Method for performing in-pocket detection and terminal device

By detecting the angle between the acceleration waveform and gravity direction of the terminal device, combined with the close light sensor and the tolerance value, the intelligent lock screen and anti-fault touch when the terminal device falls into the pocket are realized, solving the problem of increased power consumption in the existing technology, and improving user experience and device battery life.

WO2025156636A1PCT designated stage Publication Date: 2025-07-31HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/115907
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-26
Filing Date
2024-08-30
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

The existing anti-touch technology will increase power consumption when the terminal device falls into the pocket, affects the device's battery life, and has a poor user experience.

Method used

By detecting the acceleration waveform of the terminal device in the direction of movement and the angle between the direction of movement and the direction of gravity, combining the proximity light sensor and the tolerance value, it is determined whether the device falls into the pocket, and performs a lock screen or anti-incorrect touch state when necessary, reducing unnecessary power consumption.

Benefits of technology

It effectively reduces the power consumption and waste of terminal devices in non-pocketed scenarios, improves user experience, and ensures that the device does not accidentally touch and click in the pocket.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024115907_31072025_PF_FP_ABST
    Figure CN2024115907_31072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals, and provides a method for performing in-pocket detection and a terminal device. The method comprises: when a touch screen is in a non-locked state, measuring an acceleration waveform of the terminal device in a motion direction; when the wave crest 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 included angle between the motion direction and a gravity direction; and when the included angle is smaller than a preset included angle, performing in-pocket detection. The method can reduce the power consumption of terminal devices, and improve the use experience of users.
Need to check novelty before this filing date? Find Prior Art

Description

Method and terminal device for performing bag drop detection

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 26, 2024, with application number 202410116795.6 and application name “Method and terminal device for performing bag drop detection”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method and terminal device for performing bag drop detection. Background Art

[0003] With the development of smart terminal technology, capacitive touch screens (TP) 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, when using the terminal device, users often forget to lock the screen and put the terminal device in the unlocked state directly into a pocket such as a trouser pocket. Since trouser pockets and other pockets are close to the human body, they may trigger the touch screen in the unlocked state to produce accidental touch clicks, and accidental touch clicks on the touch screen may cause many adverse effects (such as mistakenly dialing a call, mistakenly sending a message, etc.), thereby affecting the user experience.

[0004] In order to avoid accidental touches of terminal devices in the non-locked state when they are in the pocket, the existing anti-mistouch technology usually requires the terminal device to perform a pocket detection method in real time to ensure that the automatic lock screen function can be activated in time to lock the terminal screen when the terminal device in the non-locked state is in the pocket; however, this method of performing pocket detection will obviously increase the power consumption of the terminal device and affect the battery life of the terminal device.

[0005] Summary of the Invention

[0006] The present invention provides a method and terminal device for performing bag drop detection, which can reduce the power consumption of the terminal device and improve the user experience. The present invention provides the following technical solutions:

[0007] In a first aspect, a method for performing bag drop detection is provided, the method comprising: when the touch screen is in a non-locked state, detecting the acceleration waveform of the terminal device in the direction of movement; when the peak of the acceleration waveform is greater than a first preset value and the half-peak width of the acceleration waveform is within a preset range, determining the angle between the direction of movement and the direction of gravity; when the angle is less than the preset angle, performing bag drop detection.

[0008] 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 to the terminal device, or by a logic module or software that can realize all or part of the terminal device functions. Compared with the existing anti-false touch technology that causes the terminal device power consumption to increase; the present application first detects the acceleration waveform of the terminal device in the direction of movement. When the peak of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a pocket peak (i.e., the acceleration peak generated in the direction of movement when the terminal device falls into the pocket). After that, the angle between the direction of movement and the direction of gravity is further determined. When the angle is less than the preset angle, it indicates that the terminal device has a pocket trend of moving in the direction of gravity. At this time, the pocket detection is performed again. This not only avoids wasting the terminal power consumption by performing pocket detection in non-pocket scenarios, but also improves the user experience of using the terminal.

[0009] In one possible implementation, before performing the drop-in-pocket detection, the method also includes: detecting the current posture of the terminal device; when the angle is less than a preset angle, performing the drop-in-pocket detection, including: when the current posture is a target posture, and when the angle is less than the preset angle, performing the drop-in-pocket detection, the target posture is a posture with the top of the touch screen facing downward.

[0010] In order to improve the accuracy of determining whether the terminal device has generated a bag drop action, in some embodiments, the terminal device can jointly determine whether the terminal device has generated a bag drop action based on the current posture and angle, so as to reduce the probability of false triggering of bag drop detection and avoid waste of terminal power consumption due to invalid bag drop detection in non-bag drop scenarios.

[0011] In one possible implementation, performing pocket detection includes: obtaining N capacitance difference values ​​on the touch screen, where the N capacitance difference values ​​are the absolute values ​​of the differences between N original capacitance values ​​and standard capacitance values, where N is a positive integer greater than 1; determining M capacitance difference values ​​from the N capacitance difference values, where the M capacitance difference values ​​are capacitance difference values ​​greater than a capacitance threshold, where M is a positive integer less than N; when M is greater than a second preset value, clustering the M capacitance difference values ​​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 the output result of the classifier is used to indicate whether the terminal device is in a pocket.

[0012] Compared with the method of directly judging whether the terminal device is in a pocket based on the number of capacitance reporting points, the present application first clusters the capacitance differences to remove capacitance differences with small correlations, while retaining the clustering results of capacitance differences with large correlations; then, the clustering results of capacitance differences with large correlations are classified by a classifier to improve the accuracy of the classifier in determining whether the terminal device is in a pocket.

[0013] In a possible implementation, performing pocket detection includes: detecting a state of a proximity light sensor of the terminal device; and determining that the terminal device is in a pocket if the state is an obstructed state.

[0014] When the terminal device is in normal use, the proximity light sensor is usually in an unblocked state, while when the terminal device is in a pocket, the surrounding environment of the proximity light sensor becomes dark and is in a blocked state; therefore, the terminal device can quickly determine whether the terminal device is in a pocket based on whether the proximity light sensor is in a blocked state, which is highly efficient and accurate.

[0015] In a possible implementation, when the terminal device is in a pocket, the method further includes: entering a lock screen state.

[0016] When the terminal device is in a pocket, the terminal can switch from a non-locked screen state (for example, a bright screen state) to a locked screen state to prevent the touch screen from being frequently accidentally touched in the pocket, thereby affecting the user's experience.

[0017] In one possible implementation, before entering the lock screen state, the method further includes: recording the duration for which the terminal device is in the pocket; when the duration is less than a preset duration, being in an anti-mistouch state within the duration.

[0018] In some scenarios (for example, when a user temporarily puts a mobile phone or other terminal device in a trouser pocket while washing hands), the user does not want the terminal device to enter the lock screen state. At this time, the terminal device can record the duration of time it has been in the pocket. During the period when the duration is less than the preset duration (for example, 1s), the terminal device can temporarily enter the anti-mistouch state instead of the lock screen state. In this way, even if the user takes the terminal out of the pocket for a short time, there is no need to unlock it again and the user can continue to use it, which is convenient, fast and safe.

[0019] In a possible implementation, after being in the anti-accidental touch state for a continuous period of time, the method further includes: when the state of the proximity light sensor of the terminal device is a non-blocking state, exiting the anti-accidental touch state.

[0020] In some embodiments, the terminal device is in an anti-mistouch state in a pocket, and the proximity light sensor is in a blocked state; when the proximity light sensor is in a non-blocked state, it means that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mistouch state to facilitate user use.

[0021] In a possible implementation, after being in the anti-false touch state for a continuous period of time, the method further includes: when the current posture of the terminal device is a posture with the top of the touch screen facing upward, exiting the anti-false touch state.

