Pocket state judgment method, terminal equipment and storage medium

Through the comprehensive judgment of multiple sensor data, it is possible to accurately determine whether the terminal device is in a pocket state, which solves the problem of misjudgment in the prior art, improves user experience and reduces after-sales service costs.

CN119520676APending Publication Date: 2025-02-25WEILAI MOBILE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719575.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art has misjudgment in determining whether the terminal device is in a pocket state, which affects the user experience and increases after-sales service costs.

Method used

By combining acceleration sensors, distance sensors, ambient light sensors and image sensors, a variety of sensor data are obtained, and a combination of complex judgment conditions is determined whether the terminal device is in a pocket state.

Benefits of technology

It realizes a more accurate judgment of whether the terminal device is in the pocket, improves user experience, reduces user complaints and return and exchanges, and reduces after-sales service costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520676A_ABST
    Figure CN119520676A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of terminals, particularly provides a pocket state judgment method, terminal equipment and a storage medium, and aims to solve the technical problem of how to accurately judge whether the terminal equipment is in a pocket or not. In order to achieve the purpose, the method is applied to the terminal equipment and comprises the steps that acceleration sensor data are obtained through an acceleration sensor, and distance sensor data are obtained through a distance sensor; the acceleration sensor data comprises acceleration values in three different axial directions of an orthogonal coordinate system of the terminal device, and the distance sensor data comprises the distance between the terminal device and a shelter; and when the acceleration sensor data meets the acceleration preset condition and the distance sensor data is located in the first distance interval, determining that the terminal device is in a pocket state. According to the embodiment, whether the terminal equipment is in the pocket or not can be accurately judged according to various sensor data and the composite judgment condition, and the method has very high robustness for the change of the external environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a pocket status determination method, a terminal device and a storage medium. Background Art

[0002] Pocket mode is a functional mode used to optimize the user experience of a terminal device in a pocket. Its main purpose is to prevent the terminal device from being misoperated due to squeezing, friction or other accidental touches in a pocket. Currently, most pocket status determination methods rely on distance sensors or sensor combinations.

[0003] However, in the prior art, whether it is through distance sensors or sensor combinations, there are obvious defects and limitations, which may fail in certain scenarios, seriously affecting the user experience, causing user complaints, returns and exchanges, etc., and increasing after-sales service costs. Summary of the invention

[0004] In order to overcome the above-mentioned defects, the present application is proposed to provide a pocket status determination method, terminal device and storage medium that solve or at least partially solve the technical problem of how to accurately determine whether a terminal device is in a pocket.

[0005] In a first aspect, a pocket status determination method is provided, which is applied to a terminal device, wherein the terminal device includes an acceleration sensor and a distance sensor; the method includes:

[0006] Acquire acceleration sensor data through the acceleration sensor, and acquire distance sensor data through the distance sensor; the acceleration sensor data includes acceleration values ​​in three different axis directions of an orthogonal coordinate system of the terminal device, and the distance sensor data includes the distance between the device and the obstruction;

[0007] When the acceleration sensor data meets the preset acceleration condition and the distance sensor data is located in the first distance interval, it is determined that the terminal device is in a pocket state.

[0008] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0009] Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system obtained multiple times in succession, a plurality of corresponding fused accelerations are obtained;

[0010] When the number of the fused accelerations in the preset acceleration interval is greater than or equal to a preset value, it is determined that the acceleration sensor data meets the acceleration preset condition.

[0011] In a technical solution of the above-mentioned pocket status determination method, the terminal device further includes an ambient light sensor, and the method further includes:

[0012] Acquiring ambient light sensor data through the ambient light sensor, wherein the ambient light sensor data includes the light intensity of the environment surrounding the terminal device;

[0013] When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the ambient light sensor data is greater than or equal to the light threshold, it is determined that the terminal device is not in the pocket state;

[0014] The minimum value of the second distance interval is greater than the maximum value of the first distance interval.

[0015] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0016] Acquiring posture information of the terminal device based on the acceleration sensor data; the posture information includes a reading posture, a head-down posture, and a screen-down posture;

[0017] When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the posture information is the reading posture, it is determined that the terminal device is not in a pocket state;

[0018] In which, the terminal device includes a first plane where the screen is located, and the first plane includes a long side and a short side; when the first angle between the short side and the horizontal plane is within a first angle range, and the second angle between the long side and the horizontal plane is within a second angle range, and the third angle between the first plane and the horizontal plane is less than a first angle threshold, the posture information is determined to be the reading posture.

[0019] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0020] When the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is not the reading posture, it is determined that the terminal device is in a pocket state.

[0021] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0022] When the acceleration sensor data satisfies the preset acceleration condition, the distance sensor data is in a third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the head-down posture, it is determined that the terminal device is in a pocket state;

[0023] The minimum value of the third distance interval is greater than the maximum value of the second distance interval.

[0024] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0025] When the acceleration sensor data satisfies the preset acceleration condition, the distance sensor data satisfies the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the screen-down posture, it is determined that the terminal device is in a pocket state.

[0026] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0027] When the acceleration sensor data satisfies the preset acceleration condition, the distance sensor data satisfies the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is neither the head-down posture nor the screen-down posture, it is determined that the terminal device is not in a pocket state.

[0028] In a technical solution of the above-mentioned pocket state determination method, acquiring the posture information of the terminal device based on the acceleration sensor data includes:

[0029] Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system, respectively obtaining the first angle, the second angle and the third angle;

[0030] When the second angle is less than a second angle threshold, determining that the posture information is the head-down posture;

[0031] When the third angle is greater than a third angle threshold, the posture information is determined to be the screen-downward posture.

[0032] In a technical solution of the above-mentioned pocket state determination method, the posture information further includes a picking up posture; and determining that the posture information is the reading posture further includes:

[0033] When the posture information is the picking-up posture, determining whether the posture information changes;

[0034] If the posture information changes, and the first angle is within the first angle interval, the second angle is within the second angle interval, and the third angle is less than the first angle threshold, the posture information is determined to be the reading posture.

