Method for preventing mistouch by using top-emitted proximity light, and terminal

Embodiments provide a proximity sensor located at a side edge of a terminal or a top side edge of the terminal. A first included angle is formed between light emitted by the proximity sensor and a touchscreen of the terminal. The terminal obtains data detected by a motion sensor, and motion data of the terminal based on the data detected by the motion sensor. The terminal determines whether the motion data is less than a first threshold. If the motion data is less than the first threshold, the terminal determines that no external object is currently approaching, and skips performing a mistouch prevention action. If the motion data is greater than or equal to the first threshold, the terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and determines, based on a determining result, whether to subsequently perform the mistouch prevention action.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a National Stage of International Application No. PCT/CN2019/112236, filed on Oct. 21, 2019, which claims priority to Chinese Patent Application No. 201811281063.3, filed on Oct. 30, 2018. Both of the aforementioned applications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to terminal technologies, and in particular, to a method for preventing a mistouch by using top-emitted proximity light, and a terminal.

BACKGROUND

With development of terminal products, a screen of a terminal becomes increasingly large. When a user places a large-screen mobile phone near an ear to make a call, a mistouch easily occurs because a face or a head gets in contact with a screen. To prevent a mistouch, a proximity sensor is usually disposed in the mobile phone. During the call, if the proximity sensor detects that an external object is approaching, the mobile phone controls the screen to turn off to prevent a mistouch.

A front surface of a conventional mobile phone includes a front cover and a display screen. The front cover includes a transparent region in the middle and an opaque edge region provided around the transparent region. The display screen is fixed in the transparent region, to perform display by using the transparent region. To accurately detect proximity of an external object, the proximity sensor is usually disposed at the top of the front surface of the mobile phone, and is located in the opaque edge region of the front cover, that is, the proximity sensor emits light to the outside or receives light from the outside through an opening in the opaque edge region. Because the proximity sensor is located in the opaque edge region, it is difficult to reduce a width of the edge region, and a screen-to-body ratio of the terminal is low.

To increase the screen-to-body ratio of the terminal, the proximity sensor needs to be placed at another location in the mobile phone. However, when the proximity sensor is at another location in the mobile phone, infrared light emitted or received by the proximity sensor may not be perpendicular to the screen of the mobile phone. Therefore, a misjudgment may occur when the proximity sensor performs determining on proximity of an external object.

SUMMARY

Embodiments of the present application provide a method for preventing a mistouch by using top-emitted proximity light, and a terminal, to improve accuracy of a function of proximity mistouch prevention.

According to a first aspect, an embodiment of the present application provides a method for proximity mistouch prevention. The method is applied to a terminal including a touchscreen, a proximity sensor, and a motion sensor. The proximity sensor is located at a side edge of the terminal. A first included angle is formed between light emitted by the proximity sensor and the touchscreen. The first included angle is an acute angle. The first included angle may be any angle ranging from 25° to 60°. Specifically, the proximity sensor may be located at a top side edge or a bottom side edge of the terminal or a side edge in another direction. The method includes: The proximity sensor and the motion sensor separately monitor data. The terminal may first obtain data detected by the motion sensor, and obtain motion data of the terminal based on the data detected by the motion sensor. The terminal determines whether the motion data is less than a first threshold. If the motion data is less than the first threshold, the terminal determines that no external object is currently approaching, and skips performing a mistouch prevention operation. To be specific, when the motion data of the terminal is comparatively small, it is considered that the terminal is currently not at a risk of being handheld by a user or being accidentally touched by another object, or it is considered that the terminal is not to be accidentally touched in a current status. In this case, the terminal skips performing a mistouch prevention operation, that is, the terminal does not enable a mistouch prevention interface or does not turn off the screen. If the motion data is greater than or equal to the first threshold, the terminal determines, based on data detected by the proximity sensor, whether an external object is approaching. To be specific, when the motion data of the terminal is comparatively large, it is considered that the terminal may be currently at a risk of being approached by and accidentally touched by an external object. In this case, the terminal determines, based on the data reported by the proximity sensor, whether an object is approaching. If an object is approaching, the terminal performs a mistouch prevention operation. If no object is approaching, the terminal may skip performing a mistouch prevention operation, or may further perform determining on another condition, to further determine whether an external object is approaching.

With reference to the first aspect, in one design manner, in a call screen-off scenario, that is, before the terminal obtains the data detected by the motion sensor, the terminal answers an incoming call or initiates a call in response to a user operation. In this case, the screen of the terminal is in an on state. When determining that the motion data is greater than or equal to the first threshold, in addition to determining, based on the data reported by the proximity sensor, whether an object is approaching, the terminal further determines, based on touch data detected by the touchscreen, whether an external object is approaching. When an object gets in contact with the touchscreen, the touchscreen may detect touch data. For example, when a user holds the terminal near an ear to make a call, the proximity sensor can detect proximity of a head of the user, or the touchscreen can detect touch data of an auricle or a face. In this case, the terminal turns off the screen, to prevent the ear or the face of the user from touching the screen to cause a mistouch. In addition, power consumption can be further reduced.

With reference to the first aspect, in one design manner, after the terminal turns off the screen, the terminal continues to determine, based on the data detected by the proximity sensor and the touch data detected by the touchscreen, whether an external object is approaching or in contact. If either the data detected by the proximity sensor or the data detected by the touchscreen indicates that an external object is approaching or in contact, the terminal keeps the screen off. If both the data detected by the proximity sensor and the data detected by the touchscreen indicate that no external object is approaching or in contact, the terminal turns on the screen. When the terminal determines that an object is far away and the screen needs to be turned on, the terminal may perform a screen-on operation after a delay of a specific time. If the terminal determines again within the delay time that an object is approaching, the terminal remains at a screen-off state. Due to an angle of light emitted by the proximity sensor, an approaching face may not be detected in some scenarios. In these scenarios, if a face gets in contact with the touchscreen, the terminal also performs a mistouch prevention operation, to avoid a mistouch. Therefore, cooperation between the proximity sensor and the touchscreen can improve accuracy of proximity detection, thereby reducing misjudgments.

With reference to the first aspect, in one design manner, in the call screen-off scenario, when determining that the motion data is greater than or equal to the first threshold, in addition to determining, based on the data reported by the proximity sensor and the touch data detected by the touchscreen, whether an object is approaching or in contact, the terminal further determines, based on floating touch data detected by the touchscreen, whether an external object is approaching. When any one of the three pieces of data reports that an object is approaching, the terminal performs a mistouch prevention operation, that is, turns off the screen. When some touchscreens support a floating touch function, proximity of an object may be further detected with reference to floating touch detection of the touchscreens.

With reference to the first aspect, in one design manner, after the terminal turns off the screen, the terminal continues to determine, based on data detected by the proximity sensor, touch data detected by the touchscreen, and floating touch data, whether an external object is approaching or in contact. If any one of the three pieces of data reports that an object is approaching, the terminal keeps the screen off. If all of the three pieces of data report that no object is approaching or in contact, the terminal turns on the screen.

The motion data may include a tilt angle of the terminal, and the tilt angle of the terminal is an included angle between the terminal and a horizontal plane. For example, the tilt angle of the terminal is an included angle between the horizontal plane and a plane at which the terminal is located along a direction of the touchscreen. Alternatively, the tilt angle of the terminal is an included angle between the horizontal plane and a central axis of the terminal along a portrait direction. The first threshold is any angle ranging from 30° to 45°. Alternatively, the motion data may include a motion range of the terminal.

With reference to the first aspect, in one design manner, before the terminal obtains the data detected by the motion sensor, the terminal triggers a pocket mistouch prevention function or a call screen-off function. It should be noted that, after the terminal triggers the pocket mistouch prevention function, if the terminal detects that an object is approaching, the terminal does not respond to an operation on the touchscreen; or if the terminal does not detect that an object is approaching, the terminal remains at a current status. After the terminal triggers the call screen-off function, if the terminal detects that an object is approaching, the terminal turns off the screen; or if the terminal detects that an object is far away (that is, the terminal does not detect that an object is approaching), the terminal turns on the screen.

According to a second aspect, an embodiment of the present application provides a method for preventing a proximity mistouch. The method is applied to a terminal including a touchscreen and a proximity sensor. The proximity sensor is located at a side edge of the terminal. A first included angle is formed between light emitted by the proximity sensor and the touchscreen. The first included angle is an acute angle. In a call screen-off scenario, the terminal determines, based on both touch data detected by the touchscreen and data detected by the proximity sensor, whether an object is approaching. If either of the two pieces of data reports that an object is approaching or in contact, the terminal determines that an object is approaching. If both of the two pieces of data report that an object is far away, the terminal determines that no object is approaching.

In some embodiments, the method provided in the second aspect may be modified as follows: The terminal determines, based on both floating touch data detected by the touchscreen and data detected by the proximity sensor, whether an object is approaching. If either of the two pieces of data reports that an object is approaching or in contact, the terminal determines that an object is approaching. If both of the two pieces of data report that an object is far away, the terminal determines that no object is approaching.

In some embodiments, the method provided in the second aspect may be alternatively modified as follows: The terminal determines, based on all of floating touch data and touch data detected by the touchscreen and data detected by the proximity sensor, whether an object is approaching. If any one of the three pieces of data reports that an object is approaching or in contact, the terminal determines that an object is approaching. If all of the three pieces of data report that an object is far away, the terminal determines that no object is approaching.