[0022] In some embodiments, the terminal device is in an anti-mistouch state 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 means that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mistouch state to facilitate the user to continue using it.

[0023] In a possible implementation, after being in the anti-false touch state for a continuous period of time, the method further includes: when the terminal device leaves the pocket, responding to a user's gesture operation, exiting the anti-false touch state.

[0024] In some embodiments, the terminal device is in an anti-mistouch state in a pocket; when the terminal device is taken out of the pocket, the user can exit the anti-mistouch state through gesture operations on the touch screen (for example, quickly swiping up twice) according to their usage needs; this operation of exiting the anti-mistouch state can be exited according to user needs, which is convenient and flexible, and provides a good user experience.

[0025] In a possible implementation, the method further includes: when the duration is greater than or equal to a preset duration, switching from the anti-mistouch state to the lock screen state.

[0026] In some scenarios, when the duration is greater than or equal to the preset duration (for example, 1s), it means that the user may not use the terminal device temporarily; the terminal device can switch from the anti-mistouch state to the lock screen state to turn off the touch screen, save terminal power consumption, and avoid accidental touches.

[0027] On the second aspect, another method for performing bag drop detection is provided, which includes: when the touch screen is in a non-locked state, determining the angle between the movement direction of the terminal device and the direction of gravity; when the angle is less than a preset 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 half-peak width of the acceleration waveform is within a preset range, performing bag drop detection.

[0028] The above method can be executed by a terminal device including a touch screen, or by a module (such as a processor, chip, or chip system, etc.) applied to the terminal device, or by a logic module or software that can realize all or part of the terminal device functions. Compared with the existing anti-false touch technology that leads to increased terminal power consumption; the present application first determines whether the terminal device has a falling-in-the-pocket trend of moving in the direction of gravity based on the angle between the movement direction of the terminal device and the gravity direction, and then detects the acceleration waveform of the terminal device in the movement direction. When the peak of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a falling-in-the-pocket peak (i.e., the acceleration peak generated in the movement direction when the terminal device falls into the pocket). At this time, the falling-in-the-pocket detection is performed again. This not only avoids wasting the terminal's power consumption by performing the falling-in-the-pocket detection in non-falling-in-the-pocket scenario, but also improves the user experience of using the terminal.

[0029] In one possible implementation, before performing the pocket detection, the method also includes: detecting the current posture of the terminal device; when the peak of the acceleration waveform is greater than a first preset value and the half-peak width of the acceleration waveform is within a preset range, performing the pocket detection, including: when the current posture is a target posture, and when the peak of the acceleration waveform is greater than a first preset value and the half-peak width of the acceleration waveform is within a preset range, performing the pocket detection, the target posture is a posture with the top of the touch screen facing down.

[0030] In order to improve the accuracy of determining whether the terminal has generated a bag drop action, in some embodiments, the terminal device can jointly determine whether the terminal device has generated a bag drop action based on the current posture and acceleration waveform, so as to reduce the probability of false triggering of bag drop detection and avoid waste of terminal power consumption due to invalid bag drop detection in non-bag drop scenarios.

[0031] In one possible implementation, performing pocket detection includes: obtaining N capacitance difference values ​​on the touch screen, where the N capacitance difference values ​​are the absolute values ​​of the differences between N original capacitance values ​​and standard capacitance values, where N is a positive integer greater than 1; determining M capacitance difference values ​​from the N capacitance difference values, where the M capacitance difference values ​​are capacitance difference values ​​greater than a capacitance threshold, where M is a positive integer less than N; when M is greater than a second preset value, clustering the M capacitance difference values ​​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 the output result of the classifier is used to indicate whether the terminal device is in a pocket.

[0032] Compared with the method of directly judging whether the terminal device is in a pocket based on the number of capacitance reporting points, the present application first clusters the capacitance differences to remove capacitance differences with small correlations, while retaining the clustering results of capacitance differences with large correlations; then, the clustering results of capacitance differences with large correlations are classified by a classifier to improve the accuracy of the classifier in determining whether the terminal device is in a pocket.

[0033] In a possible implementation, performing pocket detection includes: detecting a state of a proximity light sensor of the terminal device; and determining that the terminal device is in a pocket if the state is an obstructed state.

[0034] When the terminal device is in normal use, the proximity light sensor is usually in an unblocked state, while when the terminal device is in a pocket, the surrounding environment of the proximity light sensor becomes dark and is in a blocked state; therefore, the terminal device can quickly determine whether the terminal device is in a pocket based on whether the proximity light sensor is in a blocked state, which is highly efficient and accurate.

[0035] In a possible implementation, when the terminal device is in a pocket, the method further includes: entering a lock screen state.

[0036] When the terminal device is in a pocket, the terminal can switch from a non-locked screen state (for example, a bright screen state) to a locked screen state to prevent the touch screen from being frequently accidentally touched in the pocket, thereby affecting the user's experience.

[0037] In one possible implementation, before entering the lock screen state, the method further includes: recording the duration for which the terminal device is in the pocket; when the duration is less than a preset duration, being in an anti-mistouch state within the duration.

[0038] It can be seen that in some scenarios (for example, when a user temporarily puts a mobile phone or other terminal device in a trouser pocket while washing hands), the user does not want the terminal device to enter the lock screen state. At this time, the terminal device can record the duration of time it has been in the pocket. During the period when the duration is less than the preset duration (for example, 1s), the terminal device can temporarily enter the anti-mistouch state instead of the lock screen state. In this way, even if the user takes the terminal out of the pocket for a short time, there is no need to unlock it again and the user can continue to use it, which is convenient, fast and safe.

[0039] In a possible implementation, after being in the anti-accidental touch state for a continuous period of time, the method further includes: when the state of the proximity light sensor of the terminal device is a non-blocking state, exiting the anti-accidental touch state.

[0040] In some embodiments, the terminal device is in an anti-mistouch state in a pocket, and the proximity light sensor is in a blocked state; when the proximity light sensor is in a non-blocked state, it means that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mistouch state to facilitate user use.

[0041] In a possible implementation, after being in the anti-false touch state for a continuous period of time, the method further includes: when the current posture of the terminal device is a posture with the top of the touch screen facing upward, exiting the anti-false touch state.

[0042] In some embodiments, the terminal device is in an anti-mistouch state 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 means that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mistouch state to facilitate the user to continue using it.

[0043] In a possible implementation, after being in the anti-false touch state for a continuous period of time, the method further includes: when the terminal device leaves the pocket, responding to a user's gesture operation, exiting the anti-false touch state.

[0044] In some embodiments, the terminal device is in an anti-mistouch state in a pocket; when the terminal device is taken out of the pocket, the user can exit the anti-mistouch state through gesture operations on the touch screen (for example, quickly swiping up twice) according to their usage needs; this operation of exiting the anti-mistouch state can be exited according to user needs, which is convenient and flexible, and provides a good user experience.

[0045] In a possible implementation, the method further includes: when the duration is greater than or equal to a preset duration, switching from the anti-mistouch state to the lock screen state.

[0046] In some scenarios, when the duration is greater than or equal to the preset duration (for example, 1s), it means that the user may not use the terminal device temporarily; the terminal device can switch from the anti-mistouch state to the lock screen state to turn off the touch screen, save terminal power consumption, and avoid accidental touches.

[0047] In a third aspect, an embodiment of the present application provides a terminal device, which includes a processor and a memory, the memory being used to store computer programs, and the processor being used to call and run the computer programs from the memory, so that the terminal device executes any one of the methods in the first aspect.

[0048] In a fourth aspect, an embodiment of the present application provides a terminal device, which includes a processor and a memory, the memory being used to store computer programs, and the processor being used to call and run the computer programs from the memory, so that the terminal device executes any one of the methods in the second aspect.