[0035] In a technical solution of the above-mentioned pocket state determination method, the acquiring the posture information of the terminal device based on the acceleration sensor data further includes:

[0036] When the second angle is less than a fourth angle threshold, the posture information is determined to be the picking-up posture.

[0037] In a technical solution of the above-mentioned pocket state determination method, the terminal device further includes an image sensor, and the acquiring of acceleration sensor data through the acceleration sensor and the acquiring of distance sensor data through the distance sensor include:

[0038] Acquiring portrait detection data through the image sensor;

[0039] When the portrait detection data does not include a portrait, the acceleration sensor data is acquired through the acceleration sensor, and the distance sensor data is acquired through the distance sensor.

[0040] In a technical solution of the above-mentioned pocket status determination method, the method further includes:

[0041] When the portrait detection data includes a portrait, it is determined that the terminal device is not in a pocket state.

[0042] In a second aspect, a terminal device is provided, which includes a processor, a memory and multiple sensors, the memory is suitable for storing multiple program codes, and the program codes are suitable for being loaded and run by the processor to execute the pocket status judgment method described in any one of the technical solutions of the above-mentioned pocket status judgment method.

[0043] In a third aspect, a computer-readable storage medium is provided, in which a plurality of program codes are stored, wherein the program codes are suitable for being loaded and run by a processor to execute the pocket status determination method described in any one of the technical solutions of the above-mentioned pocket status determination method.

[0044] Solution 1. A pocket status determination method, applied to a terminal device, characterized in that the terminal device includes an acceleration sensor and a distance sensor; the method includes:

[0045] Acquire acceleration sensor data through the acceleration sensor, and acquire distance sensor data through the distance sensor; the acceleration sensor data includes acceleration values ​​in three different axis directions of an orthogonal coordinate system of the terminal device, and the distance sensor data includes the distance between the terminal device and the obstruction;

[0046] When the acceleration sensor data meets the preset acceleration condition and the distance sensor data is located in the first distance interval, it is determined that the terminal device is in a pocket state.

[0047] Solution 2. The pocket status determination method according to Solution 1, characterized in that the method further comprises:

[0048] Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system obtained multiple times in succession, a plurality of corresponding fused accelerations are obtained;

[0049] When the number of the fused accelerations in the preset acceleration interval is greater than or equal to a preset value, it is determined that the acceleration sensor data meets the acceleration preset condition.

[0050] Solution 3. The pocket status determination method according to Solution 1 is characterized in that the terminal device further includes an ambient light sensor, and the method further includes:

[0051] Acquiring ambient light sensor data through the ambient light sensor, wherein the ambient light sensor data includes the light intensity of the environment surrounding the terminal device;

[0052] When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the ambient light sensor data is greater than or equal to the light threshold, it is determined that the terminal device is not in the pocket state;

[0053] The minimum value of the second distance interval is greater than the maximum value of the first distance interval.

[0054] Solution 4. The pocket status determination method according to Solution 3, characterized in that the method further comprises:

[0055] Acquiring posture information of the terminal device based on the acceleration sensor data; the posture information includes a reading posture, a head-down posture, and a screen-down posture;

[0056] When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the posture information is the reading posture, it is determined that the terminal device is not in a pocket state;

[0057] In which, the terminal device includes a first plane where the screen is located, and the first plane includes a long side and a short side; when the first angle between the short side and the horizontal plane is within a first angle range, and the second angle between the long side and the horizontal plane is within a second angle range, and the third angle between the first plane and the horizontal plane is less than a first angle threshold, the posture information is determined to be the reading posture.

[0058] Solution 5. The pocket status determination method according to Solution 4 is characterized in that the method further comprises:

[0059] When the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is not the reading posture, it is determined that the terminal device is in a pocket state.

[0060] Solution 6. The pocket status determination method according to Solution 4, characterized in that the method further comprises:

[0061] When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the head-down posture, it is determined that the terminal device is in a pocket state;

[0062] The minimum value of the third distance interval is greater than the maximum value of the second distance interval.

[0063] Solution 7. The pocket status determination method according to Solution 6 is characterized in that the method further comprises:

[0064] When the acceleration sensor data meets the preset acceleration condition, the distance sensor data meets the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the screen-down posture, it is determined that the terminal device is in a pocket state.

[0065] Solution 8. The pocket status determination method according to Solution 6 is characterized in that the method further comprises:

[0066] When the acceleration sensor data satisfies the preset acceleration condition, the distance sensor data satisfies the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is not the head-down posture and is not the screen-down posture, it is determined that the terminal device is not in a pocket state.

[0067] Solution 9. The pocket status determination method according to Solution 4 is characterized in that the step of acquiring the posture information of the terminal device based on the acceleration sensor data comprises:

[0068] Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system, respectively obtaining the first angle, the second angle and the third angle;

[0069] When the second angle is less than a second angle threshold, determining that the posture information is the head-down posture;

[0070] When the third angle is greater than a third angle threshold, the posture information is determined to be the screen-downward posture.

[0071] Solution 10. The pocket state determination method according to Solution 9 is characterized in that the posture information further includes a picking up posture; and determining that the posture information is the reading posture further includes:

[0072] When the posture information is the picking-up posture, determining whether the posture information changes;

[0073] If the posture information changes, and the first angle is within the first angle interval, the second angle is within the second angle interval, and the third angle is less than the first angle threshold, the posture information is determined to be the reading posture.

[0074] Solution 11. The pocket state determination method according to Solution 10 is characterized in that the step of acquiring the posture information of the terminal device based on the acceleration sensor data further comprises:

[0075] When the second angle is less than a fourth angle threshold, the posture information is determined to be the picking-up posture.

[0076] Solution 12. The pocket status determination method according to any one of Solutions 1 to 11 is characterized in that the terminal device further includes an image sensor; and the acquiring of acceleration sensor data through the acceleration sensor and the acquiring of distance sensor data through the distance sensor comprises:

