CN111542802A - Method for shielding touch event and electronic equipment - Google Patents

Method for shielding touch event and electronic equipment Download PDF

Info

Publication number
CN111542802A
CN111542802A CN201880085335.4A CN201880085335A CN111542802A CN 111542802 A CN111542802 A CN 111542802A CN 201880085335 A CN201880085335 A CN 201880085335A CN 111542802 A CN111542802 A CN 111542802A
Authority
CN
China
Prior art keywords
electronic device
electronic equipment
distance sensor
inverted posture
touch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880085335.4A
Other languages
Chinese (zh)
Inventor
黄德志
童碧峰
陈浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN111542802A publication Critical patent/CN111542802A/en
Pending legal-status Critical Current

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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Abstract

The embodiment of the application provides a method for shielding a touch event and electronic equipment, relates to the technical field of electronics, and can reduce the occurrence of false touch. The specific scheme is as follows: if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields the touch event. The embodiment of the application is used for reducing the false touch.

Description

Method for shielding touch event and electronic equipment Technical Field
The embodiment of the application relates to the technical field of electronics, in particular to a method for shielding a touch event and electronic equipment.
Background
In order to provide a better display effect and facilitate user operation, the screen occupation ratio of the touch screen of mobile electronic equipment such as a mobile phone is increasing, and the area for receiving the touch operation of a user is also increasing.
The larger and larger touch screens make it easy for a user to inadvertently make a false touch. For example, when a user puts a mobile phone into a pocket, the touch screen of the mobile phone is prone to generate false touch due to contact with clothes or other objects in the pocket.
Disclosure of Invention
The embodiment of the application provides a method for shielding a touch event and electronic equipment, which can reduce the occurrence of false touch.
In order to achieve the purpose, the technical scheme of the application adopts the following technical scheme:
in a first aspect, a technical solution of the present application provides a method for shielding a touch event, including: if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields the touch event.
When the electronic equipment is determined to be in a bright screen state, the distance sensor of the electronic equipment is shielded, and the electronic equipment is in the inverted posture, the electronic equipment can be shown to be in the pocket currently, so that the touch event can be shielded, and the occurrence of mistaken touch is reduced.
In one possible implementation, if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is blocked, and the electronic device is in an inverted posture, the electronic device shields the touch event, including: whether electronic equipment is in bright screen state, whether electronic equipment's distance sensor is sheltered from to and whether electronic equipment is the handstand gesture is confirmed to electronic equipment periodicity.
That is, the electronic device may periodically determine whether the above three conditions are satisfied, thereby determining whether the electronic device is in a pocket.
In another possible implementation, if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is shielded, and the electronic device is in an inverted posture, the shielding the touch event by the electronic device includes: after the electronic device receives the first interrupt event, the second interrupt event or the third interrupt event, whether the electronic device is in a bright screen state, whether a distance sensor of the electronic device is shielded, and whether the electronic device is in an inverted posture are determined. If the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields the touch event. The first interrupt event is used for reporting that the touch screen is switched from a screen-off state to a screen-on state; the second interrupt event is used for reporting that the distance sensor is switched from being shielded to being shielded from being shielded; and the third interrupt event is used for reporting that the electronic equipment is switched from the non-inverted posture to the inverted posture.
In this scheme, the electronic device may determine whether the three conditions are satisfied after receiving any one of the first to third interrupt events.
In a possible implementation, the first interrupt event is used to report that the touch screen is switched from the off-screen state to the on-screen state (the first interrupt event may be referred to as interrupt event 1), or the first interrupt event is used to report that the touch screen is switched from the on-screen state to the off-screen state (the first interrupt event may be referred to as interrupt event 2). The second interrupt event is used to report that the distance sensor is switched from being occluded to being occluded (the first interrupt event may be referred to as interrupt event 3), or the second interrupt event is used to report that the distance sensor is switched from being occluded to being unoccluded (the first interrupt event may be referred to as interrupt event 4). The third interrupt event is used to report that the electronic device is switched from the non-inverted posture to the inverted posture (the first interrupt event may be referred to as interrupt event 5), or the third interrupt event is used to report that the electronic device is switched from the inverted posture to the non-inverted posture (the first interrupt event may be referred to as interrupt event 6).
That is, the electronic device may determine whether the above-described three conditions are satisfied after receiving any one of the interrupt events 1 to 6.
In another possible implementation, after receiving a first interrupt event, a second interrupt event, or a third interrupt event, the electronic device determines whether the electronic device is in a bright screen state, whether a distance sensor of the electronic device is blocked, and whether the electronic device is in an inverted posture, including: after the electronic equipment receives the first interrupt event, determining that the electronic equipment is in a bright screen state; the method comprises the steps that the electronic equipment starts a distance sensor and an attitude sensor, wherein the attitude sensor is used for detecting the attitude of the electronic equipment; the electronic device determines whether the distance sensor is occluded and whether the electronic device is in an inverted posture.
In the scheme, the electronic equipment can turn off the distance sensor and the attitude sensor in the screen off state and turn on the distance sensor and the attitude sensor in the screen on state, so that the power consumption of the electronic equipment can be saved.
In another possible implementation, after the electronic device turns on the distance sensor and the attitude sensor, the method further includes: if the electronic equipment receives another first interrupt event and the electronic equipment determines that the screen is in the screen-off state according to the other first interrupt event, the electronic equipment closes the distance sensor and the attitude sensor.
That is, before the electronic device is switched from the bright screen state to the off screen state, the electronic device satisfies the condition of the bright screen state, and the electronic device can cyclically determine whether other two conditions are satisfied through the distance sensor and the attitude sensor, so that whether the touch event is shielded or the electronic device is normally operated is cyclically determined.
In another possible implementation, after the electronic device masks the touch event, the method further includes: if the electronic equipment is in a bright screen state, the distance sensor is shielded, the electronic equipment is converted from the inverted posture into the non-inverted posture, and the duration time of the electronic equipment in the non-inverted posture is less than or equal to a first preset value, the electronic equipment keeps shielding the touch event.
Therefore, after the electronic equipment shields the touch event, under the condition that the electronic equipment is in a bright screen state and the distance sensor is shielded, if the electronic equipment has an inverted posture and is switched to a non-inverted posture temporarily, and then returns to the inverted posture quickly, the electronic equipment does not cancel the shielding of the touch event when the electronic equipment is switched to the non-inverted posture temporarily, so that frequent shielding and cancellation of the shielding of the touch event can be avoided, and the power consumption of the mobile phone is saved.
In another possible implementation, the electronic device determining whether the inverted posture is the inverted posture includes: if the duration of the electronic equipment in the inverted posture is greater than a second preset value within a preset duration before the current moment, determining the electronic equipment in the inverted posture; or, in a preset time period before the current time, if the time period of the electronic equipment in the non-inverted posture is less than or equal to a third preset value, the electronic equipment is determined to be in the inverted posture.
In this way, after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is shielded, and the electronic device is temporarily switched to an inverted state; however, within a preset time period before the current time, if the time period of the electronic device in the inverted posture is greater than the second preset value, or the time period of the electronic device in the non-inverted posture is less than the third preset value, that is, the electronic device is in the inverted posture in most of the third preset time period before the current time, the electronic device can keep shielding the touch event without immediately canceling the touch shielding event, so that frequent shielding and cancellation of shielding of the touch event can be avoided, and the power consumption of the mobile phone is reduced.
In another possible implementation, if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is shielded, and the electronic device is in an inverted posture, the shielding the touch event by the electronic device includes: if the electronic equipment is determined to be in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and the electronic equipment is in a vertical screen display state, the electronic equipment shields the touch event.
Thus, in some scenes, such as a scene in which a user lies on his side and plays a game with a mobile phone in a landscape screen or looks at a video in a landscape screen, the user's hand may block the distance sensor, the electronic device is in a bright screen state, and the electronic device is in an inverted posture, but the electronic device is not in a portrait screen display state but in a landscape screen display state, so that the electronic device does not shield a touch event but keeps working normally, so that the user can play a game or look at a video normally.
In a second aspect, the present application provides an apparatus for shielding a touch event, where the apparatus is included in an electronic device, and the apparatus has a function of implementing a behavior of the electronic device in any one of the above-mentioned first aspect and possible implementation manners of the first aspect. The functions may be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-described functions. Such as an input module or unit, a display module or unit, a processing module or unit, etc.
In a third aspect, embodiments of the present application provide an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of masking touch events of any of the possible implementations of the first aspect described above.
In a fourth aspect, an embodiment of the present application provides a computer storage medium, which includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device is caused to perform the method for shielding a touch event in any one of the possible implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product, which when run on a computer, causes the electronic device to perform the method for shielding touch events in any one of the possible implementations of the first aspect.
Drawings
Fig. 1 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for masking a touch event according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a handheld electronic device according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another handheld electronic device provided by an embodiment of the present application;
fig. 6 is a schematic diagram of an inverted posture provided in the embodiment of the present application;
FIG. 7 is a flowchart of another method for masking a touch event according to an embodiment of the present application;
FIG. 8 is a flow chart of another method for masking a touch event according to an embodiment of the present application;
FIG. 9 is a flowchart of another method for masking a touch event according to an embodiment of the present application;
FIG. 10 is a flow chart of another method for masking a touch event according to an embodiment of the present application;
FIG. 11 is a flowchart of another method for masking a touch event according to an embodiment of the present application;
fig. 12 is a diagram illustrating a correspondence relationship between a posture of an electronic device and time according to an embodiment of the present application;
FIG. 13 is a schematic cross-sectional view of a display provided in accordance with an embodiment of the present application;
fig. 14 is a schematic illustration of a vertical screen display provided in an embodiment of the present application;
FIG. 15 is a schematic view of a game scenario provided in an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
When a user puts an electronic device such as a mobile phone into a pocket, the touch screen of the electronic device is easy to generate false touch due to the fact that the touch screen of the electronic device touches clothes or other objects in the pocket. The technical scheme provided by the embodiment of the application can reduce the occurrence of false touch by shielding the touch event when the electronic equipment is determined to be positioned in the pocket.
Particularly, when a user puts an electronic device such as a mobile phone into a pocket, if the electronic device such as the mobile phone is in a bright screen state, the mobile phone is more likely to generate a false touch. For example, a mobile phone in a bright screen state may turn on a camera or a flashlight application due to the fact that clothes or other objects in a pocket contact shortcut keys such as a camera and a flashlight on a touch screen, so that a false touch is generated; for another example, the mobile phone in the bright screen state may have a fingerprint or pattern drawing error due to the fact that the fingerprint or pattern drawing area on the touch screen is touched by clothes or other objects in the pocket, so that the mobile phone is locked; for another example, in a mobile phone in a bright screen state, a track of the touch screen touched by clothing or other objects in the pocket is the same as a preset track (e.g., a track of "C"), so that an application (e.g., a phone call application) corresponding to the preset track is opened, and a false touch may be generated.
In actual life, the mobile phone in the pocket of the user is often in a bright screen state, so that the user is easy to touch by mistake. For example, the user forgets to turn off the touch screen before putting the mobile phone into the pocket, and puts the mobile phone in the bright screen state into the pocket directly. For another example, the user puts the mobile phone with the screen off into a pocket, but the mobile phone receives an incoming call, a message or the screen is turned on due to an alarm clock prompt or the user accidentally touches a power key.
The technical scheme provided by the embodiment of the application can reduce the occurrence of false touch by shielding the touch event when the electronic equipment is in a pocket under the bright screen state.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
The method for shielding a touch event provided in the embodiment of the present application may be applied to electronic devices such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the embodiment of the present application does not limit specific types of the electronic devices at all.
Fig. 1 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be, among other things, a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The I2C interface is a bi-directional synchronous serial bus that includes a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K via an I2C interface, such that the processor 110 and the touch sensor 180K communicate via an I2C bus interface to implement the touch functionality of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may communicate audio signals to the wireless communication module 160 via the I2S interface, enabling answering of calls via a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. GNSS may include Global Positioning System (GPS), global navigation satellite system (GLONASS), beidou satellite navigation system (BDS), quasi-zenith satellite system (QZSS), and/or Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., the x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 100, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there are no objects near the electronic device 100. The electronic device 100 can utilize the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear for talking, so as to automatically turn off the touch screen to achieve the purpose of saving power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen. It is understood that the proximity light sensor 180G may also function as a distance sensor 180F.
The ambient light sensor 180L is used to sense the ambient light level. Electronic device 100 may adaptively adjust the brightness of display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and so on.
The temperature sensor 180J is used to detect temperature. In some embodiments, electronic device 100 implements a temperature processing strategy using the temperature detected by temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 100 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 100 to shut down abnormally. In other embodiments, when the temperature is lower than a further threshold, the electronic device 100 performs boosting on the output voltage of the battery 142 to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signals acquired by the bone conduction sensor 180M, and the heart rate detection function is realized.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes an Android system with a layered architecture as an example, and exemplarily illustrates a software structure of the electronic device 100.
Fig. 2 is a block diagram of a software structure of the electronic device 100 according to the embodiment of the present application. The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom. The application layer may include a series of application packages.
As shown in fig. 2, the application package may include applications such as camera, gallery, calendar, phone call, map, navigation, WLAN, bluetooth, music, video, short message, etc.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 2, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 100. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
The Android Runtime comprises a core library and a virtual machine. The Android runtime is responsible for scheduling and managing an Android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. And executing java files of the application program layer and the application program framework layer into a binary file by the virtual machine. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), Media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The workflow of the software and hardware of the electronic device 100 is exemplarily described below in connection with a scene in which a camera is started to take a picture in response to an operation of touching a camera icon by a user.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
The following explains a technical solution provided by the embodiment of the present application, taking a mobile phone with a hardware structure shown in fig. 1 and a software structure shown in fig. 2 as an example of the electronic device 100.
Referring to fig. 3, an embodiment of the present application provides a method for shielding a touch event, which may include:
300. if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields the touch event.
That is, if the electronic device satisfies the shielding condition, the electronic device may shield the touch event. The shielding condition may include that the electronic device is determined to be in a bright screen state, a distance sensor of the electronic device is shielded, and the electronic device is in an inverted posture.
The electronic device is in an inverted posture, which means that the head (or top) of the electronic device faces downward. As shown in fig. 4, the head portion 401 of the electronic device refers to a side of the electronic device where an earphone 402 is located, the bottom portion 403 of the electronic device refers to a side of the electronic device where a microphone 404 is located, and the head portion 401 and the bottom portion 403 of the electronic device are located on two opposite sides of the electronic device. The electronic device further comprises a distance sensor 405, which may be located on the side of the head 401 of the electronic device or on the side of the bottom 403 of the electronic device. The touch screen 406 of the electronic device is used to display a Graphical User Interface (GUI). As shown in fig. 4, the GUI currently displayed by the electronic device includes icons of a plurality of applications, names of the plurality of applications, a weather widget, a status bar, and the like.
Generally, when a user uses an electronic device, as shown in fig. 4, the head 401 of the electronic device faces upward, and the picture direction of the icon of the application and the text direction of the name of the application are forward from the viewpoint of the user. After the user has used the electronic device, the user typically places the electronic device in the pocket with the head down, see fig. 5. And when the electronic equipment is put into the pocket, the distance sensor on the electronic equipment can be shielded by the pocket. Thus, when the distance sensor on the electronic device is shielded and the head of the electronic device is facing down, it may indicate that the electronic device is placed in a pocket. Therefore, when the electronic equipment is in a bright screen state, the distance sensor is shielded, and the head of the electronic equipment faces downwards, the electronic equipment can be indicated to be in the bright screen state in the pocket, so that a touch event can be shielded, and the occurrence of mistaken touch is reduced. If the three conditions that the electronic equipment is in a bright screen state, the distance sensor of the electronic equipment is shielded and the electronic equipment is in an inverted posture are not met, the touch event is not shielded, and the electronic equipment keeps working normally.
The distance sensor may include an optical distance sensor, an infrared distance sensor, an ultrasonic distance sensor, or the like. The process of determining that the distance sensor is occluded is described herein by taking an infrared distance sensor as an example. The infrared sensor may be the proximity optical sensor, and the infrared distance sensor may include an infrared transmitting tube and an infrared receiving tube, and when the infrared rays emitted from the transmitting tube are reflected by the object and received by the receiving tube, the distance between the object and the infrared distance sensor may be determined according to the transmitting time and the receiving time; if the distance is smaller than or equal to the preset threshold value, the fact that the infrared distance sensor is close to the certain object can be indicated, and the infrared distance sensor is shielded; if the distance is larger than the preset threshold value, the fact that the infrared distance sensor is close to the object can be indicated, and the infrared distance sensor is not shielded; when the receiving tube cannot receive the infrared rays transmitted by the transmitting tube, the fact that the infrared distance sensor is far away from the object can be shown, and the infrared distance sensor is not shielded.
Referring to fig. 6, the head of the electronic device facing downward means that an angle 603 between a ray 601 pointing to the head of the electronic device from the bottom of the electronic device and parallel to a side of the electronic device and a gravity direction 602 is smaller than or equal to a preset angle value. The preset angle value is smaller than 90 °, and the specific value may be set according to actual needs, for example, the preset angle value may be 20 °. If the included angle 603 between the ray 601 and the gravity direction 602 is greater than the preset angle value, the electronic device is not in the head-down state, and the electronic device is in the non-inverted posture. Specifically, the electronic apparatus may determine the orientation of the head of the electronic apparatus from at least one of a gravity sensor, an acceleration sensor, a gyroscope, and the like, thereby determining whether the electronic apparatus is in an inverted posture.
The step of shielding the touch event by the electronic device means that the electronic device closes the touch function of the touch screen and does not respond to the touch event of the touch screen.
In some embodiments, the electronic device masking touch events in step 300 may include: the electronic device turns off the function of detecting the touch signal, that is, the electronic device does not detect the touch signal, and thus does not generate a touch event and does not respond to the touch event.
In other embodiments, the electronic device masking touch events in step 300 may include: the electronic device interrupts response processing for a touch event corresponding to the touch signal after detecting the touch signal. For example, after the touch signal is detected by the touch screen of the electronic device, no touch event is generated, and the touch event is not reported to the upper application window, so that the touch event is not responded. For another example, after a touch signal is detected by a touch screen of the electronic device, a touch event is generated according to the touch signal, and the touch event is redirected to a preset upper application window for processing, so that the touch event is intercepted by the preset upper application window, and the original processing of the touch event is interrupted.
For example, when the electronic device is in a bright screen state, a distance sensor of the electronic device is shielded, and the electronic device is in an inverted posture, if a touch event is detected by a touch screen of the electronic device, the electronic device reports the touch event to a preset prompting application window, and the prompting application window prompts, through a sound of "droplet drop", that a user is currently in a touch shielding state, and in this state, the electronic device does not respond to the touch event; or the prompting application window prompts the user of the current shielded touch event through sound of shielded touch; alternatively, the prompt application window may prompt the user that the touch event has been masked by means of a vibration; alternatively, the prompt application window may prompt the user to "touch-masked" through a small popup displayed in a local area in an off-screen display (AOD) state.
In other embodiments, the electronic device masking touch events in step 300 may include: the electronic equipment closes the function of detecting the touch signal, and turns off or locks the screen after a first preset time; or after the electronic equipment detects the touch signal, interrupting the response processing of the touch event corresponding to the touch signal, and turning off or locking the screen after a first preset time period.
In other embodiments, the electronic device masking touch events in step 300 may include: the electronic device is turned off or locked to shield the touch screen from touch events.
In many cases, the user puts the electronic device in a bright screen state into a pocket and wants to continue using the electronic device later. For example, when a user uses a mobile phone, a bus comes, the user puts the mobile phone in a bright screen state into a pocket, draws out a bus card for swiping, and after the card swiping is completed, the user draws out the mobile phone for continuous use. In some embodiments, when the duration that the three conditions of the bright screen state, the distance sensor being blocked, and the inverted posture are simultaneously satisfied is greater than or equal to a second preset time (e.g., 5s), it may be indicated that the user may temporarily not want to use the electronic device any more, and the electronic device may shield the touch event; in the case that the duration time that these three conditions are satisfied simultaneously is less than the second preset duration, the user may still use the electronic device immediately, and thus the electronic device may not shield the touch event and maintain normal operation.
In step 300, the electronic device masks the touch event after determining that the three conditions of the bright screen state, the shielded distance sensor, and the inverted posture are satisfied. The sequence of determining whether each of the three conditions is satisfied by the electronic device is not limited in the embodiments of the present application. For example, the electronic device may first determine whether the screen is in a bright state, and then determine whether the distance sensor is shielded and whether the electronic device is in an inverted posture; for another example, the electronic device may first determine whether the distance sensor is occluded, and then determine whether the screen is bright and the inverted position. After the electronic device has masked the touch event, if the electronic device determines that the three conditions are not currently met, the electronic device may resume normal operation. Or after the electronic device masks the touch event, if the electronic device determines that the three conditions are not met currently, the electronic device cancels the masking of the touch event, so as to recover the normal operation.
For example, referring to fig. 7, the step 300 may specifically include:
701. the electronic device determines whether it is in a bright screen state.
If the screen is in the bright screen state, the electronic device performs step 702, and if the screen is not in the bright screen state, the electronic device performs step 703.
702. The electronic device determines whether a distance sensor of the electronic device is occluded.
If not, go to step 703; if so, go to step 704.
703. The electronic equipment works normally.
704. The electronic device determines whether the inverted posture is present.
If the posture is inverted, go to step 705; if not, go to step 703.
705. The electronic device masks the touch event.
In some embodiments, the distance sensor and the gesture sensor may be kept on, and the electronic device may periodically (for example, the period may be 20s) perform the steps 701-705 described above in a loop, that is, periodically detect whether the electronic device is in a bright screen state, whether the distance sensor is blocked, and whether the electronic device is in an inverted posture. The attitude sensor may be configured to detect an attitude of the electronic device, for example, an angle between the ray 601 and the gravity direction 602 may be detected, so as to detect whether the electronic device is in an inverted attitude. For example, the attitude sensor may be one or more of a gravity sensor, a gyroscope, or an acceleration sensor. Specifically, in the current detection period, if the electronic device determines in step 701 that the electronic device is not in the bright screen state (for example, the electronic device is in the off screen state (the off screen state may include the AOD state)), the electronic device performs step 703, that is, the electronic device keeps operating normally, and waits for the next detection period to arrive and then performs step 701 again. In the current detection period, if the electronic device determines that the electronic device is in the bright screen state and determines that the distance sensor is not shielded in step 704, the electronic device executes step 703 and waits for the next detection period to arrive and then executes step 701 again. In the current detection period, if the electronic device determines that the electronic device is in a bright screen state and the distance sensor is shielded, and the electronic device is not in an inverted posture, the electronic device executes step 703, and executes step 701 again after waiting for the next detection period to arrive. In the current detection period, if the electronic device determines that the electronic device is in a bright screen state and the distance sensor is shielded, and the electronic device is in an inverted posture, the electronic device executes step 705, and executes step 701 again after waiting for the next detection period. After step 705 (masking the touch event), if the electronic device executes step 703 again, step 703 is to cancel the masking of the touch event, so as to resume normal operation. After canceling the masking of the touch event, if the electronic device performs step 703 again, step 703 is to keep the electronic device operating normally.
Specifically, the memory of the electronic device may store related data, information or parameters indicating a state of the touch screen of the electronic device (e.g., a screen-on state or a screen-off state), a state of the distance sensor (e.g., shielded or not shielded), and a posture of the electronic device (e.g., an inverted posture, a non-inverted posture, or an angle at which the electronic device is currently tilted with respect to a gravity direction). When the state of a touch screen of the electronic equipment, the state of a distance sensor or the posture of the electronic equipment changes, the data, information or parameters also change correspondingly; the electronic device can determine whether the electronic device is in a bright screen state, whether the distance sensor is shielded, and whether the electronic device is in an inverted posture by querying the data, information or parameters.
In other embodiments, after the electronic device masks the touch event in step 705 above, the electronic device may periodically detect whether the electronic device is in a bright screen state, whether the distance sensor is blocked, and whether the electronic device is in an inverted posture. If the electronic device determines that the electronic device is not in the bright screen state, the distance sensor is not shielded, or the electronic device is not in the inverted posture, the electronic device cancels shielding of the touch event, and then returns to the step 701. Specifically, referring to fig. 8, after step 705, the method may include:
706. the electronic device determines whether it is in a bright screen state.
If the electronic device is in the bright screen state, the electronic device executes step 707; if not, the electronic device proceeds to step 708.
707. The electronic device determines whether the distance sensor is occluded.
If the distance sensor is blocked, the electronic device executes step 709, and if the distance sensor is not blocked, the electronic device executes step 708.
708. The electronic device unmasks the touch event.
After step 708, the electronic device may continue to perform step 701 after the next detection period.
709. The electronic device determines whether the inverted posture is present.
If the gesture is the handstand gesture, the electronic device continues to execute step 705, keeps shielding the touch event, and continues to execute step 706 after the next detection period comes; if not, the electronic device performs step 708 to unmask the touch event.
For another example, similar to the method shown in fig. 7 or 8, the electronic device may determine whether the electronic device is in an inverted posture, determine whether the distance sensor is blocked, and determine whether the electronic device is in a bright screen state.
For example, similar to the method of first determining whether the electronic device is in the bright screen state shown in fig. 7, when the electronic device first determines whether the electronic device is in the inverted posture, referring to fig. 9, the method may include:
901. the electronic device determines whether the inverted posture is present.
If the gesture is inverted, the electronic device executes step 902; if not, the electronic device performs step 903.
902. The electronic device determines whether the distance sensor is occluded.
If not, go to step 903; if so, go to step 904.
903. The electronic equipment works normally.
904. The electronic device determines whether it is in a bright screen state.
If the screen is in the bright screen state, executing step 905; if not, go to step 903.
905. The electronic device masks the touch event.
Generally, since the electronic device is in a bright screen state in many cases (for example, when the user uses the electronic device normally, the electronic device is in a bright screen state), in the method shown in fig. 7 or 8, after determining the bright screen state, the electronic device needs to continuously determine whether the distance sensor is blocked and whether the distance sensor is in an inverted posture; however, the electronic device is in an inverted posture rarely (for example, the electronic device is put into a pocket, or the user holds the electronic device and walks normally), so the electronic device usually does not determine whether the electronic device is in the inverted posture and whether the electronic device is in a bright screen state continuously in the current period after determining that the distance sensor is not blocked in step 901. Therefore, the method shown in fig. 9 can save power consumption of the electronic device compared to the method shown in fig. 7 or 8.
It can be understood that the electronic device may also determine whether the electronic device is in an inverted posture, determine whether the electronic device is in a bright screen state, and then determine whether the distance sensor is blocked, which is not described herein again.
For another example, similar to the method shown in fig. 7 or 8, the electronic device may determine whether the distance sensor is occluded, determine whether the position is inverted, and determine whether the screen is in a bright state.
For example, similar to the method of first determining whether the distance sensor is in the bright screen state shown in fig. 7, when the electronic device first determines whether the distance sensor is blocked, referring to fig. 10, the method may include:
1001. the electronic device determines whether the distance sensor is occluded.
If the distance sensor is blocked, the electronic device executes step 1002, and if the distance sensor is not blocked, the electronic device executes step 1003.
1002. The electronic device determines whether the inverted posture is present.
If the posture is not the handstand posture, executing step 1003; if the inverted posture is true, step 1004 is executed.
1003. The electronic equipment works normally.
1004. The electronic device determines whether it is in a bright screen state.
If the screen is in the bright screen state, executing step 1005; if not, go to step 1003.
1005. The electronic device masks the touch event.
Generally, the distance sensor of the electronic device is less shielded (for example, the distance sensor is shielded by the face when the electronic device is put into a pocket or a phone call is made), so the electronic device usually determines that the distance sensor is not shielded in step 1001, and thus does not continue to determine whether the electronic device is in an inverted posture and whether the electronic device is in a bright screen state in the current detection period. Therefore, the method shown in step 1001-1005 can save the power consumption of the electronic device compared to the method shown in fig. 7 or fig. 8.
It can be understood that the electronic device may also determine whether the distance sensor is shielded, determine whether the distance sensor is in a bright screen state, and determine whether the distance sensor is in an inverted posture, which is not described herein again.
In other embodiments, when the electronic device is in the screen-off state, the electronic device may turn off the distance sensor and the posture sensor for detecting whether the electronic device is in the inverted posture; in the bright screen state, the electronic device may turn on the distance sensor and the attitude sensor to determine whether the distance sensor is obscured and whether the electronic device is in an inverted attitude, thereby periodically performing a method similar to that shown in any of fig. 7-10. The difference is that the electronic equipment can also turn on or off the distance sensor and the attitude sensor in the process of executing the method, so that the distance sensor and the attitude sensor are not in a normally open state, and the power consumption of the electronic equipment can be saved. Specifically, taking the method shown in fig. 7 executed by the electronic device as an example, in the current detection period, if the electronic device determines in step 701 that the electronic device is not in the bright screen state (for example, the electronic device is in the screen-off state or the AOD state), step 703 is executed, the electronic device keeps normal operation, and step 701 is executed again after waiting for the next detection period; in the current detection period, if the electronic device determines that the electronic device is in a bright screen state, the distance sensor may be turned on and step 702 is executed to determine whether the distance sensor is shielded; if the distance sensor is determined not to be shielded, executing step 703, closing the distance sensor, and executing step 701 again after waiting for the next detection period; if the distance sensor is determined to be shielded, the attitude sensor is turned on and step 704 is executed to determine whether the distance sensor is in an inverted attitude according to the attitude sensor; if the gesture is inverted, step 705 is executed, the touch event is shielded, the gesture sensor and the distance sensor are closed, and step 701 is executed again after the next detection period comes; if the gesture is not inverted, step 703 is executed to keep working normally, the gesture sensor is turned off, and step 701 is executed again after the next detection period comes.
In other embodiments, instead of periodically determining whether the three conditions are a bright screen state, whether the distance sensor is occluded, and whether the device is in an inverted position, the electronic device determines whether the three conditions are met upon receiving an interrupt event. The interrupt event may include a first interrupt event, a second interrupt event, or a third interrupt event corresponding to the three conditions, respectively. The first interrupt event is used for reporting that the bright screen state of the touch screen changes; the second interrupt event is used for reporting whether the distance sensor is shielded or not; and the third interrupt event is used for reporting the posture change of the electronic equipment.
For example, the first interrupt event may be an interrupt event of powering on the touch screen or powering off the touch screen, which is reported by a power management module of the touch screen, and if the touch screen is powered on, the electronic device is switched to a bright screen state; if the touch screen is powered off, the electronic equipment is switched to a screen-off state. The second interruption event can be an interruption event reported when the distance sensor is switched from non-shielded state to shielded state; from the second interrupt event, the electronic device can determine that the distance sensor is occluded. Or the second interrupt event may be an interrupt event reported when the distance sensor is changed from being shielded to being not shielded; from the second interrupt event, the electronic device can determine that the distance sensor is not occluded. The third interrupt event can be an interrupt event reported when the attitude sensor detects that the electronic equipment is changed from the inverted attitude to the non-inverted attitude; from the third interrupt event, the electronic device may determine a non-inverted posture. Or the third interrupt event may be an interrupt event reported when the posture sensor detects that the electronic device is changed from the non-inverted posture to the inverted posture; from the third interrupt event, the electronic device may determine an inverted posture.
In one scheme, the distance sensor and the gesture sensor are kept on, and the electronic device determines whether the three conditions in the shielding conditions are met simultaneously after detecting any interrupt event of the first interrupt event, the second interrupt event or the third interrupt event, so as to determine whether to shield the touch event.
In some embodiments, the first interrupt event includes interrupt event 1 or interrupt event 2. The interrupt event 1 is used for reporting that the touch screen is switched from the screen-off state to the screen-on state, for example, an interrupt event of powering on the touch screen. The electronic device may determine that the screen is currently in the bright state based on interrupt event 1. The interrupt event 2 is used for reporting that the touch screen is switched from a bright screen state to an off screen state, for example, an interrupt event of powering down the touch screen. The electronic device may determine that the screen-off state is currently in accordance with the interrupt event 2. The second interrupt event includes interrupt event 3 or interrupt event 4. The interrupt event 3 is used to report that the distance sensor is switched from being occluded to being occluded. The electronic device may determine from interrupt event 3 that the distance sensor is occluded. The interrupt event 4 is used to report that the distance sensor is switched from being occluded to not being occluded. The electronic device may determine from the interrupt event 4 that the distance sensor is not occluded. The third interrupt event includes interrupt event 5 or interrupt event 6. The interrupt event 5 is used for reporting that the electronic equipment is switched from the non-inverted posture to the inverted posture, and the electronic equipment can determine that the electronic equipment is the inverted posture currently according to the interrupt event 5. The interrupt event 6 is used for reporting that the electronic equipment is switched from the inverted posture to the non-inverted posture. The electronic device may determine from the interrupt event 6 that the non-inverted state is present. The electronic device determines whether the above-mentioned three conditions of the masking conditions are simultaneously satisfied after receiving any of the interrupt events 1 to 6, thereby determining whether to mask the touch event.
In some embodiments, the electronic device may determine whether to mask the touch event by determining whether the above three of the masking conditions are simultaneously satisfied after receiving any of interrupt event 1, interrupt event 3, or interrupt event 5.
Specifically, the electronic device may store a first identifier, a second identifier, and a third identifier. The first identifier is used for identifying whether the electronic equipment is in a bright screen state currently or not, and the electronic equipment can update the first identifier according to the received first interrupt event, so that the first identifier can identify whether the electronic equipment is in the bright screen state or the screen off state currently in real time. For example, if the electronic device detects an interrupt event 1, the first flag is set to a first state to represent a bright screen state; if the electronic device detects the interrupt event 2, the first flag is set to the second state to indicate the screen-off state. The second identifier is used for identifying whether the distance sensor is shielded or not, and the electronic device can update the first identifier according to the detected second interrupt event, so that the first identifier can identify whether the distance sensor is shielded currently or not in real time. For example, if the electronic device detects interrupt event 3, then the second flag is set to the first state to indicate that the distance sensor is occluded; if the electronic device detects the interrupt event 4, the second flag is set to a second state to indicate that the distance sensor is not blocked. The third identifier is used for identifying whether the electronic device is in an inverted posture or not, and the electronic device can update the third identifier according to the detected third interrupt event, so that the third identifier can identify whether the electronic device is in the inverted posture or in a non-inverted posture currently in real time. For example, if the electronic device detects an interrupt event 5, then the third flag is set to the first state to represent an inverted posture; if the electronic device detects the interrupt event 6, the third flag is set to the second state to represent a non-inverted posture.
In one case, after the electronic device is powered on, the first identifier, the second identifier and the third identifier are in a preset state. For example, the first flag preset state is a first state for representing as a bright screen state, the second flag preset state is a second state for representing that the distance sensor is not occluded, and the third flag preset state is a second state for representing as a non-inverted posture. And after receiving the first interrupt event, the second interrupt event or the third interrupt event, the electronic equipment updates the first identifier, the second identifier or the third identifier.
In another case, after the electronic device is powered on, the electronic device initializes the first identifier, the second identifier, and the third identifier. Specifically, after the electronic device is started, the electronic device can detect whether the current electronic device is in a bright screen state or not, and initialize the first identifier according to a detection result; the electronic equipment can detect whether the distance sensor is shielded or not and initialize a second identifier according to the detection result; the electronic equipment can also detect whether the gesture is inverted or not and initialize the third identification according to the detection result.
For example, in such an approach, if the electronic device receives a first interrupt event, the electronic device may determine whether to screen the touch event according to the first interrupt event, and determine whether the distance sensor is blocked and whether the electronic device is in an inverted posture. Specifically, if the electronic device determines that the screen is in the bright screen state according to the first interrupt event, the first identifier is updated so that the first identifier represents the bright screen state; and then, the electronic equipment reads the stored second identification and the stored third identification so as to determine whether the distance sensor is shielded according to the second identification and determine whether the electronic equipment is in an inverted posture according to the third identification.
For example, referring to fig. 7, the electronic device may determine whether the touch event is in a bright screen state in step 701 according to the first interrupt event, then execute step 702 and step 705 to determine whether the distance sensor is blocked, and then determine whether the touch event is in an inverted posture, thereby determining whether to block the touch event. For another example, referring to fig. 8, the electronic device may determine whether the touch event is in a bright screen state in step 701 or step 706 according to the first interrupt event, and then perform other steps to determine whether the distance sensor is blocked, and then determine whether the distance sensor is in an inverted posture, so as to determine whether to block the touch event or to cancel the blocking of the touch event.
For another example, in such an approach, if the electronic device receives a second interrupt event, the electronic device may determine whether the distance sensor is blocked according to the second interrupt event, and determine whether the distance sensor is in a bright screen state and whether the electronic device is in an inverted posture, so as to determine whether to block the touch event. Specifically, if the electronic device determines that the distance sensor is blocked according to the second interrupt event, the electronic device may update the second identifier so that the second identifier indicates that the distance sensor is blocked. And then, the electronic equipment reads the stored first identification and the third identification so as to determine whether the electronic equipment is in a bright screen state according to the first identification and determine whether the electronic equipment is in an inverted posture according to the third identification.
For example, referring to fig. 9, the electronic device may determine whether the distance sensor is blocked in step 901 according to the second interrupt event, then execute step 902-. It is understood that after the electronic device determines whether the distance sensor is shielded according to the second interrupt event, it may determine whether the distance sensor is in a bright screen state and then determine whether the distance sensor is in an inverted posture.
Similarly, if the electronic device receives a third interrupt event, the electronic device may determine whether the gesture is an inverted gesture according to the third interrupt event, update the third identifier, and determine whether the gesture is a bright screen state and whether the distance sensor is blocked according to the first identifier and the second identifier, so as to determine whether to block the touch event, which is not described herein again.
The above-described flow of fig. 7-10 may be performed upon receipt of any one of interrupt events 1-6, or upon receipt of any one of interrupt events 1,3, 5.
In another scheme, when the electronic device receives a first interrupt event and determines that the electronic device is in a bright screen state according to the first interrupt event, the electronic device may turn on the distance sensor and the attitude sensor, and then cyclically determine whether the distance sensor is blocked and whether the electronic device is in an inverted attitude. If the distance sensor is shielded and in an inverted posture, the electronic equipment shields the touch event; if the distance sensor is not shielded or is not in an inverted posture, the electronic device works normally or shielding touch events are cancelled. When the electronic equipment receives another first interrupt event and determines that the electronic equipment is not in a bright screen state according to the first interrupt event, the electronic equipment finishes whether the circulating distance sensor is shielded or not and whether the electronic equipment is in an inverted posture or not, the electronic equipment works normally, and the electronic equipment closes the distance sensor and the posture sensor so as to save the power consumption of the electronic equipment. In the process that the electronic equipment circularly determines whether the distance sensor is shielded and whether the electronic equipment is in the inverted posture, if the electronic equipment receives a second interrupt event, the electronic equipment can determine whether the distance sensor is shielded according to the second interrupt event and then determine whether the distance sensor is in the inverted posture; if the electronic equipment receives the third interrupt event, the electronic equipment determines whether the electronic equipment is in the inverted posture according to the third interrupt event, and then determines whether the distance sensor is shielded. It can be understood that, in the process of cyclically determining whether the distance sensor is shielded and the electronic device is in the inverted posture by the electronic device, whether the distance sensor is shielded and the inverted state are determined according to the triggering of the second interrupt event or the third interrupt event. For example, when an interrupt event 3 is received, the distance sensor is determined to be shielded, and the third identifier is read to judge whether the terminal is in an inverted state; or when an interrupt event 5 is received, the interrupt is determined to be in an inverted state, and the second identifier is read to judge whether the distance sensor is shielded.
In some embodiments, the first interrupt event comprises interrupt event 1 or interrupt event 2, the second interrupt event comprises interrupt event 3 or interrupt event 4, and the third interrupt event comprises interrupt event 5 or interrupt event 6.
In other embodiments, the first interrupt event is interrupt event 1, the second interrupt event is interrupt event 3, and the third interrupt event is interrupt event 5.
Specifically, the electronic device stores the first identifier, the second identifier, and the third identifier. Referring to fig. 11, if the electronic device determines that the screen is in a bright state according to the first interrupt event in step 1101, step 1102 is performed to turn on the distance sensor and the posture sensor. And the electronic equipment updates the first identifier according to the first interrupt event. Then, the electronic device circularly executes step 1103-1108 until the electronic device receives another first interrupt event (in step 1109), and determines that the electronic device is in the screen-off state according to the first interrupt event, the electronic device executes step 1110, closes the distance sensor and the attitude sensor, and the electronic device normally operates. After the step 1102, if the electronic device receives the second interrupt event, the processes shown in the steps 1103 and 1106 may be executed. And the electronic equipment determines whether to update the second identifier according to the second interrupt event and the saved second identifier. Specifically, if it is determined in step 1103 that the distance sensor is not shielded, the electronic device executes step 1105 and keeps working normally; if it is determined in step 1103 that the distance sensor is blocked, the electronic device performs step 1104 to determine whether the position is inverted. In step 1104, the electronic device can read the saved third identifier and determine whether the electronic device is in an inverted posture according to the third identifier. If the electronic device determines that the electronic device is not in the inverted posture in the step 1104, the electronic device executes the step 1105 and keeps working normally; if the inverted gesture is determined in step 1104, the electronic device performs step 1106 to mask touch events. Alternatively, after step 1102, if the electronic device receives the third interrupt event, the processes shown in step 1107, step 1108, step 1105 and step 1106 may be executed, which are not described herein again.
In other embodiments, taking fig. 7 as an example, after step 705, the method may further include: if the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, the electronic equipment is converted from an inverted posture into a non-inverted posture, and the duration time of the non-inverted posture of the electronic equipment is less than or equal to a first preset value, the electronic equipment keeps shielding a touch event; if the electronic equipment is in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is converted from the inverted posture into the non-inverted posture, and the duration time of the electronic equipment in the non-inverted posture is longer than a first preset value, the electronic equipment cancels shielding of the touch event. The first preset value is small, and may be specifically set according to actual needs, for example, 2 s. In one specific implementation, after steps 701-705, when the electronic device determines that the electronic device is switched from the inverted posture to the non-inverted posture according to the interrupt event of the posture sensor, the electronic device may start a timer to count the duration of the non-inverted posture, so as to determine the magnitude relationship between the duration of the non-inverted posture and the first preset value, and further determine whether to keep shielding or cancel shielding the touch event.
That is to say, after the electronic device shields the touch event, under the condition that the electronic device is in a bright screen state and the distance sensor is shielded, if the electronic device has an inverted posture and is temporarily switched to a non-inverted posture and then quickly returns to the inverted posture, the electronic device does not cancel the shielding of the touch event when the electronic device is temporarily switched to the non-inverted posture, so that frequent shielding and cancellation of the shielding of the touch event can be avoided, and the power consumption of the mobile phone is saved.
For example, if the mobile phone is in the wrist bag on the arm of the user, the posture of the mobile phone in the wrist bag changes in real time along with the swinging of the arm during the walking or running process of the user. However, in the process of swinging the arm of the user, the mobile phone is usually in an inverted posture and is in a non-inverted state only at a moment, that is, the mobile phone only continues to return to the inverted posture after a short time (the time is less than a first preset value) after being switched from the inverted posture to the non-inverted posture. Therefore, when the user walks or runs, the electronic equipment can shield the touch event when the mobile phone is in a bright screen state, the distance sensor of the mobile phone is shielded, and the mobile phone is in an inverted posture; under the condition that the mobile phone is in a bright screen state, the distance sensor of the mobile phone is shielded, and the mobile phone is in an inverted posture for a short time (namely the duration of the non-inverted posture of the mobile phone is less than a first preset value), the mobile phone can keep shielding the touch event, so that the situation that the touch event is frequently shielded and canceled to shield in the motion process of walking, running and the like of a user can be avoided, and the power consumption of the mobile phone is reduced.
It should be noted that after the electronic device masks a touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is blocked, and the electronic device is converted from the inverted posture to the non-inverted posture, the electronic device determines to keep or cancel the masking of the touch event according to the duration of the non-inverted posture, and the scheme is not only applicable to the embodiment corresponding to fig. 7, but also applicable to other embodiments, for example, the embodiments corresponding to any one of fig. 8 to 11, and details are not repeated here.
In other embodiments, step 704 may be replaced with: the electronic equipment determines whether the duration of the electronic equipment in the inverted posture is greater than a second preset value within a third preset duration before the current moment. If yes, go to step 705; if not, go to step 703. Alternatively, the above step 704 may be replaced by: the electronic equipment determines that the duration of the electronic equipment in the non-inverted posture is less than or equal to a third preset value within a third preset duration before the current moment. If yes, go to step 705; if not, go to step 703. The second preset value can be larger, the third preset value can be smaller, and the third preset value is smaller than the second preset value. Namely, if the electronic equipment is in a bright screen state; a distance sensor of the electronic device is shielded; and in a third preset time before the current moment, if the time length of the electronic equipment in the inverted posture is greater than the second preset value or the time length of the electronic equipment in the non-inverted posture is less than the third preset value, the electronic equipment shields the touch event or keeps shielding the touch event.
In a specific implementation, the electronic device may store whether the posture of the electronic device is an inverted posture or a non-inverted posture in real time through the memory, and after the electronic device receives an interrupt event of the posture sensor, the electronic device may query the posture of the electronic device within a third preset time before the current time from the memory, so as to count the time length that the electronic device is in the inverted posture or the time length that the electronic device is in the non-inverted posture within the third preset time, and further determine a size relationship between the time length that the electronic device is in the inverted posture and a second preset value, or determine a size relationship between the time length that the electronic device is in the non-inverted posture and a third preset value, thereby determining whether to keep shielding or cancel shielding of the touch event. For example, the third preset time period may be 30s, the second preset value may be 25s, and the third preset value may be 5 s.
That is, after the electronic device shields the touch event, if the electronic device is in a bright screen state, the distance sensor of the electronic device is shielded, and the electronic device is temporarily switched to an inverted state; however, within a third preset time before the current time, if the time length of the electronic device in the inverted posture is greater than the second preset value, or the time length of the electronic device in the non-inverted posture is less than the third preset value, that is, the electronic device is in the inverted posture in most of the third preset time before the current time, the electronic device can keep shielding the touch event without immediately canceling the touch shielding event, so that frequent shielding and cancellation of shielding of the touch event can be avoided, and the power consumption of the mobile phone is reduced.
Illustratively, the phone is in the user's pocket, and when the user goes up stairs, the phone is shaken in the pocket, and the posture of the phone is dynamically changed, but most of the time the phone is still in an inverted posture. When the mobile phone is in a bright screen state, the distance sensor of the mobile phone is shielded, and most of the time of the mobile phone within a third preset time before the current time is in an inverted posture, the mobile phone shields the touch event or keeps shielding the touch event. Referring to fig. 12, in a time period t1, the mobile phone is in an inverted posture, and a touch event is shielded; during the time period t2, the electronic device is in a non-inverted posture, and the mobile phone is in an inverted posture for most of the time within the time period t2 according to the third preset time period before, so that the mobile phone continues to shield the touch event at the current moment without canceling the shielding of the touch event. Therefore, the touch event can be prevented from being frequently shielded and canceled in the process of climbing stairs of a user, and the power consumption of the mobile phone is saved.
In other embodiments, the step 300 may specifically include: when the electronic equipment is in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and the electronic equipment is in a vertical screen display state, the electronic equipment shields touch events. The specific processing procedure is similar to the method flows shown in fig. 7 to fig. 11, except that in this embodiment, the shielding condition is added with a condition that "the electronic device is in a vertical screen display state" on the basis of the three conditions. Similar to the method flows shown in fig. 7-10, the electronic device may periodically detect whether the electronic device satisfies a bright screen state, a distance sensor of the electronic device is blocked, the electronic device is in an inverted posture, and the electronic device is in a vertical screen display state, and shield a touch event when the four conditions are satisfied; if any one of the four conditions is not met and the electronic equipment does not shield the touch event currently, the electronic equipment keeps working normally; if any one of the four conditions is not met and the electronic equipment currently shields the touch event, the electronic equipment cancels shielding of the touch event and restores normal operation. The electronic device may further determine whether the four conditions are met after receiving the interrupt event corresponding to any of the four conditions, so as to determine whether to mask the touch event, which is not described herein.
The horizontal screen display is usually displayed in a full screen state, and a schematic diagram of the horizontal screen display can be seen in fig. 13; the vertical screen display may be in a full screen state or a non-full screen state, and a schematic diagram of the vertical screen display may be shown in fig. 14.
In the scheme, if the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and when the electronic equipment is in a vertical screen display state, the electronic equipment shields a touch event; if the electronic equipment is in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and the electronic equipment is in a horizontal screen display state, the electronic equipment does not shield a touch event, and the electronic equipment works normally. Thus, in the scene shown in fig. 15, in which the user lies on his side and plays a game with the mobile phone in the landscape screen or looks at a video in the landscape screen, the hand of the user may block the distance sensor, the electronic device is in the bright screen state, and the electronic device is in the inverted posture, but the electronic device is not in the portrait screen display state but in the landscape screen display state, so that the electronic device does not shield a touch event but keeps working normally, so that the user can play a game or look at a video normally.
It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The present application is capable of being implemented in hardware or a combination of hardware and computer software in conjunction with the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In this embodiment, the electronic device may be divided into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each functional module by corresponding functions, fig. 16 shows a possible composition diagram of the electronic device 1600 involved in the above embodiment, as shown in fig. 16, the electronic device 1600 may include: a masking unit 1601, a determining unit 1602, and a processing unit 1603.
In some embodiments, masking unit 1601 may be used to enable electronic device 1600 to perform steps 300, 705, 905, 1005, 1106, etc., described above, and/or other processes for the techniques described herein.
Determination unit 1602 may be configured to enable electronic device 1600 to perform step 701, step 702, step 704, step 706, step 707, step 709, step 901, step 902, step 904, step 1001, step 1002, step 1004, step 1101, step 1103, step 1104, step 1107, step 1108, step 1109, etc., described above, and/or other processes for the techniques described herein.
Processing unit 1603 may be used to support electronic device 1600 in performing above-described step 703, step 708, step 903, step 1003, step 1102, step 1105, step 1110, etc., and/or other processes for the techniques described herein.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The electronic device 1600 provided by the embodiment is used for executing the method for shielding the touch event, so that the same effect as the implementation method can be achieved.
Where an integrated unit is employed, electronic device 1600 may include a processing module, a memory module, and a communication module. The processing module may be configured to control and manage the operation of the electronic device 1600, and for example, may be configured to support the electronic device 1600 to execute the steps executed by the shielding unit 1601, the determining unit 1602, and the processing unit 1603. The memory module may be used to support the electronic device 1600 in storing the first identifier, the second identifier, the third identifier, etc., as well as program code and data, etc. A communication module may be used to support communication of the electronic device 1600 with other devices.
The processing module may be a processor or a controller. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
In an embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be an electronic device having the structure shown in fig. 1 and fig. 2.
Embodiments of the present application further provide a computer storage medium, where computer instructions are stored, and when the computer instructions are run on an electronic device, the electronic device is caused to execute the above related method steps to implement the method for masking a touch event in the above embodiments.
Embodiments of the present application further provide a computer program product, which when run on a computer, causes the computer to execute the above related steps to implement the method for shielding touch events performed by the electronic device in the above embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the apparatus runs, the processor may execute the computer execution instructions stored in the memory, so as to enable the chip to execute the method for shielding touch events, which is executed by the electronic device in the above-mentioned method embodiments.
The electronic device, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" or "in response to a determination of …" or "in response to a detection of …". Similarly, depending on the context, the phrase "at the time of determination …" or "if (a stated condition or event) is detected" may be interpreted to mean "if the determination …" or "in response to the determination …" or "upon detection (a stated condition or event)" or "in response to detection (a stated condition or event)".
Through the description of the above embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the above functional modules is used as an example, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

  1. A method of masking touch events, comprising:
    if the electronic equipment is determined to be in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, the electronic equipment shields a touch event.
  2. The method of claim 1, wherein if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, then the electronic device masks the touch event, comprising:
    the electronic equipment periodically determines whether the electronic equipment is in a bright screen state, whether a distance sensor of the electronic equipment is shielded, and whether the electronic equipment is in an inverted posture.
  3. The method of claim 1, wherein if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, then the electronic device masks the touch event, comprising:
    after receiving a first interrupt event, a second interrupt event or a third interrupt event, the electronic equipment determines whether the electronic equipment is in a bright screen state, whether a distance sensor of the electronic equipment is shielded, and whether the electronic equipment is in an inverted posture;
    if the electronic equipment determines that the electronic equipment is in a bright screen state, a distance sensor of the electronic equipment is shielded, and the electronic equipment is in an inverted posture, shielding a touch event by the electronic equipment;
    the first interrupt event is used for reporting that the touch screen is switched from a screen-off state to a screen-on state; the second interruption event is used for reporting that the distance sensor is switched from being shielded to being shielded from being shielded; and the third interrupt event is used for reporting that the electronic equipment is switched from the non-inverted posture to the inverted posture.
  4. The method of claim 3, wherein the electronic device determining whether the electronic device is in a bright screen state, whether a distance sensor of the electronic device is obscured, and whether the electronic device is in an inverted posture after receiving the first interrupt event, the second interrupt event, or the third interrupt event comprises:
    after the electronic equipment receives the first interrupt event, determining that the electronic equipment is in a bright screen state;
    the electronic equipment starts a distance sensor and an attitude sensor, and the attitude sensor is used for detecting the attitude of the electronic equipment;
    the electronic device determines whether the distance sensor is occluded and whether the electronic device is in an inverted posture.
  5. The method of claim 4, wherein after the electronic device turns on a distance sensor and a gesture sensor, the method further comprises:
    if the electronic equipment receives another first interrupt event and the electronic equipment determines that the electronic equipment is in a screen extinguishing state according to the other first interrupt event, the electronic equipment closes the distance sensor and the attitude sensor.
  6. The method of any of claims 1-5, wherein after the electronic device masks a touch event, the method further comprises:
    if the electronic equipment is in a bright screen state, the distance sensor is shielded, the electronic equipment is converted from the inverted posture into the non-inverted posture, and the duration time of the non-inverted posture of the electronic equipment is less than or equal to a first preset value, the electronic equipment keeps shielding the touch event.
  7. The method of any of claims 1-5, wherein the electronic device determining whether the inverted posture is an inverted posture comprises:
    within a preset time length before the current time, if the time length of the electronic equipment in the inverted posture is larger than a second preset value, determining the electronic equipment in the inverted posture;
    or, within a preset time period before the current time, if the time period of the electronic equipment in the non-inverted posture is less than or equal to a third preset value, determining that the electronic equipment is in the inverted posture.
  8. The method of any one of claims 1-7, wherein the electronic device masks a touch event if the electronic device determines that the electronic device is in a bright screen state, a distance sensor of the electronic device is occluded, and the electronic device is in an inverted posture, comprising:
    if the electronic equipment is determined to be in a bright screen state, the distance sensor of the electronic equipment is shielded, the electronic equipment is in an inverted posture, and the electronic equipment is in a vertical screen display state, the electronic equipment shields touch events.
  9. An electronic device comprising a touch screen, memory, one or more processors, and one or more programs; wherein the one or more programs are stored in the memory; wherein the one or more processors, when executing the one or more programs, cause the electronic device to implement the method of masking touch events of any of claims 1-8.
  10. A computer program product comprising instructions for causing an electronic device to carry out the method of masking touch events according to any one of claims 1 to 8 when the computer program product is run on the electronic device.
  11. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to implement the method of masking touch events of any of claims 1-8.
