Step counting methods, systems, devices, and media

By acquiring acceleration waveform data through smart wearable devices and identifying effective peaks and troughs, the problem of existing exercise equipment being unable to continuously monitor steps is solved, enabling accurate step counting and health data storage, and supporting users' professional exercise planning.

CN119770940BActive Publication Date: 2025-12-26BESTECHNIC SHANGHAI CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510010811.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-12-26
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

Existing exercise equipment such as elliptical trainers and treadmills cannot continuously monitor and intelligently store health data when counting steps, resulting in users not being able to understand their step count and health information in real time during exercise.

Method used

The system acquires acceleration waveform data of the user's arm along the main axis of motion using smart wearable devices, identifies valid peaks and troughs using peak and trough criteria, accumulates the user's steps, and improves detection accuracy through adaptive threshold adjustment.

Benefits of technology

It enables long-term storage of users' step count and health data while using exercise equipment, improving the accuracy and efficiency of detection and helping users to make professional exercise plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119770940B_ABST
    Figure CN119770940B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent devices, and particularly relates to a step counting method, system, device and medium applied to a motion machine use scene, the method comprising: when a user triggers a step counting detection function of an intelligent wearable device, acceleration waveform data of the user's arm along a motion main shaft direction is acquired; the motion main shaft direction is at least consistent with the direction of the user's arm forward swing / back swing; a wave peak determination condition and a wave trough determination condition are used to identify wave peaks and wave troughs on the acceleration waveform data, and a wave peak effective determination condition and a wave trough determination effective condition are used to identify whether the wave peaks or the wave troughs are effective; when an effective wave peak or an effective wave trough is identified, the user's step count is incremented by one, so as to accumulate the total step count of the user using the motion machine. The application uses the characteristic law between the hand features and the step count change of the user when using an elliptical machine or similar motion machines, so as to count steps by identifying the wave peaks and the wave troughs of the acceleration waveform of the arm along the motion main shaft direction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent devices, and particularly relates to a step counting method, system, device and medium applied to a motion machine use scenario. BACKGROUND

[0002] With the rapid development of technology, in order to enrich people's growing fitness needs, various fitness equipment has appeared in the gym, among which elliptical machines, treadmills, rowing machines and other motion machines are widely used. However, when elliptical machines and other motion machines are applied in daily fitness exercises, users often want to pay attention to their step count, step frequency and other health information in the exercise process in real time, track and record data in the exercise process for a long time, monitor and optimize their exercise intensity and method, and evaluate their physical fitness and health status.

[0003] To solve the above problems, the current general count function of elliptical machines, treadmills, rowing machines and other motion machines is used to complete the count function through the movement cycle of the handle or the pedal. However, there are still some problems in the count method of the equipment itself: it cannot be continuously monitored for a long time, and it cannot automatically store health data for subsequent user viewing. SUMMARY