According to a third aspect, an embodiment of this application provides an apparatus for preventing a proximity mistouch. The apparatus is included in a terminal. The apparatus has a function of implementing behavior of the terminal in the methods in the first aspect and the second aspect. The function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the function.

According to a fourth aspect, an embodiment of the present application provides a terminal, including a processor, a memory, a touchscreen, a proximity sensor, a motion sensor, and the like. The touchscreen includes a touch-sensitive surface and a display. The proximity sensor is located at a side edge of the terminal. A first included angle is formed between light emitted by the proximity sensor and the touchscreen. The proximity sensor is configured to detect whether an external object is approaching. The motion sensor is configured to detect motion data of the terminal. The memory is configured to store one or more computer programs, and the one or more computer programs include an instruction. When the instruction is executed by the processor, the terminal is enabled to perform the method in any one of the first aspect, the second aspect, or the possible design manners of the first aspect or the second aspect.

According to a fifth aspect, an embodiment of this application provides a computer-readable storage medium, including a computer instruction. When the computer instruction is run on an electronic device, the electronic device is enabled to perform the method in the first aspect, the second aspect, and the possible design manners of the first aspect and the second aspect.

According to a sixth aspect, an embodiment provides a computer program product. When the computer program product runs on a computer, the computer is enabled to perform the method in the first aspect, the second aspect, and the possible design manners of the first aspect and the second aspect.

It can be understood that, for beneficial effects that can be achieved in the second aspect, the third aspect, the fourth aspect, and the fifth aspect, reference may be made to the beneficial effects of the methods provided in the foregoing descriptions. Details are not described herein again.

DESCRIPTION OF EMBODIMENTS

The embodiments may be applied to various terminals. In particular, the embodiments of the present application may be applied to a terminal that has a large screen and in which a proximity sensor and the screen are at different planes. For example, the terminal may be a mobile phone, a tablet personal computer, a digital camera, a personal digital assistant (PDA for short), a navigation apparatus, a mobile Internet device (MID), a wearable device (Wearable Device), or an in-vehicle device.

To increase a screen-to-body ratio of the terminal, that is, to increase a proportion of the screen in the front surface of the terminal, the proximity sensor may be placed on a side surface of the terminal. The proximity sensor includes a transmitter, a receiver, and a light source entrance/exit. The transmitter emits infrared light to the outside of the terminal through the light source entrance/exit. The receiver receives infrared light returned from the outside through the light source entrance/exit. That the proximity sensor is disposed on a side surface of the terminal means that the light source entrance/exit of the proximity sensor and the screen are at different planes. That is, the proximity sensor emits and receives infrared light through the side surface of the terminal.

The following describes a location of a proximity sensor in a terminal in the embodiments of this application by usingFIG.2AandFIG.2Bas examples.FIG.2Ais a schematic diagram of a terminal to which solutions in the embodiments of this application are applied.FIG.2Bis a schematic exploded view of a partial structure of the terminal shown inFIG.2A. As shown inFIG.2AandFIG.2B, the terminal100includes a bezel10, a screen20, a rear cover30, and a proximity sensor (proximity sensor)40. The bezel10is of an integrated structure, and the bezel10has two roughly opposite openings. A periphery of the screen20is fixedly connected to the bezel10. In the embodiments of this application, “being fixedly connected” means that two components remain fixed to each other after being connected. The screen20covers one of the openings of the bezel10. A periphery of the rear cover30is fixedly connected to the bezel10. The rear cover30covers the other opening of the bezel10. The screen20, the bezel10, and the rear cover30jointly encircle an inner cavity of an entire system. Alternatively, the bezel10and the rear cover30may be integrated. Alternatively, the bezel10and the rear cover30may be assembled to form an integrated structure. The proximity sensor40is accommodated in the inner cavity of the entire system.

When a user uses the terminal100, the screen20faces the user. A surface that is of the terminal100and on which the screen20is disposed is considered as the front surface of the terminal100. A surface that is of the terminal100and on which the rear cover30is disposed is considered as a rear surface of the terminal100. An outer surface102of the bezel10is considered as a peripheral side surface of the terminal100.

The bezel10is provided with a through-hole101. The through-hole101penetrates the bezel10, to connect inner space (that is, the inner cavity of the entire system) and outer space of the bezel10that are opposite to each other. An opening on one side of the through-hole101is provided on the outer surface102of the bezel10. The proximity sensor40is located on an inner side of the bezel10and is partially accommodated in the through-hole101. A light source entrance/exit of the proximity sensor40passes through the through-hole101, so that the proximity sensor40can emit light and receive light through the through-hole101, thereby implementing a proximity sensing function. The bezel10includes a top surface1021and a bottom surface1022that are provided opposite to each other. The top surface1021and the bottom surface1022are a part of the outer surface102of the bezel10. The outer surface102of the bezel10further includes a left side surface1023and a right side surface1024that are provided opposite to each other. The left side surface1023and the right side surface1024are connected between the top surface1021and the bottom surface1022. A transition may be performed between the top surface1021and the right side surface1024by using an arc surface. A transition may be performed between the right side surface1024and the bottom surface1022by using an arc surface. A transition may be performed between the bottom surface1022and the left side surface1023by using an arc surface. A transition may be performed between the left side surface1023and the top surface1021by using an arc surface.

When the user uses the terminal100, the top surface1021is roughly upward, the bottom surface1022is roughly downward, the left side surface1023is close to a left hand side of the user, and the right side surface1024is close to a right hand side of the user.

A location of the through-hole101is not limited in this embodiment of this application. The through-hole101may be located on the top surface1021of the bezel10, or may be located on another surface of an bezel10, for example, the bottom surface1022, the left side surface1023, or the right side surface1024. The top surface1021is a top side surface of the terminal. When the through-hole is located on the top surface1021, light emitted by the proximity sensor is emitted from the top, and may be referred to as top-emitted proximity light. In this embodiment of this application, proximity light is not necessarily emitted from the top, and may be alternatively emitted from another side surface. Usually, a light emitting location in the proximity sensor is a location of the through-hole, and is usually determined by a location of an earpiece. For example, when the earpiece is at the top of the terminal, the light emitting location in the proximity sensor may be provided on the top side surface. When the earpiece is at the bottom of the terminal, the light emitting location in the proximity sensor may be provided on a bottom side surface.

FIG.3A,FIG.3B, andFIG.3Care schematic working diagrams of a proximity sensor according to an embodiment of this application. As shown inFIG.3A, emergent light emitted by the proximity sensor40and a plane on which the screen20is located form an included angle α, which may be referred to as a first included angle α (which may also be referred to as a front tilt angle). To detect proximity of an object to the front surface of the terminal, the first included angle is usually required to be greater than 25°, and In some embodiments, may be greater than 45°. Certainly, a larger first included angle indicates a better detection effect. When the first included angle is close to 90°, this is similar to a case in which the proximity sensor is disposed on the front surface of the terminal. However, because the proximity sensor is disposed on a side surface of the terminal, the first included angle can hardly reach 90°.

An example structure of the proximity sensor is not limited in this embodiment of this application, provided that the first included angle can be formed between the light emitted by the proximity sensor and the plane on which the screen20is located. For example,FIG.3D,FIG.3E,FIG.3F, andFIG.3Gshow a structure of a proximity sensor.FIG.3Dis a schematic structural diagram of a proximity sensor.FIG.3Eis a schematic exploded structural diagram of the proximity sensor shown inFIG.3D.FIG.3Fis a schematic structural diagram of a lampshade inFIG.3E.FIG.3Gis a sectional view of a partial structure of the terminal shown inFIG.2AandFIG.2Balong a line B-B′.

With reference toFIG.3DtoFIG.3G, the proximity sensor includes a lampshade1, a proximity light assembly2, and a circuit board3.

The proximity sensor40includes the lampshade1, the proximity light assembly2, and the circuit board3. The lampshade1is equivalent to the light source entrance/exit in the foregoing embodiment. Alternatively, a first surface121of the lampshade1is equivalent to the light source entrance/exit in the foregoing embodiment.

The lampshade1includes a fixed portion11and an embedded portion12that is fixedly connected to the fixed portion11. The fixed portion11and the embedded portion12may be integrated. An end face111that is of the fixed portion11and that is away from the embedded portion12is provided with a concave mounting slot13. The proximity light assembly2is fixed on the circuit board3. The circuit board3is fixed on the end face111that is of the fixed portion11and that is away from the embedded portion12, and covers the mounting slot13. The proximity light assembly2is accommodated in the mounting slot13. In other words, a concave cavity is formed on a side that is of the fixed portion11and that is away from the embedded portion12, and the proximity light assembly2is accommodated in the cavity. The circuit board3covers the mounting slot13, so that the proximity light assembly2can be connected to the lampshade1in a sealed manner. A sealing ring17may be further disposed between the fixed portion11and the circuit board3, to improve sealing performance. The sealing ring17may be double-sided tape or a glue layer.