CN201880085335.4A 2018-09-21 2018-09-21 Method for shielding touch event and electronic equipment Pending CN111542802A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/107128 WO2020056778A1 (en) 2018-09-21 2018-09-21 Method for shielding touch event, and electronic device

Publications (1)

Publication Number Publication Date
CN111542802A true CN111542802A (en) 2020-08-14

Family

ID=69888063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880085335.4A Pending CN111542802A (en) 2018-09-21 2018-09-21 Method for shielding touch event and electronic equipment

Country Status (2)

Country Link
CN (1) CN111542802A (en)
WO (1) WO2020056778A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114578942A (en) * 2022-02-11 2022-06-03 珠海格力电器股份有限公司 Mobile display device control method and device, electronic device and medium
CN115016629A (en) * 2021-11-19 2022-09-06 荣耀终端有限公司 Method and device for preventing false touch
CN115268749A (en) * 2022-07-20 2022-11-01 广州视享科技有限公司 Control method of augmented reality equipment, mobile terminal and anti-blocking system
CN116521018A (en) * 2023-07-04 2023-08-01 荣耀终端有限公司 False touch prompting method, terminal equipment and storage medium
WO2024055848A1 (en) * 2022-09-14 2024-03-21 华为技术有限公司 Device operation control method, electronic device, and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116204075A (en) * 2021-12-01 2023-06-02 荣耀终端有限公司 Method and device for preventing false touch

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902854A (en) * 2014-03-18 2014-07-02 深圳创维数字技术股份有限公司 Method and terminal for preventing misoperation
WO2014127642A1 (en) * 2013-02-25 2014-08-28 深圳市汇顶科技股份有限公司 Touch operation response method and system, and touchscreen terminal
CN105245717A (en) * 2015-10-27 2016-01-13 努比亚技术有限公司 Mobile terminal palm rejection device and method
CN105573632A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Terminal control method and device thereof
CN106200878A (en) * 2016-07-19 2016-12-07 深圳市万普拉斯科技有限公司 Fingerprint control method, device and mobile terminal
CN106383574A (en) * 2016-09-05 2017-02-08 广东欧珀移动通信有限公司 Screen unlocking method and device and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014127642A1 (en) * 2013-02-25 2014-08-28 深圳市汇顶科技股份有限公司 Touch operation response method and system, and touchscreen terminal
CN103902854A (en) * 2014-03-18 2014-07-02 深圳创维数字技术股份有限公司 Method and terminal for preventing misoperation
CN105245717A (en) * 2015-10-27 2016-01-13 努比亚技术有限公司 Mobile terminal palm rejection device and method
CN105573632A (en) * 2015-12-14 2016-05-11 魅族科技(中国)有限公司 Terminal control method and device thereof
CN106200878A (en) * 2016-07-19 2016-12-07 深圳市万普拉斯科技有限公司 Fingerprint control method, device and mobile terminal
CN106383574A (en) * 2016-09-05 2017-02-08 广东欧珀移动通信有限公司 Screen unlocking method and device and mobile terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115016629A (en) * 2021-11-19 2022-09-06 荣耀终端有限公司 Method and device for preventing false touch
CN114578942A (en) * 2022-02-11 2022-06-03 珠海格力电器股份有限公司 Mobile display device control method and device, electronic device and medium
CN115268749A (en) * 2022-07-20 2022-11-01 广州视享科技有限公司 Control method of augmented reality equipment, mobile terminal and anti-blocking system
CN115268749B (en) * 2022-07-20 2024-04-09 广州视享科技有限公司 Control method of augmented reality equipment, mobile terminal and shielding prevention system
WO2024055848A1 (en) * 2022-09-14 2024-03-21 华为技术有限公司 Device operation control method, electronic device, and storage medium
CN116521018A (en) * 2023-07-04 2023-08-01 荣耀终端有限公司 False touch prompting method, terminal equipment and storage medium
CN116521018B (en) * 2023-07-04 2023-10-20 荣耀终端有限公司 False touch prompting method, terminal equipment and storage medium

