Wearable device wearing detection method, wearable device, storage medium and product

By monitoring the acceleration sequence data of wearable devices and using inertial measurement units for feature statistics and extreme point analysis, the high hardware cost and false triggering problems of traditional wear detection schemes are solved, and high-precision wear action recognition is achieved.

CN122286374APending Publication Date: 2026-06-26XIAN TCL SOFTWARE DEV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Traditional wearable device wear detection solutions rely on dedicated sensors, which increases hardware costs and has weak recognition capabilities during movement, making them prone to false triggers and resulting in inaccurate status detection.

Method used

By monitoring the acceleration sequence data of wearable devices and performing feature statistical calculations, the acceleration sequence data is obtained using an inertial measurement unit without the need for additional dedicated sensor hardware. Based on the changes in the acceleration sequence data and the distribution characteristics of extreme points, the wearing or removing action can be identified.

Benefits of technology

It reduces hardware costs, improves the accuracy and anti-interference ability of status detection, and can accurately identify wearing and removing actions in complex dynamic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286374A_ABST
    Figure CN122286374A_ABST
Patent Text Reader

Abstract

This application discloses a wearable device wearing detection method, a wearable device, a storage medium, and a product, relating to the field of wearable device detection technology. The method involves performing feature statistical calculations on the acceleration sequence data of the wearable device under test to obtain first and second statistical features. When the change in the first statistical feature exceeds a switching threshold and the device is currently in an idle state, it switches to an action state. Based on the second statistical feature, the acceleration sequence data is divided into rising and falling phases, and the extreme points of each phase are marked. When switching back to an idle state, the current action type of the wearable device under test is determined based on the temporal distribution characteristics of the extreme points. Through the state switching mechanism and waveform morphology analysis, the method can accurately distinguish between wearing and removing actions in complex dynamic scenarios, improving detection accuracy and robustness, and achieving intelligent playback control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wearable device testing technology, and in particular to a method for detecting wearable device use, a wearable device, a storage medium, and a product. Background Technology

[0002] With the popularization of smart wearable devices, wearable devices have evolved from simple audio playback devices into interactive terminals integrating multiple smart functions. Among them, the wear detection function, as one of the key technologies to improve user experience, monitors the contact status between the wearable device and the head in real time, and realizes intelligent control that automatically resumes playback when worn and automatically pauses playback when removed.

[0003] Currently, traditional wearable device wear detection solutions mainly rely on equipping wearable devices with capacitive sensors, infrared sensors, pressure sensors, or combinations of multiple sensors. However, all of these dedicated sensor solutions require adding independent sensing units and their associated circuits to the wearable device hardware system. This not only increases manufacturing costs but also easily leads to assembly tolerance issues due to the trend towards miniaturization and lightweighting. Furthermore, dedicated sensor solutions rely on static threshold discrimination, which has weak recognition capabilities for user movements such as walking and running, making them prone to false triggers and resulting in inaccurate detection of the wearable device's status. Summary of the Invention

[0004] The main purpose of this application is to provide a wearable device wearing detection method, wearable device, storage medium and product, which aims to solve the technical problem of inaccurate state detection in traditional wearable device detection solutions.

[0005] To achieve the above objectives, this application proposes a wearable device wearing detection method, which includes: The acceleration sequence data of the wearable device under test is monitored, and the acceleration sequence data is subjected to feature statistical calculation to obtain the first statistical feature and the second statistical feature. If the change in the first statistical feature is greater than the action state switching threshold, and the device state of the wearable device under test is idle, the device state of the wearable device under test will be switched to action state. Based on the second statistical feature, the acceleration sequence data is divided into an ascending phase and a descending phase, and the extreme points within each phase are determined. When the device state of the wearable device under test switches back to the idle state, the current action type of the wearable device under test is determined based on the temporal distribution characteristics of the extreme points, wherein the current action type includes at least one of wearing action and removing action.

[0006] In addition, to achieve the above objectives, this application also proposes a wearable device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the wearable device wearing detection method as described above.

[0007] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the wearable device wearing detection method described above.

[0008] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the wearable device wearing detection method described above. Attached Figure Description

[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating an embodiment of the wearable device wearing detection method of this application. Figure 2 This is a schematic diagram of the state switching process provided in Embodiment 1 of the wearable device wearing detection method of this application; Figure 3 This is a schematic diagram of the action type recognition process provided in Embodiment 1 of the wearable device wearing detection method of this application; Figure 4 This is a schematic diagram of the waveform characteristics of the wearing action provided in Embodiment 1 of the wearable device wearing detection method of this application; Figure 5 This is a schematic diagram of the waveform characteristics of the removal action provided in Embodiment 1 of the wearable device wearing detection method of this application; Figure 6 This is a flowchart illustrating Embodiment 2 of the wearable device wearing detection method of this application; Figure 7 This is a schematic diagram of the hardware operating environment involved in the wearable device wearing detection method in the embodiments of this application.

[0012] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0013] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0014] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0015] The main solution of this application embodiment is as follows: monitoring the acceleration sequence data of the wearable device under test, performing feature statistical calculations on the acceleration sequence data to obtain a first statistical feature and a second statistical feature; when the change in the first statistical feature is greater than the action state switching threshold and the device state of the wearable device under test is idle, switching the device state of the wearable device under test to action state; based on the second statistical feature, dividing the acceleration sequence data into rising and falling phases, and determining the extreme points in each phase; when the device state of the wearable device under test switches back to idle state, determining the current action type of the wearable device under test based on the temporal distribution characteristics of the extreme points, wherein the current action type includes at least one of wearing action and removing action.

[0016] In this embodiment, for ease of description, the following description uses a wearable device as the execution subject.

[0017] With the popularization of smart wearable devices, wearable devices have evolved from simple audio playback devices into interactive terminals integrating multiple smart functions. Among them, the wear detection function, as one of the key technologies to improve user experience, monitors the contact status between the wearable device and the head in real time, and realizes intelligent control that automatically resumes playback when worn and automatically pauses playback when removed.

[0018] Currently, traditional wearable device wear detection solutions mainly rely on equipping wearable devices with capacitive sensors, infrared sensors, pressure sensors, or combinations of multiple sensors. However, all of these dedicated sensor solutions require adding independent sensing units and their associated circuits to the wearable device hardware system. This not only increases manufacturing costs but also easily leads to assembly tolerance issues due to the trend towards miniaturization and lightweighting. Furthermore, dedicated sensor solutions rely on static threshold discrimination, which has weak recognition capabilities for user movements such as walking and running, making them prone to false triggers and resulting in inaccurate detection of the wearable device's status.