[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a step counting method applicable to a smart wearable device, which can monitor and count the steps of a user using a motion machine, provide more comprehensive health data tracking and feedback, and develop a more scientific training plan through long-term data accumulation.

[0005] To achieve the above-mentioned purpose and other related purposes, the present application provides a step counting method applied to a motion machine use scenario, comprising: when a user triggers the step counting detection function of a smart wearable device, acquiring acceleration waveform data of the user's arm along the direction of the motion main shaft; the direction of the motion main shaft is at least consistent with the direction of the user's arm swinging forward / backward; identifying the wave peaks and wave troughs on the acceleration waveform data using wave peak determination conditions and wave trough determination conditions, and identifying whether the wave peaks or wave troughs are valid using wave peak effective determination conditions and wave trough determination effective conditions; when a valid wave peak or a valid wave trough is identified, the user's step count is incremented by one to accumulate the total step count of the user using the motion machine.

[0006] According to a specific embodiment of the present application, before identifying the wave peaks and wave troughs on the acceleration waveform data using the wave peak determination conditions and the wave trough determination conditions, it further comprises: performing a jitter test to identify whether the user is using the motion machine; if yes, counting the steps in the jitter test process into the total steps of the user; if not, clearing the steps in the jitter test process and ending the step counting detection function.

[0007] According to an embodiment of the present application, the step of performing a shake detection test to identify whether the user is using the exercise machine comprises: when the user triggers the step detection function of the smart wearable device, identifying the peaks and troughs on the acceleration waveform data within a preset first time period using peak determination conditions and trough determination conditions, and identifying whether the peaks or troughs are valid using peak validity determination conditions and trough validity determination conditions, to count the number of steps of the user according to the valid peaks and troughs within the preset first time period; if the number of steps is less than a preset threshold, identifying that the user is not using the exercise machine; and if the number of steps is greater than or equal to the preset threshold, identifying that the user is using the exercise machine.

[0008] According to an embodiment of the present application, the step of identifying the peaks and troughs on the acceleration waveform data using peak determination conditions and trough determination conditions, and identifying whether the peaks or troughs are valid using peak validity determination conditions and trough validity determination conditions comprises: identifying whether the peaks or troughs are valid using peak validity determination conditions and trough validity determination conditions; and if the peaks or troughs are invalid, ignoring them.

[0009] According to an embodiment of the present application, the peak determination conditions are as follows: when the acceleration waveform data is in an upward trend, if the acceleration value at the current sampling time is in an upward state, the acceleration value at the next sampling time is in a downward state, and the number of rising points of the acceleration value at the current sampling time is greater than or equal to a preset first value, it is considered that the current sampling time is a peak time, and the corresponding acceleration value is the peak; or when the acceleration waveform data is in an upward trend, if the acceleration value at the current sampling time is in an upward state, the acceleration value at the next sampling time is in a downward state, and the number of rising points of the acceleration value at the current sampling time is equal to a preset second value, and the difference between the acceleration value at the current sampling time and the previous trough is greater than an initial value of an adaptive difference threshold, it is considered that the current sampling time is a peak time, and the corresponding acceleration value is the peak.

[0010] According to an embodiment of the present application, the trough determination conditions are as follows: when the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a downward state, the acceleration value at the next sampling time is in an upward state, and the number of falling points of the acceleration value at the current sampling time is greater than or equal to a preset first value, it is considered that the current sampling time is a trough time, and the corresponding acceleration value is the trough; or when the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a downward state, the acceleration value at the next sampling time is in an upward state, and the number of falling points of the acceleration value at the current sampling time is equal to a preset second value, and the difference between the acceleration value at the current sampling time and the previous peak is greater than an initial value of an adaptive difference threshold, it is considered that the current sampling time is a trough time, and the corresponding acceleration value is the trough.

[0011] According to an embodiment of the present application, the peak effective determination condition comprises: a first condition that the peak value is at least greater than or equal to an adaptive first threshold value; a second condition that the number of rising points of the peak is at least greater than a preset third value; a third condition that the time difference between the peak time and the previous valley time is at least greater than or equal to a preset difference value; wherein the previous valley time is at least greater than the previous peak time; a fourth condition that the difference between the peak and the previous valley is at least greater than an adaptive difference threshold value; wherein the peak is considered effective when it satisfies all the conditions.

[0012] According to an embodiment of the present application, the method further comprises: updating the adaptive first threshold value and the adaptive difference threshold value; wherein when a peak is identified, if the time difference between the peak time and the previous valley time is greater than or equal to the preset difference value, and the difference between the peak and the previous valley is greater than the initial value of the adaptive difference threshold value, the adaptive first threshold value and the adaptive difference threshold value are updated.

[0013] According to an embodiment of the present application, the valley effective determination condition comprises: a first condition that the valley value is at least less than or equal to an adaptive second threshold value; a second condition that the number of falling points of the valley is at least greater than a preset third value; a third condition that the time difference between the valley time and the previous peak time is at least greater than or equal to a preset difference value; wherein the previous peak time is at least greater than the previous valley time; a fourth condition that the difference between the previous peak and the valley is at least greater than an adaptive difference threshold value; wherein the valley is considered effective when it satisfies all the conditions.

[0014] According to an embodiment of the present application, the method further comprises: updating the adaptive second threshold value and the adaptive difference threshold value; wherein when a peak is identified, if the time difference between the peak time and the previous valley time is greater than or equal to the preset difference value, and the difference between the peak and the previous valley is greater than the initial value of the adaptive difference threshold value, the adaptive second threshold value and the adaptive difference threshold value are updated.

[0015] According to an embodiment of the present application, the adaptive first threshold value / adaptive second threshold value is updated as follows: a new adaptive first threshold value / adaptive second threshold value is calculated according to a preset coefficient and the latest peak and valley; wherein the calculation formula is as follows:

[0016] ,

[0017] ,

[0018] denotes the new adaptive first threshold value / adaptive second threshold value, denotes the adaptive first threshold value / adaptive second threshold value, represents the latest peak value, represents the latest trough value, , represents a preset coefficient, and , the value range is between 0 and 1.

[0019] According to an embodiment of the present application, the adaptive difference threshold is updated in the following manner: an array is created in advance, and the array stores a preset number of differences between adjacent peaks and troughs; a newly calculated difference between a peak and a previous trough or a difference between a trough and a previous peak is updated to the array, and an outdated difference is deleted from the array; based on all the differences in the array, a new adaptive difference threshold is obtained by summing and averaging according to a preset coefficient.

[0020] According to an embodiment of the present application, further comprising: monitoring the total number of steps of the user in real time, and when it is detected that the total number of steps of the user does not change in a preset second time period, identifying that the user has stopped using the exercise machine, and ending the step counting detection function.

[0021] According to an embodiment of the present application, the exercise machine includes an elliptical machine, a treadmill, and a rowing machine, and the direction of the exercise main shaft is parallel to the ground and consistent with the direction of the forward swing / back swing of the user's arm.

[0022] According to an embodiment of the present application, further comprising: performing mean filtering on the acceleration waveform data according to the following formula:

[0023] ,

[0024] wherein, represents the window length, represents the data of the main shaft data x after mean filtering, represents the data of the i time instants before the current time t.

[0025] A step counting system applied to an exercise machine usage scenario, comprising: a data acquisition module, configured to acquire acceleration waveform data of a user's arm along a direction of an exercise main shaft when the user triggers a step counting detection function of a smart wearable device; the direction of the exercise main shaft is at least consistent with the direction of the forward swing / back swing of the user's arm; a data processing module, configured to identify peaks and troughs on the acceleration waveform data by using peak determination conditions and trough determination conditions, and identify whether the peaks or troughs are valid by using peak validity determination conditions and trough validity determination conditions; a step counting display module, configured to count the steps of the user by one when valid peaks or valid troughs are identified, so as to accumulate the total number of steps of the user using the exercise machine.

[0026] The application discloses a smart wearable device, which comprises a processor and a memory coupled with the processor, and the memory stores program instructions, which realize the method when executed by the processor.

[0027] A readable storage medium comprises a program, which makes the smart wearable device execute the method when the program runs on the smart wearable device.

[0028] The application provides a step counting method, which theoretically analyzes the characteristic rule between hand movement and step change of an elliptical machine and similar exercise machines during use, so that the step count can be counted by collecting acceleration data of a user's arm along the main axis direction of movement through a smart wearable device, the interference of acceleration data on other axes is effectively avoided, the detection accuracy and efficiency are improved, the smart wearable device is greatly beneficial to long-term movement data counting and health management of the user, and in combination with other time, heart rate and other related parameters, the user can make more professional and detailed movement planning. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 An elliptical machine provided by the application is shown in the figure;

[0030] Figure 2 A three-axis direction schematic diagram of an accelerometer in a smart wearable device is provided by the application;

[0031] Figure 3 A waveform schematic diagram of acceleration and speed of elliptical machine movement along the X-axis direction is provided by the application;

[0032] Figure 4 A key node schematic diagram of an arm during elliptical machine movement is provided by the application;

[0033] Figure 5 A flowchart schematic diagram of a step counting method applied to an exercise machine use scenario is provided by the application;

[0034] Figure 6 A flowchart schematic diagram of another embodiment of a step counting method applied to an exercise machine use scenario is provided by the application;

[0035] Figure 7 A flowchart schematic diagram of still another embodiment of a step counting method applied to an exercise machine use scenario is provided by the application;

[0036] Figure 8 A waveform diagram of actual data collected by an accelerometer in the X-axis direction of elliptical machine movement of a user is provided by the application;

[0037] Figure 9A structure schematic diagram of a specific embodiment of a step counting system applied to a sports equipment use scenario provided by the present application;

[0038] Figure 10 A structure block diagram of a specific embodiment of an electronic device provided by the present application. DETAILED DESCRIPTION

[0039] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The embodiments of the present application are shown in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0041] The embodiments of the present application are described below through specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the disclosure of the present specification. The present application can also be implemented or applied by different specific embodiments, and the details in the specification can be modified or changed based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0042] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application, however, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details, and in other embodiments, the known structures and devices are shown in the form of block diagrams rather than in the form of details, to avoid making the embodiments of the present application difficult to understand.