[0077] Acquiring portrait detection data through the image sensor;

[0078] When the portrait detection data does not include a portrait, the acceleration sensor data is acquired through the acceleration sensor, and the distance sensor data is acquired through the distance sensor.

[0079] Solution 13. The pocket status determination method according to Solution 12, characterized in that the method further comprises:

[0080] When the portrait detection data includes a portrait, it is determined that the terminal device is not in a pocket state.

[0081] Scheme 14. A terminal device comprises a processor, a memory and a plurality of sensors, wherein the memory is suitable for storing a plurality of program codes, and wherein the program codes are suitable for being loaded and run by the processor to execute the pocket status determination method described in any one of Schemes 1 to 13.

[0082] Solution 15. A computer-readable storage medium storing a plurality of program codes, wherein the program codes are suitable for being loaded and run by a processor to execute the pocket status determination method described in any one of Solutions 1 to 13.

[0083] The above one or more technical solutions of this application have at least one or more of the following Beneficial effects:

[0084] In the technical solution for implementing the present application, the terminal device includes an acceleration sensor and a distance sensor. The acceleration sensor data can be obtained through the acceleration sensor, and the distance sensor data can be obtained through the distance sensor, wherein the acceleration sensor data includes the acceleration values ​​in the three different axis directions of the orthogonal coordinate system of the terminal device, and the distance sensor data includes the distance between the terminal device and the obstruction; when the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the first distance interval, it is determined that the terminal device is in a pocket state. Through the above implementation, it is possible to accurately determine whether the terminal device is in a pocket based on a variety of sensor data and composite judgment conditions. Such a judgment method is highly robust to changes in the external environment, and can effectively reduce problems such as accidental touches and inability to touch the screen, improve the user experience, reduce user complaints and returns, and reduce after-sales service costs.

[0085] Furthermore, the terminal device also includes an image sensor, which can obtain portrait detection data. When the portrait detection data includes a portrait, it can be directly determined that the terminal device is not in a pocket. When the portrait detection data does not include a portrait, it is determined whether the terminal device is in a pocket based on multiple sensor data and composite judgment conditions, thereby improving the speed and accuracy of judgment and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:

[0087] Figure 1 is a schematic diagram of an orthogonal coordinate system of a terminal device according to an embodiment of the present application;

[0088] Figure 2 This is a schematic flow chart of the main steps of a method for determining a pocket state according to an embodiment of the present application;

[0089] Figure 3 It is a schematic flow chart of main steps of acquiring acceleration sensor data through an acceleration sensor and acquiring distance sensor data through a distance sensor according to an embodiment of the present application;

[0090] Figure 4 It is a schematic flow chart of the main steps of a complete pocket status determination method according to an embodiment of the present application;

[0091] Figure 5 It is a schematic diagram of the main structure of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0092] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.

[0093] In the description of the present application, "processor" may include hardware, software or a combination of the two. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Non-temporary computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as just A, just B or A and B. The term "at least one A or B" or "at least one of A and B" has a similar meaning to "A and / or B" and may include just A, just B or A and B. The singular terms "one" and "the" may also include plural forms.

[0094] As described in the background technology, most terminal devices fail to solve the problem of misjudgment of pocket status. Whether it is judged by distance sensor or the combination of distance sensor and other sensors, there are obvious defects and limitations, which will fail in some scenarios.

[0095] For example, if we only rely on the distance sensor, it is easy to misjudge when the hand approaches the terminal device, causing the screen to accidentally display the anti-mistouch interface; when the terminal device is placed face down in a black pocket, or when the user is sitting and the terminal device is placed in a black pocket with the screen facing the legs, the result detected by the distance sensor is farther than the actual distance, and it cannot recognize that the terminal device is in the pocket. In addition, due to the certain volatility of the distance sensor data, it may occasionally detect that it is close to an obstruction even when there is no obstruction, and misjudge that the terminal device is in the pocket, etc., which seriously affects the user experience, causes user complaints, returns and exchanges, etc., and increases after-sales service costs.

[0096] In order to solve the above problems, the present application provides a pocket status determination method, a terminal device and a storage medium.

[0097] The pocket status judgment method is applied to terminal devices, such as mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), netbooks, etc., and is mainly used to judge whether the terminal device is in a relatively closed small space such as a pocket, a handbag, or a backpack.

[0098] Among them, the terminal device is equipped with multiple sensors, including an acceleration sensor (also called a gravity sensor), a distance sensor (also called a proximity sensor), an ambient light sensor, and an image sensor.

[0099] Furthermore, the terminal device has an orthogonal coordinate system established based on the terminal device itself. The orthogonal coordinate system of the terminal device is a relative coordinate system, which uses the terminal device itself as a reference system to describe the directions and changes of various physical quantities sensed by the sensor.

[0100] See attached Figure 1 , Figure 1 is a schematic diagram of an orthogonal coordinate system of a terminal device according to an embodiment of the present application. Figure 1 As shown, in the orthogonal coordinate system of the terminal device, the x-axis is parallel to the short side of the terminal device, and the right direction is the positive direction; the y-axis is parallel to the long side of the terminal device, and the upward direction is the positive direction; the z-axis is perpendicular to the plane where the terminal device screen is located, and the outward direction is the positive direction.

[0101] For further information, see Appendix Figure 2 , Figure 2 FIG. 1 is a flow chart of the main steps of a method for determining a pocket state according to an embodiment of the present application. Figure 2 As shown, the pocket status determination method in the embodiment of the present application mainly includes the following steps S201 to S202.

[0102] Step S201: acquiring acceleration sensor data through an acceleration sensor, and acquiring distance sensor data through a distance sensor;

[0103] Among them, the acceleration sensor data includes the acceleration values ​​in the directions of three different axes (i.e., x-axis, y-axis and z-axis) of the orthogonal coordinate system of the terminal device detected by the acceleration sensor; the distance sensor data includes the distance between the terminal device and the obstruction (such as the inside of a pocket) detected by the distance sensor.