[0019] This application provides a solution that monitors the acceleration sequence data of a wearable device under test, performs feature statistical calculations on the acceleration sequence data to obtain a first statistical feature and a second statistical feature; when the change in the first statistical feature exceeds the action state switching threshold and the device state of the wearable device under test is idle, the device state of the wearable device under test is switched to an action state; based on the second statistical feature, the acceleration sequence data is divided into rising and falling phases, and the extreme points within each phase are determined; when the device state of the wearable device under test switches back to idle, the current action type of the wearable device under test is determined based on the temporal distribution characteristics of the extreme points, wherein the current action type includes at least one of wearing action and removing action. The acceleration sequence data of the wearable device is acquired by an inertial detection unit integrated into the wearable device, eliminating the need for additional dedicated sensor hardware components and reducing the hardware cost of the wearable device. Switching the device state of the wearable device based on the change in the first statistical feature, and performing waveform analysis only in the action state, effectively avoids accidental touch interference and improves the accuracy of state discrimination. By dividing the rising and falling phases based on the second statistical feature and determining the extreme points of each phase, a refined distinction of action states is achieved. Based on the temporal distribution characteristics of the extreme points, the current action type of the wearable device is determined, accurately distinguishing between wearing and removing actions. Even in complex dynamic scenarios, the action type of the wearable device can be accurately identified, improving the accuracy of wearable device state detection.

[0020] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a headset, VR glasses, or smart helmet, or a wearable device capable of performing the above functions. The following description uses a wearable device as an example to illustrate this embodiment and the subsequent embodiments.

[0021] Based on this, embodiments of this application provide a wearable device wearing detection method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the wearable device wearing detection method of this application.

[0022] In this embodiment, the wearable device wearing detection method includes steps S10~S40: Step S10: Monitor the acceleration sequence data of the wearable device under test, perform feature statistical calculations on the acceleration sequence data, and obtain the first statistical feature and the second statistical feature; It should be noted that the wearable device under test (DUT) refers to a wearable device equipped with an inertial measurement unit (IMU). An IMU is a component widely used in smart wearable devices, capable of measuring information such as acceleration, angular velocity, and direction of an object. When a user puts on or takes off the wearable device, the IMU can capture the corresponding data changes. By analyzing the acceleration sequence data, it can determine whether the current action is an putting-on or taking-off action, and then control the automatic playback or pause of audio. Device state refers to the current motion mode of the DUT, including idle state and active state. Idle state refers to the DUT being in a relatively static or stable state, where the user is not putting on or taking off the device. Active state refers to the DUT being in the putting-on or taking-off action phase. The first statistical characteristic is a statistical measure used to characterize the degree of fluctuation of the acceleration sequence data within a time window, including at least one of standard deviation, mean, variance, and kurtosis. For example, the first statistical feature is the standard deviation of the acceleration sequence data within the sliding window. A larger standard deviation indicates more vigorous movement of the wearable device under test, while a smaller standard deviation indicates a more stable movement. The second statistical feature is a statistic used to characterize the average level of the acceleration sequence data within the time window, including at least one of standard deviation, mean, variance, and kurtosis. For example, the second statistical feature is the mean of the acceleration sequence data within the sliding window. This mean reflects the overall acceleration level of the wearable device under test within the sliding window and can be used as a benchmark for subsequent waveform phase division.

[0023] Specifically, before starting the test, the device state of the wearable device under test (DUT) needs to be initialized to an idle state. This is because when the DUT is powered on or the test begins, it is in a stable state of not being worn or operated by default. State initialization provides the initial basis for subsequent state switching, ensuring that the DUT starts operating from a known and defined state. Then, the DUT acquires raw acceleration sequence data in real time through its built-in inertial measurement unit (IMU). Since the IMU is susceptible to noise or high-frequency interference, the raw acceleration sequence data is low-pass filtered to obtain triaxial acceleration sequence data, which suppresses noise and enhances motion feature signals. The acceleration sequence data is calculated using the acceleration calculation formula and the triaxial acceleration sequence data. To capture the dynamic changes in acceleration in real time, a sliding window mechanism is used to calculate acceleration features. First, a fixed-length sliding window is set (e.g., containing N frames of acceleration data, each frame corresponding to the acceleration sequence data value at a sampling time). As time progresses, the window slides forward (one frame at a time), and feature statistical calculations are performed on all acceleration data within the current window to obtain the first and second statistical features.

[0024] Understandably, by monitoring the acceleration sequence data of the wearable device under test and performing feature statistical calculations on the acceleration sequence data, the three-dimensional acceleration information is fused into a one-dimensional scalar, simplifying the complexity of subsequent feature calculations while retaining the core information of motion intensity. By performing feature calculations on the acceleration sequence data, first and second statistical features are obtained, allowing the statistical features to be updated in real time with the acceleration sequence data, ensuring the real-time nature of the detection.

[0025] In one feasible implementation, the steps of monitoring the acceleration sequence data of the wearable device under test, performing feature statistical calculations on the acceleration sequence data, and obtaining the first statistical feature and the second statistical feature include steps S11 to S13: Step S11: Monitor the raw acceleration sequence data of the wearable device under test in real time, and filter the raw acceleration sequence data to obtain triaxial acceleration sequence data; It should be noted that the raw acceleration sequence data refers to the acceleration signal directly output by the inertial measurement unit (IMU), including components in the X, Y, and Z axes. Filtering refers to processing the raw acceleration sequence data using a digital filter. Because the raw acceleration sequence data contains high-frequency noise and environmental interference, a low-pass filter is used to filter the raw acceleration sequence data to suppress such noise while preserving the characteristic signals of the wearing or removing motion. The three-axis acceleration sequence data refers to the three-axis acceleration sequence data obtained after filtering. Compared to the raw data, the filtered data has a better signal-to-noise ratio and smoother waveform characteristics.

[0026] Preferably, the low-pass filter has an order of 1 to 5 and a cutoff frequency of 0.1 Hz to 10 Hz. The order range of 1 to 5 and the cutoff frequency range of 0.1 Hz to 10 Hz provide a flexible selection range for different application scenarios. In static scenarios, a lower cutoff frequency can be selected to filter out noise, while in dynamic scenarios, the cutoff frequency can be increased to retain richer motion details.