[0049] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes any one of the methods in the first aspect.

[0050] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes any one of the methods in the second aspect.

[0051] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes: a computer program code, which, when executed by a terminal device, enables the terminal device to execute any one of the methods in the first aspect.

[0052] In an eighth aspect, an embodiment of the present application provides a computer program product, the computer program product comprising: a computer program code, which, when executed by a terminal device, enables the terminal device to execute any one of the methods in the second aspect.

[0053] In the ninth aspect, an embodiment of the present application provides a chip system, which includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, any one of the methods in the first aspect is implemented.

[0054] Optionally, the processing circuit in the above chip system can be replaced by a processor, and the storage medium can be replaced by a memory. Optionally, the chip system can also include a communication interface, which is used to realize communication between the chip system and external devices.

[0055] In the tenth aspect, an embodiment of the present application provides a chip system, which includes a processing circuit and a storage medium, wherein the storage medium stores computer program instructions; when the computer program instructions are executed by the processing circuit, any one of the methods in the second aspect is implemented.

[0056] Optionally, the processing circuit in the above chip system can be replaced by a processor, and the storage medium can be replaced by a memory. Optionally, the chip system can also include a communication interface, which is used to realize communication between the chip system and external devices.

[0057] The beneficial effects of the technical solutions in the third to tenth aspects of the present application can refer to the beneficial effects of the technical solutions in the first or second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] FIG1 is a schematic structural diagram of a terminal device 100 provided in an embodiment of the present application;

[0059] FIG2 is a schematic diagram of the software structure of a terminal device 100 provided in an embodiment of the present application;

[0060] FIG3 is a flow chart of a method 300 for performing bag drop detection according to an embodiment of the present application;

[0061] FIG4 is a schematic diagram of creating a coordinate system according to an embodiment of the present application;

[0062] FIG5 is a flow chart of a method 500 for performing bag drop detection according to an embodiment of the present application;

[0063] FIG6 is a schematic diagram of capacitance characteristics of several terminal devices provided in an embodiment of the present application when placed in pockets made of different materials;

[0064] FIG7 is a schematic diagram of setting an anti-mistouch mode according to an embodiment of the present application;

[0065] FIG8 is a schematic diagram of a terminal device including a fingerprint unlocking button on its side provided by an embodiment of the present application;

[0066] FIG9 is a schematic diagram of a terminal device in a pocket provided by an embodiment of the present application;

[0067] FIG10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0069] FIG1 shows a schematic structural diagram of a terminal device 100 .

[0070] The terminal device 100 may include a mobile phone, a smart watch, a smart player, a foldable electronic device, a tablet computer, etc. The embodiment of the present application does not impose any special restrictions on the specific type of the terminal device 100.

[0071] 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, an earphone interface 170D, a sensor 180, a button 190, an indicator 191, a subscriber identification module (SIM) card interface 192 and a display screen 193, etc.

[0072] It is understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than those in Figure 1, or may combine or separate certain components, or may have different component arrangements. The components in Figure 1 may be implemented in hardware, software, or a combination of software and hardware.

[0073] 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. The different processing units may be independent devices or integrated into one or more processors.

[0074] The processor 110 can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and execution.

[0075] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by processor 110. When processor 110 needs to use the instruction or data, it can directly access it from this memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0076] 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. The processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, and a camera through at least one of the above interfaces.

[0077] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.

[0078] The USB connector 130 is an interface that complies with USB standard specifications and can be used to connect the terminal device 100 and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The charger can 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 input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 193 and the wireless communication module 160. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0079] 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 modem processor and the baseband processor.

[0080] The mobile communication module 150 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the same device as at least some modules of the processor 110.

[0081] The modem processor may include a modulator and a demodulator. 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. The demodulator then 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 passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 193. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0082] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), and near field communication (NFC) for application on the terminal device 100. 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 technology. The wireless communication technology may include the global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), etc.

[0083] The terminal device 100 can implement display functions through a GPU, display screen 193, and an application processor. The GPU is a microprocessor for image processing that connects 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 that execute program instructions to generate or change display information.

[0084] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be saved on the external memory card or transferred from the terminal device to the external memory card.

[0085] The internal memory 121 can be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the terminal device 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may 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 instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0086] The terminal device 100 can implement audio functions, such as music playback, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0087] The sensor 180 may include a pressure sensor, a gyro 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 output.

[0088] 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 set on the display screen 193. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When force acts on the pressure sensor, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 193, the terminal device 100 detects the intensity of the touch operation based on the pressure sensor, and can also calculate the position of the touch based on the detection signal of the pressure sensor.

[0089] 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 (ie, x-axis, y-axis, and z-axis) can be determined by the gyroscope sensor.

[0090] The accelerometer can detect the magnitude of acceleration of the terminal device 100 in all directions (generally three axes). When the terminal device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the terminal device's posture, which is applicable to applications such as landscape and portrait screen switching and pedometers.

[0091] The 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 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 can determine that there is no object near the terminal device 100. The terminal device 100 can use the proximity light sensor to detect whether the terminal is in a pocket, so that the terminal can automatically unlock and lock the screen.

[0092] The ambient light sensor is used to sense the brightness of the ambient light. The ambient light sensor can also be used in conjunction with the proximity light sensor to detect whether the terminal device 100 is in a pocket to prevent accidental touches.

[0093] A touch sensor, also known as a "touch panel," can be provided on the display screen 193. 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 applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 193. In other embodiments, the touch sensor can also be provided on the surface of the terminal device 100, at a location different from that of the display screen 193.

[0094] The buttons 190 may include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The terminal device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the terminal device 100.

[0095] The indicator 191 can be an indicator light, which can be used to indicate the charging status, power changes, and can also be used to indicate information, missed calls, notifications, etc.

[0096] Optionally, the terminal device may further include a SIM card interface 192 for connecting a SIM card. A SIM card can be connected to and disconnected from the terminal device 100 by inserting or removing it 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, and the like. Multiple cards can be inserted into the same SIM card interface 192 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 192 is also compatible with different types of SIM cards. The SIM card interface 192 is also compatible with external memory cards.

[0097] Display screen 193 is used to display data such as video interfaces and user settings interfaces. For example, display screen 193 can be used to display information such as video content. Display screen 193 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode, or the like. In some embodiments, the display screen can be foldable or scrollable.

[0098] The terminal device 100 may also adopt other architectures. The embodiment of the present invention may also take the Harmony system as an example to exemplify the software architecture of the terminal device 100. It should be understood that the solution provided in this application may also be applied to other types of operating systems such as the Android operating system, the Apple operating system, and the Windows operating system.

[0099] FIG2 is a schematic diagram of the software structure of the terminal device 100 according to an embodiment of the present application.

[0100] In some implementations, the Harmony system includes four layers, from bottom to top: the kernel layer, the system basic service layer, the framework layer, and the application layer.

[0101] The Harmony system uses a multi-kernel design, optionally including the Linux kernel, the Hongmeng microkernel, and the lightweight IoT operating system kernel (Lite OS). This design allows devices with different device capabilities to select the appropriate system kernel. The kernel layer also includes a kernel abstraction layer, which provides basic kernel capabilities to other Harmony layers, such as process management, thread management, memory management, file system management, network management, and peripheral management.

[0102] The system basic service layer is the core capability set of the Harmony system, which supports the Harmony system to provide services to application services through the framework layer in the scenario of multi-device deployment. This layer optionally includes the following parts:

[0103] The system's basic capability subsystems provide fundamental capabilities for running, scheduling, and migrating distributed applications across multiple devices in the Harmony system. These subsystems comprise a distributed soft bus, distributed data and file management, distributed task scheduling, the Ark runtime, and distributed security and privacy protection. The Ark runtime provides a C / C++ / JavaScript multi-language runtime and basic system class libraries. It also provides a runtime for Java programs statically compiled using the Ark compiler (i.e., applications or frameworks developed in Java).