[0104] Step S202: When the acceleration sensor data meets the preset acceleration condition and the distance sensor data is within the first distance interval, it is determined that the terminal device is in a pocket state.

[0105] In some implementations of step S202, before determining whether the terminal device is in a pocket state, it is possible to first determine whether the terminal device is in a stable state based on acceleration sensor data. When the terminal device is in a stable state, it is possible to reduce misjudgment factors and improve judgment accuracy.

[0106] Specifically, whether the acceleration sensor data meets the acceleration preset condition can be determined based on the following steps S2021 to S2022. When the acceleration sensor data meets the acceleration preset condition, it indicates that the terminal device is in a stable state.

[0107] Step S2021: obtaining a plurality of corresponding fused accelerations based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system obtained multiple times in succession;

[0108] That is, the acceleration sensor obtains the acceleration values ​​of the terminal device on the x-axis, y-axis and z-axis multiple times in a time series at a certain frequency or time interval. x 、a y 、a z , and according to a x 、a y 、a z Calculate multiple corresponding fused accelerations.

[0109] The fused acceleration is a quantitative value of the total acceleration of the terminal device in three-dimensional space, which can be calculated based on the following formula (1):

[0110] mod = sqrt(a x 2 +a y 2 +a z 2 ) (1)

[0111] Among them, mod represents the fusion acceleration, a x 、a y 、az Indicates the acceleration value of the terminal device in the x-axis, y-axis, and z-axis directions. Sqrt is the abbreviation of square root, which means calculation (a x 2 +a y 2 +a z 2 ).

[0112] According to the acceleration values ​​of the terminal device obtained multiple times in succession and the above formula (1), the corresponding fused accelerations at multiple consecutive moments can be obtained.

[0113] It should be pointed out that the above examples of the calculation method of the fused acceleration are only illustrative. In practical applications, those skilled in the art can choose the above or other calculation methods according to specific scenarios, such as using the approximate method of absolute value addition to estimate the fused acceleration, etc., which is not limited here.

[0114] Step S2022: When the number of fused accelerations in the preset acceleration interval is greater than or equal to a preset value, it is determined that the acceleration sensor data meets the acceleration preset condition.

[0115] Specifically, the acceleration sensor data may be filtered according to the fused acceleration to determine whether the acceleration sensor data meets the acceleration preset condition.

[0116] Among them, the gravitational acceleration near the earth's surface is 9.8m / s 2 Therefore, 9.8±1, that is, [8.8, 10.8] can be set as the preset acceleration interval, and when the fused accelerations obtained for a preset number of consecutive times (such as 3 times) are all within the preset acceleration interval, it is determined that the acceleration sensor data meets the acceleration preset condition, that is, the terminal device is in a stable state.

[0117] Furthermore, when the acceleration sensor data meets the preset acceleration condition, it can be determined whether the terminal device is in a pocket state based on the distance sensor data, and specifically, it can be determined whether the distance sensor data is in the first distance interval.

[0118] At present, when determining the pocket state, the existing distance sensor has only two state gears, namely "far" and "near". This two-gear setting cannot accurately measure the impact of different pocket environments on the distance, resulting in an inability to accurately determine whether the terminal device is in the pocket state. When the terminal device is in a certain position or angle in the pocket, the distance detected by the distance sensor may be near the critical value of the two gears, resulting in frequent switching of data, resulting in misjudgment and other situations.

[0119] Therefore, the present application sets three status gears for the distance sensor, corresponding to the first distance interval, the second distance interval and the third distance interval respectively.

[0120] Among them, the minimum distance between the terminal device and the obstruction in the second distance interval is greater than the maximum value of the first distance interval, and the minimum value of the third distance interval is greater than the maximum value of the second distance interval. The second distance interval is equivalent to the "near" state gear of the existing distance sensor, while the first distance interval is a newly added state gear, which requires a closer distance than the "near" state gear of the existing distance sensor. By refining the distance interval of the distance sensor, the distance between the terminal device and the obstruction can be distinguished more accurately.

[0121] For example, the first distance interval is set to [0, 1), that is, the distance between the terminal device and the obstruction is less than 1 cm; the second distance interval is set to [1, 3], that is, the distance between the terminal device and the obstruction is between 1 cm and 3 cm; the third distance interval is set to (3, +∞), that is, the distance between the terminal device and the obstruction is greater than 3 cm.

[0122] In some implementations of step S202 , when the distance sensor data is within a first distance interval, it may be determined that the distance sensor data satisfies the preset distance condition.

[0123] Furthermore, when the acceleration sensor data meets the preset acceleration condition and the distance sensor data is within the first distance interval, it can be determined that the terminal device is in the pocket state.

[0124] For example, when the fused accelerations obtained three times in a row are all in the interval [8.8, 10.8] and the distance between the terminal device and the obstruction is less than 1 cm, it is determined that the terminal device is in a pocket state.

[0125] Through the above step S202, the pocket state of the terminal device can be determined according to the acceleration sensor data and the distance sensor data.

[0126] Furthermore, when the distance sensor data is in the second distance interval, it is impossible to accurately determine whether the terminal device is in a pocket state only by using the above-mentioned acceleration sensor data and distance sensor data. At this time, the posture information of the terminal device can be obtained based on the acceleration sensor data, and whether the terminal device is in a pocket state can be determined based on the fused acceleration, the posture information of the terminal device and the distance sensor data.

[0127] Specifically, the terminal device includes a first plane where the screen is located, and the first plane includes a long side and a short side. The posture information of the terminal device may include a reading posture, a head-down posture, a screen-down posture, and a pick-up posture.

[0128] Among them, Figure 1As shown, the terminal device includes two ends. Generally, the end close to the terminal device's speaker, front camera and other components is regarded as the head of the terminal device; and the end close to the terminal device's charging port, microphone and other components is regarded as the tail of the terminal device.