[0027] Step S12: Acceleration sequence data is calculated using the acceleration calculation formula and triaxial acceleration sequence data; It should be noted that the formula for calculating acceleration is: ,in, For acceleration sequence data, This is the X-axis acceleration data. Y-axis acceleration data, This refers to the Z-axis acceleration data. Acceleration sequence data refers to the vector and magnitude of the three-axis acceleration components, used to reflect the intensity of the overall motion of the wearable device under test.

[0028] Step S13: Perform sliding window feature statistical calculations on the acceleration sequence data to obtain the first statistical feature and the second statistical feature.

[0029] Preferably, the first statistical characteristic refers to the standard deviation of the acceleration sequence data within the sliding window. The standard deviation reflects the dispersion of the data within the window, i.e., the magnitude of motion fluctuation. The second statistical characteristic refers to the mean of the acceleration sequence data within the sliding window. The mean reflects the average level of the data within the window, i.e., the baseline intensity of motion.

[0030] Understandably, by performing sliding window feature calculations on acceleration sequence data, real-time updates of statistical features are achieved, enabling dynamic tracking of the changing trends in acceleration sequence data. This ensures both real-time detection and smooths out instantaneous noise interference through statistical calculations within the window. By using the standard deviation as the first statistical feature, the idle state (standard deviation approaching 0) and active state (standard deviation significantly increased) of the wearable device under test can be accurately distinguished. By using the mean as the second statistical feature, it can serve as a benchmark for dividing the rising or falling phases in the active state.

[0031] Step S20: If the change in the first statistical feature is greater than the action state switching threshold and the device state of the wearable device under test is idle, switch the device state of the wearable device under test to action state. It should be noted that the change in the first statistical characteristic refers to the degree of difference between the first statistical characteristic within adjacent time windows. For the current time t, the first statistical characteristic is σ(t), and for the previous time t-1, its first statistical characteristic is σ(t-1). Therefore, the change Δσ is Δσ = |σ(t)|. σ(t 1) The action state switching threshold is used to determine whether the current level of motion has reached the criteria for wearing or removing the device. The action state switching threshold can be set according to the actual application scenario. For example, in a static scenario, since the standard deviation of the wearable device under test is close to 0 when it is stationary, picking it up will cause the standard deviation to increase rapidly. In a dynamic scenario, since the user is walking or running, the wearable device under test will have regular shaking, and the standard deviation will fluctuate to some extent. Therefore, the action state switching threshold needs to be set to a high threshold to avoid false triggering. When the wearable device under test is in an idle state, the fluctuation of the acceleration sequence data is negligible, so its standard deviation remains at a low and stable level, and the standard deviation change of adjacent windows is close to 0. When the user begins to perform the wearing or removing action, the wearable device under test will undergo an acceleration process, causing a significant change in the acceleration sequence data, increasing the dispersion of the data within the window, and significantly increasing the standard deviation, which in turn causes the change to increase rapidly and exceed the action state switching threshold.

[0032] For details, see Figure 2 , Figure 2 This is a schematic diagram of the waveform characteristics of the wearing action provided in Embodiment 1 of the wearable device wearing detection method of this application. The raw acceleration sequence data of the inertial measurement unit is acquired in real time and low-pass filtered to obtain triaxial acceleration data. Then, the acceleration sequence data and the first statistical feature F1 and the second statistical feature F2 are calculated. It is determined whether the change in the first statistical feature F1 over multiple consecutive frames exceeds a set action state threshold. If it exceeds the threshold, the wearing / removal action is detected as starting, and the device state is updated to the action state. If it does not exceed the threshold, the device remains in a stable state, and monitoring continues. In the action state, the change in the first statistical feature F1 is continuously monitored to see if it exceeds the action end state threshold. Simultaneously, the number of rising and falling phases in the action waveform data is counted to see if it exceeds a preset threshold. When both conditions are met simultaneously, the wearing / removal action is detected as ending, and the state flag is updated to a stable state.

[0033] Understandably, using the change in the first statistical feature as the criterion for action state switching allows for earlier detection of actions and improved response speed compared to directly using the first statistical feature itself. By setting an action state switching threshold, action signals are separated from noise signals, avoiding false triggers caused by sensor noise, slight touches, or environmental vibrations, thus improving the reliability and anti-interference capabilities of the detection.

[0034] Preferably, the action state switching threshold can be adaptively adjusted according to dynamic changes in the environment. For example, when the wearable device under test is detected to be stationary for a long time, the action state switching threshold can be lowered to improve sensitivity. When the wearable device under test is detected to be in a high-frequency vibration environment (such as running), the threshold can be automatically raised to avoid false triggering.

[0035] In one feasible implementation, when the change in the first statistical characteristic is greater than the action state switching threshold and the device state of the wearable device under test is idle, the step of switching the device state of the wearable device under test to the action state includes steps S21 to S23: Step S21: Calculate the first statistical feature of the acceleration sequence data within the first sliding window, and obtain the first statistical feature of the acceleration sequence data within the second sliding window, wherein the first sliding window is the sliding window corresponding to the current frame, and the second sliding window is the sliding window corresponding to the previous frame of the current frame; It should be noted that the first sliding window refers to the sliding window corresponding to the current time t, including L frames of acceleration sequence data from time t-L+1 to time t. The second sliding window refers to the sliding window corresponding to the previous time t-1, including L frames of acceleration sequence data from time tL to time t-1. For the current time t, the first statistical feature σ(t) within the current window needs to be calculated in real time. For the first statistical feature σ(t-1) of the previous time t-1, since it has already been calculated and stored, it can be directly obtained, avoiding redundant calculation. The sliding window slides continuously frame by frame, and adjacent windows share the same data of L-1 frames. The change in the first statistical feature reflects the degree of influence of the most recently added frame of data on the overall statistical characteristics, ensuring that the change can smoothly reflect the real-time changes in the data stream.

[0036] Step S22: Calculate the difference between the first statistical feature of the first sliding window and the second sliding window, and use the difference as the change in the first statistical feature; It should be noted that the difference between the first statistical feature of the first sliding window and the second sliding window refers to the absolute difference between the two statistical features.

[0037] Step S23: If the change amount is greater than the action state switching threshold and the device state of the wearable device under test is idle, switch the device state of the wearable device under test to action state.