[0043] First of all, it needs to be explained that in order for those skilled in the art to better understand the present application scheme, the technical background of the present application is explained accordingly.

[0044] In the present embodiment, an elliptical machine is specifically taken as an example to analyze the motion characteristics of a user when using the elliptical machine. Specifically, Figure 1As shown in the schematic diagram of the elliptical trainer, when the user uses the exercise machine, the foot pedal 3 is lifted, the handrail 1 is pushed forward, the foot pedal 4 is pressed down, and the handrail 2 is pulled backward. As can be seen, when the foot on the foot pedal 3 steps forward by 1 step, the foot pedal 3 will be pressed down, and the handrail 1 will be pulled backward; when the foot pedal 4 is lifted, the handrail 2 is pushed forward, which represents that the foot on the foot pedal 4 steps forward by 1 step. Such a cycle can find that the user's foot movement and hand movement have corresponding movement rules, and the pushing and pulling actions of the user's arms holding the elliptical trainer handle correspond to the user's step forward by 1 step. In this way, we can count the user's hand movement rules to deduce the user's steps, and the user's hand movement rules can be monitored by smart wearable devices, such as smart watches, smart rings, etc.

[0045] Secondly, when the smart wearable device is assembled on the user's hand, the three axes of the built-in accelerometer will have different direction distributions, which can be seen in detail from Figure 2 . The X-axis positive direction in the horizontal plane is parallel to the arm and points to the finger direction, the Y-axis positive direction in the horizontal plane is perpendicular to the arm and points to the user's body direction, and the Z-axis positive direction is perpendicular to the horizontal plane upward. In Figure 1 , when the user wears the smart wearable device and holds the handle of the elliptical trainer to perform the stepping movement, an axis parallel to the arm movement direction is generated, which is called the main axis of motion, and the user's arm movement characteristics on the elliptical trainer are mainly distributed on the axis. Specifically, in actual application, the main movement direction of the arm during the elliptical trainer movement is the horizontal direction parallel to the ground, that is, the X-axis direction in Figure 2 , therefore, in this application, only the X-axis data of the accelerometer in the smart wearable device is used to count the user's elliptical trainer movement, rather than using the combined data of the three axes, which is beneficial to reduce the interference brought by other axis data. It can be understood that for the movement characteristics of other exercise machines, the corresponding main axis of motion needs to be analyzed according to the actual situation, which may be the Y-axis or the Z-axis, so that the data on the main axis of motion is used for counting steps. Similarly, the direction distribution of the X, Y, and Z axes can also be customized, and no further limitation is made, and the modifications and decorations made by those skilled in the art without departing from the spirit of the present application still fall within the scope of the present application.

[0046] Further, when Figure 1When the arm holding the handle 1 moves along the positive direction of the X axis, that is, the arm performs a pushing action away from the body: at the beginning, the arm is stationary, and then starts to accelerate in the positive direction of the X axis, at this time, the acceleration value is positive and in the same direction as the positive direction of the X axis. When the arm passes a certain position in the complete pushing action path, the arm starts to decelerate in the positive direction of the X axis until it reaches the farthest point, and the arm is again in a stationary state. In order to achieve the effect of deceleration, at this time, the direction of the acceleration is opposite to the positive direction of the X axis, that is, negative. Therefore, during the pushing process of the arm, the acceleration along the X axis direction changes from positive to negative, and conversely, during the pulling process of the arm, the acceleration along the X axis direction changes from negative to positive.