[0104] Basic software service subsystems: These provide common, general-purpose software services for the Harmony system. These subsystems include graphics and imaging, distributed media, distributed AI, multimodal input, mobile sensing development platform (MSDP) and device virtualization (DV), event notification, phone services, and design for X (DFX). These subsystems can be tailored to the specific functionalities of each device, tailored to the deployment environment.

[0105] The enhanced software service subsystem set (see the enhanced software section outlined by the dashed line in Figure 2) provides the Harmony system with differentiated, device-specific, capability-enhancing software services. This set comprises subsystems such as tablet business software, smart screen business software, vehicle-mounted computer business software, and Internet of Things (IoT) business software. The enhanced software service subsystem set can be tailored to the subsystem granularity based on the deployment environment of different device form factors, and each subsystem can be tailored to the functional granularity within it.

[0106] Harmony driver foundation (HDF) and hardware abstraction layer (HAL): They are the foundation of the open hardware ecosystem of the Harmony system, providing hardware capability abstraction to the hardware upward and providing a development framework and operating environment for various peripheral drivers downward.

[0107] Hardware Service Subsystem Set: This provides common, adaptive hardware services for the Harmony system and consists of hardware service subsystems such as general sensors, location, power, USB, and biometrics. The hardware service subsystem set can be tailored to the deployment environment of different device form factors, and each subsystem can be tailored to the functional granularity.

[0108] The proprietary hardware service subsystem (see the proprietary hardware section outlined by the dashed line in Figure 2) provides the Harmony system with differentiated hardware services for different devices. This subsystem optionally includes proprietary hardware services for tablets, car consoles, wearables, and IoT devices. The proprietary hardware service subsystem can be tailored to the subsystem granularity, and each subsystem can be tailored to the functional granularity.

[0109] 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.

[0110] 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).

[0111] The following takes a mobile phone having the structure shown in FIG. 1 and FIG. 2 as an example, and combines the method for performing bag drop detection provided in this application to exemplarily illustrate the processing flow of the above-mentioned terminal device 100.

[0112] For example, when a user is waiting for a flight at an airport, he is using his mobile phone to read an e-book; when he hears the ticket check notification, he puts the unlocked mobile phone into his trouser pocket; at this time, the acceleration sensor of the mobile phone can detect the acceleration waveform of the mobile phone in the direction of movement; when the peak value of the acceleration waveform is greater than the first preset value and the half-peak width is within the preset range, it means that the peak of the acceleration waveform is a pocket peak; after the mobile phone determines the pocket peak, it determines the angle between the direction of movement and the direction of gravity; when the angle is less than the preset angle, it means that the mobile phone has a pocket trend of moving in the direction of gravity; at this time, the mobile phone performs pocket detection again; the mobile phone passes The phone's proximity light sensor detects whether the surrounding environment has darkened. When the phone determines that it is in an obstructed state based on the detection value of the proximity light sensor, it can enter an anti-false touch state or a lock screen state. In some scenarios, if the phone is in a pocket for a short period of time, the phone can first enter an anti-false touch state, for example, generating (or displaying) an anti-false touch interface on the phone's touch screen to prevent the touch screen from being accidentally touched. In other scenarios, if the phone needs to be in a pocket for a long time, to prevent the touch screen from being accidentally touched, the phone can activate an automatic lock screen function, turn off the touch screen, and put the phone into a lock screen state. For details, please refer to the detailed description of the embodiments below, which will not be repeated here.

[0113] It should be noted that the terminal device applicable to this method is not limited to the hardware and software structure shown in Figures 1 and 2. In actual applications, the hardware and software system architecture shown in Figures 1 and 2 can be modified according to specific application scenarios, and this application does not limit this.

[0114] As can be seen from the background technology, in the scenario of accidental touches in pockets, anti-accidental touch technology can help users automatically lock the screen of a terminal device (such as a mobile phone) in a non-locked state in their pockets, thereby preventing the touch screen from being accidentally touched. However, the existing anti-accidental touch technology increases the power consumption of the terminal device when performing pocket detection, affecting the battery life of the terminal device. To this end, this application proposes a method for performing pocket detection; this method can reduce the power consumption of the terminal device and improve the user experience.

[0115] Before introducing the method for performing bag drop detection provided by this application, a brief description of the execution subject involved in the embodiments of this application is first given. The terminal device involved in this application can have the structure shown in Figures 1 and 2. For example, the terminal device can be a mobile phone, a foldable electronic device, etc. having the structure shown in Figures 1 and 2, or it can be a chip, a chip system, or a processor applied to the terminal device, or it can be a logic module or software that can realize all or part of the functions of the terminal device.

[0116] The following embodiments describe method 300 for performing bag drop detection using a terminal device including a touch screen as an example. Figure 3 shows a flow chart of method 300 for performing bag drop detection according to an embodiment of the present application. Method 300 includes steps S301 to S303, which are described in detail below.

[0117] S301, when the touch screen is in a non-locked state, the terminal device detects its own acceleration waveform in the direction of movement.

[0118] It should be noted that the above-mentioned touch screen being in the unlocked state can also be described as the terminal device being in the unlocked state; the touch screen being in the locked state can also be described as the terminal device being in the locked state.

[0119] The lock screen state refers to the state in which the terminal device is locked. When the terminal device is in the lock screen state, the touch screen (or display) of the terminal device can be turned off (or off) or in the bright screen state. In the lock screen state, the terminal device is inoperable; if the user wants to operate the terminal device, they need to unlock the screen to continue using it.

[0120] For example, when the terminal device is in the locked screen state and the touch screen is in the bright screen state, the user can see the time, date and other information displayed on the touch screen, but the user cannot operate the terminal device; for another example, when the terminal device is in the locked screen state and the touch screen is in the off screen state, the user can turn on the touch screen using buttons such as the power button and see the time, date and other information displayed on the touch screen, but the user cannot operate the terminal device.

[0121] The non-locked screen state (or unlocked state) means that the terminal device is in an unlocked state; in the non-locked screen state, the terminal device is in a normally operable state, and the user can directly perform various operations on the terminal device; when the terminal device is in the non-locked screen state, the touch screen of the terminal device can be in a bright screen state or in an off screen state (or black screen state); for example, in the off screen state, the terminal device is not locked, and when the user clicks the touch screen through a gesture operation (for example, a touch gesture), the touch screen can be lit; thereafter, the user can directly operate the terminal device through gesture operations without unlocking it.

[0122] The direction of movement refers to the direction in which the terminal device moves; the direction of movement can be the same as the direction of gravity, opposite to the direction of gravity, or at a certain angle to gravity (for example, the direction of movement is at a 60° angle to the direction of gravity).

[0123] In some implementations, the direction of movement 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 movement of the terminal device can be represented by a three-dimensional coordinate point in the coordinate system; wherein a certain position can refer to the center point of a certain border of the terminal device, or the geometric center of the terminal device, or other positions on the terminal device. This application does not limit this. In actual applications, a suitable position can be selected from the terminal device as the coordinate origin to establish a coordinate system according to specific circumstances.