[0129] Further, in some embodiments, when acquiring the posture information of the terminal device based on the acceleration sensor data, the first angle between the short side and the horizontal plane, the second angle between the long side and the horizontal plane, and the third angle between the first plane and the horizontal plane can be acquired respectively based on the acceleration values ​​in the three different axis directions of the orthogonal coordinate system;

[0130] Specifically, the first angle x_angle, the second angle y_angle, and the third angle z_angle may be calculated based on the following formulas (2)-(4):

[0131] x_angle=asin(a x / mod) (2)

[0132] y_angle=asin(a y / mod) (3)

[0133] z_angle=acos(a z / mod) (4)

[0134] Among them, asin is the inverse sine function, acos is the inverse cosine function, and a x 、a y 、a z It indicates the acceleration value of the terminal device in the x-axis, y-axis, and z-axis directions, and mod indicates the fused acceleration.

[0135] In addition, the angle units involved in this application are all degrees (°). When the calculation results of the inverse trigonometric functions (including the inverse sine function asin and the inverse cosine function acos) in the above formulas (2)-(4) are radians, the radians can be converted into angles through conversion.

[0136] The first angle, the second angle and the third angle are calculated by using the acceleration values ​​in three different axis directions of the orthogonal coordinate system of the terminal device, which has the characteristics of low power consumption, strong timeliness and high accuracy.

[0137] It should be noted that when the terminal device is flipped from a horizontal position, the acceleration values ​​a in the x-axis, y-axis, and z-axis directions when it flips along different edges are x 、a y 、a z Different, so the value ranges of the first angle x_angle, the second angle y_angle and the third angle z_angle are also different.

[0138] For example, when the terminal device is turned upward along the lower edge from a horizontal position, the corresponding part a x 、a y 、a z , and the values ​​of x_angle, y_angle and z_angle are shown in Table 1 below.

[0139] Table 1

[0140] When the terminal device is flipped from the horizontal position to the right along the left edge, the corresponding part a x 、a y 、a z , and the values ​​of x_angle, y_angle and z_angle are shown in Table 2 below.

[0141] Table 2

[0142] In practical applications, those skilled in the art can obtain the corresponding a according to the flipping condition of the terminal device. x 、a y 、a z , as well as x_angle, y_angle and z_angle, which are not limited here.

[0143] Furthermore, the posture information of the terminal device may be determined based on the first angle, the second angle, and the third angle.

[0144] In some implementations, when the second angle is less than a fourth angle threshold, the posture information may be determined to be a picking-up posture.

[0145] Specifically, the picking up gesture indicates that the terminal device is picked up by the user, and at this time, the angle between the screen of the terminal device and the horizontal plane is small, such as less than 20 degrees.

[0146] Therefore, when y_angle<20, the posture information of the terminal device can be determined as the picking up posture.

[0147] In some implementations, when the first angle is within a first angle interval, the second angle is within a second angle interval, and the third angle is less than a first angle threshold, the posture information may be determined to be a reading posture.

[0148] Specifically, the reading posture usually means that the screen of the terminal device is facing upward, the head is also facing upward, and the angle between the first plane where the screen is located and the horizontal plane is within a reasonable range, such as between 20 and 70 degrees.

[0149] Therefore, when -30 < x_angle < 30, 20 < y_angle < 70, and z_angle < 70, the attitude information of the terminal device can be determined as the reading attitude.

[0150] Furthermore, in some embodiments, in order to more accurately determine that the attitude information of the terminal device is the reading attitude, it is possible to first determine whether the attitude information of the terminal device is the picking-up attitude, and when the attitude information is the picking-up attitude, determine whether the attitude information changes.

[0151] If the attitude information changes, and the first included angle is within the first angle range, the second included angle is within the second angle range, and the third included angle is less than the first angle threshold, then the attitude information is determined as the reading attitude. This can avoid the situation where the terminal device accidentally satisfies "the first included angle is within the first angle range, the second included angle is within the second angle range, and the third included angle is less than the first angle threshold" at a certain moment due to the user's walking in the pocket, but it is not in the reading attitude, and can more accurately determine the attitude information of the terminal device.

[0152] In some embodiments, when the second included angle is less than the second angle threshold, the attitude information can be determined as the head-down attitude.

[0153] The head-down attitude means that the end where the head of the terminal device is located is facing downwards, such as turning the mobile phone upside down. At this time, the screen of the terminal device is perpendicular to the horizontal plane or forms a relatively large inclination angle with the horizontal plane, such as between 45 and 90 degrees.

[0154] Therefore, when y_angle < -45, the attitude information of the terminal device can be determined as the head-down attitude.

[0155] In some embodiments, when the third included angle is greater than the third angle threshold, the attitude information can be determined as the screen-down attitude.

[0156] Specifically, the screen-down attitude means that the first plane where the screen of the terminal device is located is facing downwards, and the terminal device is placed approximately horizontally. At this time, the included angle between the terminal device and the horizontal plane is very small, such as within 10 - 20 degrees.

[0157] Therefore, when z_angle > 160, the attitude information of the terminal device can be determined as the screen-down attitude.

[0158] It should be noted that in addition to the above reading attitude, head-down attitude, screen-down attitude, and picking-up attitude, the attitude information of the terminal device may also include other attitudes, which are not limited here.

[0159] In addition, the above examples regarding the first angle interval, the second angle interval, and the first angle threshold, the second angle threshold, the third angle threshold, and the fourth angle threshold are only illustrative. In actual applications, those skilled in the art can set them according to specific requirements, and no limitations are imposed here.

[0160] Through the above embodiments, the attitude information of the terminal device can be determined.

[0161] Furthermore, it is possible to jointly determine whether the terminal device is in the pocket state based on the fused acceleration, the attitude information of the terminal device, and the distance sensor data.

[0162] In some embodiments, when the acceleration sensor data meets the acceleration preset condition, the distance sensor data is within the second distance interval, and the attitude information is the reading attitude, it is determined that the terminal device is not in the pocket state.