[0047] Therefore, during the elliptical exercise of the user, the acceleration waveform along the X axis direction can be simplified as shown in Figure 3 , where accelerometer represents acceleration and velocity represents speed. It can be obviously found that the acceleration data presents a trigonometric function feature, and the peaks and troughs change regularly, which is closely related to the regular pushing and pulling of the arm during the elliptical exercise of the user.

[0048] For this, the movement process of the arm can be simplified as several key movement nodes as shown in Figure 4 : when the swinging direction of the arm is the same as the positive direction of the X axis, after one leg of the user steps out, the arm is at point A, the speed is minimum, and the positive acceleration value is maximum. From point A, the arm accelerates to point B, but the acceleration value decreases. At point B, the positive speed is maximum, and the acceleration value is minimum. Then, the arm starts to decelerate from point B to point C, the reverse acceleration value increases, at point C, the speed is minimum, and the reverse acceleration is maximum. This indicates that the acceleration of the arm from point A to point B to point C changes from maximum in the positive direction to 0 to maximum in the reverse direction, which corresponds to the process of the solid line peak A to B to trough C. Figure 3 Conversely, when the swinging direction of the arm is opposite to the positive direction of the X axis, after the other leg of the user steps out, the arm is at point C, the speed is minimum, and the reverse acceleration value is maximum. From point C, the arm accelerates in the reverse direction to point B, but the acceleration value decreases. At point B, the reverse speed is maximum, and the acceleration value is minimum. Then, the arm starts to decelerate from point B to point A, the positive acceleration value increases, at point A, the speed is minimum, and the positive acceleration is maximum. This indicates that the acceleration of the arm from point C to point B to point A changes from maximum in the reverse direction to 0 to maximum in the positive direction, which corresponds to the process of the dashed line peak C to B to trough A. Figure 3the process from trough C to B to peak A. It can be found that the change from peak to trough and from trough to peak on the acceleration waveform data corresponds to a step of the user, and then only the total number of peaks and troughs is counted using an algorithm to obtain the total number of steps of the user when using the elliptical machine, and in combination with the motion time information, other user health information such as step frequency, calories, etc. can be obtained.

[0049] Therefore, based on the motion characteristics of the user when using the elliptical machine, the application provides a step counting method applied to a motion machine use scenario. Of course, the above is only an example of an elliptical machine, but is not limited to the application range of the method. For example, the arm characteristics of the user when using a treadmill or rowing machine are basically similar to those of the elliptical machine, and the method provided by the application can be directly used. In addition, for some other motion machines, the arm motion and step number correlation law can be specifically analyzed and adjusted, and the acceleration data of the corresponding motion axis direction of the arm is obtained to count the steps, and no more limitation is made.

[0050] Embodiment 1

[0051] Please refer to Figure 5 、 6 A step counting method applied to a motion machine use scenario, comprising:

[0052] Step S100, when the user triggers the step counting detection function of the smart wearable device, acceleration waveform data of the user's arm along the motion axis direction is obtained; the motion axis direction is at least consistent with the direction of the user's arm forward swing / back swing.

[0053] Step S200, peaks and troughs on the acceleration waveform data are identified using peak determination conditions and trough determination conditions, and whether the peaks or troughs are valid is identified using peak effective determination conditions and trough determination effective conditions.

[0054] Step S300, when an effective peak or an effective trough is identified, the user's step count is incremented by one to accumulate the total number of steps of the user using the motion machine.

[0055] It can be understood here that since the step counting method provided by the application needs to obtain acceleration data of the user's hand movement, the corresponding smart wearable device is at least worn on the user's hand, but the type of smart wearable device is not limited. In order to facilitate the description of the technical solution, an intelligent watch is taken as an example.

[0056] Based on the above analysis, when the user triggers the step detection function of the smart watch, the accelerometer built-in the smart watch will collect acceleration data in different directions of the user's arm, however, in the embodiment, the acceleration data in the direction of the arm along the main axis direction, i.e. the acceleration data in the X-axis direction, is mainly used, and the data or synthesized data in the Y-axis direction and the Z-axis direction are not used. Moreover, when the user's arm is not in a static state, a motion trajectory will be formed accordingly and accompanied by continuous speed changes, i.e. the acceleration is also a continuous change process, therefore, the obtained acceleration data is actually a continuous waveform change. In this regard, the steps are counted by identifying the peaks and troughs of the acceleration waveform as shown in Figure 3 , and then combined with the motion time information, the step frequency, calories and other user motion health information can be obtained.

[0057] Firstly, the data needs to be mean filtered to reduce the interference of the burr in the waveform change to the greatest extent, and the specific calculation formula is as follows:

[0058]

[0059] wherein, represents the window length, represents the data of the main axis data x after mean filtering, represents the data of the i time points before the current time t, i.e. the above formula represents the mean value of the data with a length of window_len starting from the current time t, as the data after mean filtering at the current time t .

[0060] Correspondingly, the larger the window length value, the better the smoothing effect, but it is also easy to drown out the normal waveform change, and the smaller the window length value, the smoothing effect is not ideal. Therefore, in the embodiment, the window length is preferably 8.