[0038] It should be noted that if the change in magnitude exceeds the action state switching threshold, it indicates that the current intensity of movement of the wearable device under test has reached the action level. If the change in magnitude is less than or equal to the action state switching threshold, it indicates that the current intensity of movement of the wearable device under test has not reached the action level, and it remains in the current idle state. When the wearable device under test is in an idle state, it indicates that it can enter the action state. If the wearable device under test is not in an idle state, it indicates that it is already in the action state and should not switch repeatedly. Both conditions must be met simultaneously for the wearable device under test to switch its state. This prevents repeated state switching, ensures the orderly operation of the wearable device under test, and improves its stability and reliability.

[0039] Step S30: Based on the second statistical characteristic, divide the acceleration sequence data into an ascending phase and a descending phase, and determine the extreme points within each phase. It should be noted that the second statistical characteristic as the benchmark refers to the mean of the acceleration sequence data within the sliding window. This mean is recorded when the wearable device under test switches from an idle state to an active state, serving as the initial benchmark. During the active state, this benchmark is dynamically updated as the phase changes. The benchmark serves as a reference line for dividing the acceleration sequence data into rising and falling phases. By comparing the current frame's acceleration sequence data sampling points with this benchmark, the distribution trend of the sampling points relative to the benchmark determines whether the current phase is rising or falling. When a phase switch occurs, the benchmark is updated to the mean of the current frame's acceleration sequence data to ensure that subsequent phase divisions are based on the latest signal level. A rising phase refers to a phase where the acceleration sequence data waveform shows an overall upward trend. A falling phase refers to a phase where the acceleration sequence data waveform shows an overall downward trend. The rising and falling phases are local trends relative to the current benchmark, not global monotonicity. In actual action waveforms, wearing or removing the device typically involves one or more alternations of rising and falling phases; therefore, phase division captures the complete waveform shape. Extreme points include the peak values ​​of the rising phase and the trough values ​​of the falling phase. Extreme points are captured by detecting trend changes within a phase. During an upward phase, the maximum sampled value (i.e., the current peak candidate) is continuously tracked. When two consecutive sampled points show a value less than the previous sampled point (i.e., the trend changes from upward to downward), it indicates the end of the upward phase. At this point, the previous sampled point is marked as a peak and stored in the extreme point sequence. During a downward phase, the minimum sampled value (i.e., the current valley candidate) is continuously tracked. When two consecutive sampled points show a value greater than the previous sampled point (i.e., the trend changes from downward to upward), it indicates the end of the downward phase. At this point, the previous sampled point is marked as a valley and stored in the extreme point sequence.

[0040] Understandably, by using dynamic benchmark comparison and local extremum detection, continuous motion waveforms are discretized into physically meaningful rising / falling phase sequences and extremum point sequences, thereby achieving a quantitative description of the motion process. When the wearable device under test undergoes wearing or removing actions, its acceleration sequence data waveform typically exhibits a fluctuation pattern of rising first and then falling (or falling first and then rising), containing multiple fluctuations. By setting a dynamically adjusted benchmark, the waveform can be divided into several monotonic intervals (rising and falling segments). Within each monotonic interval, by detecting changes in the sign of the difference between sampling points, local extrema (peaks and valleys) can be accurately captured. By using a second statistical feature as the benchmark, the stage division failure caused by using a fixed threshold is avoided, making it suitable for scenarios with different wearing habits, different wearable device forms, and different exercise intensities. By dividing the acceleration sequence data into rising and falling phases and marking the extremum points within each phase, the robustness of phase determination is improved.

[0041] In one feasible implementation, the step of dividing the acceleration sequence data into an ascending phase and a descending phase based on a second statistical characteristic, and determining the extreme points within each phase, includes steps S31 to S37: Step S31: Compare each sample point of the acceleration sequence data in the current frame with the second statistical feature to obtain the comparison result; It should be noted that in this embodiment, the data stream is divided into consecutive frames, each frame including several consecutive acceleration sequence data sampling points. The frame division method can be designed according to user needs; for example, the frame length can be set to include 10 sampling points per frame. Comparison refers to comparing the numerical value of each acceleration sequence data sampling point in the current frame with the current reference. The comparison result is the Boolean value (greater than or less than the reference) obtained after comparing each sampling point with the reference.

[0042] Step S32: Based on the comparison results, calculate the proportion of sampling points greater than the reference and the proportion of sampling points less than the reference within the current frame. It should be noted that the proportion of sample points greater than the reference refers to the percentage of sample points greater than the reference in the current frame out of the total number of sample points. The proportion of sample points less than the reference refers to the percentage of sample points less than the reference in the current frame out of the total number of sample points. Based on the comparison results, the number of sample points greater than the reference and less than the reference in the current frame are counted, and their respective proportions to the total number of sample points in the frame are calculated. These two proportions reflect the overall distribution trend of sample points in the current frame.

[0043] Step S33: If the proportion of sampling points greater than the baseline is greater than the first preset proportion threshold, determine that the current stage of the current frame is the rising stage. It should be noted that the first preset proportional threshold is a preset threshold used to determine the rising phase. The rising phase refers to a phase where the waveform shows an overall upward trend, characterized by most sampling points being above the baseline. When the proportion of sampling points above the baseline exceeds the first preset proportional threshold, the current frame is marked as part of the rising phase. If the current phase differs from the previous frame (i.e., a phase switch occurs), a baseline update is triggered, updating the baseline value to the average of the acceleration sequence data for the current frame. By determining the phase using the proportional threshold, the continuous waveform is divided into monotonic intervals. The baseline update mechanism during phase switching allows the baseline to adaptively follow the overall horizontal changes of the waveform, avoiding misjudgments caused by baseline deviation.

[0044] Step S34: If the proportion of sampling points less than the baseline is greater than the second preset proportion threshold, determine that the current stage of the current frame is the falling stage. It should be noted that the second preset ratio threshold is a preset threshold used to determine the falling phase. The falling phase refers to a phase where the waveform shows an overall downward trend, characterized by most sampling points being below the baseline. When the proportion of sampling points below the baseline is greater than the second preset ratio threshold, the current frame is marked as a falling phase. Similar to step S33, a baseline update is triggered when a phase switch occurs.

[0045] Step S35: During the rising phase, if the difference between two consecutive sampling points changes from a positive value to a negative value, the previous sampling point is marked as the peak value. It should be noted that the peak value refers to the turning point where the waveform changes from rising to falling at the end of the rising phase. During the rising phase, the maximum value of the sampling points is continuously tracked. When the difference between two consecutive sampling points changes from positive to negative (i.e., two consecutive falling points), it indicates that the rising trend has ended. The previous sampling point (i.e., the local maximum value) is marked as a peak value and stored in the extreme point sequence.