[0163] For example, when the fused acceleration obtained continuously three times is all within the interval [8.8, 10.8], the distance between the terminal device and the occluder is between 1 cm and 3 cm, and the first included angle, the second included angle, and the third included angle satisfy -30 < x_angle < 30 & 20 < y_angle < 70 & z_angle < 70, it is determined that the terminal device is in the pocket state.

[0164] Furthermore, when it is impossible to accurately determine whether the terminal device is in the pocket state through the fused acceleration, the attitude information of the terminal device, and the distance sensor data, it is also possible to obtain the ambient light sensor data based on the ambient light sensor, and jointly determine whether the terminal device is in the pocket state based on the acceleration sensor data, the distance sensor data, and the ambient light sensor data.

[0165] Among them, the ambient light sensor data includes the light intensity (unit: lux) of the environment around the terminal device detected by the ambient light sensor.

[0166] In some embodiments, a light threshold (such as 50 lux) can be set, and the detected ambient light sensor data is compared with the light threshold. When the ambient light sensor data is greater than or equal to the light threshold, it is considered that the terminal device is in a bright environment; when the ambient light sensor data is less than the light threshold, it is considered that the terminal device is in a dark environment.

[0167] Furthermore, when the acceleration sensor data meets the acceleration preset condition, the distance sensor data is within the second distance interval, and the ambient light sensor data is greater than or equal to the light threshold, it is determined that the terminal device is not in the pocket state.

[0168] For example, when the fused acceleration obtained three times in a row is in the interval [8.8, 10.8], the distance between the terminal device and the obstruction is between 1cm-3cm, and the light intensity of the environment surrounding the terminal device is greater than or equal to 50lux, it is determined that the terminal device is in the pocket state.

[0169] In other embodiments, when the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, the ambient light sensor data is less than the light threshold, and the posture information is not a reading posture, it is determined that the terminal device is in a pocket state.

[0170] For example, when the fused acceleration obtained three times in a row is in the interval [8.8, 10.8], the distance between the terminal device and the obstruction is between 1cm-3cm, the light intensity of the terminal device's surrounding environment is less than 50lux, and the posture information is head-down posture, screen-down posture, picked-up posture or other postures, it is determined that the terminal device is in a pocket state.

[0171] Through the above implementation, the pocket state of the terminal device can be determined when the acceleration sensor data meets the preset acceleration condition and the distance sensor data is within the second distance interval.

[0172] Furthermore, the pocket state of the terminal device can also be determined when the acceleration sensor data meets the preset acceleration condition and the distance sensor data is within a third distance interval.

[0173] In some embodiments, when the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in a third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is a head-down posture, it is determined that the terminal device is in a pocket state.

[0174] For example, when the fused acceleration obtained three times in a row is in the interval [8.8, 10.8], the distance between the terminal device and the obstruction is greater than 3 cm, the light intensity of the terminal device's surrounding environment is less than 50 lux, and the second angle satisfies y_angle<-45, it is determined that the terminal device is in the pocket state.

[0175] In some embodiments, when the acceleration sensor data meets the preset acceleration condition, the distance sensor data meets the third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is the screen-down posture, it is determined that the terminal device is in a pocket state.

[0176] For example, when the fused acceleration obtained three times in a row is in the interval [8.8, 10.8], the distance between the terminal device and the obstruction is greater than 3 cm, the light intensity of the terminal device's surrounding environment is less than 50 lux, and the third angle satisfies z_angle>160, it is determined that the terminal device is in the pocket state.

[0177] Furthermore, in other embodiments, when the acceleration sensor data meets the preset acceleration conditions, and the distance sensor data is in the third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is not a head-down posture and is not a screen-down posture, it is determined that the terminal device is not in a pocket state.

[0178] For example, when the fused acceleration obtained three times in a row is in the interval [8.8, 10.8], the distance between the terminal device and the obstruction is greater than 3 cm, the light intensity of the terminal device's surrounding environment is less than 50 lux, and the posture information is a reading posture, a picking up posture or other postures, it is determined that the terminal device is not in a pocket state.

[0179] Through the above implementation, the pocket state of the terminal device can be determined when the acceleration sensor data meets the preset acceleration condition and the distance sensor data is within the third distance interval.

[0180] Determining whether a terminal device is in a pocket based on multi-dimensional information such as acceleration sensor data, distance sensor data, and ambient light sensor data can improve the accuracy of judgment and effectively reduce misjudgments caused by interference with some sensors. At the same time, by integrating multiple sensor data, it can adapt to different pocket types and usage scenarios, and is also highly robust in the face of external interference.

[0181] To sum up, the application scenarios of the pocket status judgment method provided in this application can be divided into the following 7 categories.

[0182] Scenario 1: When the acceleration sensor data meets the preset acceleration condition and the distance sensor data is in the first distance interval, it is determined that the terminal device is in a pocket state;

[0183] Scenario 2: When the acceleration sensor data meets the preset acceleration condition, and the distance sensor data is in the second distance interval, and the posture information is the reading posture, it is determined that the terminal device is not in the pocket state;

[0184] Scenario 3: When the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, and the ambient light sensor data is greater than or equal to the light threshold, it is determined that the terminal device is not in the pocket state;

[0185] Scenario 4: When the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, the ambient light sensor data is less than the light threshold, and the posture information is not a reading posture, it is determined that the terminal device is in a pocket state;

[0186] Scenario 5: When the acceleration sensor data meets the acceleration preset condition, the distance sensor data is in the third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is the head-down posture, it is determined that the terminal device is in the pocket state;

[0187] Scenario 6: When the acceleration sensor data meets the preset acceleration condition, the distance sensor data meets the third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is the screen-down posture, it is determined that the terminal device is in a pocket state;

[0188] Scenario 7: When the acceleration sensor data meets the preset acceleration conditions, the distance sensor data is in the third distance interval, the ambient light sensor data is less than the light threshold, and the posture information is not a head-down posture and a screen-down posture, it is determined that the terminal device is not in a pocket state.