An end face that is of the embedded portion12and that is away from the fixed portion11includes the first surface121. A bottom wall of the mounting slot13includes a second surface131. Light emitted by the proximity light assembly2may pass through the second surface131and the first surface121, and then be emitted from the proximity sensor40. Light outside the proximity sensor40may pass through the first surface121and the second surface131, and then enter the proximity light assembly2.

In this embodiment, because the proximity light assembly2is accommodated in the mounting slot13and the proximity light assembly2is roughly embedded in the lampshade1, utilization of light can be improved. The lampshade1may also protect a structure of the proximity light assembly2. In addition, the terminal100may be modularized by assembling the proximity light assembly2and the lampshade1, to simplify an overall assembly process of the terminal100.

The first surface121may be a part of the end face that is of the embedded portion12and that is away from the fixed portion11, or may be all of the end face that is of the embedded portion12and that is away from the fixed portion11. When the proximity sensor40is mounted on the bezel10(referring toFIG.3A), the lampshade1is located on an inner side of the bezel10and is partially accommodated in the through-hole101. A part or all of the embedded portion12is accommodated in the through-hole101. The first surface121is exposed outside the terminal100through an opening of the through-hole101. In this embodiment of this application, the first surface121is entirety of the end face that is of the embedded portion12and that is away from the fixed portion11. In other words, the first surface121covers the entire end face that is of the embedded portion12and that is away from the fixed portion11. The end face is exposed outside the terminal100through an opening of the through-hole101. In this case, the entire end face can receive light or transmit light, thereby improving utilization of the end face. In addition, an area of an opening that is of the through-hole101and that is provided on the outer surface102of the bezel10may also be correspondingly set to a comparatively small value. The fixed portion11is located on an inner side of the bezel10. For example, the fixed portion11may be accommodated in or partially accommodated in a groove103on an inner side of the bezel10. The groove103may be used to accommodate and limit the fixed portion11. The second surface131may be a part of a bottom wall of the mounting slot13of the fixed portion11.

In an implementation, the fixed portion11includes a fixing surface112. The embedded portion12is located on the fixing surface112. The embedded portion12is a protrusion portion disposed on the fixing surface112. The embedded portion12includes a limiting surface122. The limiting surface122is connected between the fixing surface112and the end face that is of the embedded portion12and that is away from the fixed portion11. That is, the limiting surface122is connected between the fixing surface112and the first surface121. The limiting surface122is a peripheral side surface of the embedded portion12. When the embedded portion12is partially or completely accommodated in the through-hole101, the limiting surface122is provided facing a hole wall of the through-hole101. A shape of the hole wall of the through-hole101adapts to a shape of the limiting surface122.

In an implementation, the proximity light assembly2includes a transmitter21and a receiver22. The transmitter21is configured to emit light. The emitted light may be invisible light such as infrared light. The transmitter21may be a light emitting diode (LED) or a vertical-cavity surface-emitter laser (VCSEL). The receiver22is configured to receive induced light and form a corresponding electrical signal. The emitted light passes through the lampshade1to form emergent light. The emergent light is reflected by an obstacle to form emitted light. A part of the reflected light passes through the lampshade1to form induced light. In this implementation, both the transmitter21and the receiver22are accommodated in the mounting slot13. The receiver22of the proximity light assembly2has an induction surface221, and the induction surface221is configured to receive the induced light. A direction of the emitted light emitted by the transmitter21is roughly perpendicular to the induction surface221. The proximity light assembly2is fixed at one end of the circuit board3, and the other end of the circuit board3may be used for mounting a connector.

In an implementation, the circuit board3may include a body31and a reinforcing piece32. The body31may be a flexible printed circuit board. The reinforcing piece32is configured to reinforce strength of a part of the body31. For example, the reinforcing piece32may cover a part that is of the body31and that is used to cover the groove103, that is, the body31includes the part that covers the groove103, and the reinforcing piece32covers the part, so that the circuit board3can be better fixed and sealed to the lampshade1.

In an implementation, the lampshade1includes one or more positioning rods14. The one or more positioning rods14are convexly disposed on the end face111that is of the fixed portion11and that is away from the embedded portion12. The one or more positioning rods14are configured to position the circuit board3, so that assembly precision of the circuit board3and the lampshade1is comparatively high. As shown inFIG.3D, a part of the circuit board3is located in space limited by a plurality of positioning rods14, and the circuit board3abuts against the plurality of positioning rods14.

As shown inFIG.3G, the proximity light assembly2emits light to the outside or receives light from the outside through the lampshade1. The light emitted by the proximity light assembly2faces the screen20, and the light is emitted through the lampshade1. Based on different lampshade structures, the lampshade1may change a direction of emergent light (not shown in the figure). A first included angle α is formed between the light emitted by the lampshade1and the screen20.

It should be noted thatFIG.3DtoFIG.3Gare merely examples of a structure of a proximity sensor, and this structure is not limited in this embodiment of this application.

Because the first included angle of the proximity sensor40can hardly reach 90°, a misjudgment may occur in some application scenarios. Examples are as follows.

Scenario 1: When an object approaches the terminal from another direction (not the front), the object may be detected by the proximity sensor, thereby causing a misjudgment. For example, as shown inFIG.3B, when an object approaches from the top of the terminal, the screen of the terminal is actually not to be accidentally touched. In this case, the proximity sensor does not need to report a proximity event. However, due to the first included angle, the proximity sensor may detect the object at the top, thereby causing a misjudgment of proximity. For example, the scenario 1 may be a scenario in which an object approaches from the top of the terminal when the terminal is placed on a desktop or another plane, or a scenario in which the terminal is in a horizontal state and the top of the terminal is close to another obstacle region when a user finishes a call by using the terminal and puts the terminal away from an ear, or a scenario in which a user holds the terminal with a hand and a front side of the user's body is close to an obstacle.

Scenario 2: Although an object approaches the terminal from the front, the proximity sensor may not detect the object due to existence of the first included angle, and therefore cannot report proximity of the object, thereby also causing a misjudgment. For example, as shown inFIG.3C, when an object approaches the terminal from the front, the screen of the terminal is very likely to be accidentally touched. In this case, the proximity sensor needs to report a proximity event. However, due to the first included angle, the proximity sensor may not detect proximity of the object, thereby causing a misjudgment. For example, the scenario 2 may be as follows: When a user uses the terminal to make a call, if a face of the user is comparatively large, the face may be in contact with a lower part of the screen of the terminal, and there is still a specific distance between an ear and the top of the terminal. In this scenario, light emitted by the proximity sensor may not reach the user's head. Alternatively, when a user uses the terminal to make a call, if the top of the terminal is right at an edge of an auricle, because a human head is round, if the human head needs to be detected, the first included angle of the proximity sensor needs to be comparatively large. When the first included angle of the proximity sensor is not sufficiently large, the proximity sensor may not detect proximity of an object.

The solution of preventing a proximity mistouch that is provided in this embodiment of this application is used to mitigate the foregoing possible misjudgment. In this embodiment of this application, the motion sensor cooperates with the proximity sensor, or the proximity sensor cooperates with the touchscreen, or the motion sensor, the proximity sensor, and the touchscreen cooperate with each other to jointly perform proximity detection. For example, if it is detected, by using the motion sensor, that the terminal is located at a plane (or an approximate plane) or a motion range of the terminal is very small, it may be considered that the terminal is not close to an ear of a user at this time, and therefore it may be reported that no object is approaching (or an object is far away). If it is detected, by using the touchscreen, that an ear or a face of a user is in contact with the screen, it may be reported that an object is approaching. The motion sensor may detect a posture, an angle, or a motion status of the terminal.

A specific form of the terminal is not particularly limited in the embodiments of this application. For example,FIG.1is a schematic structural diagram of a terminal100according to an embodiment of this application.

The terminal100may include a processor110, an external memory interface120, an internal memory123, a universal serial bus (USB) interface130, a charging management module140, a power management module141, a battery142, an antenna1, an antenna2, a mobile communications module150, a wireless communications module160, an audio module170, a speaker170A, a receiver170B, a microphone170C, a headset interface170D, a sensor module180, a key190, a motor191, an indication device192, a camera193, a display screen194, a subscriber identity module (SIM) card interface195, and the like. The sensor module180may include a pressure sensor180A, a gyroscope sensor180B, a barometric pressure sensor180C, a magnetic sensor180D, an acceleration sensor180E, a distance sensor180F, a proximity sensor180G, a fingerprint sensor180H, a temperature sensor180J, a touch sensor180K, an ambient light sensor180L, a bone conduction sensor180M, a direction sensor, and the like.

The controller may be a nerve center and a command center of the terminal100. The controller may generate an operation control signal based on an instruction operation code and a time sequence signal, to control obtaining of an instruction and execution of the instruction.

A memory may be further disposed in the processor110to store an instruction and data. In some embodiments, the memory in the processor110is a cache. The memory may store an instruction or data just used or cyclically used by the processor110. If the processor110needs to use the instruction or the data again, the processor110may directly invoke the instruction or the data from the memory. This avoids repeated access and reduces a waiting time of the processor110, thereby improving system efficiency.

The I2S interface may be used for audio communication. In some embodiments, the processor110may include a plurality of I2S buses. The processor110may be coupled to the audio module170by using an I2S bus, to implement communication between the processor110and the audio module170. In some embodiments, the audio module170may transmit an audio signal to the wireless communications module160by using the I2S interface, to implement a function of answering a call by using a Bluetooth headset.