[0046] Step S36: During the descent phase, if the difference between two consecutive sampling points changes from negative to positive, the previous sampling point is marked as a valley value. It should be noted that the trough value refers to the turning point where the waveform changes from decreasing to increasing at the end of the decreasing phase. During the decreasing phase, the minimum value of the sampling points is continuously tracked. When the difference between two consecutive sampling points changes from negative to positive (i.e., two consecutive increasing points), it indicates that the decreasing trend has ended. The previous sampling point (i.e., the local minimum) is marked as a trough value and stored in the extreme value sequence.

[0047] Step S37: Determine the peak and valley values ​​obtained from each stage as the extreme points within each stage.

[0048] It should be noted that extreme points include peaks and valleys, which are waveform turning points recorded alternately in chronological order.

[0049] Understandably, summarizing the point-by-point comparison results into a statistical proportion preserves the overall trend information while smoothing out the impact of individual outliers, thus improving the robustness of stage judgment. The baseline value is updated to the current frame average during stage switching, allowing the baseline to adaptively follow the overall horizontal changes of the waveform and avoiding misjudgments caused by baseline deviation. Peaks and troughs are detected using the differential sign change of continuous sampling points, independent of absolute amplitude, and can effectively detect movements of varying amplitudes.

[0050] Step S40: When the device state of the wearable device under test switches back to the idle state, the current action type of the wearable device under test is determined based on the distribution characteristics of the extreme points in the time series. The current action type includes at least one of wearing action and taking off action.

[0051] It should be noted that this is only executed when the device state of the wearable device to be measured switches to the idle state after the action is completely finished, which can ensure that the extreme point sequence for analysis contains the complete waveform information of the entire action process and avoid misjudgment caused by an unfinished action. The extreme point sequence refers to the sequence formed by arranging the peaks and valleys marked in step S30 in chronological order, and the peaks and valleys appear alternately. The distribution characteristics of extreme points in time series refer to the arrangement rules of extreme points on the time axis, including the alternating rule of extreme types, the number of extreme points, the relationship between extreme values, and the position of the global minimum valley. The alternating rule of extreme types refers to whether peaks and valleys appear alternately, which is used to verify the validity of the waveform. The number of extreme points refers to the number of peaks and valleys, which is used to reflect the action complexity. The relationship between extreme values refers to the numerical comparison of extreme points at different positions. The position of the global minimum valley refers to whether the minimum value appears in the front or back segment of the sequence, which is used to distinguish whether the current action type of the wearable device to be measured is wearing or taking off.

[0052] Specifically, refer to Figure 3 , Figure 3 which is a schematic diagram of the waveform characteristics of the taking-off action provided in the first embodiment of the wearable device wearing detection method of this application. The abscissa is the number of samples of the inertial measurement unit, and the ordinate is the output value of the inertial sensor. When the device state first switches to the action state, the waveform analysis process in the action state is entered. According to the second statistical feature F2 of the previous frame and the sampling point value of the current frame, the rising stage and the falling stage are dynamically divided, the peak values and valley values of each stage are respectively counted, and the number of stages in the rising stage and the falling stage is also counted. When the threshold conditions (the change amount of the first statistical feature F1 is lower than the end threshold, and the number of stages exceeds the preset threshold) are met, the device state is updated to the idle state, and then the action type recognition process is entered, that is, the minimum value among all valley values and its corresponding index value are found, the peak value array is divided into two parts, the front segment and the back segment, according to the index value, the maximum values Max1 and Max2 in the two segments are respectively obtained, and the sizes of Max1 and Max2 are compared. If Max1>Max2, the wearing action result is given; if Max1<Max2, the taking-off action result is given.

[0053] Specifically, refer to Figure 4 , Figure 4This is a schematic diagram of the waveform characteristics of the wearing action provided in Embodiment 1 of the wearable device wearing detection method of this application. The horizontal axis represents the number of sampling points of the inertial measurement unit, and the vertical axis represents the output value of the inertial sensor. When the user performs the wearing action, the wearable device under test is picked up from a stationary state (such as a table), moved towards the head, and put on. This process will generate the following waveforms: In the first stage, the wearable device under test is picked up and accelerated towards the head, and the acceleration sequence data increases rapidly, forming a large early peak (corresponding to the picking action); in the second stage, the speed of the wearable device under test slows down when it approaches the head, and the acceleration sequence data decreases, forming a mid-term trough; in the third stage, the wearable device under test is put on the head and its position is adjusted, generating a late peak. Among them, the early peak is significantly larger than the late peak because the picking action needs to overcome gravity and inertia, resulting in a large acceleration, while the adjustment action after putting it on is smaller.

[0054] Further, see Figure 5 , Figure 5 This diagram illustrates the waveform characteristics of the removal action provided in Embodiment 1 of the wearable device wearing detection method of this application. The horizontal axis represents the number of sampling points of the inertial measurement unit, and the vertical axis represents the output value of the inertial sensor. When the user performs the removal action, the wearable device under test is removed from the head, moved away from the head, and placed on the table. This process generates the following waveforms: In the first stage, the wearable device under test is removed from the head and moves away rapidly, increasing the acceleration sequence data and forming an early peak. In the second stage, the wearable device under test decelerates after being moved away from the head, decreasing the acceleration sequence data and forming a mid-term trough. In the third stage, the wearable device under test experiences slight oscillations when placed on the table, forming a late peak. The late peak is significantly larger than the early peak because at the beginning of the removal action, the wearable device under test has just detached from the head, resulting in a smaller acceleration, while the impact or oscillation when placed on the table leads to a larger late peak.

[0055] Understandably, the current action type of the wearable device under test can be determined by analyzing the temporal distribution characteristics of extreme points. By utilizing the asymmetry in the mechanical process of wearing and removing the device, the current action type can be determined by analyzing the relationship between the peak values ​​before and after the global minimum trough in the acceleration sequence data waveform. When the wearable device is worn or removed, its motion undergoes a cycle of acceleration, deceleration, and stopping, reflected in the acceleration sequence data waveform as alternating peaks and troughs. However, the force direction and environment differ between wearing and removing the device: when worn, the device accelerates from rest towards the head and eventually comes to rest; when removed, the device accelerates from rest away from the head and eventually comes to rest. The acceleration distributions of these two motion modes exhibit opposite symmetry, specifically manifested in the interchangeable relationship between the peak values ​​before and after the global minimum trough. Based on the distribution characteristics of extreme points over time, the current motion type of the wearable device under test can be determined. It can accurately identify and distinguish between wearing and removing actions, and does not rely on threshold judgment. It is adaptable to different users, different wearing habits, and different wearable device forms, meeting the needs of various practical use scenarios.