[0061] Of course, the data preprocessing is not limited to mean filtering, and specific additions / reductions can be made according to actual needs. After preprocessing the acceleration waveform data, the peaks and troughs of the acceleration waveform can be identified to accumulate the total number of steps of the user. Here, in order to avoid similar waveform jitter caused by the user's other behaviors, which leads to step misrecognition, for example, when the user enters the elliptical instrument special motion interface of the smart watch, the user may not directly start to exercise (use the elliptical instrument to exercise), which may cause similar acceleration waveform changes, but this behavior will not be persistent, therefore, a anti-jitter test phase is set, only when the number of steps accumulated in the preset first time period meets the requirement, the step counting phase will be formally entered, i.e. the number of steps obtained in the anti-jitter test phase is greater than or equal to the preset threshold, otherwise the number of steps in the anti-jitter time is cleared.

[0062] ​Specifically, refer to Figure 7 As shown in the figure, when the step detection function of the smart watch is not enabled, step_state is set to 0, and when the step detection function is just enabled, it first enters the anti-shake test phase, step_state is set to 1, and the anti-shake test is started. Here, the first time period can be preset to 5s, and the number of steps generated by the user in the 5s is counted, that is, whether the total number of identified peaks and troughs reaches the preset threshold: if it does not meet the standard, it means that the user has stopped moving, and the counted steps are directly cleared and not displayed, and the step detection function is exited, that is, step_state is reset to 0; if it meets the standard, it means that the user has started to use the elliptical machine normally, that is, it enters the formal step counting phase, and step_state needs to be set to 2, and the number of steps counted in the anti-shake test phase will be added to the total number of steps of the user using the elliptical machine. When the formal step counting phase is entered, the acceleration values can be identified in real time, or one or more acceleration values can be identified according to the preset unit time, so as to count the peaks and troughs on the acceleration waveform, which is not limited.

[0063] It should be added here that the cumulative step count change can also be verified in real time to identify whether the user has stopped using the elliptical machine, for which a second time period can be set, for example, 10s, and if no new peak or trough is identified within 10s, that is, the user's step count has not changed, the step detection function is exited, step_state is reset to 0, and waits for the next step detection function to start.

[0064] The above is the complete process of the smart watch counting steps when the user uses the elliptical machine or other exercise equipment. In addition, how to identify the peaks and troughs in the acceleration waveform data can be seen below.

[0065] For the acceleration value at the current sampling time, first determine whether it is a peak using the peak determination condition, if so, further determine whether it is a valid peak to avoid the influence of other burr peaks; if not, determine whether it is a trough using the trough determination condition, and similarly, when it is determined to be a trough, it also needs to be further determined whether it is a valid trough. If it is neither a peak nor a trough, wait for the next sampling time to identify the acceleration value, and repeat the cycle to count the number of peaks and troughs.

[0066] The peak determination condition mainly refers to: when the acceleration waveform data is in an upward trend, if the acceleration value at the current sampling time is in an upward state, the acceleration value at the next sampling time is in a downward state, and the number of rising points of the acceleration value at the current sampling time is greater than or equal to a preset first value (for example, 2), it is considered that the current sampling time is a peak time, and the corresponding acceleration value is a peak. Or, when the acceleration waveform data is in an upward trend, if the acceleration value at the current sampling time is in an upward state, the acceleration value at the next sampling time is in a downward state, and the number of rising points of the acceleration value at the current sampling time is equal to a preset second value (for example, 1), and the difference between the acceleration value at the current sampling time and the previous valley is greater than the initial value of the adaptive difference threshold, it is considered that the current sampling time is a peak time, and the corresponding acceleration value is a peak. The valley determination condition mainly refers to: when the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a downward state, the acceleration value at the next sampling time is in an upward state, and the number of falling points of the acceleration value at the current sampling time is greater than or equal to a preset first value, it is considered that the current sampling time is a valley time, and the corresponding acceleration value is a valley. Or, when the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a downward state, the acceleration value at the next sampling time is in an upward state, and the number of falling points of the acceleration value at the current sampling time is equal to a preset second value, and the difference between the acceleration value at the current sampling time and the previous peak is greater than the initial value of the adaptive difference threshold, it is considered that the current sampling time is a valley time, and the corresponding acceleration value is a valley.

[0067] The peak effective determination condition mainly includes the following: the first condition, the peak value is at least greater than or equal to the adaptive first threshold value; the second condition, the number of rising points of the peak is at least greater than a preset third value; the third condition, the time difference between the peak time and the previous valley time is at least greater than or equal to a preset difference value; wherein the previous valley time is at least greater than the previous peak time; the fourth condition, the difference between the peak and the previous valley is at least greater than the adaptive difference threshold value; so as to avoid the burr peak near the peak, or to detect two consecutive peaks, and when the peak satisfies all the above conditions, the peak is considered effective.

[0068] Similarly, the valley effective determination condition also includes the following: the first condition, the valley value is at least less than or equal to the adaptive second threshold value; the second condition, the number of falling points of the valley is at least greater than a preset third value; the third condition, the time difference between the valley time and the previous peak time is at least greater than or equal to a preset difference value; wherein the previous peak time is at least greater than the previous valley time; the fourth condition, the difference between the valley and the previous peak is at least greater than the adaptive difference threshold value; and when the valley satisfies all the conditions, the valley is considered effective.

[0069] Based on the above, only when the wave peak is a valid wave peak or the wave trough is a valid wave trough, the cumulative steps of the user are counted, that is, the steps of the user are counted by one when a valid wave peak or a valid wave trough is identified. The invalid wave peak and wave trough are ignored and considered as a burr.