The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a two-way communications bus. The bus converts to-be-transmitted data between serial communication and parallel communication. In some embodiments, the UART interface is usually configured to connect the processor110to the wireless communications module160. For example, the processor110communicates with a Bluetooth module in the wireless communications module160by using the UART interface, to implement a Bluetooth function. In some embodiments, the audio module170may transmit an audio signal to the wireless communications module160by using the UART interface, to implement a function of playing music by using a Bluetooth headset.

The GPIO interface may be configured by using software. The GPIO interface may be configured as a control signal, or may be configured as a data signal. In some embodiments, the GPIO interface may be configured to connect the processor110to the camera193, the display screen194, the wireless communications module160, the audio module170, the sensor module180, or the like. The GPIO interface may be alternatively configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, or the like.

The USB interface130is an interface that complies with a USB standard specification, and may be specifically a mini USB interface, a micro USB interface, a USB Type C interface, or the like. The USB interface130may be configured to connect to a charger to charge the terminal100, or may be configured to transmit data between the terminal100and a peripheral device, or may be configured to connect to a headset to play an audio file by using the headset. Alternatively, the interface may be configured to connect to another electronic device, for example, an AR device.

The charging management module140is configured to receive charging input from a charger. The charger may be a wireless charger, or may be a wired charger. In some embodiments of wired charging, the charging management module140may receive charging input from a wired charger by using the USB interface130. In some embodiments of wireless charging, the charging management module140may receive wireless charging input by using a wireless charging coil of the terminal100. When the charging management module140charges the battery142, the power management module141may further supply power to the electronic device.

The power management module141is configured to connect to the battery142, the charging management module140, and the processor110. The power management module141receives input from the battery142and/or the charging management module140, and supplies power to the processor110, the internal memory123, an external memory, the display screen194, the camera193, the wireless communications module160, and the like. The power management module141may be further configured to monitor parameters such as a battery capacity, a quantity of battery cycles, and a battery health status (electric leakage and impedance). In some other embodiments, the power management module141may be alternatively disposed in the processor110. In some other embodiments, the power management module141and the charging management module140may be alternatively disposed in a same device.

A wireless communication function of the terminal100may be implemented by the antenna1, the antenna2, the mobile communications module150, the wireless communications module160, the modem processor, the baseband processor, and the like.

The mobile communications module150may provide a solution that is applied to the terminal100and that includes wireless communications technologies such as 2G, 3G, 4G, and 5G. The mobile communications module150may include at least one light filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communications module150may receive an electromagnetic wave by using the antenna1, perform processing such as filtering and amplification on the received electromagnetic wave, and transmit a processed electromagnetic wave to the modem processor for demodulation. The mobile communications module150may further amplify a signal modulated by the modem processor, and convert an amplified signal into an electromagnetic wave and radiate the electromagnetic wave by using the antenna1. In some embodiments, at least some functional modules of the mobile communications module150may be disposed in the processor110. In some embodiments, at least some functional modules of the mobile communications module150and at least some modules of the processor110may be disposed in a same device.

The wireless communications module160may provide a solution that is applied to the terminal100and that includes wireless communications technologies such as a wireless local area network (WLAN) (for example, a wireless fidelity (Wi-Fi) network), Bluetooth (BT), a global navigation satellite system (GNSS), frequency modulation (FM), a near field communication (NFC) technology, and an infrared (IR) technology. The wireless communications module160may be one or more devices that integrate at least one communications processing module. The wireless communications module160receives an electromagnetic wave by using the antenna2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor110. The wireless communications module160may further receive a to-be-sent signal from the processor110, perform frequency modulation and amplification on the signal, and convert a processed signal into an electromagnetic wave and radiate the electromagnetic wave by using the antenna2.

The terminal100implements a display function by using the GPU, the display screen194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen194and the application processor. The GPU is configured to perform mathematical and geometric calculation, and is used for graphics rendering. The processor110may include one or more GPUs that execute a program instruction to generate or change display information.

The display screen194is configured to display an image, a video, and the like. The display screen194includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini LED, a micro LED, a micro OLED, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the terminal100may include one or N display screens194, where N is a positive integer greater than 1.

The terminal100may implement a photographing function by using the ISP, the camera193, the video codec, the GPU, the display screen194, the application processor, and the like.

The ISP is configured to process data fed back by the camera193. For example, during photographing, a shutter is opened, light is transmitted to a photosensitive element of the camera through a lens, an optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, to convert the electrical signal into an image visible to a naked eye. The ISP may further optimize noise, luminance, and complexion of the image based on an algorithm. The ISP may further optimize parameters such as exposure and color temperature of a photographing scenario. In some embodiments, the ISP may be disposed in the camera193.

The camera193is configured to capture a static image or a video. An optical image is generated for an object by using the lens, and the optical image is projected to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts an optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert the electrical signal into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard image signal in an RGB format, a YUV format, or the like. In some embodiments, the terminal100may include one or N cameras193, where N is a positive integer greater than 1.

The digital signal processor is configured to process a digital signal. In addition to a digital image signal, the digital signal processor may further process another digital signal. For example, when the terminal100selects a frequency, the digital signal processor is configured to perform Fourier transformation and the like on frequency energy.

The video codec is configured to compress or decompress a digital video. The terminal100may support one or more types of video codecs. In this way, the terminal100may play or record videos in a plurality of encoding formats, for example, moving picture experts group (MPEG)-1, MPEG-2, MPEG-3, and MPEG-4.

The external memory interface120may be configured to connect to an external storage card, for example, a micro SD card, to extend a storage capability of the terminal100. The external storage card communicates with the processor110by using the external memory interface120, to implement a data storage function. For example, files such as music and videos are stored in the external storage card.

The internal memory123may be configured to store computer executable program code, where the executable program code includes an instruction. The processor110performs various functional applications and data processing of the terminal100by running the instruction stored in the internal memory123. The internal memory123may include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (for example, a sound play function or an image play function), and the like. The data storage area may store data (for example, audio data and a phone book) created in a process of using the terminal100, and the like. In addition, the internal memory123may include a high-speed random access memory, or may include a nonvolatile memory, for example, at least one magnetic disk storage device, a flash storage device, or a universal flash storage (universal flash storage, UFS).

The terminal100may implement audio functions, for example, music playing and recording, by using the audio module170, the speaker170A, the receiver170B, the microphone170C, the headset interface170D, the application processor, and the like.

The speaker170A, also referred to as a “loudspeaker”, is configured to convert an audio electrical signal into a sound signal. The terminal100may be used to listen to music or answer a hands-free call by using the speaker170A.

The receiver170B, also referred to as an “earpiece”, is configured to convert an audio electrical signal into a sound signal. When the terminal100is used to answer a call or listen to voice information, the receiver170B may be placed close to a human ear to listen to a voice.

The microphone170C, also referred to as a “mike” or a “mic”, is configured to convert a sound signal into an electrical signal. When making a call or sending voice information, a user may move a mouth close to the microphone170C and make a sound, to input a sound signal into the microphone170C. At least one microphone170C may be disposed in the terminal100. In some other embodiments, two microphones170C may be disposed in the terminal100, to implement a noise reduction function, in addition to collecting a sound signal. In some other embodiments, three, four, or more microphones170C may be alternatively disposed in the terminal100, to collect a sound signal and reduce noise. The microphones170C may further identify a sound source, implement a directional recording function, and the like.

The pressure sensor180A is configured to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor180A may be disposed in the display screen194. There are many types of pressure sensors180A, for example, a resistive pressure sensor, an inductive pressure sensor, and a capacitive pressure sensor. The capacitive pressure sensor may include at least two parallel plates that have conductive materials. When a force acts on the pressure sensor180A, capacitance between electrodes changes. The terminal100determines pressure strength based on the capacitance change. When a touch operation acts on the display screen194, the terminal100detects strength of the touch operation based on the pressure sensor180A. The terminal100may also calculate a touch position based on a detection signal of the pressure sensor180A. In some embodiments, touch operations acting on a same touch position but having different touch operation strength may correspond to different operation instructions. For example, when a touch operation whose touch operation strength is less than a first pressure threshold acts on an icon of an SMS application, an instruction for viewing an SMS message is executed; or when a touch operation whose touch operation strength is greater than or equal to the first pressure threshold acts on the icon of the SMS application, an instruction for creating an SMS message is executed.

The gyroscope sensor180B may be configured to determine a motion posture of the terminal100. In some embodiments, an angular velocity of the terminal100around three axes (that is, an x-axis, a y-axis, and a z-axis) may be determined by using the gyroscope sensor180B. The gyroscope sensor180B may be used for image stabilization during photographing. For example, when the shutter is pressed, the gyroscope sensor180B detects an angle at which the terminal100shakes, and calculates, based on the angle, a distance for which a lens module needs to compensate, so that the lens cancels the shake of the terminal100through reverse motion, thereby implementing image stabilization. The gyroscope sensor180B may be further used in navigation and motion sensing game scenarios.

The barometric pressure sensor180C is configured to measure barometric pressure. In some embodiments, the terminal100calculates an altitude by using a barometric pressure value measured by the barometric pressure sensor180C, to assist in positioning and navigation.