[0189] Through the above implementation, it is possible to accurately determine whether the terminal device is in a pocket based on a variety of sensor data and composite judgment conditions. This judgment method is highly robust to changes in the external environment. For example, when the ambient light sensor is exposed to abnormally strong light or blocked, the distance sensor and the acceleration sensor can still work normally, thereby improving the reliability and stability of the judgment. It can effectively solve the problem in the prior art that "only relying on the distance sensor is prone to misjudgment when the hand approaches the terminal device, causing the screen to accidentally display the anti-mistouch interface", thereby reducing the possibility of accidental touches and inability to touch the screen.

[0190] At the same time, the above-mentioned scenarios 2 and 3 can solve the problem in the prior art that "the distance sensor may occasionally detect proximity to obstructions even when there is no obstruction due to certain volatility in its data, and mistakenly judge that the terminal device is in a pocket"; scenarios 5 and 6 can solve the problem in the prior art that "the terminal device is placed face down in a black pocket, or the user is sitting with the screen facing the legs and placed in a black pocket, and the result detected by the distance sensor is farther than the actual distance, making it impossible to identify that the terminal device is in the pocket", thereby improving the user experience, reducing user complaints and returns and exchanges, and reducing after-sales service costs.

[0191] Furthermore, in some very special scenarios, such as when the distance sensor fails continuously, resulting in a close distance between the measured terminal device and the obstruction, and the light intensity of the surrounding environment is less than the light threshold, and the posture information of the terminal device is not a reading posture, the above-mentioned pocket status judgment method may have misjudgment. At this time, portrait recognition technology can be added to more accurately determine whether the terminal device is in a pocket state.

[0192] For details, see the attached Figure 3 , Figure 3 FIG. 1 is a flow chart of the main steps of obtaining acceleration sensor data through an acceleration sensor and obtaining distance sensor data through a distance sensor according to an embodiment of the present application. Figure 3 As shown, it mainly includes the following steps S301 to S304.

[0193] Step S301: Acquire portrait detection data through an image sensor;

[0194] Specifically, portrait detection data can be obtained through the Always On (AON) technology of the image sensor. Among them, AON technology is a low-power sensing technology applied to image sensors, which enables terminal devices to continuously perceive the surrounding environment or its changes, autonomously identify target objects according to the needs of scene understanding at different stages, and flexibly adjust the resolution through pixel merging technology.

[0195] S302: Determine whether the portrait detection data includes a portrait;

[0196] After acquiring the portrait detection data through the sensor, AON technology can analyze and process the pixel information in the portrait detection data according to the preset algorithms and models to determine whether the portrait detection data includes a portrait.

[0197] When the pixel-merged image data conforms to the characteristic pattern of a portrait, it is determined that the portrait detection data includes a portrait. For example, by identifying and judging features such as facial contours and facial features ratios in the image, it is determined whether a portrait is detected.

[0198] Further, when the portrait detection data does not include a portrait, step S303 is executed, otherwise step S304 is executed.

[0199] Step S303: acquiring acceleration sensor data through the acceleration sensor, and acquiring distance sensor data through the distance sensor;

[0200] Step S304: Determine that the terminal device is not in a pocket state.

[0201] Specifically, if the portrait detection data includes a portrait, it can be inferred that the terminal device is not in a pocket state, because the inside of a pocket is a relatively closed dark environment, and under normal circumstances the image sensor cannot detect a portrait in a pocket. Therefore, once the portrait detection data includes a portrait, it means that the terminal device is in an environment where a portrait can be photographed, such as being held in the hand, placed on the table and there are people around, etc., rather than being in a pocket state.

[0202] If the portrait detection data does not include a portrait, it is not possible to simply rely on the image sensor to determine whether the terminal device is in a pocket state. At this time, it is possible to accurately determine whether the terminal device is in a pocket state based on the above-mentioned multiple sensor data and composite judgment conditions.

[0203] Portrait detection technology can improve the speed and accuracy of pocket status judgment and enhance user experience.

[0204] In some embodiments, see Appendix Figure 4 , Figure 4 FIG. 1 is a flow chart of the main steps of a complete method for determining the pocket status according to an embodiment of the present application. Figure 4 As shown, it mainly includes the following steps S401 to S4012.

[0205] Step S401: Acquire portrait detection data through an image sensor;

[0206] Step S402: Determine whether the portrait detection data includes a portrait;

[0207] Further, when the portrait detection data does not include a portrait, step S403 is executed, otherwise step S4012 is executed.

[0208] Step S403: acquiring acceleration sensor data through the acceleration sensor, and acquiring distance sensor data through the distance sensor;

[0209] Step S404: determining whether the acceleration sensor data meets the acceleration preset condition;

[0210] Further, if yes, execute step S405, otherwise repeat step S404.

[0211] Step S405: determining whether the distance sensor data is within the first distance interval;

[0212] Further, if yes, execute step S4011, otherwise execute step S406.

[0213] Step S406: Determine whether the ambient light sensor data is greater than or equal to the light threshold;

[0214] Further, if yes, execute step S4012, otherwise execute step S407.

[0215] Step S407: determining whether the posture information is a reading posture;

[0216] Further, if yes, execute step S4012, otherwise execute step S408.

[0217] Step S408: determining whether the posture information is a head-down posture;

[0218] Further, if yes, execute step S4011, otherwise execute step S409.

[0219] Step S409: determining whether the posture information is a screen-downward posture;

[0220] Further, if yes, execute step S4011, otherwise execute step S4010.

[0221] Step S4010: determining whether the distance sensor data is within the second distance interval;

[0222] Further, if yes, execute step S4011, otherwise execute step S4012.

[0223] Step S4011: Determine that the terminal device is in a pocket state;

[0224] Step S4012: Determine that the terminal device is not in a pocket state.

[0225] The above is a further explanation of the pocket status determination method provided in this application.

[0226] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders. These changes are within the scope of protection of the present application.

[0227] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.