Also Published As

Publication number Publication date
WO2020056778A1 (en) 2020-03-26

Similar Documents

Publication Publication Date Title
CN109766036B (en) Message processing method and electronic equipment
CN113645351B (en) Application interface interaction method, electronic device and computer-readable storage medium
CN112130742B (en) Full screen display method and device of mobile terminal
CN110058777B (en) Method for starting shortcut function and electronic equipment
CN111543042B (en) Notification message processing method and electronic equipment
CN111258700B (en) Icon management method and intelligent terminal
CN111542802A (en) Method for shielding touch event and electronic equipment
CN113722058B (en) Resource calling method and electronic equipment
CN112600961A (en) Volume adjusting method and electronic equipment
CN111913750B (en) Application program management method, device and equipment
CN112751954B (en) Operation prompting method and electronic equipment
CN111602108B (en) Application icon display method and terminal
CN113573390B (en) Antenna power adjusting method, terminal device and storage medium
WO2021218429A1 (en) Method for managing application window, and terminal device and computer-readable storage medium
CN113452945A (en) Method and device for sharing application interface, electronic equipment and readable storage medium
CN114089932A (en) Multi-screen display method and device, terminal equipment and storage medium
CN113805797A (en) Network resource processing method, electronic device and computer readable storage medium
CN112449101A (en) Shooting method and electronic equipment
CN113438366B (en) Information notification interaction method, electronic device and storage medium
CN111249728B (en) Image processing method, device and storage medium
CN110058729B (en) Method and electronic device for adjusting sensitivity of touch detection
CN114995715A (en) Control method of floating ball and related device
CN114828098A (en) Data transmission method and electronic equipment
CN114911400A (en) Method for sharing pictures and electronic equipment
CN111475363B (en) Card death recognition method and electronic equipment

Legal Events

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

Application publication date: 20200814

RJ01 Rejection of invention patent application after publication