The magnetic sensor180D includes a Hall effect sensor. The terminal100may detect opening/closing of a clamshell leather case by using the magnetic sensor180D. In some embodiments, when the terminal100is a clamshell phone, the terminal100may detect opening/closing of a clamshell based on the magnetic sensor180D. Further, a feature, such as automatic unlocking upon flipping, is set based on a detected open/closed state of a leather case or a detected open/closed state of the clamshell.

The acceleration sensor180E may detect a magnitude of an acceleration of the terminal100in each direction (usually, three axes). When the terminal100is still, a magnitude and a direction of gravity may be detected. The acceleration sensor180E may be further configured to identify a posture of the electronic device, and is applied to applications such as landscape/portrait mode switching and a pedometer. A tilt angle of the terminal may be calculated by using data detected by the acceleration sensor, that is, an included angle between a horizontal plane and a plane at which the screen of the terminal is located may be calculated.

The distance sensor180F is configured to measure a distance. The terminal100may measure a distance by using an infrared or laser technology. In some embodiments, in a photographing scenario, the terminal100may measure a distance by using the distance sensor180F, to implement fast focusing.

The proximity sensor180G (equivalent to the proximity sensor40in other embodiments) may include, for example, a light emitting diode (LED) and an optical detector, for example, a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal100emits infrared light by using the light emitting diode. The terminal100detects, by using the photodiode, infrared reflected light that comes from a nearby object. When detecting sufficient reflected light, the terminal100may determine that there is an object near the terminal100; or when detecting insufficient reflected light, the terminal100may determine that there is no object near the terminal100. The terminal100may detect, by using the proximity sensor180G, that a user holds the terminal100close to an ear for a call, to automatically turn off the screen to save power and prevent a mistouch. The proximity sensor180G may also be used for automatic screen locking or unlocking in a leather case mode or a pocket mode, that is, a mistouch prevention mode.

The ambient light sensor180L is configured to sense luminance of ambient light. The terminal100may adaptively adjust luminance of the display screen194based on the sensed luminance of ambient light. The ambient light sensor180L may also be configured to automatically adjust white balance during photographing. The ambient light sensor180L may further cooperate with the proximity sensor180G to detect whether the terminal100is in a pocket, to prevent a mistouch.

The fingerprint sensor180H is configured to collect a fingerprint. The terminal100may implement fingerprint-based unlocking, unlocking for application access, fingerprint-based photographing, fingerprint-based call answering, and the like by using a collected fingerprint characteristic.

The temperature sensor180J is configured to detect temperature. In some embodiments, the terminal100executes a temperature processing policy by using the temperature detected by the temperature sensor180J. For example, when temperature reported by the temperature sensor180J exceeds a threshold, the terminal100degrades performance of a processor near the temperature sensor180J, to reduce power consumption and implement thermal protection. In some other embodiments, when temperature is lower than another threshold, the terminal100heats up the battery142to avoid abnormal shutdown of the terminal100due to low temperature. In some other embodiments, when temperature is lower than still another threshold, the terminal100boosts an output voltage of the battery142to avoid abnormal shutdown due to low temperature.

The touch sensor180K is also referred to as a “touch panel”. The touch sensor180K may be disposed in the display screen194, and a touchscreen includes the touch sensor180K and the display screen194, which is also referred to as a touch control screen. The touch sensor180K is configured to detect a touch operation acting on or near the touch sensor. The touch sensor may transmit the detected touch operation to the application processor, to determine a type of a touch event. Visual output related to the touch operation may be provided by using the display screen194. In some other embodiments, the touch sensor180K may be alternatively disposed on a surface of the terminal100, and is at a position different from that of the display screen194. Some touch sensors180K have a floating touch function. To be specific, when an external object is approaching but has not got in contact with the touchscreen, these touch sensors can detect proximity of the external object, that is, detect the floating object. The touchscreen is equivalent to the screen20in other embodiments.

The bone conduction sensor180M may obtain a vibration signal. In some embodiments, the bone conduction sensor180M may obtain a vibration signal from a vibration bone of a human voice part. The bone conduction sensor180M may also be in contact with a human pulse, and receive a blood pressure and pulse signal. In some embodiments, the bone conduction sensor180M may be alternatively disposed in a headset to form a bone conduction headset. The audio module170may parse out a speech signal based on the vibration signal obtained by the bone conduction sensor180M from the vibration bone of the voice part, to implement a speech function. The application processor may parse out heart rate information based on the blood pressure and pulse signal obtained by the bone conduction sensor180M, to implement a heart rate detection function.

The key190includes a power key, a volume key, or the like. The key190may be a mechanical key, or may be a touch key. The terminal100may receive key input, and generate key signal input related to user settings and function control of the terminal100.

The motor191may produce a vibration prompt. The motor191may be configured to produce a vibration prompt for an incoming call, or may be configured to produce a vibration feedback on a touch. For example, touch operations acting on different applications (for example, photographing and audio playing) may correspond to different vibration feedback effects. For touch operations acting on different regions on the display screen194, the motor191may also correspondingly produce different vibration feedback effects. Different application scenarios (for example, a time reminder, information receiving, an alarm clock, and a game) may also correspond to different vibration feedback effects. A touch vibration feedback effect may be further customized.

The indication device192may be an indicator, and may be configured to indicate a charging status and a battery level change, or may be configured to indicate a message, a missed call, a notification, or the like.

The SIM card interface195is configured to connect to a SIM card. The SIM card may be inserted in the SIM card interface195or removed from the SIM card interface195, to implement contact with or separation from the terminal100. The terminal100may support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface195may support a nano-SIM card, a micro-SIM card, a SIM card, and the like. A plurality of cards may be inserted in one SIM card interface195. The plurality of cards may be of a same type, or may be of different types. The SIM card interface195may also be compatible with different types of SIM cards. The SIM card interface195may also be compatible with an external storage card. The terminal100interacts with a network by using the SIM card, to implement functions such as a call and data communication. In some embodiments, the terminal100uses an eSIM, that is, an embedded SIM card. The eSIM card may be embedded in the terminal100, and cannot be separated from the terminal100.

The following describes the solutions of this application by using specific embodiments. It should be noted that all steps in embodiments shown inFIG.4andFIG.6are performed in a pocket mistouch prevention scenario or a call screen-off scenario. In other words, if a terminal currently does not trigger a pocket mistouch prevention function or a call screen-off function, the terminal does not perform a method in an embodiment shown inFIG.4orFIG.6.

Triggering, by the terminal, the pocket mistouch prevention function may include: The terminal enables an option for the pocket mistouch prevention function (the option is usually enabled by a user or enabled by default), and triggers the pocket mistouch prevention function when a screen of the terminal is turned on in a lock-screen state or a screen-off state. If the terminal does not enable the option for the pocket mistouch prevention function, that is, a user manually disables the option for the function, the terminal does not have the pocket mistouch prevention function in this case. In addition, even if the terminal enables the option for the pocket mistouch prevention function, if the terminal is in an unlocked state or a screen-on state, that is, the terminal does not change from a lock-screen state or a screen-off state to a screen-on state, the terminal does not trigger the pocket mistouch prevention function.

Usually, the terminal supports the call screen-off function by default, and a user does not need to manually select the function. Triggering, by the terminal, the call screen-off function may include: When the terminal answers an incoming call (usually when a user taps an “Answer” key) in response to a user operation, the terminal triggers the call screen-off function. Alternatively, when the terminal makes a call (usually when a user taps a “Dial” key) in response to a user operation, the terminal triggers the call screen-off function. If the terminal allows the user to manually enable or disable the call screen-off function, after the user selects to enable the call screen-off function, the terminal triggers the call screen-off function when answering an incoming call or making a call.

FIG.4is a flowchart of a method for preventing a proximity mistouch according to an embodiment of this application. In the solution of this embodiment, proximity detection is mainly implemented through cooperation between a motion sensor and a proximity sensor. This can effectively avoid the misjudgment described in the foregoing scenario 1. A terminal to which this embodiment is applied includes a proximity sensor and a motion sensor. The motion sensor may include one or more sensors, for example, an acceleration sensor, a gyroscope, and a direction sensor. As shown inFIG.4, the method may include the following steps.

Step401: The terminal enables a proximity detection function.

The terminal may enable the proximity detection function in a plurality of conditions. For example, these conditions may be as follows. Condition 1: The terminal answers an incoming call in response to a user operation. Condition 2: The terminal initiates a call as a calling party in response to a user operation. Condition 3: The terminal triggers a pocket mistouch prevention function. This may be specifically as follows: The terminal enables the pocket mistouch prevention function, and detects that a screen of the terminal is turned on in a lock-screen state and the terminal receives a touch operation, or detects that a screen of the terminal is turned on in a lock-screen state. Condition 4: In addition to a call application and a pocket mistouch prevention application, another application that needs to use proximity data is enabled. When any one of the foregoing conditions is met, the terminal may enable the proximity detection function. A condition for enabling the proximity detection function is not limited in this embodiment of this application. Proximity data may need to be used on the terminal in a plurality of cases. When proximity data needs to be used, the terminal may enable the proximity detection function. It should be noted that, because a plurality of applications on the terminal may need to use proximity data, after one of the applications is enabled, the terminal enables the proximity detection function and starts to obtain proximity data. After the proximity detection function is enabled, if another application that needs to use the proximity detection function is enabled, because the proximity detection function is already enabled, the application may directly read the proximity data, and the terminal does not need to perform an action of enabling the proximity detection function again.

