Method for executing falling bag detection and terminal equipment
By detecting the acceleration waveform of the terminal device and the close-to-light sensor state, accurate bag-to-pocket detection is achieved when in the pocket, solving the problem of increased power consumption caused by accidentally touching and clicking, and improving the battery life and user experience of the terminal device.
Patent Information
- Application Number
- CN202410116795.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2025-07-29
AI Technical Summary
The power consumption caused by the error touching of existing terminal devices when in the pocket increases, affecting battery life and user experience.
By detecting the acceleration waveform and angle of the terminal device in the direction of motion, combined with the proximity of the light sensor state, it is determined whether it falls into the pocket, and performing bag-off detection when necessary to avoid accidentally touching and clicking.
It reduces the power consumption of terminal devices, improves user experience, avoids invalid detection in non-pocketed scenarios, and improves the accuracy and energy-saving effect of detection.
Smart Images

Figure CN120390052A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of terminals, and in particular, to a method and a terminal device for performing pocket detection. Background Art
[0002] With the development of intelligent terminal technology, capacitive touch screens (Touch Panels, TPs) have been widely used in various terminal devices including touch screens (such as mobile phones, tablets, etc.). Users can perform various operations on the touch screen of the terminal device with their fingers. However, during the use of the terminal device by the user, there is often a situation where the user forgets to lock the screen and directly puts the terminal device in a non-locked state into a pocket such as a trouser pocket. Since pockets such as trouser pockets are close to the human body, it will trigger the touch screen in the non-locked state to generate accidental touch clicks, and accidental touch clicks on the touch screen may cause many adverse effects (such as accidental calls, accidental messages, etc.), thus affecting the user experience.
[0003] In the existing anti-accidental touch technology, in order to avoid accidental touches of the terminal device in the non-locked state in the pocket, the terminal device usually executes the pocket detection method in real time to ensure that the non-locked terminal device can start the automatic screen locking function in time when it is in the pocket and lock the screen of the terminal; however, this way of performing pocket detection will obviously increase the power consumption of the terminal device and affect the battery life of the terminal device. Summary of the Invention
[0004] This application provides a method and a terminal device for performing pocket detection, which can reduce the power consumption of the terminal device and improve the user experience.
[0005] To achieve the above object, this application adopts the following technical solutions:
[0006] In a first aspect, a method for performing pocket detection is provided. The method includes: when the touch screen is in a non-locked state, detecting the acceleration waveform of the terminal device in the moving direction; when the peak of the acceleration waveform is greater than a first preset value and the full width at half maximum of the acceleration waveform is within a preset range, determining the angle between the moving direction and the gravity direction; when the angle is less than a preset angle, performing pocket detection.
[0007] The above method can be executed by a terminal device including a touch screen, or by a module (such as a processor, a chip, or a chip system, etc.) applied in the terminal device, or can also be implemented by a logic module or software that can implement all or part of the functions of the terminal device. Compared with the existing anti-mis-touch technology that causes an increase in the power consumption of the terminal device; in this application, the acceleration waveform of the terminal device in the moving direction is first detected. When the peak of the acceleration waveform is greater than a first preset value and the full width at half maximum of the acceleration waveform is within a preset range, it indicates that the peak of the acceleration waveform is a pocket entry peak (i.e., the acceleration peak generated in the moving direction when the terminal device enters the pocket). After that, the angle between the moving direction and the gravity direction is further determined. When the angle is less than a preset angle, it indicates that the terminal device has a tendency to enter the pocket in the direction of gravity. At this time, the pocket entry detection is performed. This can not only avoid wasting the power of the terminal by performing pocket entry detection in non-pocket entry scenarios, but also improve the user experience of using the terminal.
[0008] In a possible implementation manner, before performing the pocket entry detection, the method further includes: detecting the current posture of the terminal device; when the angle is less than the preset angle, performing the pocket entry detection, including: when the current posture is the target posture, and when the angle is less than the preset angle, performing the pocket entry detection, and the target posture is the posture with the top of the touch screen facing down.
[0009] In order to improve the accuracy of determining whether the terminal device has a pocket entry action, in some embodiments, the terminal device can jointly determine whether the terminal device has a pocket entry action according to the current posture and the angle, so as to reduce the probability of false triggering of the pocket entry detection and avoid wasting the power of the terminal caused by invalid pocket entry detection in non-pocket entry scenarios.
[0010] In a possible implementation manner, performing the pocket entry detection includes: obtaining N capacitance differences on the touch screen, where the N capacitance differences are the absolute values of the differences between N capacitance original values and the capacitance standard value, and N is a positive integer greater than 1; determining M capacitance differences from the N capacitance differences, where the M capacitance differences are the capacitance differences greater than the capacitance threshold, and M is a positive integer less than N; when M is greater than a second preset value, performing clustering processing on the M capacitance differences to obtain at least one clustering result; processing at least one clustering result through a classifier to determine whether the terminal device is in the pocket, and the output result of the classifier is used to indicate whether the terminal device is in the pocket.
[0011] Compared with the method of directly judging whether the terminal device is in the pocket according to the number of capacitance reporting points, in this application, clustering processing is first performed on the capacitance differences to remove the capacitance differences with small correlation, and the clustering results of the capacitance differences with large correlation are retained; then, the classifier is used to perform classification processing on the clustering results of the capacitance differences with large correlation to improve the accuracy of the classifier in determining whether the terminal device is in the pocket.
[0012] In a possible implementation, performing pocket detection includes: detecting the state of the proximity light sensor of the terminal device; if the state is an occluded state, determining that the terminal device is in a pocket.
[0013] Since in the normal use of the terminal device, the proximity light sensor is usually in a non-occluded state, and when the terminal device is in a pocket, the surrounding environment of the proximity light sensor becomes dark and is in an occluded state; therefore, the terminal device can quickly determine whether the terminal device is in a pocket according to whether the proximity light sensor is in an occluded state, with high efficiency and good accuracy.
[0014] In a possible implementation, when the terminal device is in a pocket, the method further includes: entering the locked screen state.
[0015] When the terminal device is in a pocket, the terminal can switch from a non-locked screen state (such as a lit screen state) to a locked screen state to prevent the touch screen from being frequently misclicked in the pocket, thereby affecting the user experience.
[0016] In a possible implementation, before entering the locked screen state, the method further includes: recording the continuous duration that the terminal device is in a pocket; when the continuous duration is less than a preset duration, being in an anti-misclick state within the continuous duration.
[0017] In some scenarios (such as when the user temporarily puts a terminal device such as a mobile phone into the trouser pocket when washing hands), the user does not want the terminal device to enter the locked screen state. At this time, the terminal device can record its continuous duration in the pocket. During the period when the continuous duration is less than a preset duration (such as 1 s), the terminal device can temporarily enter the anti-misclick state instead of the locked screen state. In this way, even if the user takes out the terminal from the pocket for a short time, there is no need to unlock it again and can continue to be used, which is convenient, fast and has good security.
[0018] In a possible implementation, after being in the anti-misclick state within the continuous duration, the method further includes: when the state of the proximity light sensor of the terminal device is a non-occluded state, exiting the anti-misclick state.
[0019] In some embodiments, the terminal device is in the anti-misclick state in the pocket and the proximity light sensor is in the occluded state; when the state of the proximity light sensor is a non-occluded state, it indicates that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-misclick state to facilitate user use.
[0020] In a possible implementation, after being in the anti-misclick state within the continuous duration, the method further includes: when the current posture of the terminal device is a posture with the top of the touch screen facing up, exiting the anti-misclick state.
[0021] In some embodiments, the terminal device is in an anti-mis-touch state in the pocket, and the top of the touch screen may be in a horizontal direction or inclined towards the direction of gravity; when the top of the touch screen is in an upward posture (or upward attitude), it indicates that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mis-touch state for the user to continue using.
[0022] In a possible implementation, after being in the anti-mis-touch state for a continuous duration, the method further includes: when the terminal device leaves the pocket, in response to a gesture operation of the user, exiting the anti-mis-touch state.
[0023] In some embodiments, the terminal device is in an anti-mis-touch state in the pocket; when the terminal device is taken out of the pocket, the user can exit the anti-mis-touch state on the touch screen through a gesture operation (for example, quickly swiping up twice) according to their own usage needs; this operation of exiting the anti-mis-touch state can be exited according to user needs, which is convenient and flexible, and provides a good user experience.
[0024] In a possible implementation, the method further includes: when the continuous duration is greater than or equal to a preset duration, switching from the anti-mis-touch state to the lock screen state.
[0025] In some scenarios, when the continuous duration is greater than or equal to a preset duration (for example, 1 s), it indicates that the user may not use the terminal device temporarily; the terminal device can switch from the anti-mis-touch state to the lock screen state to turn off the touch screen, save the power consumption of the terminal, and avoid accidental touch clicks.
[0026] In a second aspect, another method for performing pocket detection is provided. The method includes: when the touch screen is in a non-lock screen state, determining the included angle between the movement direction of the terminal device and the direction of gravity; when the included angle is less than a preset included angle, detecting the acceleration waveform of the terminal device in the movement direction; when the peak of the acceleration waveform is greater than a first preset value and the full width at half maximum of the acceleration waveform is within a preset range, performing pocket detection.
[0027] The above method can be executed by a terminal device including a touch screen, or by a module (such as a processor, a chip, or a chip system, etc.) applied in the terminal device, or can also be implemented by a logic module or software that can implement all or part of the functions of the terminal device. Compared with the existing anti-mis-touch technology that causes an increase in the power consumption of the terminal device; in this application, first, it is determined whether the terminal device has a tendency to fall into the pocket in the direction of gravity according to the included angle between the movement direction of the terminal device and the direction of gravity, and then the acceleration waveform of the terminal device in the movement direction is detected. When the peak of the acceleration waveform is greater than the first preset value and the full-width at half-maximum of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a falling-into-pocket peak (that is, the acceleration peak generated in the movement direction when the terminal device falls into the pocket). At this time, the falling-into-pocket detection is performed. In this way, not only can the waste of the terminal's power consumption caused by performing the falling-into-pocket detection in a non-falling-into-pocket scenario be avoided, but also the user experience of using the terminal can be improved.
[0028] In a possible implementation manner, before performing the falling-into-pocket detection, the method further includes: detecting the current posture of the terminal device; when the peak of the acceleration waveform is greater than the first preset value and the full-width at half-maximum of the acceleration waveform is within the preset range, performing the falling-into-pocket detection, including: when the current posture is the target posture, and when the peak of the acceleration waveform is greater than the first preset value and the full-width at half-maximum of the acceleration waveform is within the preset range, performing the falling-into-pocket detection, and the target posture is the posture with the top of the touch screen facing down.
[0029] In order to improve the accuracy of determining that the terminal generates a falling-into-pocket action, in some embodiments, the terminal device can jointly determine whether the terminal device generates a falling-into-pocket action according to the current posture and the acceleration waveform, so as to reduce the probability of mis-triggering the falling-into-pocket detection and avoid the waste of the terminal's power consumption caused by invalid falling-into-pocket detection in a non-falling-into-pocket scenario.
[0030] In a possible implementation manner, performing the falling-into-pocket detection includes: obtaining N capacitance differences on the touch screen, where the N capacitance differences are the absolute values of the differences between N original capacitance values and the capacitance standard value, and N is a positive integer greater than 1; determining M capacitance differences from the N capacitance differences, where the M capacitance differences are the capacitance differences greater than the capacitance threshold, and M is a positive integer less than N; when M is greater than the second preset value, performing clustering processing on the M capacitance differences to obtain at least one clustering result; processing at least one clustering result through a classifier to determine whether the terminal device is in the pocket, and the output result of the classifier is used to indicate whether the terminal device is in the pocket.
[0031] Compared with the method of directly determining whether the terminal device is in the pocket based on the number of capacitance reporting points, the present application first performs clustering processing on the capacitance differences to remove the capacitance differences with low relevance and retain the clustering results of the capacitance differences with high relevance; then, a classifier is used to perform classification processing on the clustering results of the capacitance differences with high relevance to improve the accuracy of the classifier in determining whether the terminal device is in the pocket.
[0032] In a possible implementation manner, performing pocket detection includes: detecting the state of the proximity light sensor of the terminal device; if the state is an occlusion state, determining that the terminal device is in the pocket.
[0033] Since the proximity light sensor of the terminal device is usually in a non-occluded state during normal use, and when the terminal device is in the pocket, the surrounding environment of the proximity light sensor becomes dark and is in an occluded state; therefore, the terminal device can quickly determine whether the terminal device is in the pocket according to whether the proximity light sensor is in an occluded state, with high efficiency and good accuracy.
[0034] In a possible implementation manner, when the terminal device is in the pocket, the method further includes: entering the locked screen state.
[0035] When the terminal device is in the pocket, the terminal can switch from the non-locked screen state (such as the screen-on state) to the locked screen state to prevent the touch screen from being frequently misclicked in the pocket, thereby affecting the user experience.
[0036] In a possible implementation manner, before entering the locked screen state, the method further includes: recording the continuous duration of the terminal device in the pocket; when the continuous duration is less than a preset duration, being in an anti-misclick state within the continuous duration.
[0037] It can be seen that in some scenarios (such as when the user temporarily puts a terminal device such as a mobile phone into the trouser pocket when washing hands), the user does not want the terminal device to enter the locked screen state. At this time, the terminal device can record its continuous duration in the pocket. Within the period when the continuous duration is less than the preset duration (such as 1 s), the terminal device can temporarily enter the anti-misclick state instead of the locked screen state. In this way, even if the user takes out the terminal from the pocket for a short time, there is no need to unlock it again and can continue to be used, which is convenient, fast, and has good security.
[0038] In a possible implementation manner, after being in the anti-misclick state within the continuous duration, the method further includes: when the state of the proximity light sensor of the terminal device is a non-occluded state, exiting the anti-misclick state.
[0039] In some embodiments, the terminal device is in a state of preventing accidental touch when in a pocket, and the proximity light sensor is in an occluded state; when the state of the proximity light sensor is a non-occluded state, it indicates that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the state of preventing accidental touch to facilitate user use.
[0040] In a possible implementation manner, after being in the state of preventing accidental touch for a continuous duration, the method further includes: when the current posture of the terminal device is a posture with the top of the touch screen facing up, exiting the state of preventing accidental touch.
[0041] In some embodiments, the terminal device is in a state of preventing accidental touch when in a pocket, and the top of the touch screen may be in a horizontal direction or biased towards the direction of gravity; when the top of the touch screen is in an upward posture (or an upward posture), it indicates that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the state of preventing accidental touch to facilitate the user's continued use.
[0042] In a possible implementation manner, after being in the state of preventing accidental touch for a continuous duration, the method further includes: when the terminal device leaves the pocket, in response to a user's gesture operation, exiting the state of preventing accidental touch.
[0043] In some embodiments, the terminal device is in a state of preventing accidental touch when in a pocket; when the terminal device is taken out of the pocket, the user can exit the state of preventing accidental touch through a gesture operation (such as quickly swiping up twice) on the touch screen according to their own usage needs; this operation of exiting the state of preventing accidental touch can be exited according to the user's needs, which is convenient and flexible, and provides a good user experience.
[0044] In a possible implementation manner, the method further includes: when the continuous duration is greater than or equal to a preset duration, switching from the state of preventing accidental touch to the locked screen state.
[0045] In some scenarios, when the continuous duration is greater than or equal to a preset duration (such as 1 s), it indicates that the user may not use the terminal device temporarily; the terminal device can switch from the state of preventing accidental touch to the locked screen state to turn off the touch screen, save the power consumption of the terminal, and avoid accidental touch clicks.
[0046] In a third aspect, an embodiment of the present application provides a terminal device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the terminal device executes the method of any one of the first aspects.
[0047] In a fourth aspect, an embodiment of the present application provides a terminal device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the terminal device executes the method of any one of the second aspects.
[0048] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the method according to any one of the first aspect.
[0049] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the method according to any one of the second aspect.
[0050] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes computer program code that, when run on a terminal device, causes the terminal device to execute the method according to any one of the first aspect.
[0051] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes computer program code that, when run on a terminal device, causes the terminal device to execute the method according to any one of the second aspect.
[0052] In a ninth aspect, an embodiment of the present application provides a chip system, which includes a processing circuit and a storage medium storing computer program instructions; when the computer program instructions are executed by the processing circuit, the method according to any one of the first aspect is implemented.
[0053] Optionally, the processing circuit in the above chip system may be replaced by a processor, and the storage medium may be replaced by a memory. Optionally, the chip system may further include a communication interface for implementing communication between the chip system and an external device.
[0054] In a tenth aspect, an embodiment of the present application provides a chip system, which includes a processing circuit and a storage medium storing computer program instructions; when the computer program instructions are executed by the processing circuit, the method according to any one of the second aspect is implemented.
[0055] Optionally, the processing circuit in the above chip system may be replaced by a processor, and the storage medium may be replaced by a memory. Optionally, the chip system may further include a communication interface for implementing communication between the chip system and an external device.
[0056] For the beneficial effects of the technical solutions in the third aspect to the tenth aspect of the present application, reference may be made to the beneficial effects of the technical solutions in the first aspect or the second aspect, which will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 FIG. 1 is a schematic structural diagram of a terminal device 100 provided by an embodiment of the present application;
[0058] Figure 2 It is a schematic diagram of the software structure of a terminal device 100 provided by an embodiment of the present application;
[0059] Figure 3 It is a schematic flowchart of a method 300 for performing bagging detection provided by an embodiment of the present application;
[0060] Figure 4 It is a schematic diagram of creating a coordinate system provided by an embodiment of the present application;
[0061] Figure 5 It is a schematic flowchart of a method 500 for performing bagging detection provided by an embodiment of the present application;
[0062] Figure 6 It is a schematic diagram of the capacitance characteristics of several terminal devices in pockets of different materials provided by an embodiment of the present application;
[0063] Figure 7 It is a schematic diagram of setting an anti-misoperation mode provided by an embodiment of the present application;
[0064] Figure 8 It is a schematic diagram of a side of a terminal device including a fingerprint unlocking button provided by an embodiment of the present application;
[0065] Figure 9 It is a schematic diagram of a terminal device in a pocket provided by an embodiment of the present application;
[0066] Figure 10 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Detailed implementation manners
[0067] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings.
[0068] Figure 1 It shows a schematic diagram of the structure of a terminal device 100.
[0069] The terminal device 100 may include a mobile phone, a smart watch, a smart player, a foldable electronic device, a tablet computer, etc. The specific type of the terminal device 100 is not particularly limited in the embodiments of the present application.
[0070] The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor 180, a button 190, an indicator 191, a subscriber identification module (SIM) card interface 192, and a display screen 193, etc.
[0071] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device 100. In some other embodiments of the present application, the terminal device 100 may include more or fewer components, or combine certain components, or split certain components, or have different component arrangements. Figure 1 More or fewer components, or combine certain components, or split certain components, or different component arrangements. Figure 1 The components in can be implemented in hardware, software, or a combination of software and hardware.
[0072] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0073] The processor 110 may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0074] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. This memory may store instructions or data that the processor 110 has used or uses frequently. If the processor 110 needs to use this instruction or data, it can be directly called from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0075] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, a camera, etc. through at least one of the above interfaces.
[0076] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0077] The USB connector 130 is an interface that conforms to the USB standard specification and can be used to connect the terminal device 100 and peripheral devices. The charging management module 140 is used to receive the charging input from a charger. Among them, the charger may be a wireless charger or a wired charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 193, the wireless communication module 160, etc. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
[0078] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0079] The mobile communication module 150 may provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.
[0080] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs an audio signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 193. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
[0081] The wireless communication module 160 may provide solutions for wireless communications applied to the terminal device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), near field communication (NFC), etc. In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other terminal devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), etc.
[0082] The terminal device 100 may implement the display function through the GPU, the display screen 193, and the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0083] The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the terminal device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card. Or files such as music and videos are transferred from the terminal device to the external memory card.
[0084] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function, etc. The data storage area can store data created during the use of the terminal device 100, etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the terminal device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.
[0085] The terminal device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. Such as music playback, etc.
[0086] The sensor 180 can include a pressure sensor, a gyroscope sensor, an acceleration sensor, a proximity light sensor, an ambient light sensor, a touch sensor, etc., and is used to convert various signals from the outside world into electrical signals or other required forms of information for output.
[0087] The pressure sensor is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor can be disposed on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 193, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor, and can also calculate the position of the touch according to the detection signal of the pressure sensor.
[0088] The gyroscope sensor can be used to determine the motion posture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 around three axes (i.e., the x-axis, the y-axis, and the z-axis) can be determined through the gyroscope sensor.
[0089] The acceleration sensor can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device and is applied to applications such as horizontal and vertical screen switching and pedometers.
[0090] A proximity light sensor may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The terminal device 100 emits infrared light outward through the light-emitting diode. The terminal device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100. The terminal device 100 may use the proximity light sensor to detect whether the terminal is in a pocket, so as to facilitate automatic unlocking and locking of the terminal.
[0091] An ambient light sensor is used to sense the ambient light brightness. The ambient light sensor can also cooperate with the proximity light sensor to detect whether the terminal device 100 is in a pocket to prevent accidental touch.
[0092] A touch sensor, also known as a "touch panel". The touch sensor may be disposed on the display screen 193, and the touch sensor and the display screen 193 form a touch screen, also known as a "touch screen". The touch sensor is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 193. In other embodiments, the touch sensor may also be disposed on the surface of the terminal device 100, at a different position from the display screen 193.
[0093] The button 190 may include a power-on button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device 100 can receive button inputs and generate key signal inputs related to the user settings and function control of the terminal device 100.
[0094] The indicator 191 may be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate information, missed calls, notifications, etc.
[0095] Optionally, the terminal device may further include a SIM card interface 192 for connecting a SIM card. The SIM card can be in contact with and separated from the terminal device 100 by being inserted into or removed from the SIM card interface 192. The terminal device 100 may support one or more SIM card interfaces 192. The SIM card interface 192 may support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 192 at the same time. The types of multiple cards can be the same or different. The SIM card interface 192 can also be compatible with different types of SIM cards. The SIM card interface 192 can also be compatible with external memory cards.
[0096] The display screen 193 is used to display data such as video interfaces and user setting interfaces. For example, the display screen 193 can be used to display information such as video content. The display screen 193 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode, etc. In some embodiments, the display screen can be a foldable or rollable display screen.
[0097] The above terminal device 100 can also adopt other architectures. Taking the Harmony system as an example, the software architecture of the terminal device 100 will be exemplarily described in the embodiments of the present invention. It should be understood that the solution provided in this application can also be applied to other types of operating systems such as the Android operating system, the Apple operating system, and the Windows operating system.
[0098] Figure 2 It is a schematic diagram of the software structure of the terminal device 100 in the embodiments of the present application.
[0099] In some implementation schemes, the Harmony system includes four layers, namely the kernel layer, the system basic service layer, the framework layer, and the application layer from bottom to top.
[0100] The Harmony system adopts a multi-kernel design. Optionally, it includes a Linux kernel, a Harmony micro-kernel, and a lightweight Internet of Things operating system kernel (lite operating system, LiteOS). Through this design, devices with different device capabilities can select appropriate system kernels. The kernel layer also includes a kernel abstract layer, which provides basic kernel capabilities for other Harmony layers, such as process management, thread management, memory management, file system management, network management, and peripheral management.
[0101] The system basic service layer is a collection of the core capabilities of the Harmony system, supporting the Harmony system to provide services to application services through the framework layer in scenarios of multi-device deployment. Optionally, this layer includes the following parts:
[0102] System Basic Capability Subsystem Set: It provides basic capabilities for the operation, scheduling, migration, etc. of distributed applications on multiple devices in the Harmony system. It consists of distributed soft bus, distributed data management and file management, distributed task scheduling, Ark Runtime, distributed security and privacy protection, etc. Among them, Ark Runtime provides multi-language runtimes for C / C++ / JavaScript and basic system class libraries, and also provides a runtime for Java programs statically compiled by the Ark compiler (i.e., the part developed in the Java language in the application or framework layer).
[0103] Basic Software Service Subsystem Set: It provides common and general software services for the Harmony system. It consists of subsystems such as graphics, distributed media, distributed AI, multi-modal input, mobile sensing development platform (MSDP) & device virtualization technology (DV), event notification, telephone service, design for X (DFX), etc. The Basic Software Service Subsystem Set can be tailored according to the deployment environment of different device forms, and each subsystem can be tailored according to the function granularity internally.
[0104] Enhanced Software Service Subsystem Set (see the enhanced software part outlined by the dotted line in Figure 2 ): It provides differentiated and enhanced software services for different devices in the Harmony system. It consists of subsystems such as tablet business software, smart screen business software, in-vehicle infotainment system business software, Internet of Things (IoT) business software, etc. The Enhanced Software Service Subsystem Set can be tailored according to the deployment environment of different device forms, and can be tailored at the subsystem granularity. Each subsystem can be tailored according to the function granularity internally.
[0105] Harmony Driver Foundation (HDF) and Hardware Abstraction Layer (HAL): They are the basis for the opening of the hardware ecosystem of the Harmony system. They provide hardware capability abstraction for the hardware upwards and a development framework and runtime environment for various peripheral drivers downwards.
[0106] Hardware Service Subsystem Set: It provides common and adapted hardware services for the Harmony system. It consists of hardware service subsystems such as general Sensor, location, power supply, USB, biometric recognition, etc. The Hardware Service Subsystem Set can be tailored according to the deployment environment of different device forms, and each subsystem can be tailored according to the function granularity internally.
[0107] Proprietary Hardware Service Subsystem (seeFigure 2 Proprietary hardware (enclosed by the dashed line): Provides differentiated hardware services for different devices within the Harmony system. These services may include tablet, car, wearable, and IoT subsystems. The proprietary hardware service subsystem can be tailored to the subsystem granularity, and each subsystem can be tailored to the functional granularity.
[0108] The framework layer provides Harmony system applications with a user program framework and meta-capability framework in multiple languages, such as Java / C / C++ / JavaScript, as well as a multi-language framework application programming interface (API) that is open to various software and hardware services.
[0109] The application layer includes system applications and third-party applications (or extended applications), including camera, gallery, calendar, call, drawing, navigation, WLAN, music, video, short messaging, and other applications. Applications in the Harmony system are built based on atomic capabilities (AA) and feature capabilities (FA).
[0110] The following has Figure 1 and Figure 2 Taking the mobile phone of the structure shown as an example, combined with the method for performing bag drop detection provided in this application, the processing flow of the above-mentioned terminal device 100 is exemplarily described.
[0111] For example, when a user is waiting at the airport and reading an e - book on their mobile phone; when the user hears the ticket - checking notice, they casually put the non - locked - screen mobile phone into their trouser pocket; at this time, the acceleration sensor of the mobile phone can detect the acceleration waveform of the mobile phone in the moving direction; when the peak value of the acceleration waveform is greater than the first preset value and the full - width at half - maximum is within a preset range, it indicates that the peak of the acceleration waveform is a pocket - entry peak; after the mobile phone determines the pocket - entry peak, it then determines the angle between the moving direction and the gravity direction; when this angle is less than the preset angle, it indicates that the mobile phone has a tendency to move towards the gravity direction and enter the pocket; at this time, the mobile phone performs pocket - entry detection; the mobile phone uses its own proximity light sensor to detect whether the environment around it is getting darker; when the mobile phone determines that it is in an occluded state based on the detection value of the proximity light sensor, it can enter the anti - accidental - touch state or the locked - screen state; in some scenarios, if the mobile phone is in the pocket for a short time, the mobile phone can first enter the anti - accidental - touch state. For example, a anti - accidental - touch interface is generated (or displayed) on the touch screen of the mobile phone to prevent the touch screen from being accidentally clicked; in other scenarios, if the mobile phone needs to be in the pocket for a long time, in order to prevent the touch screen from being accidentally clicked, the mobile phone can activate the automatic lock - screen function to turn off the touch screen and make the mobile phone enter the locked - screen state. For specific details, please refer to the detailed description in the following embodiments, which will not be elaborated here for now.
[0112] It should be noted that the terminal devices applicable to this method are not limited to Figure 1 and Figure 2 the software and hardware structures shown, and in actual applications, the software and hardware system architectures shown in Figure 1 and Figure 2 can be deformed according to specific application scenarios, and this application does not make any limitations in this regard.
[0113] As can be seen from the content introduced in the background technology, in the pocket accidental - touch scenario, through the anti - accidental - touch technology, it can help users automatically lock the non - locked - screen terminal devices (such as mobile phones, etc.) in the pocket, thus avoiding the situation where the touch screen is accidentally clicked; however, the existing anti - accidental - touch technology increases the power consumption of the terminal device when performing pocket - entry detection, affecting the battery life of the terminal device. Therefore, this application proposes a method for performing pocket - entry detection; this method can reduce the power consumption of the terminal device and improve the user experience.
[0114] Before introducing the method for performing pocket - entry detection provided by this application, a brief description of the execution entity involved in the embodiments of this application is given first. The terminal devices involved in this application can have the structures shown in Figure 1 and Figure 2 For example, the terminal device can be a device with the structures shown in Figure 1 and Figure 2The mobile phone, folding electronic device, etc. with the shown structure can also be a chip, chip system, or processor applied to a terminal device, or a logic module or software that can implement all or part of the functions of the terminal device.
[0115] In the following embodiments, the execution subject of the method 300 for performing drop detection is described by taking a terminal device including a touch screen as an example. As Figure 3 shown, it is a schematic flowchart of a method 300 for performing drop detection provided by an embodiment of the present application. The method 300 includes S301 to S303, and these steps are described in detail below.
[0116] S301, when the touch screen is in a non-locked state, the terminal device detects its own acceleration waveform in the moving direction.
[0117] It should be noted that the above-mentioned touch screen being in a non-locked state can also be alternatively described as the terminal device being in a non-locked state; the touch screen being in a locked state can also be alternatively described as the terminal device being in a locked state.
[0118] Among them, the locked state means that the terminal device is in a locked state; when the terminal device is in the locked state, the touch screen (or display screen) of the terminal device can be in a closed (or screen-off) state or in a lit state. In the locked state, the terminal device is in an inoperable state; if the user wants to operate the terminal device, the screen needs to be unlocked to continue using.
[0119] For example, when the terminal device is in the locked state and the touch screen is in the lit state, the user can see information such as the time and date displayed on the touch screen, but the user cannot operate the terminal device; for another example, when the terminal device is in the locked state and the touch screen is in the screen-off state, the user can light up the touch screen through keys such as the power button and see information such as the time and date displayed on the touch screen, but the user still cannot operate the terminal device.
[0120] The non-locked state (or called the unlocked state) means that the terminal device is in a non-locked state; in the non-locked state, the terminal device is in a normal operable state, and the user can directly perform various operations on the terminal device; when the terminal device is in the non-locked state, the touch screen of the terminal device can be in the lit state or in the screen-off state (or black screen state); for example, in the screen-off state, the terminal device is not locked, and when the user clicks the touch screen through a gesture operation (such as a touch gesture), the touch screen can be lit; then, the user can directly operate the terminal device through gesture operations without unlocking.
[0121] The direction of motion refers to the direction in which the terminal device moves; this direction of motion can be the same as the direction of gravity, opposite to the direction of gravity, or at a certain angle to the direction of gravity (for example, the direction of motion forms a 60° angle with the direction of gravity).
[0122] In some implementations, the direction of motion of the terminal device can be determined by establishing a coordinate system; for example, a three-dimensional rectangular coordinate system is established with a certain position of the terminal device as the coordinate origin, and the direction of motion of the terminal device can be represented by three-dimensional coordinate points in the coordinate system; among them, a certain position can refer to the center point of a certain side frame of the terminal device, can also refer to the geometric center of the terminal device, or can be other positions on the terminal device. This application does not make any limitations in this regard, and in practical applications, a suitable position can be selected from the terminal device according to specific circumstances as the coordinate origin to establish a coordinate system.
[0123] For example, as Figure 4 shown in (a) of, a XYZ rectangular coordinate system is established with the geometric center O of the terminal device (such as a mobile phone) as the coordinate origin, the Y-axis is along the axis direction of the terminal device, the X-axis is perpendicular to the axis and lies in the same plane as the Y-axis, and the Z-axis is perpendicular to the XOY plane; the top of the terminal device is in the positive direction of the Y-axis, while the bottom is in the negative direction of the Y-axis.
[0124] After the coordinate system is established, the terminal device can determine its own direction of motion at different times or for different time durations according to its own movement trajectory in the coordinate system; for example, as Figure 4 shown in (a) of, at time T1, the terminal device moves to point A. At this time, the direction of motion of the terminal device can be determined by calculating the angle θ between the line segment OA and the positive direction of the Y-axis; for another example, during the time duration from time T0 to time T1, the terminal device moves along Figure 4 the positive direction of the Y-axis shown in (b) of, and at this time, the direction of motion of the terminal device is the positive direction of the Y-axis.
[0125] It should be noted that the acceleration of the terminal device in the direction of motion can be decomposed onto each coordinate axis of the coordinate system; the different motion postures of the terminal device result in different components of the acceleration in the direction of terminal motion decomposed onto each coordinate axis; for example, as Figure 4 shown in (b) of, the terminal device moves along the positive direction of the Y-axis, and the components of the acceleration of the terminal device in the positive direction of the Y-axis on the X-axis and the Z-axis are zero; when the terminal device detects the acceleration waveform in the direction of motion, it only needs to detect the acceleration waveform in the positive direction of the Y-axis; in the pocketing scenario, there is usually an obvious peak in the acceleration waveform in the positive direction of the Y-axis; it should be noted that the acceleration waveform in the positive direction of the Y-axis can also be regarded as a linear acceleration sensor signal.
[0126] Under normal circumstances, a terminal device can detect the acceleration waveform in the moving direction through the acceleration sensor carried by itself. On the one hand, this acceleration sensor can be used to detect the acceleration waveforms of the terminal device in different directions (for example, on each coordinate axis of the coordinate system). On the other hand, when the terminal device is stationary, this acceleration sensor can also be used to detect the magnitude and direction of gravity. In addition, in some scenarios (such as the horizontal and vertical screen scenarios), the acceleration sensor can also be used to identify the current posture of the terminal device. For example, taking the case where the user puts the mobile phone into the pocket of the trousers during the time period from T1 to T2 as an example; as Figure 4 shown in (b) of
[0127] , when the user puts the terminal device into the pocket of the trousers along the positive direction of the Y axis, the acceleration sensor can detect the acceleration waveform in the positive direction of the Y axis. Since the terminal device generates a pocketing action, Figure 4 therefore, the acceleration sensor of the terminal device can have an obvious peak in the acceleration waveform detected in the positive direction of the Y axis during the time period from T1 to T2, as
[0128] shown in (c) of
[0129] S302. When the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, the terminal device determines the angle between the moving direction and the gravity direction.
[0130] Among them, the first preset value can be taken as -5 (m / s^2) to -15 (m / s^2), etc.; the preset range can be taken as 5 to 30 milliseconds, etc. The values of the first preset value and the preset range can be set according to the actual application scenario, and this application does not limit this.
[0131] At this time, in order to further determine that the terminal device has produced a pocketing action, the terminal device can obtain a gravity detection value (such as a gravity vector or a gravitational acceleration value in a coordinate system) through its own gravity sensor, and obtain a motion detection value (such as a motion vector or a motion coordinate in a coordinate system) through its own motion sensor (such as an acceleration sensor); the terminal device calculates an included angle based on the gravity detection value and the motion detection value.
[0132] For example, as Figure 4 shown in (b) of, when the user puts the terminal device into the pocket along the positive Y-axis direction, the motion direction of the terminal device is the positive Y-axis direction; at this time, the acceleration sensor of the terminal device can detect its own acceleration in the positive Y-axis direction, and can detect an acceleration waveform with a peak within the time period from T1 to T2; the terminal device obtains the peak (or peak value or peak) and the full width at half maximum of the acceleration waveform; when the peak of the acceleration waveform is greater than a first preset value and the full width at half maximum of the acceleration waveform is within a preset range, the terminal device can determine that the peak of the acceleration is a pocketing peak; then, the terminal device obtains a motion detection value through its own acceleration sensor, and obtains a gravity detection value through its own gravitational acceleration sensor, and calculates the included angle between the motion detection value and the gravity detection value according to the cosine formula. For example, the included angle can be 30° or 60°. It should be noted that when the terminal device obtains a motion vector through the acceleration sensor and obtains a gravity vector through the gravitational acceleration sensor, the terminal device can obtain the included angle between the motion direction and the gravity direction by multiplying the motion vector by the gravity vector.
[0133] S303. When the above included angle is less than a preset included angle, the terminal device performs pocketing detection.
[0134] Among them, the preset included angle can be 90° or 60°, etc., and can be set according to specific application scenarios in practical applications. This application does not limit this.
[0135] When the above-mentioned included angle is less than the preset included angle, it indicates that the moving direction of the terminal device is towards the gravity direction; since the terminal device generates a pocketing peak in the moving direction and moves towards the gravity direction, the terminal device can determine that it has generated a pocketing action; at this time, the terminal device starts pocketing detection to determine whether it is in the pocket and whether it needs to enter the locked screen state; among them, pocketing detection can refer to a series of detection processes performed by the terminal device when determining whether it is in the pocket (for example, the terminal device determines whether it is in the pocket, when it leaves the pocket, when it enters or exits the anti-mis-touch state, and when it enters the locked screen state, etc.); for example, the terminal device can determine whether it is in the pocket by means of the occlusion state of the proximity light sensor, the average value of the capacitance reporting points or the capacitance difference, etc.; when the terminal device determines that it is in the pocket, it can start the automatic locked screen function to make the terminal enter the locked screen state to avoid frequent mis-touch clicks on the touch screen in the pocket.
[0136] In summary, compared with the situation where the existing anti-mis-touch technology causes an increase in the power consumption of the terminal; in this application, the acceleration waveform of the terminal device in the moving direction is first detected. When the peak of the acceleration waveform is greater than the first preset value and the full-width at half-maximum of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a pocketing peak (that is, the acceleration peak generated by the terminal device in the moving direction when it falls into the pocket). After that, the included angle between the moving direction and the gravity direction is further determined. When the included angle is less than the preset included angle, it indicates that the terminal device has a pocketing trend of moving towards the gravity direction. At this time, pocketing detection is performed, which can not only avoid wasting the power consumption of the terminal by performing pocketing detection in non-pocketing scenarios, but also improve the user experience of using the terminal.
[0137] It should be noted that in some embodiments, before the terminal device performs pocketing detection, method 300 further includes: the terminal device detects its current posture; when the current posture is the target posture, and when the included angle is less than the preset included angle, the terminal device performs pocketing detection, where the target posture is the posture with the top of the touch screen facing downwards.
[0138] Among them, the current posture of the terminal device can be obtained through its own posture (or position) sensor (such as at least one of an acceleration sensor, a gyroscope sensor, or a magnetometer sensor); the terminal device can calculate the current posture of the terminal device through the detection values of the posture sensor and the motion sensor. When the current posture is the posture with the top of the touch screen facing downwards (that is, the target posture), it indicates that the terminal device has a tendency to move towards the gravity direction; and since the terminal device has detected a pocketing peak, when the terminal device determines that the current posture is the target posture and the above-mentioned included angle is less than the preset included angle, it can be determined that the terminal device has generated a pocketing action; at this time, the terminal device can start pocketing detection.
[0139] It can be seen that in order to improve the accuracy of determining whether the terminal device has generated a bag-dropping action, in some embodiments, the terminal device determines whether it has generated a bag-dropping action based on the current posture and the above-mentioned angle, so as to reduce the probability of false triggering of bag-dropping detection and avoid waste of terminal power consumption.
[0140] It should also be noted that, in some other embodiments, before the terminal device performs bag drop detection, it can also assist in judging whether the movement direction of the terminal device is toward the direction of gravity by determining whether the angle between the movement direction and the preset coordinate axis is less than a preset value; wherein the preset value can be 60° or 90°, etc.; the step of the terminal device determining the angle between the movement direction and the preset coordinate axis can be performed simultaneously with any one of steps S301 to S302, or can be performed at different times, and this application does not limit this; for example, the terminal device determines the angle between the movement direction and the preset coordinate axis can be performed simultaneously with S301; it can also be performed after S301, at the same time as S302, or after S302; it can also be performed simultaneously with the step of the terminal device detecting its own current posture, or performed one after another, and this application does not limit this.
[0141] The selection of the preset coordinate axis depends on the establishment of the coordinate system. Usually, the preset coordinate axis is selected as the coordinate axis in the coordinate system where the angle between the positive direction of the coordinate axis and the direction of gravity is less than 90°; for example, Figure 4 As shown in (b), the preset coordinate axis can be the positive direction of the Y-axis. Since the angle β between the positive direction of the Y-axis and the direction of gravity is less than 90°, the terminal device can further determine whether it is moving in the direction of gravity by determining whether the angle between the positive direction of the Y-axis and the direction of movement is less than a preset value (for example, 90°). For example, when the angle between the positive direction of the Y-axis and the direction of movement is less than the preset value of 90°, the terminal device determines that it is moving in the direction of gravity; when the angle between the positive direction of the Y-axis and the direction of movement is greater than or equal to the preset value of 90°, the terminal device determines that it is not moving in the direction of gravity (for example, it may be moving in a horizontal direction perpendicular to the direction of gravity, or in a direction opposite to the direction of gravity). The terminal device can exclude some non-bag-dropping scenarios by determining whether the angle between the direction of movement and the preset coordinate axis is less than the preset value, which is beneficial to improving the accuracy of the terminal device in determining whether to perform bag-drop detection.
[0142] The above describes a method 300 for performing bag drop detection, which can reduce the power consumption of the terminal device and improve the user experience; the following describes a method 500 for performing bag drop detection, such as Figure 5As shown in the figure; the method 500 can also reduce the power consumption of the terminal device and improve the user experience; the execution subject of the method 500 is similar to that of the method 300. For specific reference, please refer to the description of the execution subject in the method 300, which will not be elaborated here; the method 500 includes S501 to S503, and these steps will be described in detail below.
[0143] S501, when the touch screen is in the non-locked state, the terminal device determines the angle between its own motion direction and the gravity direction.
[0144] Among them, for the terminal device to determine the angle between its own motion direction and the gravity direction, reference can be made to the relevant description in step S302 above, which will not be elaborated here.
[0145] It should be noted that different from the method 300, in the method 500, when the touch screen is in the non-locked state, the terminal device first excludes some non-pocketing scenarios through the angle between its own motion direction and the gravity direction to avoid waste of terminal power caused by invalid pocketing detection in non-pocketing scenarios.
[0146] S502, when the above angle is less than the preset angle, the terminal device detects the acceleration waveform in its own motion direction.
[0147] Among them, for the terminal device to detect the acceleration waveform in its own motion direction, reference can be made to the relevant description in step S301 above, which will not be elaborated here.
[0148] When the terminal device determines that the above angle is less than the preset angle, it means that the terminal device has a tendency to move in the direction of gravity. At this time, the terminal device then detects the acceleration waveform in its own motion direction.
[0149] S503, when the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, the terminal device performs pocketing detection.
[0150] When the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, it means that the terminal device generates a pocketing peak in the motion direction; and since the terminal device has a tendency to move in the direction of gravity, it can be determined that the terminal device has performed a pocketing action; at this time, the terminal device can start pocketing detection to determine whether it is in the pocket and whether it needs to enter the locked state. For specific reference, please refer to the relevant description in S303 above, which will not be elaborated here.
[0151] It should be noted that when the terminal device executes method 300 or method 500, it can be executed within a preset duration or within a preset sliding time window. The starting moment of the preset duration can be the moment when the terminal device detects an acceleration in the moving direction. The duration of the preset duration can be set according to the actual situation. For example, it can be 2 seconds, 3 seconds, etc. The present application does not limit this. The total duration of the sliding time window can be 1 second, 2 seconds, etc. The starting moment of the sliding time window can be a preset moment after the terminal device is powered on. The terminal device detects whether there is an acceleration in its moving direction within the preset sliding time window at regular intervals. Compared with the method in which the terminal device determines whether it generates a pocketing action based on the acceleration value detected at a certain moment, the method in the present application for the terminal device to determine the pocketing action by detecting the change of its own motion parameters (such as acceleration waveform, included angle, etc.) within a period of time (or within a preset duration) is more accurate.
[0152] In method 500, compared with the situation where the existing anti-mis-touch technology increases the power consumption of the terminal; method 500 first determines whether the terminal device has a pocketing trend of moving towards the gravity direction according to the included angle between the moving direction of the terminal device and the gravity direction, and then detects the acceleration waveform of the terminal device in the moving direction. When the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, it indicates that the peak of this acceleration waveform is a pocketing peak. At this time, the pocketing detection is performed. In this way, not only can the waste of the terminal power consumption caused by performing the pocketing detection in a non-pocketing scenario be avoided, but also the user experience of using the terminal can be improved.
[0153] In some embodiments, before the terminal device performs the pocketing detection, method 500 further includes: the terminal device detects its current posture; when the current posture is the target posture, and when the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, the terminal device performs the pocketing detection, where the target posture is the posture with the top of the touch screen facing downwards.
[0154] It should be noted that for the terminal device to obtain its current posture, reference can be made to the relevant descriptions above and will not be elaborated here. When the current posture is the posture with the top of the touch screen facing downwards (or the top of the touch screen is higher than the top) (i.e., the target posture), it indicates that the terminal device has a tendency to move towards the gravity direction. Also, since the terminal device determines that the peak of the acceleration waveform is a pocketing peak according to the fact that the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, the terminal device can determine that it generates a pocketing action. At this time, the terminal device can start the pocketing detection.
[0155] It can be seen that, in order to improve the accuracy of determining the bag-drop action of the terminal, in some embodiments, the terminal device can jointly determine whether the terminal device generates a bag-drop action based on the current posture and the bag-drop peak, so as to reduce the probability of false triggering of the bag-drop detection.
[0156] The above Method 300 and Method 500 introduce the methods for the terminal device to determine the execution of the bag-drop detection. Next, the specific methods for the terminal device to execute the bag-drop detection in Method 300 and Method 500 will be continued to be introduced.
[0157] In some embodiments, the terminal device executes the bag-drop detection, including: the terminal device obtains N capacitance differences on the touch screen, where the N capacitance differences are the absolute values of the differences between N capacitance original values and the capacitance standard value, and N is a positive integer greater than 1; the terminal device determines M capacitance differences from the N capacitance differences, and the M capacitance differences are the capacitance differences greater than the capacitance threshold, where M is a positive integer less than N; when M is greater than the second preset value, the terminal device performs clustering processing on the M capacitance differences to obtain at least one clustering result; finally, the terminal device processes the above at least one clustering result through a classifier to determine whether the terminal device is in the pocket, where the output result of the classifier can be used to indicate whether the terminal device is in the pocket.
[0158] It should be noted that the capacitance original value can refer to the capacitance value when the capacitance node is touched, and the capacitance original value decreases as the touch force increases; the capacitance standard value is usually a preset value. For example, the capacitance standard value is 8000 or 12000, etc.; generally, the capacitance original value is less than the capacitance standard value; for example, when the capacitance node A is not touched, the capacitance original value is 8000, and the capacitance standard value is 8000; when the finger touches the capacitance node A, the capacitance original value of the capacitance node A is 7000, and the capacitance difference of the capacitance node A is 1000 (that is, capacitance standard value - capacitance original value = 8000 - 7000).
[0159] The above capacitance threshold can be 400 or 600, etc., and the second preset value can be 300 or 400, etc. The capacitance threshold and the second preset value can be set according to the specific scenario in practical applications, and this application does not limit this.
[0160] Since the capacitance characteristics of the touch screen change when the terminal device is in the pocket, it is possible to determine whether the terminal device is in the pocket by the capacitance characteristics of the touch screen (such as the capacitance difference). For example, the terminal device can obtain N capacitance differences on the touch screen, compare the N capacitance differences with the capacitance threshold respectively, and then determine M capacitance differences from the N capacitance differences; among them, the M capacitance differences are greater than the capacitance threshold; in order to improve the accuracy of the classification result, the terminal device first performs clustering processing on the M capacitance differences through a clustering algorithm (such as the K-means algorithm) to obtain at least one clustering result; it should be noted that since the terminal device is in pockets of different materials, the capacitance characteristics of the touch screen (such as the capacitance difference) are different. For example, for some materials of pockets, when the terminal device is placed in them, the capacitance differences in multiple areas of the touch screen are positive. When the terminal device clusters the capacitance differences on the touch screen in such a material pocket, multiple clustering results will be obtained; while for some materials of pockets, when the terminal device is placed in them, only the capacitance difference in one area is positive. When the terminal device clusters the capacitance differences on the touch screen in such a material pocket, one clustering result will be obtained; the terminal device can gather the capacitance differences with greater relevance (or correlation) together through the clustering algorithm to accurately reflect the capacitance characteristics of the touch screen in pockets of different materials; finally, the terminal device then performs feature extraction and classification on at least one clustering result through the trained classifier to obtain the output result, and then determines whether it is in the pocket according to the output result. It should be noted that in practical applications, the trained classifier can determine whether the terminal device is in the pocket according to the capacitance differences reported by the terminal device in pockets of different materials.
[0161] It should be noted that when training the classifier, the training set can be the capacitance differences when the terminal device falls into pockets of different materials, or the clustering results of the capacitance differences when the terminal device falls into pockets of different materials; among them, the clustering result can refer to the result obtained after the capacitance differences when the terminal device falls into pockets of different materials are processed by the clustering algorithm; during the training process, if the training set is the clustering results of the terminal device falling into pockets of different materials, the classifier can determine information such as the clustering area and clustering position according to the clustering results, so as to determine the capacitance characteristics of the terminal device in pockets of different materials; after training, the classifier can determine the corresponding capacitance characteristics (such as the clustering area, clustering position, etc.) according to the capacitance differences (or clustering results) when the terminal device falls into pockets of different materials, so as to determine whether the terminal device falls into the corresponding material pocket. Therefore, after training the classifier, the terminal device can identify the clustering result after it falls into a pocket of a certain material through the classifier to determine whether it is in the pocket of that material.
[0162] It should be noted that the above classifier may refer to a support vector machines (SVM) classifier or other lightweight classifiers, which is not limited in this application. In addition, when the classifier is trained, the training set can also be extended to the capacitance difference or clustering result when the terminal device is in pockets of different shapes and different thicknesses. For example, the training set includes the capacitance difference in a thick square denim trouser pocket and the capacitance difference in a thin round denim trouser pocket, etc. After training the classifier with the training set, the classifier can identify whether the terminal device is in pockets of different types (for example, the pocket material and thickness are different, or the pocket material and shape are different).
[0163] Figure 6 shows the capacitance characteristics of several terminal devices in pockets of different materials; from Figure 6 it can be seen that the capacitance characteristics of the terminal device in pockets of different materials are different, that is, the capacitance difference is different (or the clustering result is different). For example, the capacitance characteristic 601 of the terminal device in a thick denim trouser pocket, the capacitance characteristic 602 in a thin denim trouser pocket, the capacitance characteristic 603 in a thin sports trouser pocket, and the capacitance characteristic 604 in a windbreaker trouser pocket are significantly different. Among them, the capacitance characteristic includes but is not limited to the average capacitance difference of the capacitance difference, the clustering area, and the clustering position. It should be noted that compared with some scenarios of holding the device horizontally to play games, some clustering results are at the top of the touch screen, and some clustering results are at the bottom of the touch screen. In the pocketing scenario, the distance between multiple clustering results is usually relatively close; for example, from Figure 6 it can be seen that the capacitance characteristic 601 has two clustering results, and the distance between these two clustering results is relatively close.
[0164] Thus, compared with the method of directly judging whether the terminal is in the pocket according to the number of capacitance reporting points, this application first performs clustering processing on the capacitance difference to remove the capacitance difference with small correlation, and retains the clustering result of the capacitance difference with large correlation; then, the classifier is used to perform classification processing on the clustering result of the capacitance difference with large correlation to improve the accuracy of the classifier in determining whether the terminal device is in the pocket.
[0165] In some embodiments, the terminal device performs pocketing detection, including: the terminal device detects the state of its own proximity light sensor; if the state is an occlusion state, it is determined that the terminal device is in the pocket.
[0166] Under normal circumstances, the states of the proximity light sensor include an occluded state and a non-occluded state; the terminal device determines whether it is in a pocket based on whether the proximity light sensor is occluded. Since the proximity light sensor is usually in the non-occluded state when the terminal device is in normal use, and when the terminal device is in a pocket, the surrounding environment of the proximity light sensor becomes dark and is in the occluded state; therefore, the terminal device can quickly determine whether the terminal device is in a pocket according to whether the proximity light sensor is in the occluded state, with high efficiency and good accuracy.
[0167] In some embodiments, when the terminal device is in a pocket, method 300 (or method 500) further includes: the terminal device enters the locked screen state.
[0168] Whether through the proximity light sensor or the capacitance difference, etc., when the terminal device determines that it is in a pocket, it can activate the locked screen function and switch the terminal device from the non-locked screen state to the locked screen state to prevent the touch screen from being accidentally touched and clicked in the pocket, affecting the terminal battery life and user experience; among them, the reason for affecting the terminal battery life is that due to the terminal device in the non-locked screen state in the pocket being frequently accidentally touched and clicked, the touch screen frequently receives click events and cannot enter the screen-off and locked screen state, so it affects the terminal battery life.
[0169] In some embodiments, before the terminal device enters the locked screen state, method 300 (or method 500) further includes: the terminal device records the continuous duration of being in the pocket; when the continuous duration is less than the preset duration, it enters the anti-accidental touch state within the continuous duration.
[0170] Among them, the continuous duration can be 800 milliseconds, 1 second, 2 seconds, etc., and the preset duration can be 1 second, 2 seconds, etc.; the continuous duration and the preset duration can be set according to the actual situation, and this application does not limit this.
[0171] When the terminal device detects that it is in a pocket, it starts to record the continuous duration of being in the pocket. During the period when the continuous duration is less than the preset duration, the terminal device can temporarily not activate the locked screen function and first switch from the non-locked screen state to the anti-accidental touch state (or anti-accidental touch mode). For example, the terminal device generates an anti-accidental touch interface on the touch screen to avoid accidental triggering of the terminal device in the pocket. It should be noted that this anti-accidental touch interface is usually on the top of all interface layers of the terminal device to block the accidental touch reporting points of the touch screen in the pocket.
[0172] For example, as Figure 7 shown in (a), the user can find the accessibility option in the settings interface of the terminal device and open the accessibility interface 701; select to turn on the anti-accidental touch mode 702 on the accessibility interface 701; for example, the user is using the mobile phone to watch a video, as Figure 7As shown in (b) therein, if something suddenly happens and the unlocked mobile phone is casually put into the pocket of the trousers, within the first period of time (less than the preset period of time) when the mobile phone just falls into the pocket of the trousers, the mobile phone will generate an anti-misoperation interface 703, as Figure 7 shown in (c) therein; where the first period of time is the continuous period of time when the mobile phone is in the pocket; if the user takes out the mobile phone from the pocket within a period of time less than the preset period of time, the mobile phone automatically exits the anti-misoperation mode, as Figure 7 shown in (d) therein, and the user can directly use the mobile phone to continue watching the video without unlocking it again.
[0173] In another scenario, a fingerprint unlocking button is installed on the side of some terminal devices (such as mobile phones); although this fingerprint unlocking button is very convenient for users to unlock the terminal, in some scenarios, it is also prone to accidental unlocking; for example, although the user has locked the screen before putting the terminal device into the pocket, when the user puts the locked terminal device into the pocket, the user may accidentally touch the fingerprint unlocking button, so that the locked terminal device is accidentally unlocked again; in this scenario, the terminal device can also detect whether a pocket-drop action occurs after the terminal device is unlocked through the above method 300 or method 500; if a pocket-drop action occurs, perform pocket-drop detection; when the continuous period of time when the terminal device is in the pocket is less than the preset period of time, it can temporarily enter the anti-misoperation state (or temporarily activate the anti-misoperation mode) within the continuous period of time.
[0174] For example, there is a fingerprint unlocking button 801 on the side of the mobile phone, as Figure 8 shown in (a) therein, and the user can use the fingerprint unlocking button 801 to perform fingerprint unlocking on the locked mobile phone; for example, as Figure 8 shown in (b) therein, when the user is using the mobile phone, after locking the screen of the mobile phone and putting it into the pocket of the trousers, during the process of putting it into the pocket, accidentally touches the fingerprint unlocking button 801 to unlock the locked mobile phone again, and the mobile phone returns to the unlocked state, as Figure 8 shown in (c) therein; at this time, the mobile phone will determine whether the unlocked mobile phone is in the pocket according to method 300 or method 500; when it is detected that the mobile phone is in the pocket, the mobile phone continues to detect its continuous period of time in the pocket; within this period of time when the continuous period of time is less than the preset period of time, the mobile phone can temporarily generate an anti-misoperation interface 802, as Figure 8 shown in (d) therein, to prevent the touch screen of the mobile phone from being accidentally touched and clicked; if the user takes out the mobile phone from the pocket within a period of time less than the preset period of time, and the proximity light sensor of the mobile phone is in a non-blocked state, the mobile phone can automatically exit the anti-misoperation mode.
[0175] It can be seen that in some scenarios (for example, when the user temporarily puts a terminal such as a mobile phone into the pocket when washing hands), the user does not want the terminal device to enter the locked screen state. At this time, the terminal device can record the duration of the terminal in the pocket. During the period when the duration is less than the preset duration (for example, 1 s), the terminal device can temporarily enter the anti-misoperation state instead of the locked screen state. In this way, even if the user takes out the terminal device from the pocket within a short time, there is no need to unlock it again and can continue to be used, which is convenient, fast and has good security.
[0176] In some embodiments, after the terminal device is in the anti-misoperation state during the duration, method 300 (or method 500) further includes: when the state of the proximity light sensor of the terminal device is the non-blocked state, exiting the anti-misoperation state.
[0177] When the terminal device is in the pocket, the terminal device can detect the state of the proximity light sensor in real time or at intervals of a preset time; when the state of the proximity light sensor is the non-blocked state, it indicates that the terminal device may be taken out of the pocket by the user. At this time, the terminal device can automatically exit the anti-misoperation state and return to the non-locked screen state (or unlocked state) so that the user can continue to use it without having to unlock it again, providing a good user experience.
[0178] In some other embodiments, after the terminal device is in the anti-misoperation state during the duration, method 300 (or method 500) further includes:
[0179] When the current posture of the terminal device is the posture with the top of the touch screen facing up, exiting the anti-misoperation state.
[0180] When the terminal device is in the pocket, the top of the touch screen of the terminal device can be horizontal or biased in the direction of gravity; the terminal device can obtain the detection value of the attitude sensor in real time or at intervals of a preset time; when the terminal device determines that the current posture is the posture with the top of the touch screen facing up (or the top of the touch screen is higher than the bottom) according to the detection value of the attitude sensor, it indicates that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-misoperation state so that the user can continue to use it.
[0181] For example, when the terminal device is in the trouser pocket, an anti-misoperation interface is temporarily generated (or temporarily pulled up) on the touch screen of the terminal device, as shown in Figure 9 (d); when the terminal device is in the trouser pocket, the top of the touch screen can be placed biased in the direction of gravity, as shown in Figure 9 (a); it can also be placed horizontally, as shown in Figure 9 (b); when the terminal device is taken out of the trouser pocket by the user, the terminal device determines that the current posture of the terminal device is the posture with the top of the touch screen facing up according to the detection value of the attitude sensor, as shown in Figure 9as shown in (c) therein; at this time, the terminal device switches from the anti-mis-touch state (such as Figure 9 as shown in (d) therein) to the unlocked state, such as Figure 9 as shown in (e) therein, so as to facilitate the user to continue using.
[0182] In some embodiments, after the terminal device is in the anti-mis-touch state for a continuous duration, the above method 300 (or method 500) further includes: when the terminal device leaves the pocket, in response to the user's gesture operation, exiting the anti-mis-touch state.
[0183] When the terminal device is in the pocket, the terminal device is in the anti-mis-touch state; if the user takes out the terminal device from the pocket, the user can make the terminal device exit the anti-mis-touch state and return to the unlocked state through a gesture operation (such as quickly swiping up twice) on the touch screen to continue using. This operation of exiting the anti-mis-touch state can be exited according to the user's needs, which is convenient and flexible, and the user experience is good.
[0184] It should be noted that the gesture operation can be an air gesture, a touch gesture, a floating gesture, etc. For example, the gesture operation is a touch gesture operation, and the touch gesture operation can include, but is not limited to, one of a sliding operation, a tapping operation, or a pressing operation; for example, the sliding operation can be a quick left swipe operation, a quick right swipe operation, a slow left swipe operation, etc.; the tapping operation can be a single click operation, a double click operation, etc.; the pressing operation can be a short press operation, a long press operation, etc.
[0185] In some embodiments, the method 300 (or method 500) further includes: when the continuous duration is greater than or equal to a preset duration, the terminal device switches from the anti-mis-touch state to the locked screen state.
[0186] When the terminal device is in the pocket, the terminal device continuously records its own continuous duration in the pocket; when the continuous duration is greater than or equal to the preset duration, it indicates that the user may not have temporarily put the terminal device into the pocket; in order to prevent the terminal device from being accidentally touched in the pocket, the terminal device starts the automatic lock screen function and switches itself from the temporary anti-mis-touch state to the locked screen state to turn off the touch screen, save the power consumption of the terminal, and avoid accidental touch clicks.
[0187] It should be noted that the pocket in this application can be a trouser pocket, an outer coat pocket, an outer pocket of a backpack, etc. This application only takes the trouser pocket as an example to illustrate the method of performing the pocket detection, and should not be construed as a limitation on the scope of the pocket applicable to this application.
[0188] Examples of the method for performing bag-drop detection provided by this application are described in detail above. It can be understood that in order for the terminal device to implement the above functions, it includes the corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application. This application can divide the method for performing bag-drop detection into functional units according to the above method examples. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. It should be noted that the division of units in this application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0189] Figure 10 The structure diagram of a terminal device provided by this application is shown. Figure 10 The dotted line in it indicates that the unit or the module is optional. The terminal device 1000 can be used to implement the method described in the above method embodiments. The terminal device 1000 can be a terminal device, or a server or a chip (system).
[0190] The terminal device 1000 includes one or more processors 1001, and the one or more processors 1001 can support the terminal device 1000 to implement Figure 3 or Figure 5 the method in the corresponding method embodiment. The processor 1001 can be a general-purpose processor or a special-purpose processor. For example, the processor 1001 can be a Central Processing Unit (CPU). The CPU can be used to control the terminal device 1000, execute software programs, and process the data of software programs. The terminal device 1000 can also include a communication unit 1005 for realizing the input (reception) and output (transmission) of signals.
[0191] The above terminal device 1000 can be a chip (system), and the chip (system) includes a memory and a processor, where the processor is configured to execute the computer program stored in the memory to implement the methods shown in the above various embodiments.
[0192] The communication unit 1005 may be the input and / or output circuit of the chip (system), or the communication unit 1005 may be the communication interface of the chip (system), and the chip (system) may be a component of the terminal device 1000.
[0193] For another example, the communication unit 1005 may be a transceiver of the terminal device 1000, or the communication unit 1005 may be a transceiver circuit of the terminal device 1000. One or more memories 1002 may be included in the terminal device 1000, on which a program 1004 is stored. The program 1004 can be run by the processor 1001 to generate instructions 1003, so that the processor 1001 executes the method described in the above method embodiments according to the instructions 1003. Optionally, data may also be stored in the memory 1002. Optionally, the processor 1001 may also read the data stored in the memory 1002. The data may be stored at the same storage address as the program 1004, or the data may be stored at a different storage address from the program 1004.
[0194] The processor 1001 and the memory 1002 may be provided separately or integrated together. For example, they may be integrated on a system-on-chip (SOC) of the terminal device. The specific manner in which the processor 1001 executes the method for detecting bag dropping can be referred to the relevant description in the method embodiments.
[0195] It should be understood that each step of the above method embodiments can be completed by a logic circuit in hardware form or an instruction in software form in the processor 1001. The processor 1001 may be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices. For example, discrete gate, transistor logic devices, or discrete hardware components.
[0196] The present application also provides a computer program product, which implements the method of any method embodiment in the present application when executed by the processor 1001. The computer program product may be stored in the memory 1002, such as the program 1004. The program 1004 undergoes processes such as preprocessing, compilation, assembly, and linking, and is finally converted into an executable target file that can be executed by the processor 1001.
[0197] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the computer, it implements the method of any method embodiment in the present application. The computer program may be a high-level language program or an executable target program.
[0198] The computer-readable storage medium is, for example, the memory 1002. The memory 1002 may be a volatile memory or a non-volatile memory, or the memory 1002 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), SynchLink DRAM (SLDRAM), and direct rambus RAM (DRRAM).
[0199] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes and the resulting technical effects of the above-described devices and apparatuses can refer to the corresponding processes and technical effects in the foregoing method embodiments, and will not be elaborated herein again.
[0200] In several embodiments provided in the present application, the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, some features of the above-described method embodiments may be ignored or not executed. The above-described apparatus embodiments are merely illustrative. The splitting of units is only a logical function splitting. In actual implementation, there may be other splitting methods. Multiple units or components may be combined or integrated into another system. In addition, the coupling between units or the coupling between components may be a direct coupling or an indirect coupling. The above couplings include electrical, mechanical, or other forms of connection.
[0201] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
[0202] Finally, as described above, the above are only specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for performing pocket detection, characterized in that, Applied to a terminal device including a touch screen, the method includes: When the touch screen is in a non-locked screen state, detecting an acceleration waveform of the terminal device in the moving direction; When the peak of the acceleration waveform is greater than a first preset value and the full width at half maximum of the acceleration waveform is within a preset range, determining an angle between the moving direction and the gravity direction; When the angle is less than a preset angle, performing a pocket detection.
2. The method according to claim 1, wherein Before performing the pocket detection, the method further includes: Detecting a current posture of the terminal device; The step of performing the pocket detection when the angle is less than the preset angle includes: When the current posture is a target posture, and when the angle is less than the preset angle, performing the pocket detection, where the target posture is a posture with the top of the touch screen facing downwards.
3. A method for performing pocket detection, characterized in that, Applied to a terminal device including a touch screen, the method includes: When the touch screen is in a non-locked screen state, determining an angle between the moving direction of the terminal device and the gravity direction; When the angle is less than the preset angle, detecting an acceleration waveform of the terminal device in the moving direction; When the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, performing the pocket detection.
4. The method according to claim 3, wherein Before performing the pocket detection, the method further includes: Detecting a current posture of the terminal device; The step of performing the pocket detection when the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range includes: When the current posture is the target posture, and when the peak of the acceleration waveform is greater than the first preset value and the full width at half maximum of the acceleration waveform is within the preset range, performing the pocket detection, where the target posture is a posture with the top of the touch screen facing downwards.
5. The method according to any one of claims 1 to 4, characterized in that The step of performing the pocket detection includes: Obtaining N capacitance differences on the touch screen, where the N capacitance differences are absolute values of differences between N capacitance original values and a capacitance standard value, and N is a positive integer greater than 1; Determining M capacitance differences from the N capacitance differences, where the M capacitance differences are capacitance differences greater than a capacitance threshold, and M is a positive integer less than N; When M is greater than a second preset value, performing clustering processing on the M capacitance differences to obtain at least one clustering result; Processing the at least one clustering result through a classifier to determine whether the terminal device is in a pocket, and an output result of the classifier is used to indicate whether the terminal device is in a pocket.
6. The method according to any one of claims 1 to 4, characterized in that The step of performing the pocket detection includes: Detecting a state of a proximity light sensor of the terminal device; If the state is an occlusion state, determining that the terminal device is in a pocket.
7. The method according to any one of claims 1 to 6, characterized in that When the terminal device is in a pocket, the method further includes: Entering a locked screen state.
8. The method according to claim 7, characterized in that, Before entering the locked screen state, the method further includes: Recording a continuous duration of the terminal device being in the pocket; When the continuous duration is less than a preset duration, being in an anti-misoperation state within the continuous duration.
9. The method according to claim 8, characterized in that After being in the anti-misoperation state within the continuous duration, the method further includes: When the state of the proximity light sensor of the terminal device is a non-occlusion state, exiting the anti-misoperation state.
10. The method according to claim 8, characterized in that, After being in the anti-mis-touch state during the duration, the method further includes: When the current posture of the terminal device is the posture with the top of the touch screen facing up, exiting the anti-mis-touch state.
11. The method according to claim 8, wherein After being in the anti-mis-touch state during the duration, the method further includes: When the terminal device leaves the pocket, in response to a user's gesture operation, exiting the anti-mis-touch state.
12. The method according to any one of claims 8 to 11, characterized in that The method further includes: When the duration is greater than or equal to the preset duration, switching from the anti-mis-touch state to the locked screen state.
13. A terminal device, characterized in that, The terminal device includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the terminal device executes the method according to any one of claims 1 to 2 and 5 to 12, or so that the terminal device executes the method according to any one of claims 3 to 12.
14. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 2 and 5 to 12, or the processor is caused to execute the method according to any one of claims 3 to 12.
15. A chip system, characterized in that, The chip system includes a memory and a processor. The processor is configured to execute the computer program stored in the memory to implement the method according to any one of claims 1 to 2 and 5 to 12, or to implement the method according to any one of claims 3 to 12.
Citation Information
Cited By
Method for performing in-pocket detection and terminal device
EP4746394A1
Method for performing in-pocket detection and terminal device
WO2025156636A1