[0070] In addition, as the user uses the exercise machine over time, the action may become more and more unstandard, and the wave peak and wave trough values will be adjusted accordingly. In this regard, the adaptive first threshold, the adaptive second threshold, and the adaptive difference threshold described above are also updated synchronously to adapt to the user's arm action. Specifically, when a wave peak is identified, the time difference between the corresponding wave peak moment and the last wave trough moment is greater than or equal to a preset difference value, and the difference between the wave peak and the last wave trough is greater than the initial value of the adaptive difference threshold, the adaptive first threshold, the adaptive second threshold, and the adaptive difference threshold are updated accordingly. Whether the wave peak is a valid wave peak or not, the above thresholds are updated to avoid the situation that the arm action amplitude becomes smaller, the wave form amplitude changes smaller, and the step counting cannot continue.

[0071] Therefore, the adaptive first threshold and the adaptive second threshold can be updated according to the following formula:

[0072] ,

[0073] ,

[0074] wherein, represents the new adaptive first threshold / adaptive second threshold, represents the adaptive first threshold / adaptive second threshold, represents the latest wave peak value, represents the latest wave trough value, , represents a preset coefficient, and , The value range is between 0 and 1. If the value of is too large, the final new adaptive first threshold / adaptive second threshold is closer to the wave peak, otherwise it is closer to the wave trough. Similarly, The value of represents the update speed of the adaptive first threshold / adaptive second threshold. The larger the value is, the more the final updated adaptive first threshold / adaptive second threshold is related to the historical value, the slower the update speed is, and the smaller the value is, the more the updated adaptive first threshold / adaptive second threshold is related to the new value, and the faster the update speed is.

[0075] The adaptive difference threshold can be updated according to the following formula:

[0076] ,

[0077] wherein, denotes a new adaptive difference threshold value, denotes the number of differences in the array, denotes the sum of all differences in the array, denotes a preset coefficient for scaling the difference between the peak and the valley, generally the value is greater than 1, representing that the fluctuation between the peak and the valley is at least greater than the adaptive difference threshold value after updating using the coefficient.

[0078] It should be noted that an array needs to be created in advance before updating the adaptive difference threshold value, and the array stores a preset number of differences between adjacent peaks and valleys, and in the embodiment, the specific number is set to 3. When a peak or a valley is identified, the difference between the peak and the previous valley or the difference between the valley and the previous peak can be calculated accordingly, so that it can be updated to the array, and the difference that is relatively time-expired in the array is removed, that is, a difference needs to be stored and an initial difference needs to be removed. Finally, when the adaptive difference threshold value needs to be updated, the sum is taken and the new adaptive difference threshold value is obtained by taking the mean value according to the preset coefficient .

[0079] Based on the above, the accuracy of the cumulative step count of the user when using the elliptical machine can be greatly improved. In a specific implementation, the data shown in Figure 8 may be referred to, in which the user wearing a smart watch performs 100 steps on the elliptical machine, wherein filter_x denotes the x-axis data after mean filtering, peak denotes the peak, valley denotes the valley, and threadvalue denotes the adaptive updated threshold value, that is, the adaptive first threshold value and the adaptive second threshold value. It can be found that the data characteristics are consistent with the theoretical analysis of the waveform characteristics, and 99 peaks and valleys can be found by using the step counting method provided in the present application, that is, the cumulative step count of the user is 99 steps, which is basically consistent with the theoretical data, fully illustrating the effectiveness of the step counting method provided in the present application.

[0080] It should be noted that the step division of the above various methods is only for clear description, and can be combined into one step or some steps can be split and decomposed into multiple steps, as long as the same logical relationship is included, and all are within the protection scope of the present application. Irrelevant modifications or irrelevant designs are added to the algorithm or the process, but the core design of the algorithm and the process is within the protection scope of the present application.

[0081] Embodiment 2

[0082] Please refer to Figure 9 , the present embodiment also provides a step counting system applied to a motion machine use scene, comprising:

[0083] The data acquisition module 10 is configured to acquire acceleration waveform data of the user's arm along a motion main axis direction when the user triggers a step detection function of the smart wearable device; the motion main axis direction is at least consistent with a direction of forward swing / back swing of the user's arm.

[0084] The data processing module 20 is configured to identify a wave crest and a wave trough on the acceleration waveform data by using a wave crest determination condition and a wave trough determination condition, and identify whether the wave crest or the wave trough is valid by using a wave crest validity determination condition and a wave trough validity determination condition.

[0085] The step display module 30 is configured to increase the user's step count by one when a valid wave crest or a valid wave trough is identified, so as to accumulate the total step count of the user using the exercise machine.

[0086] It should be noted that the step counting system applied to the exercise machine usage scenario provided in the above embodiment and the step counting method applied to the exercise machine usage scenario provided in the above embodiment 1 belong to the same concept, wherein the specific manner in which each module and unit performs operations has been described in detail in the method embodiment, which will not be described here. The step counting method applied to the exercise machine usage scenario provided in the above embodiment 1 can be used in actual application, and the above functions can be completed by different functional modules according to needs, i.e., the internal structure of the device is divided into different functional modules to complete all or part of the above described functions, and this is not limited herein.

[0087] Embodiment 3

[0088] Please refer to Figure 10 The embodiment of the present application further provides a smart wearable device, which comprises a memory 2, a processor 1, and a program stored in the memory and executable on the processor, and the processor executes steps of the above method.