The pocket mistouch prevention function is as follows: When the terminal is located in a pocket or a bag, if the screen of the terminal in a lock-screen state or a screen-off state is turned on (for example, the screen is turned on by pressing a power key or by using another operation) and the terminal receives a touch operation on the screen, the terminal enables the mistouch prevention function, that is, the terminal does not respond to the touch operation, to prevent the terminal from being accidentally touched.

The conditions 1 and 2 are related to a call screen-off scenario. Call screen-off means that, when the terminal answers an incoming call or initiates a call as a calling party, if the terminal detects that an external object is approaching (usually when a user picks up the terminal and places it near an ear), the terminal turns off the screen, to prevent the screen from being accidentally touched by the ear or a face of the user, and reduce power consumption of the terminal; or if the terminal detects that an external object is far away (usually when a user takes the terminal away from an ear), the terminal turns on the screen, so that the user can operate the touchscreen.

Step402: After the proximity detection function is enabled, the terminal obtains data detected by the proximity sensor and the motion sensor.

The proximity sensor or the motion sensor may have been enabled before step401, or may be enabled in step401. An occasion at which these sensors are enabled is not limited in this application. After step401, the terminal obtains data detected by the proximity sensor and data detected by the motion sensor.

Step403: The terminal determines, based on the data detected by the motion sensor, whether a current tilt angle of the terminal is less than a first threshold, and performs step404if the tilt angle is less than the first threshold, or performs step405if the tilt angle is greater than or equal to the first threshold.

The tilt angle of the terminal is an included angle between the terminal and a horizontal plane, for example, an included angle between the horizontal plane and a plane at which the terminal is located along a direction of the screen, or an included angle between the horizontal plane and a central axis of the terminal.FIG.5Ais a schematic diagram of the included angle between the terminal and the horizontal plane, where AA′ is the central axis of the terminal. As shown inFIG.5B, an included angle between the central axis AA′ and the horizontal plane is the tilt angle. It should be noted that the terminal usually has two central axes, where one is along a portrait direction, and the other is along a landscape direction. However, the central axis in this embodiment of this application is usually the central axis along the portrait direction (as shown inFIG.5B), because an earpiece of the terminal is usually located at the top along the portrait direction. In other words, a direction of the central axis described in this embodiment of this application is related to a location of the earpiece. If the earpiece of the terminal is located at the top or bottom along the portrait direction, the central axis along the portrait direction is selected. If the earpiece of the terminal is located at the top or bottom along the landscape direction, a central axis along the landscape direction is selected. For example, the first threshold may be set to 30°, 40°, or 45°, or may be set to another value ranging from 30° to 45°.

The tilt angle of the terminal may be calculated by using the data detected by the motion sensor.

Step404: The terminal determines that no object is currently approaching, and then repeats step403to perform, in real time, determining on data detected by the motion sensor.

It should be noted that, when performing determining on the data detected by the motion sensor in step403, the terminal may also perform determining on data detected by the proximity sensor. However, provided that the data detected by the motion sensor indicates that a current tilt angle of the terminal is less than the first threshold, it may be considered that a result reported by a current sensor (including the motion sensor and the proximity sensor) is that no object is approaching or an object is far away.

When a user picks up the terminal and places the terminal near an ear to answer a call, a conventional posture of holding the terminal by the user is that a head (top) of the terminal is far away from ground, and a tail of the terminal is close to the ground. In this case, a tilt angle of the terminal is usually comparatively large. Therefore, if the tilt angle of the terminal is comparatively small, it is usually considered that the terminal is not picked up and placed near an ear. In this case, if the screen of the terminal is turned off due to a misjudgment, user experience is affected. For example, when a mobile phone is placed on a desktop, if an object is approaching from the top of the mobile phone, the proximity sensor may detect proximity of the object. In this case, because the tilt angle of the mobile phone is almost 0 (less than the first threshold), the terminal determines that no object is approaching, thereby avoiding a false positive. Therefore, when the tilt angle of the terminal is comparatively small, the terminal determines that no object is currently approaching, thereby avoiding a misjudgment.

In addition, for a value of the first threshold, refer to a first included angle α of the proximity sensor of the terminal. In this embodiment of this application, there is an included angle (the first included angle α) between an optical direction of the proximity sensor and a direction of the screen of the terminal. Therefore, when the terminal tilts to a specific angle, an optical emission direction of the proximity sensor is toward a direction of the sky (for example, perpendicular to the horizontal plane and upward). In a scenario in which emergent light emitted by the proximity sensor is irradiated into the sky, a misjudgment usually does not occur. Therefore, the tilt angle of the terminal may be set to the first threshold in the scenario. For example, as shown inFIG.5C, the first included angle of the terminal is a, and the first threshold β may be set as follows: β=90°−α. If the first included angle α is 50°, the first threshold may be set to 40°.

When the motion sensor detects that the tilt angle is small, the terminal may reduce sensitivity of the proximity sensor, so that a status reported by the proximity sensor is always being far away, and the terminal determines that no object is currently approaching. Alternatively, when the motion sensor detects that the tilt angle is small, the terminal may not read the data detected by the proximity sensor, but directly identifies a current status as that no object is approaching.

It should be noted that the determining, by the terminal, that no external object is currently approaching does not mean that the terminal necessarily performs a determining action, but means that the terminal performs a processing procedure corresponding to that no external object is approaching. For example, in a pocket mistouch prevention scenario, if the terminal determines that no external object is currently approaching, the terminal does not display a mistouch prevention interface; in a call screen-off scenario, if the terminal determines that no external object is currently approaching, the terminal does not turn off the screen.

Step405: The terminal determines, based on the data detected by the proximity sensor, whether an object is approaching, and performs step406if an object is approaching, or repeats step403if no object is approaching.

When the tilt angle of the terminal is greater than or equal to the first threshold, it is considered that current data detected by the proximity sensor is accurate. Therefore, the terminal determines, based on the data detected by the proximity sensor, whether an object is approaching. That is, if the tilt angle of the terminal is comparatively large, the terminal is likely to have been picked up. In this case, whether an object is approaching needs to be determined based on the data of the proximity sensor.

Step406: The terminal performs a mistouch prevention action. For example, in a call screen-off scenario, the terminal turns off the screen, to prevent the screen from being accidentally touched; in a pocket mistouch prevention scenario, the terminal does not respond to a current touch operation, to prevent a mistouch.

As shown inFIG.5D, in the pocket mistouch prevention scenario, the performing a mistouch prevention action by the terminal may be: displaying an interface420on the screen, and skipping responding to a current touch operation on the screen. The interface420is in a mistouch prevention mode. When the interface is displayed, no response is given to a touch operation performed by a user on the interface. In some embodiments, the interface420may prompt the user as follows: “Do not block the top of the screen.” If the user accidentally blocks the top of the screen, the user may unblock the top of the screen after viewing the prompt. In some embodiments, the interface420may alternatively prompt the user as follows: “Press the power key and the volume up key at the same time to forcibly exit.”

Turning off the screen not only can prevent a mistouch, but also can save power.

After step406, step403is repeated. In the call screen-off scenario, when step403is repeated, if it is determined that step404needs to be performed, the terminal turns on the screen when determining that no object is currently approaching, so that the user can see and operate the screen.

It should be noted that steps403,404, and405may be specifically implemented in a plurality of manners. For example, in a manner, determining may be first performed on motion data of the terminal, and if the tilt angle is less than the first threshold, it may be directly determined that an object is far away, or if the tilt angle is greater than or equal to the first threshold, determining is performed again based on the data of the proximity sensor. In a second manner, motion data of the terminal and the proximity data of the proximity sensor may be converged for processing. The second manner may be specifically as follows: The terminal may be configured with virtual proximity sensors of different sensitivity. In addition, a mistouch prevention solution and a proximity screen-off solution may be separately configured. For example, the terminal may configure a virtual sensor A, a virtual sensor B, and a virtual sensor C. The three virtual sensors are specific to same proximity sensor hardware, but separately correspond to different determining thresholds, to achieve different sensitivity statuses. The virtual sensor C has no sensitivity, that is, a limit threshold is set for a status of the sensor to ensure that a reported status is always being far away (that is, no object is approaching). The virtual sensor B has medium sensitivity, and a threshold is set for the sensor, so that only an object very close to the sensor is reported as being approaching, that is, sensitivity is medium. The virtual sensor A has high sensitivity, and a threshold is set for the sensor, so that sensitivity of the sensor is higher than that of the virtual sensor B. During detection, the three virtual sensors simultaneously report detected statuses, and flexibly perform switching and distinguishing by using an upper-layer interface and with reference to data detected by the motion sensor. For example, in the proximity screen-off solution, if the motion sensor detects that the tilt angle is less than the first threshold, an upper-layer application invokes data reported by the virtual sensor C, to learn of a status that an object is far away; or if the motion sensor detects that the tilt angle is greater than or equal to the first threshold, an upper-layer application invokes data reported by the virtual sensor A, and determines, based on the high-sensitivity data detected by the virtual sensor A, whether an object is approaching. In the pocket mistouch prevention solution, if the motion sensor detects that the tilt angle is less than the first threshold, an upper-layer application invokes data reported by the virtual sensor C, to learn of a status that an object is far away; or if the motion sensor detects that the tilt angle is greater than or equal to the first threshold, an upper-layer application invokes data reported by the virtual sensor B, and determines, based on the medium-sensitivity data detected by the virtual sensor B, whether an object is approaching. Because the pocket mistouch prevention solution requires lower sensitivity than that required by the proximity screen-off solution, the medium-sensitivity virtual sensor B may be used in the pocket mistouch prevention solution. Certainly, alternatively, only the virtual sensor A and the virtual sensor C may be disposed. In this case, the virtual sensor A replaces the virtual sensor B in the pocket mistouch prevention solution.