[0056] In one feasible implementation, when the device state of the wearable device under test switches back to the idle state, the step of determining the current action type of the wearable device under test based on the temporal distribution characteristics of the extreme points includes steps S41 to S44: Step S41: Count the number of rising and falling phases recorded by the wearable device under test in the action state. It should be noted that the number of stages refers to the total number of rising and falling stages determined through steps S33 and S34 during the duration of the current action state. Each stage corresponds to a continuous frame sequence. For example, a complete action process may experience the following stage sequence: rising stage, falling stage, rising stage, falling stage, then the number of stages for this action process is 4. The number of stages reflects the complexity of the action waveform. For example, a number of stages of 1 to 2 indicates that the waveform is a simple single rise or fall, representing that the wearable device under test is only slightly shaking or accidentally touched, rather than a complete action. A number of stages of 3 to 4 indicates a typical wearing or removing action, representing that the wearable device under test experiences a complete process of acceleration, deceleration, re-acceleration, and re-deceleration. A number of stages greater than or equal to 5 indicates that the wearable device under test experiences a complex action process, such as multiple adjustments or oscillations.

[0057] Step S42: When the number of stages is greater than or equal to the preset stage number threshold, and the change in the first statistical feature is greater than the action end threshold, the device state of the wearable device under test is switched to the idle state. It should be noted that the preset stage number threshold is used to ensure the integrity of the wearable device under test's actions. A typical wearing or removing action involves 3 to 5 stages (alternating between rising and falling). Therefore, in this embodiment, the preset stage number threshold can be set to 3 or 4. If the preset stage number threshold is set to 3, it is suitable for general scenarios, where the sensitivity and reliability of identifying the current action type of the wearable device under test are balanced. If it is set to 4, it is suitable for scenarios with high performance requirements, where the reliability of identifying the current action type of the wearable device under test is high, and only complete actions are detected. The action end threshold is used to determine whether the wearable device under test has reached a stable state. The action end threshold is less than the action start threshold, and its value is close to the noise level of the wearable device under test in the idle state. For example, if the action start threshold is 0.05, the action end threshold can be set to 0.03. When the change in the first statistical feature is continuously greater than the action end threshold, it indicates that the wearable device under test has returned to the idle state and the action has been completed. By determining the number of stages, it is possible to determine whether the action is valid and avoid misjudgment.

[0058] Step S43: Obtain the extreme points in the action state; It should be noted that during the duration of the action, the marked peak and trough values ​​are sequentially stored in an extreme point sequence. When the device state of the wearable device under test is switched to idle state, all extreme points of this action are completely recorded and can be directly extracted. After obtaining the extreme points, a validity check is performed on them. For example, it is checked whether the number of extreme points is at least greater than or equal to 3 (at least one peak, one trough, and one peak are required to form a complete waveform). It is also checked whether peaks and troughs alternate, and whether the extreme point values ​​are within a reasonable range (e.g., outliers much less than 0 or much greater than normal values).

[0059] Step S44: Identify the current action type of the action state based on the distribution characteristics of the extreme points in the time series.

[0060] It should be noted that the distribution characteristics of extreme points in time series refer to the magnitude and positional relationship between peaks and valleys in the extreme point sequence.

[0061] In one feasible implementation, the step of identifying the current action type of the action state based on the temporal distribution characteristics of the extreme points includes steps S51 to S55: Step S51: Extract the target valley value from the extreme points and determine the position index of the target valley value in the extreme point sequence; It should be noted that the target valley value refers to the global minimum valley value, that is, the valley value with the smallest value in the extreme point sequence. The global minimum valley value corresponds to the moment of lowest speed during the action, which is the instant when the wearable device under test is closest to the head during wearing or the instant when the wearable device under test has just been removed from the head. It is a key turning point in the action process. By traversing the extreme point sequence, all elements of the type of valley value are filtered out, and the values ​​of these valley values ​​are compared to find the valley value with the smallest value, which is the target valley value. The position index refers to the sequential position of the target valley value in the extreme point sequence. The position index is used to divide the extreme point sequence into preceding and following segments.

[0062] Step S52: Divide the extreme point sequence according to the position index to obtain the first extreme point sequence and the second extreme point sequence; It should be noted that, using the target valley value's position index as the dividing point, the extreme point sequence is divided into two sub-sequences. The first extreme point sequence includes all extreme points in the extreme point sequence that are before the target valley value. The second extreme point sequence includes all extreme points in the extreme point sequence that are after the target valley value. The first extreme point sequence refers to the process from the start of the action to the lowest point of velocity (e.g., when wearing the device, it moves from a table to near the head, or when removing the device, it is initially separated from the head). The second extreme point sequence refers to the process from the lowest point of velocity to the end of the action (e.g., when wearing the device, it moves from near the head to being securely worn, or when removing the device, it moves from being detached from the head to being stationary).

[0063] Step S53: Mark the first target peak in the first extreme point sequence, and mark the second target peak in the second extreme point sequence; It should be noted that the first target peak and the second target peak refer to the maximum peak values ​​in the first and second extreme point sequences, respectively. The maximum peak value represents the most dramatic acceleration change within that stage and reflects the mechanical characteristics of that stage. By traversing the first and second extreme point sequences, all elements of the peak type are selected. The numerical values ​​of these peak values ​​are compared in the first and second extreme point sequences, and the maximum values ​​are identified as the first target peak and the second target peak value, respectively.

[0064] Step S54: If the peak value of the first target is greater than the peak value of the second target, identify the current action type of the action state as a wearing action; It should be noted that the criteria for identifying the current action type of the wearable device under test as a wearing action is that the wearable device under test is picked up from a standstill and accelerated towards the head, generating a large initial acceleration. When the wearable device under test approaches the head, it decelerates and then makes slight adjustments, generating a small later acceleration. Therefore, when the first target peak is greater than the second target peak, the current action type can be determined to be a wearing action.

[0065] Step S55: If the peak value of the first target is less than the peak value of the second target, the current action type of the action state is identified as the removal action.