[0124] For example, as shown in (a) in Figure 4, an XYZ rectangular coordinate system is established with the geometric center O of the terminal device (for example, 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 is located 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 located in the positive direction of the Y axis, and the bottom is located in the negative direction of the Y axis.

[0125] After the coordinate system is established, the terminal device can determine its own direction of movement at different times or different durations based on its own movement trajectory in the coordinate system; for example, as shown in (a) in Figure 4, at time T1, the terminal device moves to point A. At this time, the direction of movement 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 period from time T0 to time T1, the terminal device moves along the positive direction of the Y-axis shown in (b) in Figure 4. At this time, the direction of movement of the terminal device is the positive direction of the Y-axis.

[0126] It should be noted that the acceleration of the terminal device in the direction of motion can be decomposed into each coordinate axis of the coordinate system; the components of the acceleration in the direction of motion of the terminal decomposed into each coordinate axis are different depending on the motion posture of the terminal device; for example, as shown in (b) in Figure 4, 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 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 bag drop scenario, the acceleration waveform in the positive direction of the Y-axis usually has an obvious peak; 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.

[0127] Normally, a terminal device can detect the acceleration waveform in the direction of motion through its own accelerometer. On the one hand, the accelerometer can be used to detect the acceleration waveform 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, the accelerometer can also be used to detect the magnitude and direction of gravity. In addition, in some scenarios (for example, horizontal and vertical screen scenarios), the accelerometer can also be used to identify the current posture of the terminal device. For example, take the example of a user putting a mobile phone into a trouser pocket during the period from T1 to T2. As shown in (b) of FIG4 , when the user puts the terminal device into the trouser pocket along the positive direction of the Y axis, the accelerometer can detect the acceleration waveform in the positive direction of the Y axis. Since the terminal device generates a pocket-dropping action, the accelerometer of the terminal device can detect an obvious peak in the acceleration waveform in the positive direction of the Y axis during the period from T1 to T2, as shown in (c) of FIG4 .

[0128] S302: When the peak of the acceleration waveform is greater than a first preset value and the half-peak width of the acceleration waveform is within a preset range, the terminal device determines the angle between the motion direction and the gravity direction.

[0129] Among them, the first preset value can be -5 (m / s^2) to -15 (m / s^2), etc.; the preset range can be 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.

[0130] When the terminal device detects its own acceleration waveform in a certain direction of movement, the terminal device will continue to detect the peak and half-peak width of the acceleration waveform; for example, when the terminal device detects that the derivative of the acceleration in a sliding window for a period of time changes from a negative number to a positive number, it determines that a peak appears in the time period; then, the terminal device extracts the detection value of the peak in this section and determines the half-peak width; when the peak of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within a preset range, it indicates that the peak of the acceleration waveform is a pocket peak, which also indicates that the terminal device may produce a pocket action; wherein, the pocket peak is the acceleration peak generated in the direction of movement when the terminal device falls into the pocket; if the terminal device detects the pocket peak, it can be determined that the terminal device may currently produce a pocket action.

[0131] At this time, in order to further determine that the terminal device has generated a bag-dropping action, the terminal device can obtain the gravity detection value (for example, the gravity vector or gravity acceleration value in the coordinate system) through its own gravity sensor, and obtain the motion detection value (for example, the motion vector or motion coordinate in the coordinate system) through its own motion sensor (for example, acceleration sensor); the terminal device calculates the angle based on the gravity detection value and the motion detection value.

[0132] For example, as shown in (b) of FIG4 , when a user places a terminal device into a pocket along the positive direction of the Y-axis, the terminal device moves in the positive direction of the Y-axis. At this time, the terminal device's accelerometer can detect its own acceleration in the positive direction of the Y-axis, and can detect an acceleration waveform with a peak during the period from T1 to T2. The terminal device obtains the peak (or peak value or peak value) and half-peak width of the acceleration waveform. When the peak of the acceleration waveform is greater than a first preset value and the half-peak width of the acceleration waveform is within a preset range, the terminal device can determine that the peak of the acceleration is a pocket peak. The terminal device then obtains a motion detection value through its own accelerometer and a gravity detection value through its own gravity acceleration sensor, and calculates the angle between the motion detection value and the gravity detection value according to the cosine formula. For example, the 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 gravity acceleration sensor, the terminal device can obtain the angle between the motion direction and the gravity direction by multiplying the motion vector and the gravity vector.

[0133] S303: When the angle is smaller than the preset angle, the terminal device performs bag drop detection.

[0134] Among them, the preset angle can be 90° or 60°, etc., and can be set according to the specific application scenario in actual application. This application does not limit this.

[0135] When the above-mentioned angle is less than the preset angle, it indicates that the movement direction of the terminal device is toward the direction of gravity; since the terminal device generates a pocket drop peak in the movement direction and moves toward the direction of gravity, the terminal device can determine that it has generated a pocket drop action; at this time, the terminal device restarts the pocket drop detection to determine whether it is in the pocket and whether it needs to enter the lock screen state; wherein, the pocket drop 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-mistouch state, and when it enters the lock screen state, etc.); for example, the terminal device can determine whether it is in the pocket by the occlusion state of the proximity light sensor, the number of capacitance reporting points or the average value of the capacitance difference; when the terminal device determines that it is in the pocket, it can start the automatic lock screen function to make the terminal enter the lock screen state to avoid the touch screen from being frequently accidentally touched in the pocket.

[0136] To sum up, compared with the situation where the existing anti-mistouch technology leads to increased terminal power consumption; this application first detects the acceleration waveform of the terminal device in the direction of movement. When the peak of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a pocket peak (that is, the acceleration peak generated in the direction of movement when the terminal device falls into the pocket). After that, the angle between the direction of movement and the direction of gravity is further determined. When the angle is less than the preset angle, it indicates that the terminal device has a pocket trend of moving in the direction of gravity. At this time, pocket detection is performed again. This not only avoids wasting the terminal's power consumption by performing pocket detection in non-pocket scenarios, but also improves the user experience of using the terminal.

[0137] It should be noted that, in some embodiments, before the terminal device performs the pocket detection, method 300 also includes: the terminal device detects its current posture; when the current posture is the target posture, and when the angle is less than the preset angle, the terminal device performs the pocket detection, wherein the target posture is the posture with the top of the touch screen facing downward.