In another implementation, the motion sensor may detect a motion range of the terminal, and the terminal performs proximity determining based on the detected motion range and with reference to the proximity sensor. As shown inFIG.6, on a basis of the embodiment shown inFIG.4, step403may be replaced with step403′, and other steps remain unchanged.

Step403′: The terminal determines, based on the data detected by the motion sensor, whether a current motion range of the terminal is less than a second threshold, and performs step404if the motion range is less than the second threshold, or performs step405if the motion range is greater than or equal to the second threshold.

When a user picks up the terminal and places the terminal near an ear to answer a call, there is usually a pick-up action. In this case, a motion range of the terminal is comparatively large. Therefore, if the motion range of the terminal is comparatively small, the terminal is usually not in a state of being picked up to answer a call. In this case, it may be determined that no object is approaching (or an object is far away). For example, the determining whether the motion range of the terminal is less than a second threshold may be as follows: It is determined, based on the motion data (for example, a rotation angle and the motion range) of the terminal, whether the terminal is picked up; and if it is determined that the terminal is picked up, this is equivalent to that the motion range is greater than or equal to the second threshold; or if it is determined that the terminal is not picked up, this is equivalent to that the motion range is less than the second threshold. Content and a value of the second threshold may be determined based on characteristics of the terminal and experimental measurements. This is not limited in this embodiment of this application.

FIG.7AandFIG.7Bare a flowchart of another method for preventing a proximity mistouch according to an embodiment of this application. It should be noted that all steps in embodiments shown inFIG.7AtoFIG.9Bare performed in a call screen-off scenario. In other words, if a terminal currently does not trigger a call screen-off function, the terminal does not perform a method in an embodiment shown inFIG.7A,FIG.7B,FIG.8A,FIG.8B,FIG.9AorFIG.9B. In the solution of this embodiment, proximity detection is mainly implemented through cooperation between a touchscreen and a proximity sensor. This can effectively avoid the misjudgment described in the foregoing scenario 2. As shown inFIG.7A andFIG.7B, the method may include the following steps.

Step701: The terminal enables a proximity detection function. This step is similar to step401. For details, refer to the descriptions in the foregoing embodiment. This embodiment is usually applied to a call screen-off scenario. For example, the terminal may enable the proximity detection function when either of the following two conditions is met. Condition 1: The terminal answers an incoming call in response to a user operation. Condition 2: The terminal initiates a call as a calling party in response to a user operation. When the proximity detection function is enabled on the terminal, the terminal is in a screen-on state.

Step702: After the proximity detection function is enabled, the terminal obtains data detected by the proximity sensor and the touchscreen, and then performs steps703and704.

The proximity sensor may have been enabled before step701, or may be enabled in step701. An occasion at which the proximity sensor is enabled is not limited in this application. After step701, the terminal obtains data detected by the proximity sensor.

In this embodiment, data detected by the touchscreen may be touch data generated when a user touches the touchscreen, that is, when the user is in contact with the touchscreen, the touchscreen may detect which points on the screen are touched by the user. Different touch data is generated when different parts of the user touch the touchscreen. For example, touch data generated when the user performs an operation on the touchscreen by using a finger is different from touch data generated when an ear or a face of the user is in contact with the touchscreen. Some touch data models may be preset on the terminal to indicate different parts of the user. For example, a touch data model 1 is touch data generated when a finger of the user touches the screen, a touch data model 2 is touch data generated when an ear of the user is in contact with the touchscreen, a touch data model 3 is touch data generated when the face of the user is in contact with the touchscreen, and a touch data model 4 is touch data generated when both an ear and the face (which may include a head) of the user are in contact with the touchscreen. Touch data or a touch data model may include an area and an outline of a touch. The terminal compares touch data detected by the touchscreen with a preset touch data model, to obtain a type of the touch data. If the touch data matches the touch data model 1, it indicates that a finger of the user is in contact with the touchscreen. If the touch data matches the touch data model 2, the touch data model 3, or the touch data model 4, it indicates that an ear and/or the face of the user are/is in contact with the touchscreen.

When the terminal is in a screen-on or unlocked state, a detection function of the touchscreen is usually enabled, that is, the touchscreen can detect touch data.

Step703: The terminal determines, based on the data detected by the proximity sensor, whether an external object is approaching, and performs step705if an object is approaching.

Step704: The terminal determines, based on the touch data detected by the touchscreen, whether an external object is in contact, and performs step705if an object is in contact.

When no external object is in contact with the touchscreen, the touchscreen cannot detect touch data. In this case, it is determined that no object is approaching. If the touchscreen detects touch data, the terminal matches the detected touch data against a preset touch data model. If the touch data matches a preset touch data model for an ear or a face, it is determined that an object is in contact, that is, proximity is reported. If the touch data matches a preset touch data model for a finger, it is determined that no object is in contact, that is, being far away is reported.

A sequence of step703and step704is not limited in this embodiment, and the two steps may be alternatively performed simultaneously.

Step705: The terminal turns off the screen, and then performs step706and step707.

Step706: The terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and remains at a screen-off state if an object is approaching, or performs step708if no object is approaching.

Step707: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and remains at a screen-off state if an object is in contact, or performs step708if no object is in contact, that is, an object is far away.

After the operation of turning off the screen is performed in step705, the touchscreen module of the terminal is not powered off or hibernated, but still detects a contact report feature of the touchscreen in the screen-off state.

Step708: Determine whether determining results in step706and step707are both that no object is approaching or no object is in contact, that is, whether the determining results are both “no”; and if yes, that is, it is reported that no object is approaching in step706, and it is reported that no object is in contact in step707, turn on the screen, and repeat step703and step704; or if no, that is, it is reported that no object is approaching or no object is in contact only in one of step706and step707, remain at the screen-off state, and repeat step706and step707.

It should be noted that, when the terminal determines that an object is far away and the screen needs to be turned on, the terminal may perform a screen-on operation after a delay of a specific time. If the terminal determines again within the delay time that an object is approaching, the terminal remains at the screen-off state.

In a scenario in which a user holds the terminal near an ear to make a call, when the proximity sensor does not detect proximity of a head of the user due to a first included angle, if the head (an ear or a face) of the user is in contact with the touchscreen, the terminal may identify that an object is approaching, and further turn off the screen. This can prevent the touchscreen from being accidentally touched, and can further reduce power consumption of the terminal. In this embodiment, the misjudgment in the foregoing scenario 2 can be avoided through cooperation between the proximity sensor and the touchscreen.

Further, touchscreens of some terminals have a floating touch function. For such a terminal, this application provides another embodiment.FIG.8AandFIG.8Bare a flowchart of another method for preventing a proximity mistouch according to an embodiment of this application. In this embodiment, for a terminal with a floating touch function, the embodiment shown inFIG.7AandFIG.7Bis improved. As shown inFIG.8AandFIG.8B, the method includes the following steps.

Step801: The terminal enables a proximity detection function. This step is the same as step701.

Step802: After the proximity detection function is enabled, the terminal obtains data detected by a proximity sensor and a touchscreen, and then performs steps803,804, and805.

Different from that in step702, data detected by the touchscreen and obtained by the terminal includes touch data and floating touch data. For the touch data, refer to the descriptions in the foregoing step702. The floating touch data is data obtained after the terminal learns, based on the floating touch function, that an external object is approaching. It should be noted that the terminal may not enable a full-screen floating touch, but may enable a floating touch only in a specific region at the top of the mobile phone.

Step803: The terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and performs step806if an object is approaching.

Step804: The terminal determines, based on the touch data detected by the touchscreen, whether an external object is in contact, and performs step806if an object is in contact.

Step805: The terminal determines, based on the floating touch data detected by the touchscreen, whether an external object is approaching, and performs step806if an object is approaching.

Step806: The terminal turns off the screen, and then performs steps807,808, and809.

Step807: The terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and remains at a screen-off state if an object is approaching, or performs step810if no object is approaching, that is, an object is far away.

Step808: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and remains at a screen-off state if an object is in contact, or performs step810if no object is in contact, that is, an object is far away.

Step809: The terminal determines, based on floating touch data detected by the touchscreen, whether an external object is approaching, and remains at a screen-off state if an object is approaching, or performs step810if no object is approaching, that is, an object is far away.

