Wristband type equipment step counting method and device based on step prediction
By adopting a step-counting method based on step prediction in wristband equipment, combined with three-axis acceleration sensor data and attitude judgment, the problem of insufficient step-counting accuracy in the prior art is solved, and higher step-counting accuracy and Adaptability.
Patent Information
- Application Number
- CN202411495448.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-18
AI Technical Summary
现有腕带式设备的计步方法存在误计步或漏计步的问题,尤其是由于手腕多样化运动和步伐不对称性带来的干扰,准确性不足。
Using a step-counting method based on pace prediction, data is collected through a three-axis acceleration sensor, preprocessing and Euclidean norm calculation are performed, and the user's attitude and pace characteristics are judged by combining cosine similarity and gravity calibration algorithm. Establish a pace prediction model, adjust the pace detection threshold in real time, and judge the effective pace and true walking status.
It improves the accuracy of step counting, effectively solves the interference caused by the diverse wrist movements and pace asymmetry, and provides a more reliable step counting experience.
Smart Images

Figure CN119469196A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a step counting method for a wristband-type wearable device (such as a smart bracelet, a smart watch, etc.). Background Art
[0002] With the popularity of wearable devices, wristband devices are becoming more popular due to their portability and versatility. As one of the important functions of wristband devices, the pedometer function has received widespread attention. Accurate pedometer results can not only provide users with a reference for exercise volume, but also serve as basic data for other health monitoring functions.
[0003] At present, the wristband device pedometer method mainly uses acceleration sensors to obtain data and determines the pace by setting a fixed threshold or frequency analysis. However, these methods have the following limitations.
[0004] First, most wristband devices use methods based on fixed acceleration threshold judgment or frequency analysis to identify steps. Although this method is simple and easy to use, it often lacks flexibility and accuracy. Due to the complexity of human steps and the diverse movements of the wrist in daily activities, these simple judgment methods are prone to miscounting or missing steps. In order to improve the accuracy of step counting, some methods try to introduce dynamic thresholds, such as calculating the mean value of acceleration multiplied by a coefficient within a certain time window or using the maximum and minimum values to determine the threshold. However, the improved method still cannot effectively solve the interference problem caused by the diverse movements of the wrist, and the improvement of step counting accuracy is limited.
[0005] Second, in actual use, wrist movement is not always synchronized with footsteps. Users may perform various wrist activities while walking, such as swinging their arms, carrying objects, etc. These activities will interfere with the data of the acceleration sensor, thereby affecting the accuracy of step counting. In addition, the human body's steps when walking have a certain asymmetry, which is often ignored in the step counting process of wristband devices. The asymmetry is further exacerbated by the swing of the wrist. Existing step counting methods do not specifically analyze and process the asymmetry of steps, which further limits the accuracy of step counting.
[0006] From the above analysis, it can be seen that the existing wristband device step counting method still has deficiencies in accuracy. In order to improve the accuracy of wristband device step counting, it is necessary to research and develop new step counting methods that comprehensively consider factors such as user step characteristics, arm movement noise, and step asymmetry to provide more reliable and stable step counting results. Summary of the invention
[0007] The technical problem to be solved by the present application is: how to solve the limitations of the existing wristband device pedometer method and improve the accuracy of pedometer counting.
[0008] To solve the above technical problems, the present application proposes a wristband device step counting method based on step prediction, comprising the following steps. Step S1: Collect acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device. Step S2: Preprocess the collected three-axis acceleration data. Step S3: Calculate the Euclidean norm of the preprocessed three-axis acceleration data to obtain the synthetic acceleration; divide the synthetic acceleration by the gravity acceleration constant to obtain the normalized resultant force data. Step S4: Use cosine similarity to determine whether the user's posture is stable based on the synthetic acceleration data. Step S5: Use a gravity calibration algorithm to calculate the gravity calibration coefficient based on the normalized resultant force data. Step S6: Extract the step cycle and amplitude characteristics based on the synthetic acceleration data. The order of steps S4, S5, and S6 can be either in front or performed simultaneously. Step S7: Establish a step prediction model based on the historical step cycle and amplitude characteristics, and obtain the predicted step cycle and predicted step amplitude through the step prediction model. Step S8: Adjust the step detection threshold in real time according to the predicted step cycle and the predicted step amplitude, and the step detection threshold changes dynamically over time. The closer the interval between the current moment and the moment when the step was most recently detected is to the predicted step cycle, the smaller the value of the step detection threshold; the farther the interval between the current moment and the moment when the step was most recently detected is from the predicted step cycle, the larger the value of the step detection threshold. The step detection threshold is also adjusted overall according to the predicted step amplitude; the larger the predicted step amplitude, the larger the overall value range of the step detection threshold; and vice versa. Step S9: Determine whether the user has generated a valid step according to the predicted step amplitude and the dynamically changing step detection threshold; if it is determined to be a valid step, the step counting result of the candidate counter is increased by 1. Step S10: Determine whether the user is actually in a walking state; when the user switches from a non-walking state to a real walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared; each time it is determined to be a valid step and it is determined to be a real walking state at that time, the step counting result of the final counter is increased by 1.
[0009] Furthermore, in step S4, a time window of fixed length is selected, and the mean acceleration of the three axes in each time window is calculated; then the cosine similarity is calculated using the three-axis acceleration mean vector of two adjacent time windows; when the cosine similarity is greater than a preset first threshold and the duration meets the first judgment condition, it is determined that the user's current posture is stable.
[0010] Furthermore, in step S4, all cosine similarity values within a period of time are saved, and their average value is calculated as the average cosine similarity; when the average cosine similarity is greater than a preset first threshold and the duration meets the first determination condition, it is determined that the user's current posture is stable.
[0011] Furthermore, in step S5, first, a time window of fixed length is selected according to the normalized resultant force data, and the variance of the resultant force data in the fixed length time window is calculated; when the variance is less than a preset second threshold and the duration satisfies a second judgment condition, it is determined that the wristband device is in a static state at this time; in the static state, the ratio of the normalized resultant force data to the gravitational acceleration constant is obtained as the gravity calibration coefficient.
[0012] Furthermore, in step S8, an inertia factor α of the threshold change is introduced, 0<α<1; the current step detection threshold T new It depends not only on the current adjustment strategy ΔT, but also on the step detection threshold T at the previous moment. old The two are weighted averaged according to certain weights to obtain the final step detection threshold T new . T new =[(1-α)×T old +α×(T old +ΔT)]×GravityRatio; where T old is the step detection threshold at the previous moment, ΔT is the adjustment amount of the step detection threshold calculated when considering both the predicted step period and the predicted step amplitude, and GravityRatio is the gravity calibration coefficient.
[0013] Furthermore, in step S9, if the currently detected step amplitude is greater than the step detection threshold at this time and the user's posture is stable, the step is considered to be valid; otherwise, it is considered that no valid step is generated.
[0014] Furthermore, in step S9, if it is determined to be a valid step, the data of the historical step cycle and amplitude characteristics of the step prediction model are also recorded; at the same time, the time when the step is determined to be a valid step is recorded as the time when the step is most recently detected. If it is not determined to be a valid step, the candidate counter does not count.
[0015] Furthermore, in step S10, any one of the continuous step count determination rule and the fast walking determination rule is used to determine whether the user is actually in a walking state. Continuous step count determination rule: First, check whether the number of steps detected continuously within a certain time window reaches a preset fourth threshold; if it reaches, and these steps all meet the condition that the user's posture is stable, then it is determined that the user is actually in a walking state. Fast walking determination rule: If the number of steps detected continuously within a period of time exceeds a fifth threshold that is higher than the fourth threshold, even if the condition that the user's posture is stable is not fully met, it is considered that the user is actually in a walking state.
[0016] Furthermore, in step S10, once the user is determined to be in a real walking state, the determination result will be maintained until the number of steps detected decreases significantly over a certain period of time, and the user is determined to have exited the real walking state, that is, is in a non-walking state.
[0017] The present application also proposes a wristband device pedometer based on step prediction, including a collection unit, a preprocessing unit, a norm calculation unit, a posture judgment unit, a calibration calculation unit, a step feature extraction unit, a step prediction unit, a step detection threshold real-time adjustment unit, an effective step judgment unit, and a real walking state judgment unit. The collection unit is used to collect acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device. The preprocessing unit is used to preprocess the collected three-axis acceleration data. The norm calculation unit is used to calculate the Euclidean norm of the preprocessed three-axis acceleration data to obtain a synthetic acceleration; and the synthetic acceleration is divided by the gravity acceleration constant to obtain normalized resultant force data. The posture judgment unit is used to use cosine similarity to determine whether the user's posture is stable based on the synthetic acceleration data. The calibration calculation unit is used to use a gravity calibration algorithm to calculate a gravity calibration coefficient based on the normalized resultant force data. The step feature extraction unit is used to extract step cycle and amplitude characteristics based on the synthetic acceleration data. The step prediction unit is used to establish a step prediction model based on the historical step cycle and amplitude characteristics, and obtain the predicted step cycle and amplitude through the step prediction model. The step detection threshold real-time adjustment unit is used to adjust the step detection threshold in real time according to the predicted step cycle and the predicted step amplitude. The step detection threshold changes dynamically over time; the closer the interval between the current moment and the moment when the step is detected the most recently is to the predicted step cycle, the smaller the value of the step detection threshold; the farther the interval between the current moment and the moment when the step is detected the most recently is from the predicted step cycle, the larger the value of the step detection threshold; the step detection threshold is also adjusted overall according to the predicted step amplitude; the larger the predicted step amplitude, the larger the overall value range of the step detection threshold; and vice versa. The effective step judgment unit is used to judge whether the user has generated effective steps according to the predicted step amplitude and the dynamically changing step detection threshold; if it is determined to be an effective step, the step counting result of the candidate counter is increased by 1. The real walking state judgment unit is used to judge whether the user is actually in a walking state; when the user switches from a non-walking state to a real walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared; each time it is judged that a valid step is generated and it is judged to be a real walking state at that time, the step counting result of the final counter is increased by 1.
[0018] The technical effect achieved by the present application is: through step prediction and adaptive threshold adjustment, the problems existing in the existing methods are effectively solved and the accuracy of step counting is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flowchart of a wristband device step counting method based on step prediction proposed in this application.
[0020] Figure 2 It is a schematic diagram of the comparison of the synthetic acceleration curves obtained from the original and pre-processed three-axis acceleration data.
[0021] Figure 3 This is a schematic diagram of the theoretical curve of the step detection threshold changing with time when only the predicted step cycle factor is considered.
[0022] Figure 4 This is a diagram showing the actual curve of the step detection threshold changing with time when only the predicted step cycle factor is considered.
[0023] Figure 5 This is a schematic diagram of the change in the step detection threshold when only the predicted step amplitude factor is considered.
[0024] Figure 6 It is a structural schematic diagram of a wristband-type pedometer device based on step prediction proposed in this application.
[0025] Explanation of the reference numerals in the figure: acquisition unit 1, preprocessing unit 2, norm calculation unit 3, posture judgment unit 4, calibration calculation unit 5, step feature extraction unit 6, step prediction unit 7, step detection threshold real-time adjustment unit 8, effective step judgment unit 9, actual walking state judgment unit 10. DETAILED DESCRIPTION
[0026] See also Figure 1 The wristband device step counting method based on step prediction proposed in this application includes the following steps.
[0027] Step S1: Collect acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device. Preferably, the sampling frequency of the three-axis acceleration sensor is set to 50 Hz to ensure that subtle changes in wrist movement can be effectively captured.
[0028] Step S2: preprocessing the collected three-axis acceleration data, including median filtering and low-pass filtering, to remove high-frequency noise and outliers, obtain a smooth acceleration signal, and better reflect the actual movement state of the wrist.
[0029] Step S3: performing Euclidean norm calculation on the preprocessed three-axis acceleration data, that is, respectively calculating the squares of the accelerations of the x-axis, y-axis and z-axis and then adding them, and then taking the square root of the summed result to obtain the composite acceleration data V. Where x represents the x-axis acceleration data, y represents the y-axis acceleration data, and z represents the z-axis acceleration data. In order to eliminate the influence of gravity acceleration, divide the synthetic acceleration V by the gravity acceleration constant (9.8m / s 2 ) to obtain the normalized resultant force data, which will serve as the basic data for subsequent analysis.
[0030] See also Figure 2 This is a comparative diagram of the synthetic acceleration curves obtained from the original and pre-processed three-axis acceleration data. The horizontal axis is time and the vertical axis is synthetic acceleration. The dotted line is the synthetic acceleration curve obtained from the original (unprocessed) three-axis acceleration data, and the solid line is the synthetic acceleration curve obtained from the pre-processed three-axis acceleration data. Comparing the dotted line and the solid line, it can be found that the synthetic acceleration obtained after pre-processing (filtering) becomes smooth.
[0031] Step S4: Use cosine similarity to determine whether the user's posture is stable based on the synthetic acceleration data. Specifically, based on the synthetic acceleration data obtained in step S3, select a time window of fixed length, for example, a time window of 1 second, and calculate the mean acceleration of each axis (x-axis, y-axis, z-axis) in each time window. Then, use the three-axis acceleration mean vector of two adjacent time windows to calculate the cosine similarity, whose dimension is 3. The formula for calculating cosine similarity is Where A and B represent the mean vectors of the three-axis acceleration of two adjacent time windows. 1 ,y 1 , z 1 ], x 1 is the mean x-axis acceleration in time window 1, y 1 is the mean y-axis acceleration in time window 1, z 1 is the average value of the z-axis acceleration in time window 1. 2 ,y 2 , z 2 ], x 2 is the mean x-axis acceleration in time window 2, y 2 is the mean y-axis acceleration in time window 2, z 2 is the mean value of the z-axis acceleration in time window 2. When the cosine similarity is greater than a preset first threshold and the duration satisfies the first determination condition, for example, 10 consecutive time windows, the user's current posture is determined to be stable.
[0032] In order to further improve the reliability of posture stability judgment, this step can also save all cosine similarity values within a period of time and calculate their average value as the average cosine similarity. When the average cosine similarity is greater than the preset first threshold and the duration meets the first judgment condition, it is determined that the user's current posture is stable.
[0033] Step S5: Use the gravity calibration algorithm to calculate the gravity calibration coefficient based on the normalized resultant force data to eliminate the measurement bias of the acceleration sensor. First, based on the normalized resultant force data obtained in step S3, select a time window of fixed length, for example, a time window of 1 second, and calculate the variance of the resultant force data within the fixed length time window. Assume that the resultant force within a time window is {x 1 , x 2 , …, x n}, the variance is calculated as follows: in Represents data x 1 to x n When the variance is less than the preset second threshold and the duration meets the second judgment condition, for example, 50 consecutive time windows, it is determined that the wristband device is in a static state. In the static state, the ratio of the normalized resultant force data to the gravity acceleration constant is obtained as the gravity calibration coefficient GravityRatio, which is used to adjust the step detection threshold later.
[0034] Step S6: Extract the step cycle and amplitude characteristics according to the synthetic acceleration data obtained in step S3. On the one hand, the step cycle is determined by autocorrelation analysis and cycle judgment algorithm, and on the other hand, the amplitude characteristics of each step are determined by peak detection algorithm, both of which belong to the prior art. The step cycle and amplitude characteristics extracted in this step will be used for subsequent step prediction and effectiveness judgment.
[0035] There is no strict restriction on the order of step S4, step S5 and step S6, and they can be performed in any order or simultaneously.
[0036] Step S7: A step prediction model is established based on the step cycle and amplitude characteristics extracted from historical data, and the predicted step cycle and predicted step amplitude are obtained through the step prediction model. The step prediction model can be implemented using a variety of algorithms such as Kalman filtering and autoregressive models. The step prediction model predicts the step cycle and amplitude of the user's next step by learning the historical step cycle and amplitude characteristics, providing a reference for subsequent adaptive threshold adjustment. The predicted step cycle and predicted step amplitude can be understood as the filtered step cycle and step amplitude.
[0037] Step S8: According to the predicted step cycle and predicted step amplitude, the step detection threshold (third threshold) is adjusted in real time. The step detection threshold changes dynamically over time. This step is aimed at the uncertainty and asymmetry of the step, and a dynamic threshold adjustment method is used to adapt to the change of the user's step, optimize the accuracy of step detection, and thus reduce misjudgment and missed judgment.
[0038] First, if the interval between the current moment and the moment when a step was most recently detected is close to the predicted step cycle—for example, if the predicted step cycle is 1 second, and the interval between the current moment and the moment when a step was most recently detected is between 0.8 seconds and 1.2 seconds, this means that the user is more likely to be walking; at this time, the step detection threshold is appropriately lowered to increase the sensitivity of step detection and reduce the possibility of missed detection. On the contrary, if the interval between the current moment and the moment when a step was most recently detected deviates significantly from the predicted step cycle—for example, if the predicted step cycle is 1 second, and the interval between the current moment and the moment when a step was most recently detected is less than 0.5 seconds or greater than 1.5 seconds, this means that the user may not be walking; at this time, the step detection threshold is appropriately increased to reduce misjudgments caused by non-walking movements of the arms or other body parts.
[0039] See also Figure 3 This is a schematic diagram of the theoretical curve of the step detection threshold changing with time when only the predicted step cycle factor is considered. The horizontal axis is time, and the numbers representing time are only examples; the vertical axis is the value of the step detection threshold. Figure 3 It only shows how the predicted step cycle factor affects the step detection threshold. In general, the closer the interval between the current moment and the moment when the step was last detected is to the predicted step cycle, the smaller the value of the step detection threshold; the farther the interval between the current moment and the moment when the step was last detected is from the predicted step cycle, the larger the value of the step detection threshold; the step detection threshold curve presents a relatively gentle V shape as a whole. The interval between the current moment and the moment when the step was last detected is equal to the predicted step cycle ( Figure 2 When the horizontal coordinate is 2, the step detection threshold value is the smallest.
[0040] See also Figure 4This is a schematic diagram of the actual curve of the step detection threshold changing with time when only the predicted step cycle factor is considered. The horizontal axis is time, and the vertical axis is the value of the step detection threshold. The shorter dotted lines on the horizontal axis represent the time point after the moment of the most recent step detection is added to the predicted step cycle. Each time a step is detected, the step detection threshold is reset to the maximum value. Each time a step is detected, the value of the step detection threshold gradually decreases because the probability of a second step in a short period of time is very low. Until it is close to the sum of the moment of the most recent step detection and the predicted step cycle, the value of the step detection threshold is at the minimum value.
[0041] Secondly, young people's movements are larger, which is reflected in the large amplitude of the acceleration waveform; the movements of the elderly are relatively slow, which is reflected in the small acceleration value. If a single criterion is used, it will cause misjudgment of steps and missed steps. This step also adjusts the level of the step detection threshold according to the predicted step amplitude. Please refer to Figure 5 , this is the change of the step detection threshold when only the predicted step amplitude factor is considered. The larger the predicted step amplitude, the larger the overall value range A of the step detection threshold, as shown by the solid line. The smaller the predicted step amplitude, the smaller the overall value range B of the step detection threshold, as shown by the dotted line.
[0042] If the step detection threshold is represented by a curve that changes dynamically over time, the horizontal axis represents time and the vertical axis represents the value of the step detection threshold. The characteristic of this curve changing with time is determined by the predicted step cycle. The overall value range of the vertical axis of this curve is determined by the predicted step amplitude.
[0043] Preferably, in order to make the change of the step detection threshold T smoother and avoid the adjustment of the step detection threshold being too sensitive, an inertia factor α of the threshold change is introduced, where 0<α<1. The step detection threshold T at the current moment new It depends not only on the current adjustment strategy ΔT, but also on the step detection threshold T at the previous moment. old The two are weighted averaged according to certain weights to obtain the final step detection threshold T new . T new =[(1-α)×T old +α×(T old +ΔT)]×GravityRatio. The current adjustment strategy ΔT is the adjustment amount of the step detection threshold calculated by considering both the predicted step period and the predicted step amplitude, and GravityRatio is the gravity calibration coefficient obtained in step S5.
[0044] Step S9: Based on the predicted step amplitude and the dynamically changing step detection threshold, determine whether the user has taken a valid step. The specific determination rule is: if the currently detected step amplitude is greater than the step detection threshold at this time, and the user's posture is stable as determined in step S4, then the step is considered to be valid. Otherwise, it is considered that no valid step has been taken.
[0045] If it is determined to be a valid step, the step result of the candidate counter is increased by 1. At the same time, it is recorded as the data of the historical step cycle and amplitude characteristics, providing a new sample for the step prediction model in step S7. At the same time, the time when the step is determined to be a valid step is recorded as the time when the step is most recently detected, providing a time reference for the judgment in step S8.
[0046] If it is not determined to be a valid step, the candidate counter does not count.
[0047] Step S10: Comprehensively analyze the user's step data and use either the continuous step count determination rule or the fast walking determination rule to determine whether the user is actually in a walking state. This step is crucial to ensure the accuracy and reliability of the step counting results.
[0048] Continuous step count determination rule: First, check whether the number of steps detected continuously within a certain time window (e.g., 5 seconds) reaches a preset fourth threshold (e.g., 10 steps). If it reaches it, and these steps all meet the condition of stable user posture determined in step S4, then it is determined that the user is actually in a walking state. This judgment rule is intended to ensure that the detected steps are continuous and stable, thereby reducing misjudgments caused by occasional movements.
[0049] Fast walking judgment rule: In the case of fast walking or jogging, due to the large range of arm movement, the condition of stable user posture determined in step S4 may not be fully met. Therefore, if the number of steps detected continuously in a short period of time (e.g., 10 seconds) exceeds the fifth threshold (e.g., 35 steps) that is higher than the fourth threshold, even if the condition of stable user posture determined in step S4 is not fully met, it is considered that the user is actually walking. This judgment rule can better adapt to the situation of fast user movement and improve the flexibility and adaptability of step counting.
[0050] Once the user is judged to be in a real walking state, the judgment result will be maintained until the number of steps detected decreases significantly (for example, less than 4 steps) within a certain period of time (for example, 5-6 seconds), and the user is judged to have exited the real walking state, that is, to be in a non-walking state. This is to avoid erroneously judging that the user has exited the real walking state due to a short pause or change in movement, and to ensure the continuity and stability of step counting.
[0051] When the user switches from a non-walking state to a truly walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared. Subsequently, each time step S9 determines that a valid step is generated and step S10 determines that the user is truly in a walking state at that time, the step counting result of the final counter is increased by 1. This operation ensures the accuracy of the step count. On the contrary, when the user exits from a truly walking state to a non-walking state, the candidate counter is cleared, but the number of steps already counted into the final counter is not affected.
[0052] The present application realizes a continuous and real-time pedometer function by repeatedly executing steps S1 to S10.
[0053] See also Figure 6 The wristband pedometer based on step prediction proposed in this application includes a collection unit 1, a preprocessing unit 2, a norm calculation unit 3, a posture judgment unit 4, a calibration calculation unit 5, a step feature extraction unit 6, a step prediction unit 7, a step detection threshold real-time adjustment unit 8, an effective step judgment unit 9, and a real walking state judgment unit 10. Figure 6 The device shown corresponds to Figure 1 The method shown.
[0054] The acquisition unit 1 is used to acquire acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device.
[0055] The preprocessing unit 2 is used to preprocess the collected three-axis acceleration data.
[0056] The norm calculation unit 3 is used to calculate the Euclidean norm of the preprocessed three-axis acceleration data to obtain the composite acceleration; and further divide the composite acceleration by the gravity acceleration constant to obtain the normalized resultant force data.
[0057] The posture judgment unit 4 is used to judge whether the user's posture is stable according to the synthetic acceleration data by using cosine similarity.
[0058] The calibration calculation unit 5 is used to calculate the gravity calibration coefficient according to the normalized resultant force data using a gravity calibration algorithm.
[0059] The step feature extraction unit 6 is used to extract the step period and amplitude features based on the synthetic acceleration data.
[0060] The step prediction unit 7 is used to establish a step prediction model based on historical step cycle and amplitude characteristics, and obtain the predicted step cycle and amplitude through the step prediction model.
[0061] The step detection threshold real-time adjustment unit 8 is used to adjust the step detection threshold in real time according to the predicted step cycle and the predicted step amplitude. The step detection threshold changes dynamically over time.
[0062] The effective step judging unit 9 is used to judge whether the user has taken effective steps according to the predicted step amplitude and the dynamically changing step detection threshold. If it is judged to be an effective step, the step counting result of the candidate counter is increased by 1.
[0063] The real walking state judgment unit 10 is used to determine whether the user is really in a walking state by using any one of the continuous step count judgment rule and the fast walking judgment rule. When the user switches from a non-walking state to a real walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared. Subsequently, each time it is determined that a valid step is generated and it is determined that the user is really in a walking state, the step counting result of the final counter is increased by 1.
[0064] This application comprehensively considers factors such as user step characteristics, arm movement noise, step asymmetry, etc., and effectively improves the accuracy and adaptability of wristband device step counting through step prediction, adaptive threshold adjustment and multiple judgment conditions, providing users with a more reliable step counting experience.
[0065] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should all be included in the protection scope of the present application.
Claims
1. A wristband device step counting method based on step prediction, characterized in that: The method comprises the following steps: Step S1: collecting acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device; Step S2: preprocessing the collected three-axis acceleration data; Step S3: Calculate the Euclidean norm of the preprocessed three-axis acceleration data to obtain the resultant acceleration; divide the resultant acceleration by the gravitational acceleration constant to obtain normalized resultant force data; Step S4: using cosine similarity to determine whether the user's posture is stable based on the synthetic acceleration data; Step S5: Calculate the gravity calibration coefficient based on the normalized resultant force data using a gravity calibration algorithm; Step S6: extracting step cycle and amplitude characteristics according to the synthetic acceleration data; The order of step S4, step S5 and step S6 may be any one before the other, or may be performed simultaneously; Step S7: establishing a step prediction model based on the historical step cycle and amplitude characteristics, and obtaining a predicted step cycle and a predicted step amplitude through the step prediction model; Step S8: adjusting the step detection threshold in real time according to the predicted step cycle and the predicted step amplitude, and the step detection threshold changes dynamically over time; The closer the interval between the current moment and the moment when the step was most recently detected is to the predicted step cycle, the smaller the value of the step detection threshold is; the farther the interval between the current moment and the moment when the step was most recently detected is from the predicted step cycle, the larger the value of the step detection threshold is; The step detection threshold is also adjusted overall according to the predicted step amplitude; the larger the predicted step amplitude, the larger the overall value range of the step detection threshold; and vice versa; Step S9: judging whether the user has taken a valid step based on the predicted step amplitude and the dynamically changing step detection threshold; if it is determined to be a valid step, adding 1 to the step counting result of the candidate counter; Step S10: Determine whether the user is actually in a walking state; when the user switches from a non-walking state to a real walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared; Each time a valid step is determined to be taken and the person is determined to be in a real walking state, the step count result of the final counter is increased by 1.
2. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S4, a time window of fixed length is selected, and the acceleration mean of the three axes in each time window is calculated; then the cosine similarity is calculated using the three-axis acceleration mean vector of two adjacent time windows; when the cosine similarity is greater than a preset first threshold and the duration meets the first judgment condition, it is determined that the user's current posture is stable.
3. The wristband device step counting method based on step prediction according to claim 2 is characterized in that: In step S4, all cosine similarity values within a period of time are saved, and their average value is calculated as the average cosine similarity; when the average cosine similarity is greater than a preset first threshold and the duration meets the first determination condition, it is determined that the user's current posture is stable.
4. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In the step S5, first, a time window of fixed length is selected according to the normalized resultant force data, and the variance of the resultant force data in the fixed length time window is calculated; when the variance is less than a preset second threshold and the duration satisfies a second judgment condition, it is determined that the wristband device is in a static state at this time; in the static state, the ratio of the normalized resultant force data to the gravitational acceleration constant is obtained as the gravity calibration coefficient.
5. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S8, an inertia factor α of the threshold change is introduced, 0<α<1; the current step detection threshold T new It depends not only on the current adjustment strategy ΔT, but also on the step detection threshold T at the previous moment. old The two are weighted averaged according to certain weights to obtain the final step detection threshold T new . T new =[(1-α)×T old +α×(T old +ΔT)]×GravityRatio; where T old is the step detection threshold at the previous moment, ΔT is the adjustment amount of the step detection threshold calculated when considering both the predicted step period and the predicted step amplitude, and GravityRatio is the gravity calibration coefficient.
6. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S9, if the currently detected step amplitude is greater than the step detection threshold at this time and the user's posture is stable, the step is considered to be valid; otherwise, it is considered that no valid step is generated.
7. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S9, if it is determined to be a valid step, the data of the historical step cycle and amplitude characteristics of the step prediction model are also recorded; at the same time, the time when the step is determined to be a valid step is recorded as the time when the step is most recently detected; If it is not determined to be a valid step, the candidate counter does not count.
8. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S10, any one of the continuous step determination rule and the fast walking determination rule is used to determine whether the user is actually in a walking state; Continuous step count determination rule: First, check whether the number of steps detected continuously within a certain time window reaches the preset fourth threshold; if it reaches it, and these steps meet the condition that the user's posture is stable, then it is determined that the user is actually in a walking state; Fast walking determination rule: If the number of steps detected continuously within a period of time exceeds a fifth threshold that is higher than the fourth threshold, the user is considered to be in a real walking state even if the condition of user posture stability is not fully met.
9. The wristband device step counting method based on step prediction according to claim 1 is characterized in that: In step S10, once the user is determined to be in a real walking state, the determination result will be maintained until the number of steps detected decreases significantly over a certain period of time, and the user is determined to have exited the real walking state, that is, is in a non-walking state.
10. A wristband-type pedometer based on step prediction, characterized in that: It includes a collection unit, a preprocessing unit, a norm calculation unit, a posture judgment unit, a calibration calculation unit, a step feature extraction unit, a step prediction unit, a step detection threshold real-time adjustment unit, an effective step judgment unit, and a real walking state judgment unit; The acquisition unit is used to collect acceleration data of the user's wrist movement through a three-axis acceleration sensor integrated in the wristband device; The preprocessing unit is used to preprocess the collected three-axis acceleration data; The norm calculation unit is used to calculate the Euclidean norm of the preprocessed three-axis acceleration data to obtain the composite acceleration; and the composite acceleration is divided by the gravity acceleration constant to obtain the normalized resultant force data; The posture judgment unit is used to judge whether the user's posture is stable according to the synthetic acceleration data by using cosine similarity; The calibration calculation unit is used to calculate the gravity calibration coefficient according to the normalized resultant force data using a gravity calibration algorithm; The step feature extraction unit is used to extract step cycle and amplitude features according to the synthetic acceleration data; The step prediction unit is used to establish a step prediction model based on historical step cycle and amplitude characteristics, and obtain the predicted step cycle and amplitude through the step prediction model; The step detection threshold real-time adjustment unit is used to adjust the step detection threshold in real time according to the predicted step cycle and the predicted step amplitude, and the step detection threshold changes dynamically over time; the closer the interval between the current moment and the moment when the step was last detected is to the predicted step cycle, the smaller the value of the step detection threshold; the farther the interval between the current moment and the moment when the step was last detected is from the predicted step cycle, the larger the value of the step detection threshold; the step detection threshold is also adjusted overall according to the predicted step amplitude; the larger the predicted step amplitude, the larger the overall value range of the step detection threshold; and vice versa; The effective step judging unit is used to judge whether the user has taken effective steps according to the predicted step amplitude and the dynamically changing step detection threshold; If it is determined to be a valid step, the step result of the candidate counter is increased by 1; The real walking state judgment unit is used to judge whether the user is in a real walking state; when the user switches from a non-walking state to a real walking state, the number of steps accumulated in the candidate counter is counted into the step counting result of the final counter at one time, and the candidate counter is cleared; Each time a valid step is determined to be taken and the person is determined to be in a real walking state, the step count result of the final counter is increased by 1.