[0066] It should be noted that the criteria for identifying the current action type of the wearable device under test as a wearing action is that the wearable device under test is removed from the head and moved away with acceleration, generating a certain initial acceleration. After the wearable device under test is moved back to the head, it continues to move and is eventually placed on the table or in the hand, generating a large subsequent acceleration. Therefore, when the first target peak value is less than the second target peak value, the current action type can be determined to be a removal action.

[0067] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 , Figure 6 This is a flowchart illustrating Embodiment 2 of the wearable device wearing detection method of this application. After determining the current action type of the wearable device under test based on the temporal distribution characteristics of extreme points, it further includes steps A11-A12: Step A11: If the current action type is determined to be a wearing action, control the wearable device under test to play audio; Step A12: If the current action type is determined to be a removal action, control the wearable device under test to pause the audio.

[0068] It's important to note that once the user's action is clearly identified as a wearing action, the user has already transitioned the wearable device under test from a non-wearing state (e.g., placed on a table or held in hand) to a wearing state (worn on the head). The movement of the wearable device has stabilized, and the wearing process is complete. Audio playback is then controlled by calling the audio system's API interface, sending audio remote control configuration file commands via Bluetooth, or triggering preset playback events. To prevent accidental triggering of multiple playback commands due to slight adjustments during the wearing process, optimization can be achieved through delayed execution. This involves adding a very short delay after confirming the wearing action is complete to ensure the wearable device is securely worn. Alternatively, optimization can be achieved through a status check, whereby the audio system is not currently in playback mode before playback is executed to avoid repeated playback. Once the user's action is clearly identified as a removal action, the user has transitioned the wearable device from a wearing state (on the head) to a non-wearing state (e.g., removing it and holding it in the hand, or placing it on a table). The movement of the wearable device under test has stabilized, and the removal process is complete. Audio can be paused by calling the audio system's API interface, sending audio remote control configuration file commands via Bluetooth, or triggering a preset playback event. Similar to the playback function, the pause function also needs to consider anti-shake and false triggering. This can be optimized through delayed execution; that is, after the removal action is completed, a delayed confirmation can be added to ensure that the wearable device has indeed been removed. Alternatively, a status check can be performed, that is, before executing the pause, confirming that the audio is currently playing to avoid repeated pauses. The anti-shake mechanism responds only to the removal action once in a short period of time. Automatically pausing audio after removing the wearable device under test not only improves the user experience but also optimizes the power consumption of the wearable device. After the wearable device is removed, audio playback is no longer needed; pausing avoids unnecessary power consumption. After pausing playback, the system can enter a low-power mode, significantly extending battery life.

[0069] Understandably, based on the user scenario requirement of "play when worn, pause when removed," and considering power consumption optimization, the action recognition results are linked to the audio control system to achieve intelligent pause control. By determining that the current action type is a removal action, the wearable device under test is controlled to pause the audio. After the user removes the wearable device, the audio automatically plays without manual operation, avoiding a decline in user experience caused by forgetting to pause. This allows the wearable device to enter a low-power state promptly, effectively extending battery life. Combined with the "play when worn" function, this forms a complete intelligent control process, significantly improving the level of intelligence.

[0070] This application provides a method for detecting wearable device wear. It monitors the acceleration sequence data of the wearable device under test, performs feature statistical calculations on the acceleration sequence data to obtain a first statistical feature and a second statistical feature. When the change in the first statistical feature exceeds an action state switching threshold and the wearable device is in an idle state, the device state is switched to an action state. Based on the second statistical feature, the acceleration sequence data is divided into an ascending phase and a descending phase, and extreme points within each phase are determined. When the device state switches back to an idle state, the current action type of the wearable device is determined based on the temporal distribution characteristics of the extreme points. The current action type includes at least one of wearing and removing actions. In other words, this embodiment acquires the acceleration sequence data of the wearable device through an inertial measurement unit integrated into the wearable device, eliminating the need for additional dedicated sensor hardware components, reducing the hardware cost and design complexity of the wearable device, and improving the product's cost-effectiveness while ensuring functionality. Intelligent switching between idle and active states of wearable devices is achieved based on the change in the first statistical feature. Waveform analysis is performed only in the active state, effectively avoiding slight shaking and noise interference during daily activities and improving the accuracy of state discrimination. By monitoring the change in the standard deviation of acceleration sequence data within a sliding window, the device switches from idle to active state when the change exceeds the active state switching threshold, and switches back to idle state when the change exceeds the end threshold. This maintains low-power monitoring in the idle state and performs complex waveform analysis only when necessary, ensuring detection accuracy while optimizing system power consumption. The device is divided into rising and falling phases based on dynamically updated second statistical features, and the peak and trough extreme points of each phase are recorded, enabling fine-grained tracking and quantitative description of the action process. The current action type of the wearable device is determined based on the temporal distribution characteristics of extreme points, accurately distinguishing between wearing and removing actions, and maintaining high recognition accuracy even in complex dynamic scenarios. It exhibits excellent adaptability to different users, wearing habits, and wearable device forms. It reliably detects wear actions not only in typical static scenarios such as picking up and putting on a desktop, but also accurately identifies wearing and removing actions in complex dynamic scenarios such as walking and running. By setting dual judgment conditions for the end of an action, the integrity of the action is verified, avoiding misjudgments midway. After determining the action type, corresponding playback control is executed based on the wearing or removing action, achieving an intelligent improvement in user experience. In summary, this application achieves wear detection by reusing an inertial sensing unit. Without increasing hardware costs, it achieves accurate identification of wearing and removing actions through a state switching mechanism, dynamic stage division, extreme point marking, and waveform-based action recognition methods. This significantly improves recognition accuracy and adaptability, and further translates into intelligent playback control functions, significantly enhancing user experience and product competitiveness.

[0071] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the wearable device wearing detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0072] This application provides a wearable device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the wearable device wearing detection method in Embodiment 1 above.

[0073] The following is for reference. Figure 7 The diagram illustrates a structural schematic suitable for implementing the embodiments of this application. The wearable devices in the embodiments of this application may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The wearable device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0074] like Figure 7As shown, the wearable device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the wearable device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows wearable devices to communicate wirelessly or wiredly with other devices to exchange data. While wearable devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0075] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0076] The wearable device provided in this application, employing the wearable device wearing detection method in the above embodiments, can solve the technical problem of inaccurate state detection in traditional wearable device detection schemes. Compared with the prior art, the beneficial effects of the wearable device provided in this application are the same as those of the wearable device wearing detection method provided in the above embodiments, and other technical features of this wearable device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0077] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0078] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0079] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the wearable device wearing detection method in the above embodiments.