Step810: Determine whether determining results in steps807,808, and809are all that no object is approaching or no object is in contact, that is, determine whether the three determining results are all “no”; and if yes, that is, it is reported that no object is approaching in both steps807and809, and it is reported that no object is in contact in step808, turn on the screen, and repeat steps803,804, and805; or if no, that is, it is reported that no object is approaching or no object is in contact only in one or two of steps807,808, and809, remain at the screen-off state, and repeat steps807,808, and809.

Likewise, in this embodiment, the misjudgment in the foregoing scenario 2 can be avoided through cooperation between the proximity sensor and the touchscreen. It should be noted that, even for the terminal with the floating touch, proximity determining in a call scenario may be performed by using the embodiment shown inFIG.7AandFIG.7Balone.

Further, to effectively avoid the misjudgment shown in the foregoing scenario 1 and scenario 2, that is, to avoid a misjudgment of the terminal to a greatest extent, as shown inFIG.9AandFIG.9B, an embodiment of this application provides another implementation with reference toFIG.4,FIG.7AandFIG.7B. In the solution of this embodiment, proximity detection is implemented through cooperation between a motion sensor, a touchscreen, and a proximity sensor, and the solution may be mainly applied to a call screen-off scenario. As shown inFIG.9AandFIG.9B, the method includes the following steps.

Step901: The terminal enables a proximity detection function. This step is the same as step701.

Step902: After the proximity detection function is enabled, the terminal obtains data detected by the proximity sensor and the motion sensor.

Step903: The terminal determines, based on data detected by the motion sensor, whether a current tilt angle of the terminal is less than a first threshold, and performs step904if the tilt angle is less than the first threshold, or performs steps905and906if the tilt angle is greater than or equal to the first threshold.

Step904: The terminal determines that no object is currently approaching, and keeps the screen on, and then repeats step903to perform, in real time, determining on data detected by the motion sensor.

Steps902to904are the same as steps402to404respectively.

Step905: The terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and performs step907if an object is approaching.

Step906: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and performs step907if an object is in contact.

Steps905and906are the same as steps704and705respectively.

Step907: The terminal turns off the screen, and then performs step908and step909.

Step908: The terminal determines, based on data detected by the proximity sensor, whether an external object is approaching, and remains at a screen-off state if an object is approaching, or performs step910if no object is approaching, that is, an object is far away.

Step909: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and remains at a screen-off state if an object is in contact, or performs step910if no object is in contact, that is, an object is far away.

Step910: Determine whether determining results in step908and step909are both that no object is approaching or no object is in contact, that is, whether the determining results in the two steps are both “no”; and if yes, turn on the screen, and repeat step903; or if no, remain at the screen-off state, and repeat step908and step909.

It should be noted that, in an implementation, the terminal may detect a current tilt angle in real time. Provided that the terminal detects that the tilt angle is less than the first threshold, the terminal determines that a current status is that an object is far away (that is, no object is approaching), and then turns on the screen. In other words, regardless of which step is performed, the terminal turns on the screen, provided that the terminal detects that the current tilt angle is less than the first threshold. In this implementation, step910may be replaced as follows: Determine whether determining results in step908and step909are both “no”; and if yes, turn on the screen, and repeat step903; or if no, remain at the screen-off state, and repeat step903.

In another implementation, when detecting that the tilt angle is less than the first threshold, the terminal also needs to determine whether the touchscreen has touch data indicating that an object is approaching (or in contact). If the tilt angle is less than the first threshold and the touchscreen does not detect touch data indicating proximity, the terminal determines that an object is far away; or if the tilt angle is less than the first threshold but the touchscreen detects touch data indicating proximity, the terminal determines that an object is approaching. That is, step904may be replaced with904′. Specifically, step904′ is as follows: The terminal further determines, based on touch data detected by the touchscreen, whether an external object is in contact; and performs step907if an object is in contact; or if no object is in contact, determines that no object is currently approaching, keeps the screen on, and then repeats step903to perform, in real time, determining on data detected by the motion sensor.

With reference to the embodiments shown inFIG.4,FIG.8AandFIG.8B, the embodiment shown inFIG.9AandFIG.9Bmay be further improved. Specifically, in the embodiment shown inFIG.9AandFIG.9B, step906may be replaced with step906A and step906B, and step909may be replaced with step909A and step909B. Details are as follows.

Step906A: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and performs step907if an object is in contact.

Step906B: The terminal determines, based on floating touch data detected by the touchscreen, whether an external object is approaching, and performs step907if an object is approaching.

Step909A: The terminal determines, based on touch data detected by the touchscreen, whether an external object is in contact, and remains at a screen-off state if an object is in contact, or performs step910if no object is in contact, that is, an object is far away.

Step909B: The terminal determines, based on floating touch data detected by the touchscreen, whether an external object is approaching, and remains at a screen-off state if an object is approaching, or performs step910if no object is approaching, that is, an object is far away.

Likewise, in this embodiment, the terminal may detect a current tilt angle in real time. Provided that the terminal detects that the tilt angle is less than the first threshold, the terminal determines that a current status is that an object is far away (that is, no object is approaching), and then keeps the screen on or turns on the screen. Alternatively, when detecting that the tilt angle is less than the first threshold, the terminal may further determine whether there is touch data indicating that an object is approaching (or in contact). If the tilt angle is less than the first threshold and the touchscreen does not detect touch data indicating proximity, the terminal determines that an object is far away, and keeps the screen on or turns on the screen; or if the tilt angle is less than the first threshold but the touchscreen detects touch data indicating proximity, the terminal determines that an object is approaching, and keeps the screen off or turns off the screen.

It can be understood that, to implement the foregoing functions, the terminal includes corresponding hardware structures and/or software modules for performing the functions. A person skilled in the art should easily be aware that, in combination with the examples described in the embodiments disclosed in this specification, units, algorithm steps may be implemented by hardware or a combination of hardware and computer software. Whether a function is performed by hardware or hardware driven by computer software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the embodiments of this application.

In the embodiments of this application, functional modules of the terminal may be divided based on the foregoing method examples. For example, the functional modules may be divided based on the functions, or at least two functions may be integrated in one processing module. The foregoing integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module. It should be noted that, in the embodiments of this application, module division is an example, and is merely logical function division and may be other division in actual implementation.

When the integrated unit is used,FIG.10shows one schematic structural diagram of the terminal100in the foregoing embodiments. The terminal100may include a processing module1001, a display module1002, a proximity sensing module1003, and a motion sensing module1004. In some embodiments, the terminal100may further include a communications module, and the communications module includes an RF module, a Bluetooth module, a Wi-Fi module, and the like.

The processing module1001is configured to control and manage an action of the terminal100. The display module1002is configured to display image content or receive an input operation of a user. The proximity sensing module1003is configured to detect proximity of an external object. The motion sensing module1004is configured to detect a motion status of the terminal. The communications module is used for the terminal100to communicate with another device.

Specifically, the processing module1001may be configured to support the terminal100in performing steps401to406,403′,701to708,801to810,901to910,904′,906A,906B,909A, and909B in the foregoing method embodiments, and/or another process used for the technology described in this specification. The display module1002may be configured to: when the terminal100performs the foregoing method embodiments, support the terminal100in detecting touch data or floating touch data, and reporting the detected data to the processing module1001. The proximity sensing module1003may be configured to: when the terminal100performs the foregoing method embodiments, support the terminal100in detecting proximity of an external object by transmitting/receiving infrared light, and reporting a detection result to the processing module1001. The motion sensing module1004may be configured to: when the terminal100performs the foregoing method embodiments, support the terminal100in detecting a motion status of the terminal, and reporting a detection result to the processing module1001.

Certainly, unit modules in the terminal100include but are not limited to the processing module1001, the display module1002, the proximity sensing module1003, the motion sensing module1004, and the like. For example, the terminal100may further include a storage module. The storage module may be configured to store program code and data.

The processing module1001may be equivalent to the processor110in the embodiment shown inFIG.1, or the processing module1001may be included in the processor110. The display module1002may be equivalent to the touchscreen in the embodiment shown inFIG.1. The proximity sensing module1003may be equivalent to the proximity sensor40or the proximity sensor180G in the foregoing embodiments. The motion sensing module1004may be equivalent to one or more of the acceleration sensor180E, the gyroscope sensor180B, and the direction sensor, and the like in the foregoing embodiments.

An embodiment of this application further provides a computer storage medium. The computer storage medium stores computer program code. When the computer program code is executed, the terminal100performs a related method in any one of the embodiments inFIG.4, andFIG.6toFIG.9B.

An embodiment of this application further provides a computer program product. When the computer program product runs on a computer, the computer is enabled to perform a related method in any one of the embodiments inFIG.4, andFIG.6toFIG.9B.

The terminal100, the computer storage medium, and the computer program product provided in the embodiments of this application are all configured to perform the corresponding methods provided in the foregoing descriptions. Therefore, for beneficial effects that can be achieved by the terminal100, the computer storage medium, and the computer program product, refer to the beneficial effects of the corresponding methods provided in the foregoing descriptions. Details are not described herein again.

The foregoing descriptions about the implementations allow a person skilled in the art to clearly understand that, for the purpose of convenient and brief description, division of the foregoing functional modules is taken as an example for illustration. In actual application, the foregoing functions can be allocated to different modules and implemented based on a requirement, that is, an inner structure of an apparatus is divided into different functional modules to implement all or some of the functions described above.