[0138] The current posture of the terminal device can be obtained through its own posture (or position) sensor (for example, at least one of an accelerometer, a gyroscope sensor, or a magnetometer sensor); the terminal device can calculate the current posture of the terminal device through the detection value of the posture sensor and the detection value of the motion sensor. When the current posture is the posture with the top of the touch screen facing downward (i.e., the target posture), it indicates that the terminal device has a tendency to move in the direction of gravity; and because the terminal device has detected the pocket drop peak, when the terminal device determines that the current posture is the target posture and the above-mentioned angle is less than the preset angle, it can be determined that the terminal device has generated a pocket drop action; at this time, the terminal device can initiate pocket drop 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 the 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. Generally, the preset coordinate axis is selected as the coordinate axis in the coordinate system whose positive direction and the direction of gravity have an angle less than 90°. For example, as shown in (b) of FIG4 , the preset coordinate axis may be the positive direction of the Y-axis, because 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 motion is less than a preset value (e.g., 90°). For example, when the angle between the positive direction of the Y-axis and the direction of motion is less than a 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 motion is greater than or equal to a preset value of 90°, the terminal device determines that it is not moving in the direction of gravity (e.g., 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 drop scenarios by determining whether the angle between the direction of motion and the preset coordinate axis is less than a preset value, which is conducive to improving the accuracy of the terminal device in determining whether to perform bag drop detection.

[0142] The above introduces 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 introduces a method 500 for performing bag drop detection, as shown in Figure 5; this method 500 can also reduce the power consumption of the terminal device and improve the user experience; the execution body of method 500 is similar to the execution body of method 300, and the details can be referred to the description of the execution body in method 300, which will not be repeated here; the method 500 includes S501 to S503, and these steps are described in detail below.

[0143] S501: When the touch screen is in a non-locked state, the terminal device determines the angle between its own movement direction and the direction of gravity.

[0144] Among them, the terminal device determines the angle between its own movement direction and the gravity direction. Please refer to the relevant description of step S302 above, which will not be repeated here.

[0145] It should be noted that, unlike method 300, in method 500, when the touch screen is in a non-locked state, the terminal device first eliminates some non-bag drop scenarios through the angle between its own movement direction and the direction of gravity, so as to avoid invalid bag drop detection in non-bag drop scenarios and cause waste of terminal power consumption.

[0146] S502: When the angle is smaller than the preset angle, the terminal device detects its own acceleration waveform in the direction of motion.

[0147] Among them, the terminal device detects its own acceleration waveform in the direction of movement. Please refer to the relevant description of step S301 above, which will not be repeated here.

[0148] When the terminal device determines that the above-mentioned angle is less than the preset angle, it indicates that the terminal device has a tendency to move in the direction of gravity. At this time, the terminal device then detects its own acceleration waveform in the direction of movement.

[0149] S503: When the peak value of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within a preset range, the terminal device performs bag drop detection.

[0150] When the peak of the acceleration waveform is greater than a first preset value and the half-width at half maximum of the acceleration waveform is within a preset range, it indicates that the terminal device has generated a pocket drop peak in the direction of motion. Furthermore, since the terminal device tends to move in the direction of gravity, it can be determined that the terminal device has generated a pocket drop. At this point, the terminal device can initiate pocket drop detection to determine whether it is in a pocket and whether it needs to enter the lock screen state. For details, please refer to the relevant description in S303 above and will not be repeated here.

[0151] It should be noted that when executing method 300 or method 500, the terminal device can execute it within a preset time period or within a preset sliding time window, wherein the starting moment of the preset time period can be the moment when the terminal device detects the presence of acceleration in the direction of motion, and the duration of the preset time period can be set according to actual conditions, for example, 2 seconds or 3 seconds, etc., and this application does not limit this; the total duration of the sliding time window can be 1 second or 2 seconds, etc., and the starting moment of the sliding time window can be a preset moment after the terminal device is turned on. The terminal device detects whether there is acceleration in the direction of motion within the preset sliding time window at intervals. Compared with the method in which the terminal device determines whether it has generated a bag drop action based on the acceleration value detected at a certain moment, the method in this application in which the terminal device determines the bag drop action by detecting changes in its own motion parameters (such as acceleration waveform, angle, etc.) over a period of time (or within a preset time period) is more accurate.

[0152] In method 500, compared with the situation where the existing anti-false touch technology causes increased terminal power consumption, method 500 first determines whether the terminal device has a falling bag trend of moving in the direction of gravity based on the angle between the movement direction of the terminal device and the gravity direction, and then detects the acceleration waveform of the terminal device in the movement direction. When the peak of the acceleration waveform is greater than the first preset value and the half-peak width of the acceleration waveform is within the preset range, it indicates that the peak of the acceleration waveform is a falling bag peak. At this time, the falling bag detection is performed again. This not only avoids wasting the terminal's power consumption by performing the falling bag detection in a non-falling bag scenario, but also improves the user experience of using the terminal.

[0153] In some embodiments, before the terminal device performs the drop-in-pocket detection, the 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 half-peak width of the acceleration waveform is within a preset range, the terminal device performs the drop-in-pocket detection, wherein the target posture is the posture with the top of the touch screen facing downward.

[0154] It should be noted that the terminal device obtains its current posture, and can refer to the relevant description above, which will not be repeated here; when the current posture is the posture with the top of the touch screen facing down (or the top of the touch screen is higher than the top) (that is, the target posture), it indicates that the terminal device has a tendency to move in the direction of gravity; and because the terminal device determines that the peak of the acceleration waveform is a bag drop peak based on the peak of the acceleration waveform being greater than the first preset value and the half-peak width of the acceleration waveform being within the preset range, the terminal device can determine that it has generated a bag drop action; at this time, the terminal device can start bag drop detection.

[0155] It can be seen that in order to improve the accuracy of determining whether the terminal has generated a bag drop action, in some embodiments, the terminal device can jointly determine whether the terminal device has generated a bag drop action based on the current posture and the bag drop peak to reduce the probability of false triggering of the bag drop detection.

[0156] The above method 300 and method 500 introduce the method by which the terminal device determines to perform bag drop detection. The following will continue to introduce the specific method by which the terminal device performs bag drop detection in method 300 and method 500.

[0157] In some embodiments, the terminal device performs pocket detection, including: the terminal device obtains N capacitance difference values ​​on the touch screen, wherein the N capacitance difference values ​​are the absolute values ​​of the differences between the N original capacitance values ​​and the standard capacitance values, and N is a positive integer greater than 1; the terminal device determines M capacitance difference values ​​from the N capacitance difference values, and the M capacitance difference values ​​are capacitance difference values ​​greater than the capacitance threshold, wherein M is a positive integer less than N; when M is greater than a second preset value, the terminal device clusters the M capacitance difference values ​​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 a pocket, wherein the output result of the classifier can be used to indicate whether the terminal device is in a pocket.

[0158] It should be noted that the original value of capacitance may refer to the capacitance value when the capacitance node is touched, and the original value of capacitance decreases as the touch force increases; the standard value of capacitance is usually a preset value, for example, the standard value of capacitance is 8000 or 12000, etc.; generally, the original value of capacitance is less than the standard value of capacitance; for example, when capacitance node A is not touched, the original value of capacitance is 8000, and the standard value of capacitance is 8000; when the finger touches capacitance node A, the original value of capacitance of capacitance node A is 7000, and the capacitance difference of capacitance node A is 1000 (i.e., standard value of capacitance - original value of capacitance = 8000 - 7000).

[0159] The above-mentioned 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 specific scenarios in actual applications, and this application does not limit this.

[0160] Since the capacitance characteristics of the touch screen will change when the terminal device is in a pocket, it is possible to determine whether the terminal device is in a pocket through the capacitance characteristics of the touch screen (for example, capacitance difference). For example, the terminal device can obtain N capacitance differences on the touch screen, and compare the N capacitance differences with the capacitance threshold respectively, and then determine M capacitance differences from the N capacitance differences; wherein, the M capacitance differences are greater than the capacitance threshold; in order to improve the accuracy of the classification results, the terminal device first clusters the M capacitance differences through a clustering algorithm (for example, 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 (for example, capacitance difference) on the touch screen are different. For example, for pockets of some materials, when the terminal device is placed in, the capacitance differences of multiple areas of the touch screen are positive, and the terminal device is not good at clustering. When clustering the capacitance differences on the touch screen in a pocket of this material, multiple clustering results will be obtained; for pockets of some materials, when the terminal device is placed, only one area has a positive capacitance difference. When the terminal device clusters the capacitance differences on the touch screen in pockets of this material, one clustering result will be obtained; the terminal device can use the clustering algorithm to cluster capacitance differences with large correlation (or relevance) together to accurately reflect the capacitance characteristics of the touch screen in pockets of different materials; finally, the terminal device uses the trained classifier to extract features and classify at least one clustering result to obtain an output result, and then determines whether it is in a pocket based on the output result. It should be noted that in actual applications, the trained classifier can determine whether the terminal device is in a pocket based on the capacitance differences reported by the terminal device in pockets of different materials.

[0161] It should be noted that when training a classifier, the training set can be the capacitance difference when the terminal device falls into pockets of different materials, or the clustering result of the capacitance difference when the terminal device falls into pockets of different materials; wherein, the clustering result can refer to the result obtained after the capacitance difference when the terminal device falls into pockets of different materials is processed by the clustering algorithm; during the training process, if the training set is the clustering result of the terminal device falling into pockets of different materials, the classifier can determine the clustering area, clustering position and other information based on the clustering result, thereby determining the capacitance characteristics of the terminal device in pockets of different materials; after training, the classifier can determine the corresponding capacitance characteristics (for example, clustering area, clustering position, etc.) based on the capacitance difference (or clustering result) when the terminal device falls into pockets of different materials, thereby determining whether the terminal device falls into the pocket of the corresponding material. Therefore, after the classifier is trained, the terminal device can use the classifier to identify the clustering result after it falls into a certain material pocket to determine whether it is in the pocket of that material.

[0162] It should be noted that the above-mentioned classifier may refer to a support vector machine (SVM) classifier or other lightweight classifiers, and this application does not limit this. In addition, when the classifier is trained, the training set may also be expanded to the capacitance difference or clustering results of the terminal device in pockets of different shapes and thicknesses. For example, the training set includes the capacitance difference in a square thick jeans pocket and the capacitance difference in a round thin jeans pocket, etc. After the classifier is trained with the training set, the classifier can identify whether the terminal device is in pockets of different types (for example, pockets of different materials and thicknesses, or pockets of different materials and shapes).

[0163] Figure 6 shows the capacitance characteristics of several terminal devices in pockets of different materials; it can be seen from Figure 6 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 results are different). For example, the capacitance characteristics 601 of the terminal device in the pocket of thick jeans, the capacitance characteristics 602 in the pocket of thin jeans, the capacitance characteristics 603 in the pocket of thin sports pants, and the capacitance characteristics 604 in the pocket of assault pants are obviously different, wherein the capacitance characteristics include but are 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 screen 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, while in the pocket-drop scenario, the distance between multiple clustering results is usually relatively close; for example, it can be seen from Figure 6 that there are 2 clustering results for capacitance feature 601, and the distance between these 2 clustering results is relatively close.

[0164] It can be seen that compared with the method of directly judging whether the terminal is in a pocket based on the number of capacitance reporting points, the present application first clusters the capacitance differences to remove capacitance differences with small correlation, while retaining the clustering results of capacitance differences with large correlation; then, the clustering results of capacitance differences with large correlation are classified by a classifier to improve the accuracy of the classifier in determining whether the terminal device is in a pocket.

[0165] In some embodiments, the terminal device performs pocket detection, including: the terminal device detects the state of its own proximity light sensor; if the state is blocked, it is determined that the terminal device is in a pocket.

[0166] Typically, the proximity light sensor is in either a blocked or unblocked state. The terminal device determines whether it is in a pocket based on whether the proximity light sensor is blocked. Because the proximity light sensor is typically unblocked during normal use, and the surrounding environment darkens and becomes blocked when the terminal device is in a pocket, the terminal device can quickly determine whether it is in a pocket based on whether the proximity light sensor is blocked, achieving high efficiency and accuracy.

[0167] In some embodiments, when the terminal device is in a pocket, method 300 (or method 500) further includes: the terminal device enters a lock screen state.

[0168] Whether through proximity light sensors or capacitance difference, when the terminal device determines that it is in a pocket, the lock screen function can be activated to switch the terminal device from a non-locked screen state to a locked screen state to prevent the touch screen from being accidentally touched and clicked in the pocket, affecting the terminal's battery life and user experience; the reason for affecting the terminal's battery life is that due to frequent accidental touches and clicks on the non-locked screen terminal device in the pocket, the touch screen frequently receives click events and cannot enter the screen-off locked screen state, thus affecting the terminal's battery life.

[0169] In some embodiments, before the terminal device enters the lock screen state, method 300 (or method 500) further includes: the terminal device records the duration of time it is in the pocket; when the duration is less than the preset duration, it enters the anti-mistouch state within the duration.

[0170] Among them, the duration can be 800 milliseconds, 1 second or 2 seconds, etc., and the preset duration can be 1 second or 2 seconds, etc.; the duration and preset duration can be set according to actual conditions, and this application does not limit this.

[0171] When the terminal device detects that it is in a pocket, it starts to record the duration of the time it is in the pocket. During this period of time that is less than the preset duration, the terminal device may temporarily not activate the lock screen function and switch from the non-lock screen state to the anti-mistouch state (or anti-mistouch mode). For example, the terminal device generates an anti-mistouch interface on the touch screen to avoid the terminal device from being accidentally triggered in the pocket. It should be noted that the anti-mistouch interface is usually located on the top of all interface layers on the terminal device to block the touch screen from being accidentally touched in the pocket.

[0172] For example, as shown in (a) in FIG7 , the user can find the auxiliary function option in the setting interface of the terminal device and open the auxiliary function interface 701; choose to turn on the anti-mistouch mode 702 on the auxiliary function interface 701; for example, the user is using a mobile phone to watch a video, as shown in (b) in FIG7 , and suddenly puts the unlocked mobile phone into the trouser pocket for something, and within the first time (less than the preset time) after the mobile phone falls into the trouser pocket, the mobile phone will generate an anti-mistouch interface 703, as shown in (c) in FIG7 ; wherein the first time is the duration that the mobile phone is in the pocket; if the user takes the mobile phone out of the pocket within a time period less than the preset time, the mobile phone automatically exits the anti-mistouch mode, as shown in (d) in FIG7 , and the user can directly use the mobile phone to continue watching the video without re-unlocking it.

[0173] In another scenario, some terminal devices (such as mobile phones) are equipped with a fingerprint unlock button on the side; although the fingerprint unlock button is very convenient for users to unlock the terminal, it is also prone to mislocking in some scenarios; for example, although the user has locked the screen before putting the terminal device into the pocket, the user may accidentally touch the fingerprint unlock button when putting the locked terminal device into the pocket, so that the locked terminal device is inadvertently unlocked again; in this scenario, the terminal device can also detect whether the terminal device generates a pocket-falling action after being unlocked through the above-mentioned method 300 or method 500; if the pocket-falling action occurs, the pocket-falling detection is performed; when the duration of the terminal device being in the pocket is less than the preset duration, it can temporarily enter the anti-mistouch state (or temporarily pull up the anti-mistouch mode) within the duration.

[0174] For example, there is a fingerprint unlock button 801 on the side of the mobile phone, as shown in (a) of Figure 8 . The user can use the fingerprint unlock button 801 to unlock the locked mobile phone. For example, as shown in (b) of Figure 8 , the user puts the locked mobile phone into a trouser pocket while using the mobile phone. While putting the mobile phone into the pocket, the user accidentally touches the fingerprint unlock button 801 to unlock the locked mobile phone again, and the mobile phone returns to the unlocked state, as shown in (c) of Figure 8 . 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 the mobile phone is detected to be in the pocket, the mobile phone continues to detect the duration of time it has been in the pocket. During this period of time that the duration is less than a preset time, the mobile phone can temporarily generate an anti-false touch interface 802, as shown in (d) of Figure 8 , to prevent the touch screen of the mobile phone from being accidentally touched. If the user takes the mobile phone out of the pocket within a period of time less than the preset time and the proximity light sensor of the mobile phone is in an unblocked state, the mobile phone can automatically exit the anti-false touch mode.

[0175] It can be seen that in some scenarios (for example, when a user temporarily puts a mobile phone or other terminal into a trouser pocket while washing hands), the user does not want the terminal device to enter the lock 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, 1s), the terminal device can temporarily enter the anti-mistouch state instead of the lock screen state. In this way, even if the user takes the terminal device out of the pocket for a short time, there is no need to unlock it again and the user can continue to use it, which is convenient, fast and safe.