[0080] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0081] The aforementioned computer-readable storage medium may be included in the wearable device; or it may exist independently and not assembled into the wearable device.

[0082] The aforementioned computer-readable storage medium carries one or more programs. When the wearable device executes the aforementioned one or more programs, the wearable device causes the wearable device to: monitor the acceleration sequence data of the wearable device under test; perform feature statistical calculations on the acceleration sequence data to obtain a first statistical feature and a second statistical feature; when the change in the first statistical feature is greater than the action state switching threshold and the device state of the wearable device under test is idle, switch the device state of the wearable device under test to an action state; based on the second statistical feature, divide the acceleration sequence data into an ascending phase and a descending phase, and determine the extreme points within each phase; when the device state of the wearable device under test switches back to idle, determine the current action type of the wearable device under test based on the temporal distribution characteristics of the extreme points, wherein the current action type includes at least one of wearing action and removing action.

[0083] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0084] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0085] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0086] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described wearable device wearing detection method, thereby solving the technical problem of inaccurate state detection in traditional wearable device detection schemes. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the wearable device wearing detection method provided in the above embodiments, and will not be repeated here.

[0087] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the wearable device wearing detection method described above.

[0088] The computer program product provided in this application can solve the technical problem of inaccurate state detection in traditional wearable device detection schemes. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the wearable device wearing detection method provided in the above embodiments, and will not be repeated here.

[0089] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for detecting wearability of a wearable device, characterized in that, The wearable device wearing detection method includes: The acceleration sequence data of the wearable device under test is monitored, and the acceleration sequence data is subjected to feature statistical calculation to obtain the first statistical feature and the second statistical feature. If the change in the first statistical feature is greater than the action state switching threshold, and the device state of the wearable device under test is idle, the device state of the wearable device under test will be switched to action state. Based on the second statistical feature, the acceleration sequence data is divided into an ascending phase and a descending phase, and the extreme points within each phase are determined. When the device state of the wearable device under test switches back to the idle state, the current action type of the wearable device under test is determined based on the temporal distribution characteristics of the extreme points, wherein the current action type includes at least one of wearing action and removing action.

2. The wearable device wearing detection method as described in claim 1, characterized in that, The steps of monitoring the acceleration sequence data of the wearable device under test and performing feature statistical calculations on the acceleration sequence data to obtain the first statistical feature and the second statistical feature include: The raw acceleration sequence data of the wearable device under test is monitored in real time, and the raw acceleration sequence data is filtered to obtain triaxial acceleration sequence data. The acceleration sequence data is obtained by calculating the acceleration calculation formula and the triaxial acceleration sequence data. The acceleration sequence data is subjected to sliding window feature statistical calculations to obtain the first statistical feature and the second statistical feature.

3. The wearable device wearing detection method as described in claim 1, characterized in that, The step of switching the device state of the wearable device under test to an active state when the change in the first statistical feature is greater than the action state switching threshold and the device state of the wearable device under test is idle includes: Calculate the first statistical feature of the acceleration sequence data within the first sliding window, and obtain the first statistical feature of the acceleration sequence data within the second sliding window, wherein the first sliding window is the sliding window corresponding to the current frame, and the second sliding window is the sliding window corresponding to the previous frame of the current frame; Calculate the difference between the first statistical feature of the first sliding window and the second sliding window, and use the difference as the change in the first statistical feature; If the change amount is greater than the action state switching threshold and the device state of the wearable device under test is idle, the device state of the wearable device under test will be switched to the action state.

4. The wearable device wearing detection method as described in claim 1, characterized in that, The step of dividing the acceleration sequence data into an ascending phase and a descending phase based on the second statistical characteristic, and determining the extreme points within each phase, includes: The acceleration sequence data sampling points in the current frame are compared one by one with the second statistical feature to obtain the comparison results; Based on the comparison results, the proportion of sampling points in the current frame that are greater than the benchmark and the proportion of sampling points that are less than the benchmark are respectively counted. If the proportion of sampling points greater than the benchmark is greater than the first preset proportion threshold, the current stage of the current frame is determined to be the rising stage. If the proportion of sampling points smaller than the benchmark is greater than the second preset proportion threshold, the current stage of the current frame is determined to be the falling stage. During the rising phase, if the difference between two consecutive sampling points changes from a positive value to a negative value, the previous sampling point is marked as the peak value. During the descent phase, if the difference between two consecutive sampling points changes from negative to positive, the previous sampling point is marked as a valley value. The peak and valley values ​​obtained from each stage are determined as the extreme points within each stage.

5. The wearable device wearing detection method as described in claim 1, characterized in that, When the device state of the wearable device under test switches back to the idle state, the step of determining the current action type of the wearable device under test based on the temporal distribution characteristics of the extreme points includes: The number of rising and falling phases recorded by the wearable device under test in the action state is counted. When the number of stages is greater than or equal to a preset stage number threshold, and the change in the first statistical feature is greater than the action end threshold, the device state of the wearable device under test is switched to an idle state. Obtain the extreme point under the stated action state; Based on the temporal distribution characteristics of the extreme points, the current action type of the action state is identified.

6. The wearable device wearing detection method as described in claim 5, characterized in that, The step of identifying the current action type of the action state based on the temporal distribution characteristics of the extreme points includes: Extract the target valley value from the extreme points and determine the position index of the target valley value in the extreme point sequence; The extreme point sequence is divided according to the location index to obtain a first extreme point sequence and a second extreme point sequence; Mark the first target peak in the first extreme point sequence, and mark the second target peak in the second extreme point sequence; If the first target peak value is greater than the second target peak value, the current action type of the action state is identified as a wearing action; If the first target peak value is less than the second target peak value, the current action type of the action state is identified as the removal action.

7. The wearable device wearing detection method as described in claim 1, characterized in that, After the step of determining the current action type of the wearable device under test based on the temporal distribution characteristics of the extreme points, the method further includes: If the current action type is determined to be a wearing action, the wearable device under test is controlled to play audio; If the current action type is determined to be a removal action, the wearable device under test is controlled to pause audio.

8. A wearable device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the wearable device wearing detection method as described in any one of claims 1 to 7.

9. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the wearable device wearing detection method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the wearable device wearing detection method as described in any one of claims 1 to 7.