[0228] Furthermore, the present application also provides a terminal device. Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the main structure of a terminal device according to an embodiment of the present application. Figure 5 As shown, the terminal device in the embodiment of the present application mainly includes a processor 501, a memory 502 and a plurality of sensors 503. The memory 502 can be configured to store a program for executing the pocket state determination method of the above method embodiment, and the processor 501 can be configured to execute the program in the memory 502, which includes but is not limited to the program for executing the pocket state determination method of the above method embodiment. For ease of explanation, only the part related to the embodiment of the present application is shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application.

[0229] In some possible implementations of the present application, the terminal device may include multiple processors 501 and multiple memories 502. The program for executing the pocket state determination method of the above method embodiment can be divided into multiple subprograms, and each subprogram can be loaded and run by the processor 501 to execute different steps of the pocket state determination method of the above method embodiment. Specifically, each subprogram can be stored in different memories 502, and each processor 501 can be configured to execute the program in one or more memories 502 to jointly implement the pocket state determination method of the above method embodiment, that is, each processor 501 executes different steps of the pocket state determination method of the above method embodiment, to jointly implement the pocket state determination method of the above method embodiment.

[0230] The above-mentioned multiple processors 501 may be processors deployed on the same device. For example, the above-mentioned terminal device may be a high-performance device composed of multiple processors, and the above-mentioned multiple processors 501 may be processors configured on the high-performance device. In addition, the above-mentioned multiple processors 501 may also be processors deployed on different devices. For example, the above-mentioned terminal device may be a server cluster, and the above-mentioned multiple processors 501 may be processors on different servers in the server cluster.

[0231] Furthermore, the present application also provides a computer-readable storage medium. In a computer-readable storage medium embodiment according to the present application, the computer-readable storage medium can be configured to store a program for executing the pocket state judgment method of the above-mentioned method embodiment, and the program can be loaded and run by the processor to implement the above-mentioned pocket state judgment method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium can be a memory device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.

[0232] It should be noted that the relevant user personal information that may be involved in the various embodiments of the present application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.

[0233] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's device information, sensor information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.

[0234] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.

[0235] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.

Claims

1. A pocket status determination method, applied to a terminal device, characterized in that: The terminal device includes an acceleration sensor and a distance sensor; the method includes: Acquire acceleration sensor data through the acceleration sensor, and acquire distance sensor data through the distance sensor; the acceleration sensor data includes acceleration values ​​in three different axis directions of an orthogonal coordinate system of the terminal device, and the distance sensor data includes the distance between the terminal device and the obstruction; When the acceleration sensor data meets the preset acceleration condition and the distance sensor data is located in the first distance interval, it is determined that the terminal device is in a pocket state.

2. The pocket status determination method according to claim 1, characterized in that: The method further comprises: Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system obtained multiple times in succession, a plurality of corresponding fused accelerations are obtained; When the number of the fused accelerations in the preset acceleration interval is greater than or equal to a preset value, it is determined that the acceleration sensor data meets the acceleration preset condition.

3. The pocket status determination method according to claim 1, characterized in that: The terminal device further includes an ambient light sensor, and the method further includes: Acquiring ambient light sensor data through the ambient light sensor, wherein the ambient light sensor data includes the light intensity of the environment surrounding the terminal device; When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the ambient light sensor data is greater than or equal to the light threshold, it is determined that the terminal device is not in the pocket state; The minimum value of the second distance interval is greater than the maximum value of the first distance interval.

4. The pocket status determination method according to claim 3, characterized in that: The method further comprises: Acquiring posture information of the terminal device based on the acceleration sensor data; the posture information includes a reading posture, a head-down posture, and a screen-down posture; When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the second distance interval, and the posture information is the reading posture, it is determined that the terminal device is not in a pocket state; In which, the terminal device includes a first plane where the screen is located, and the first plane includes a long side and a short side; when the first angle between the short side and the horizontal plane is within a first angle range, and the second angle between the long side and the horizontal plane is within a second angle range, and the third angle between the first plane and the horizontal plane is less than a first angle threshold, the posture information is determined to be the reading posture.

5. The pocket status determination method according to claim 4, characterized in that: The method further comprises: When the acceleration sensor data meets the preset acceleration condition, the distance sensor data is in the second distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is not the reading posture, it is determined that the terminal device is in a pocket state.

6. The pocket status determination method according to claim 4, characterized in that: The method further comprises: When the acceleration sensor data meets the acceleration preset condition, and the distance sensor data is in the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the head-down posture, it is determined that the terminal device is in a pocket state; The minimum value of the third distance interval is greater than the maximum value of the second distance interval.

7. The pocket status determination method according to claim 6, characterized in that: The method further comprises: When the acceleration sensor data meets the preset acceleration condition, the distance sensor data meets the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is the screen-down posture, it is determined that the terminal device is in a pocket state.

8. The pocket status determination method according to claim 6, characterized in that: The method further comprises: When the acceleration sensor data satisfies the preset acceleration condition, the distance sensor data satisfies the third distance interval, the ambient light sensor data is less than the illumination threshold, and the posture information is not the head-down posture and is not the screen-down posture, it is determined that the terminal device is not in a pocket state.

9. The pocket status determination method according to claim 4, characterized in that: The acquiring the posture information of the terminal device based on the acceleration sensor data includes: Based on the acceleration values ​​in three different axis directions of the orthogonal coordinate system, respectively obtaining the first angle, the second angle and the third angle; When the second angle is less than a second angle threshold, determining that the posture information is the head-down posture; When the third angle is greater than a third angle threshold, the posture information is determined to be the screen-downward posture.

10. The pocket status determination method according to claim 9, characterized in that: The posture information further includes a picking up posture; and determining that the posture information is the reading posture further includes: When the posture information is the picking-up posture, determining whether the posture information changes; If the posture information changes, and the first angle is within the first angle interval, the second angle is within the second angle interval, and the third angle is less than the first angle threshold, the posture information is determined to be the reading posture.