[0176] In some embodiments, after the terminal device is in the anti-mistouch state for a continuous period of time, method 300 (or method 500) further includes: when the state of the proximity light sensor of the terminal device is a non-blocking state, exiting the anti-mistouch state.

[0177] When the terminal device is in a pocket, the terminal device can detect the status of the proximity light sensor in real time or at preset intervals; when the status of the proximity light sensor is unblocked, it means 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-mistouch state and restore to the non-locked screen state (or unlocked state) so that the user can continue to use it without having to unlock it again, which provides a good user experience.

[0178] In other embodiments, after the terminal device is in the anti-mistouch state for a continuous period of time, method 300 (or method 500) further includes: when the current posture of the terminal device is a posture with the top of the touch screen facing upward, exiting the anti-mistouch state.

[0179] When the terminal device is in a pocket, the top of the touch screen of the terminal device can be horizontal or tilted in the direction of gravity; the terminal device can obtain the detection value of the posture sensor in real time or at preset intervals; when the terminal device determines that the current posture is that the top of the touch screen is facing up (or the top of the touch screen is higher than the bottom) based on the detection value of the posture sensor, it means that the terminal device may be taken out of the pocket. At this time, the terminal device can automatically exit the anti-mistouch state to facilitate the user to continue using it.

[0180] For example, when the terminal device is in a trouser pocket, an anti-mistouch interface is temporarily generated (or temporarily pulled up) on the touch screen of the terminal device, as shown in (d) in FIG9 ; when the terminal device is in a trouser pocket, the top of the touch screen can be placed in the direction of gravity, as shown in (a) in FIG9 ; it can also be placed horizontally, as shown in (b) in FIG9 ; 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 that the top of the touch screen is facing up based on the detection value of the posture sensor, as shown in (c) in FIG9 ; at this time, the terminal device switches from the anti-mistouch state (as shown in (d) in FIG9 ) to the unlocked state, as shown in (e) in FIG9 , so that the user can continue to use it.