[0089] The memory comprises at least one type of readable storage medium, which comprises a flash memory, a card type memory (such as an SD or DX memory, etc.), a magnetic memory, etc. In some embodiments, the memory can be an internal storage unit of the smart wearable device. Further, the memory can comprise both an internal storage unit and an external storage device of the smart wearable device. The memory can be used not only to store application software and various data installed on the smart wearable device, but also to temporarily store data that has been output or will be output.

[0090] The processor can be composed of integrated circuits in some embodiments, for example, can be composed of a single packaged integrated circuit, or can be composed of multiple packaged integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor is the control unit of the smart wearable device, which connects all components of the smart wearable device through various interfaces and lines, executes or runs programs or modules stored in the memory, and calls data stored in the memory, to perform various functions and process data of the smart wearable device.

[0091] The processor executes the operating system of the smart wearable device and various installed application programs. The processor executes the application programs to implement the steps in the above method embodiments.

[0092] For example, the program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of program instruction segments capable of completing a specific function, which are used to describe the execution process of the program in the electronic device.

[0093] The integrated units implemented in the form of software function modules described above can be stored in a readable storage medium. The software function modules described above are stored in a storage medium, including a plurality of instructions for enabling the smart wearable device to execute part of the functions of the various embodiments of the present application.

[0094] In summary, the present application provides a step counting method, which theoretically analyzes the characteristic rules between hand movement and step change during the use of an elliptical machine and similar exercise equipment, so that the acceleration data of the user's arm along the main axis direction can be collected by the smart wearable device to count the steps, effectively avoiding the interference of acceleration data on other axes, improving the accuracy and efficiency of detection, greatly benefiting the user to use the smart wearable device for long-term exercise data statistics and health management, and in combination with other time, heart rate and other related parameters, helping the user to make more professional and detailed exercise planning.

[0095] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not used to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical thought of the present application should be covered by the claims of the present application.

Claims

1. A step counting method applied to exercise equipment usage scenarios, characterized in that, include: When a user triggers the step counting detection function of a smart wearable device, the acceleration waveform data of the user's arm along the main axis of motion is obtained. The direction of the main axis of motion is at least consistent with the direction of the user's arm swinging forward / backward; Peaks and troughs in the acceleration waveform data are identified using peak and trough determination conditions, and the validity of peaks or troughs is determined using valid peak and trough determination conditions. The valid peak determination conditions include: a first condition, the peak value is at least greater than or equal to an adaptive first threshold; a second condition, the number of peak rise points exceeds a preset third value; a third condition, the time difference between the peak moment and the previous trough moment is at least greater than or equal to a preset difference, and the previous trough moment is at least greater than the previous peak moment; a fourth condition, the difference between the peak and the previous trough is at least greater than an adaptive difference threshold; and a peak is considered valid when all conditions are met. The peak is valid; the adaptive difference threshold is defined as follows when a peak is detected, and the time difference between the peak time and the previous trough time is greater than or equal to a preset difference, and the difference between the peak and the previous trough is greater than the initial value of the adaptive difference threshold: an array is pre-created, and the array stores a preset number of differences between adjacent peaks and troughs; the newly calculated difference between the peak and the previous trough or the difference between the trough and the previous peak is updated to the array, and a difference that has expired in relative time is deleted from the array; based on all the differences in the array, a new adaptive difference threshold is obtained by summing and averaging according to a preset coefficient; When a valid peak or trough is detected, the user's step count is incremented by one to accumulate the total number of steps taken by the user using the exercise equipment.

2. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, Before identifying the peaks and troughs in the acceleration waveform data using the peak and trough determination criteria, the process also includes: Perform a shake stabilization test to identify whether the user is using the exercise equipment: If so, the number of steps taken during the anti-shake test will be included in the user's total steps; If not, the step count during the anti-shake test will be reset to zero, and the step counting detection function will be terminated.

3. The step counting method applied to sports equipment usage scenarios according to claim 2, characterized in that, The steps for conducting a shake stabilization test to identify whether a user is using exercise equipment include: When a user triggers the step counting detection function of a smart wearable device, the peaks and troughs on the acceleration waveform data are identified using peak and trough determination conditions within a preset first time period. The validity of the peaks and troughs is then determined using peak validity determination conditions and trough validity determination conditions. The user's steps are counted based on the valid peaks and troughs within the preset first time period. If the number of steps is less than a preset threshold, it is identified that the user is not using exercise equipment; If the number of steps is greater than or equal to a preset threshold, it is identified that the user is using exercise equipment.

4. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, The steps of identifying peaks and troughs in the acceleration waveform data using peak and trough determination conditions, and determining whether a peak or trough is valid using peak validity and trough validity determination conditions, include: Use the valid criteria for peaks and troughs to identify whether a peak or trough is valid: If the peaks or troughs are invalid, they are ignored.

5. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, The criteria for determining the peak are as follows: When the acceleration waveform data is on an upward trend, if the acceleration value at the current sampling moment is increasing, the acceleration value at the next sampling moment is decreasing, and the number of rise points of the acceleration value at the current sampling moment is greater than or equal to a preset first value, then the current sampling moment is considered to be a peak moment, and the corresponding acceleration value is the peak; or When the acceleration waveform data is on an upward trend, if the acceleration value at the current sampling time is in an upward state, the acceleration value at the next sampling time is in a downward state, and the number of climbing points of the acceleration value at the current sampling time is equal to the preset second value, and the difference between the acceleration value at the current sampling time and the previous trough is greater than the initial value of the adaptive difference threshold, then the current sampling time is considered to be the peak time, and the corresponding acceleration value is the peak.

6. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, The conditions for determining the trough are as follows: When the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a decreasing state, the acceleration value at the next sampling time is in an increasing state, and the number of decreasing points of the acceleration value at the current sampling time is greater than or equal to a preset first value, then the current sampling time is considered to be a trough moment, and the corresponding acceleration value is the trough. or When the acceleration waveform data is in a downward trend, if the acceleration value at the current sampling time is in a decreasing state, the acceleration value at the next sampling time is in an increasing state, and the number of decreasing points of the acceleration value at the current sampling time is equal to the preset second value, and the difference between the acceleration value at the current sampling time and the previous peak is greater than the initial value of the adaptive difference threshold, then the current sampling time is considered to be a trough moment, and the corresponding acceleration value is the trough.

7. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, Also includes: The adaptive first threshold and the adaptive difference threshold are updated; Specifically, when a peak is identified, if the time difference between the peak time and the previous trough time is greater than or equal to a preset difference, and the difference between the peak and the previous trough is greater than the initial value of the adaptive difference threshold, then the adaptive first threshold and the adaptive difference threshold are updated.

8. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, The valid criteria for determining a trough include: The first condition is that the trough value is at least less than or equal to the adaptive second threshold. The second condition is that the number of troughs falls by at least more than the preset third value; The third condition is that the time difference between the trough and the previous peak is at least greater than or equal to a preset difference; wherein, the previous peak is at least greater than the previous trough. The fourth condition is that the difference between the previous peak and trough is at least greater than the adaptive difference threshold. A trough is considered valid when it meets all the conditions.

9. The step counting method applied to sports equipment usage scenarios according to claim 8, characterized in that, Also includes: The adaptive second threshold and the adaptive difference threshold are updated; Specifically, when a peak is identified, if the time difference between the peak time and the previous trough time is greater than or equal to a preset difference, and the difference between the peak and the previous trough is greater than the initial value of the adaptive difference threshold, then the adaptive second threshold and the adaptive difference threshold are updated.

10. The step counting method applied to sports equipment usage scenarios according to claim 7 or 9, characterized in that, The adaptive first threshold / adaptive second threshold is updated as follows: Based on the preset coefficients and the latest peaks and troughs, a new adaptive first threshold / adaptive second threshold is calculated. The calculation formula is as follows: , , This represents the new adaptive first threshold / adaptive second threshold. This represents the adaptive first threshold / adaptive second threshold. This indicates the latest peak value. This represents the latest trough value. , This indicates a preset coefficient, and , The value ranges from 0 to 1.

11. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, Also includes: The system monitors the user's total steps in real time, and if the user's total steps do not change within a preset second time period, it recognizes that the user has stopped using the exercise equipment and terminates the step counting function.

12. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, The exercise equipment includes an elliptical trainer, a treadmill, and a rowing machine, and the main axis of the exercise is parallel to the ground and consistent with the direction of the user's arm swing.

13. The step counting method applied to sports equipment usage scenarios according to claim 1, characterized in that, Also includes: The acceleration waveform data is mean filtered using the following formula: , in, Indicates the length of the window. This represents the data after the principal axis data x has been filtered by mean. This represents the data from the i time steps prior to the current time step t.

14. A step counting system applied to sports equipment usage scenarios, characterized in that, include: The data acquisition module is used to acquire the acceleration waveform data of the user's arm along the main axis of motion when the user triggers the step counting detection function of the smart wearable device; The direction of the main axis of motion is at least consistent with the direction of the user's arm swinging forward / backward; The data processing module is used to identify peaks and troughs in the acceleration waveform data using peak and trough determination conditions, and to determine whether a peak or trough is valid using peak validity and trough validity determination conditions. The peak validity determination conditions include: a first condition, the peak value is at least greater than or equal to an adaptive first threshold; a second condition, the number of peak rise points exceeds a preset third value; a third condition, the time difference between the peak moment and the previous trough moment is at least greater than or equal to a preset difference, and the previous trough moment is at least greater than the previous peak moment; a fourth condition, the difference between the peak and the previous trough is at least greater than an adaptive difference threshold; and when the peak satisfies all of these conditions... The peak is considered valid under certain conditions. The adaptive difference threshold is defined as follows: when a peak is detected, and the time difference between the peak and the previous trough is greater than or equal to a preset difference, and the difference between the peak and the previous trough is greater than the initial value of the adaptive difference threshold, the threshold is updated as follows: an array is pre-created, and the array stores a preset number of differences between adjacent peaks and troughs; the newly calculated difference between the peak and the previous trough or the difference between the trough and the previous peak is updated to the array, and a difference that has expired in relative time is deleted from the array; based on all the differences in the array, a new adaptive difference threshold is obtained by summing and averaging according to a preset coefficient. The step counting display module increments the user's step count by one when a valid peak or trough is detected, to accumulate the total number of steps the user takes using the exercise equipment.

15. A smart wearable device, characterized in that, The method includes a processor coupled to a memory storing program instructions, which, when executed by the processor, implement the method of any one of claims 1 to 13.

16. A readable storage medium, characterized in that, Includes a program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 13.

Citation Information

Patent Citations

  • Step counting algorithm based on wave peak and wave trough detection

    CN106767888A

  • Software step counting method based on mobile phone acceleration and distance sensors

    CN107091650A

  • Step number metering method and device, electronic equipment and readable storage medium

    CN117782148A