[0181] In some embodiments, after the terminal device is in the anti-mistouch state for a continuous period of time, the above method 300 (or method 500) further includes: when the terminal device leaves the pocket, exiting the anti-mistouch state in response to a user's gesture operation.

[0182] When the terminal device is in a pocket, it is in an anti-accidental touch state. If the user takes the terminal device out of the pocket, the user can use a gesture on the touch screen (for example, quickly swiping up twice) to exit the anti-accidental touch state and restore the terminal device to the unlocked state for continued use. This operation can exit the anti-accidental touch state according to user needs, which is convenient and flexible, and provides a good user experience.

[0183] It should be noted that the gesture operation can be an air gesture, a touch gesture, or a floating gesture, etc. For example, the gesture operation is a touch gesture operation, and the touch gesture operation may include but is not limited to a sliding operation, a tapping operation, or a pressing operation; for example, the sliding operation can be a quick swipe to the left, a quick swipe to the right, or a slow swipe to the left, etc.; the tapping operation can be a single-click operation or a double-click operation, etc.; the pressing operation can be a short press operation or a long press operation, etc.

[0184] In some embodiments, method 300 (or method 500) further includes: when the duration is greater than or equal to a preset duration, the terminal device switches from the anti-mistouch state to the lock screen state.

[0185] When the terminal device is in a pocket, the terminal device will continue to record the duration of its presence in the pocket; when the duration is greater than or equal to the preset duration, it indicates that the user may not have temporarily placed the terminal device in the pocket; in order to prevent accidental touches of the terminal device in the pocket, the terminal device will activate the automatic screen lock function, switching itself from a temporary anti-accidental touch state to a locked screen state, thereby turning off the touch screen, saving terminal power consumption, and avoiding accidental touches.

[0186] It should be noted that the pocket in this application can be a trouser pocket, or it can refer to a coat pocket, an outer pocket of a backpack, etc. This application only uses a trouser pocket as an example to illustrate the method of performing bag drop detection, and should not be understood as a limitation on the range of pockets to which this application is applicable.

[0187] The above details examples of methods for performing bag drop detection provided by this application. It will be understood that, in order to implement the aforementioned functions, the terminal device includes hardware structures and / or software modules corresponding to each function. Those skilled in the art will readily appreciate that, in conjunction with the units and algorithmic steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application. This application may divide the method for performing bag drop detection into functional units based on the aforementioned method examples. For example, each function may be divided into separate functional units, or two or more functions may be integrated into a single unit. Such integrated units may be implemented in either hardware or software functional units. It should be noted that the division of units in this application is illustrative and represents only one logical functional division; actual implementation may employ other division methods.

[0188] FIG10 is a schematic diagram illustrating the structure of a terminal device provided by the present application. In FIG10 , dashed lines indicate that the unit or module is optional. Terminal device 1000 may be used to implement the method described in the above method embodiment. Terminal device 1000 may be a terminal device, a server, or a chip (system).

[0189] The terminal device 1000 includes one or more processors 1001, which can support the terminal device 1000 in implementing the method in the method embodiment corresponding to Figure 3 or Figure 5. 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 data from the software programs. The terminal device 1000 can also include a communication unit 1005 to implement signal input (reception) and output (transmission).

[0190] The terminal device 1000 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above embodiments.

[0191] The communication unit 1005 may be an input and / or output circuit of the chip (system), or the communication unit 1005 may be a communication interface of the chip (system), and the chip (system) may be a component of the terminal device 1000 .

[0192] 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. The terminal device 1000 may include one or more memories 1002, on which a program 1004 is stored. The program 1004 can be executed by the processor 1001 to generate instructions 1003, so that the processor 1001 performs the method described in the above method embodiment according to the instructions 1003. Optionally, data may also be stored in the memory 1002. Optionally, the processor 1001 may also read 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 than the program 1004.

[0193] The processor 1001 and the memory 1002 can be provided separately or integrated together, for example, integrated into a system-on-chip (SOC) of a terminal device. The specific manner in which the processor 1001 performs the bag drop detection method can be found in the relevant description of the method embodiment.

[0194] It should be understood that each step of the above method embodiment can be completed by hardware logic circuits or software instructions in the processor 1001. The processor 1001 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0195] The present application also provides a computer program product that, when executed by processor 1001, implements any method embodiment of the present application. The computer program product may be stored in memory 1002, for example, program 1004, which undergoes preprocessing, compilation, assembly, and linking to be converted into an executable object file that can be executed by processor 1001.

[0196] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements any method embodiment of the present application. The computer program may be a high-level language program or an executable target program.

[0197] The computer-readable storage medium is, for example, memory 1002. Memory 1002 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (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 and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLink DRAM, SLDRAM), and direct RAM bus random access memory (DRRAM).

[0198] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.

[0199] In several embodiments provided in this application, the disclosed systems, devices, and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the splitting of units is only a logical function splitting. There may be other splitting methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0200] The above embodiments are intended only to illustrate the technical solutions of the present application and are not intended to limit the same. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the above embodiments or replace some of the technical features therein with equivalents, and that such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application and are therefore intended to be included within the scope of protection of the present application.

[0201] Finally, the above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be covered by the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A method for performing drop bag 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 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 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, characterized in that Before performing the pocket detection, the method further includes: Detecting the 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 a clustering process 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 state.

8. The method according to claim 7, wherein Before entering the locked state, the method further includes: Recording a duration for which the terminal device is in the pocket; When the duration is less than a preset duration, being in an anti-misoperation state within the duration.

9. The method according to claim 8, characterized in that, After being in the anti-misoperation state within the 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 - accidental touch state within 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 upward, exit the anti - accidental touch state.

11. The method according to claim 8, wherein After being in the anti - accidental touch state within the duration, the method further includes: When the terminal device leaves the pocket, in response to a user's gesture operation, exit the anti - accidental 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, switch from the anti - accidental touch state to the lock - 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

Patent Citations

  • Method for executing falling bag detection and terminal equipment

    CN120390052A

  • Control method and mobile terminal

    CN107977113A

  • Pocket pattern recognition method, pocket pattern recognition device and storage medium

    CN112738324A

  • Method and device for reducing power consumption

    CN114375027A

  • Method and device for preventing mistaken touch

    CN116204075A

Cited By

  • Artificial intelligence-based dance posture correction method and system

    CN121053698A