CN114034313A - Step counting method and device - Google Patents

Step counting method and device Download PDF

Info

Publication number
CN114034313A
CN114034313A CN202111324051.6A CN202111324051A CN114034313A CN 114034313 A CN114034313 A CN 114034313A CN 202111324051 A CN202111324051 A CN 202111324051A CN 114034313 A CN114034313 A CN 114034313A
Authority
CN
China
Prior art keywords
step counting
acceleration
current time
time window
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111324051.6A
Other languages
Chinese (zh)
Other versions
CN114034313B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Transtek Medical Electronics Co Ltd
Original Assignee
Guangdong Transtek Medical Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Transtek Medical Electronics Co Ltd filed Critical Guangdong Transtek Medical Electronics Co Ltd
Priority to CN202111324051.6A priority Critical patent/CN114034313B/en
Publication of CN114034313A publication Critical patent/CN114034313A/en
Application granted granted Critical
Publication of CN114034313B publication Critical patent/CN114034313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
    • G01C22/006Pedometers

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention provides a step counting method and a step counting device, wherein the method comprises the following steps: acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length; preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state. According to the method, the step counting precision of the step counting equipment is improved by analyzing the signal activity, the combined acceleration, the maximum acceleration value and the average acceleration value of the three-axis acceleration data of the step counting equipment in the current time window and then counting the step number of the user.

Description

Step counting method and device
Technical Field
The invention relates to the technical field of electronic information, in particular to a step counting method and device.
Background
Along with wearable electronic equipment's rapid development, the meter step equipment has obtained extensive application, and the user can count up the walking step number in a period through the accelerometer step counting module cooperation meter step algorithm of meter step equipment. The general step counting process is as follows: the method comprises the steps of obtaining an acceleration signal of a user through an acceleration sensor of step counting equipment, generating an acceleration curve according to the acceleration signal, transmitting the acceleration curve to a step counting analysis module of the step counting equipment, and finally counting the number of walking steps of the user in a period of time by the step counting analysis module through a step counting algorithm.
The traditional step counting algorithm mainly counts steps according to the peak-to-valley value of the acceleration curve, namely, when the peak-to-valley value exceeds a preset threshold value, the step counting is started. However, the step-counting algorithm has high sensitivity to the peak-to-valley value of the acceleration curve, and when the acceleration sensor is interfered by external noise, the acquired acceleration curve is easy to have peak staggering or peak due to interference, so that the step-counting accuracy is low. In order to obtain higher step counting precision, the prior art improves the step counting precision by introducing a threshold value of the minimum distance between peaks of an acceleration curve, periodic judgment of the acceleration curve, continuity of the acceleration curve and other constraint conditions, however, in some conventional life scenes (such as driving, playing piano, playing electronic games and the like), the step counting equipment is mistakenly identified due to the fact that the user action has certain regularity but is not necessarily in a walking state, and the step counting precision is still low.
Disclosure of Invention
The invention aims to provide a step counting method and a step counting device, which are used for improving the step counting precision of step counting equipment.
In a first aspect, an embodiment of the present invention provides a step counting method, where the step counting method includes: acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length; preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is indicative of a degree of motion of the step counting device; judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet the preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state; and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the step counting state further includes a wait step counting state; the step of judging the step counting state of the step counting device in the current time window according to the signal activity, the maximum acceleration value and the average acceleration value of the step counting device in the current time window in three axial directions comprises the following steps: judging whether the signal activity of the step counting device in the current time window is greater than a preset first threshold value or not; if so, judging whether the maximum acceleration values of the three axial directions are within a preset second threshold interval or not; if so, inputting the triaxial acceleration data into a pre-trained classification tree model, and outputting a classification result; the classification result is continuous walking or stop walking; if the classification result is continuous walking, determining the step counting state of the step counting equipment in the current time window as a step counting statistical state; and if the classification result is stop walking, determining that the step counting state of the step counting equipment in the current time window is a step waiting state.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the classification tree model is constructed in the following manner: acquiring a training data set; wherein the proportion of walking data, non-walking data and walking and stopping data in the training data set is 3:6: 1; constructing an initial network model of the step counting equipment by using an extreme gradient lifting algorithm; and training the initial network model by using the training data set and taking the preset feature set of the step counting device as a training feature until a preset training condition is reached to obtain a trained classification tree model.
With reference to the second possible implementation manner of the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the preset feature set includes: the pedometer comprises an autocorrelation coefficient of transverse acceleration, a maximum value of the transverse acceleration, a maximum value of longitudinal acceleration, the number of peak points of the longitudinal acceleration, an absolute accumulated value of activity in a maximum interval of combined acceleration and an accumulated value of activity in a maximum interval of 80% of vertical acceleration.
With reference to the first possible implementation manner of the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where if the triaxial acceleration data of the current time window satisfies a preset continuous walking condition, the step of determining that the step counting device is in a step counting statistical state includes: determining the number of wave crests of the combined acceleration in the current time window, the average value of amplitude differences of the wave crests and the wave troughs, the average value of the three-axis acceleration and the waveform shape according to the three-axis acceleration data of the current time window; and if the number of wave crests of the combined acceleration in the current time window is greater than a preset third threshold value, the average value of amplitude differences of the wave crests and the wave troughs is greater than a preset fourth threshold value, the average value of the three-axis acceleration is within a preset range interval, and the waveform shape is a narrow and sharp peak, determining that the step counting equipment is in a step counting statistical state.
With reference to the fourth possible implementation manner of the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where the method further includes: determining the number of wave crests of the combined acceleration in the current time window, the time interval of the wave crests and the wave troughs and the average value of the triaxial acceleration according to the triaxial acceleration data of the current time window; and if the number of wave crests of the combined acceleration in the current time window is less than the third threshold value, the time interval between the wave crest and the wave trough is greater than the preset time length, and the average value of the three-axis acceleration is not in the preset range interval, determining that the step counting equipment is in a step counting waiting state.
With reference to the first aspect, an embodiment of the present invention provides a sixth possible implementation manner of the first aspect, where the method further includes: capturing the wave crest and the wave trough of the acceleration data of the current time window based on the resultant acceleration of the current time window with the step counting state as the step counting statistical state; and determining the step counting number of the step counting equipment according to the captured wave crests and wave troughs.
With reference to the sixth possible implementation manner of the first aspect, the embodiment of the present invention provides a seventh possible implementation manner of the first aspect, wherein the step of determining the step count of the step counting device according to the captured peaks and valleys includes: and determining the number of the captured peaks as the step counting steps of the step counting device in the current time window.
With reference to the sixth possible implementation of the first aspectIn this way, an embodiment of the present invention provides an eighth possible implementation manner of the first aspect, where the step of determining the step count of the step counting device according to the captured peaks and valleys includes: determining the time interval variance and the time interval mean value of adjacent wave crests according to the grabbed wave crests and wave troughs; if the time interval variance and the time interval mean value meet a preset first relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after adding one; if the time interval variance and the time interval mean value meet a preset second relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after subtracting one; the first relation is:
Figure BDA0003346290400000041
the second relation is:
Figure BDA0003346290400000042
wherein, Tp→p+1Representing the time interval from the p-th peak to the p + 1-th peak,
Figure BDA0003346290400000043
means of time interval, σ [ T ], of all neighboring peaks representing the current time windowp→p+1]Representing all neighboring peak time interval variances for the current time window.
In a second aspect, an embodiment of the present invention provides a step counting device, where the device includes: the data acquisition module is used for acquiring triaxial acceleration data of the step counting equipment in a current time window according to the length of a preset window; the data preprocessing module is used for preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting equipment in the current time window; the signal activity is indicative of a degree of motion of the step counting device; the step counting state judging module is used for judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet a preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state; and the step counting module is used for determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
The embodiment of the invention has the following beneficial effects:
the step counting method and the step counting device provided by the embodiment of the invention comprise the following steps: acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length; preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is indicative of a degree of motion of the step counting device; judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet the preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state; and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state. According to the method, the step counting precision of the step counting equipment is improved by analyzing the signal activity, the combined acceleration, the maximum acceleration value and the average acceleration value of the three-axis acceleration data of the step counting equipment in the current time window and then counting the step number of the user.
Additional features and advantages of the present disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the above-described techniques of the present disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a step counting method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another step counting method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a step-counting device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Icon: 31-a data acquisition module; 32-a data preprocessing module; 33-step counting state judgment module; 34-step counting and step counting statistical module; 41-a memory; 42-a processor; 43-bus; 44-communication interface.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
At present, the traditional step counting algorithm mainly counts steps according to the peak-to-valley value of the acceleration curve, that is, when the peak-to-valley value exceeds a preset threshold value, the step counting is started. However, the sensitivity of the traditional step counting algorithm to the peak-valley value of the acceleration curve is very high, and when the acceleration sensor is interfered by external noise, the acquired acceleration curve is easy to have peak staggering or peak due to interference, so that the step counting accuracy is low. In order to obtain higher step counting precision, the prior art improves the step counting precision by introducing a threshold value of the minimum distance between peaks of an acceleration curve, periodic judgment of the acceleration curve, continuity of the acceleration curve and other constraint conditions, however, in some conventional life scenes (such as driving, playing piano, playing electronic games and the like), the step counting equipment is mistakenly identified due to the fact that the user action has certain regularity but is not necessarily in a walking state, and the step counting precision is still low.
Based on this, the embodiment of the invention provides a step counting method and device, so as to improve the step counting precision of step counting equipment. To facilitate understanding of the embodiment, a step counting method disclosed in the embodiment of the present invention will be described in detail first.
Example 1
Fig. 1 is a schematic flow chart of a step counting method according to an embodiment of the present invention, and as shown in fig. 1, the step counting method includes the following steps:
step S101: and acquiring triaxial acceleration data of the step counting equipment in the current time window according to the length of a preset window.
In this embodiment, a time window is preset in advance, and then triaxial acceleration data of the step counting device in the current time window is acquired according to the length of the preset window. And acquiring the triaxial acceleration data through a triaxial acceleration sensor arranged on the step counting equipment.
Step S102: preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is used to indicate the degree of movement of the step-counting device.
In this embodiment, in the prior art, when the acceleration sensor is interfered by external noise, the collected acceleration curve is likely to have a peak error or a peak due to the interference, resulting in a low accuracy rate of step counting. Therefore, the signal activity, the resultant acceleration, the maximum acceleration value and the average acceleration value of the three axial directions of the step counting device in the current time window are obtained by preprocessing the triaxial acceleration data, so that whether the user is in the step counting state or not is further judged, and the step counting accuracy is improved.
Step S103: judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; and if the triaxial acceleration data of the current time window meets the preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state.
In this embodiment, through the signal activity of the current time window under the preset continuous walking condition, the maximum acceleration values in the three axial directions, and the threshold of the acceleration average value, it is further determined whether the user is in the step counting statistical state according to the above parameters, so as to improve the accuracy of step counting.
Step S104: and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
Here, when the step counting device is judged to be in the step counting state through the above judgment, the step counting step number of the step counting device is further determined by the number of the wave crest or the wave trough of the resultant acceleration of the current time window.
The step counting method provided by the embodiment comprises the following steps: acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length; preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is indicative of a degree of motion of the step counting device; judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; if the triaxial acceleration data of the current time window meet the preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state; and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state. According to the method, the step counting precision of the step counting equipment is improved by analyzing the signal activity, the combined acceleration, the maximum acceleration value and the average acceleration value of the three-axis acceleration data of the step counting equipment in the current time window and then counting the step number of the user.
Example 2
On the basis of the flow diagram of a step counting method shown in fig. 1, the present embodiment also provides another step counting method. Fig. 2 is a schematic flow chart of another step counting method according to an embodiment of the present invention.
Step S201: and acquiring triaxial acceleration data of the step counting equipment in the current time window according to the length of a preset window.
Step S202: preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is used to indicate the degree of movement of the step-counting device.
In one embodiment, the signal activity of the step-counting device in the current time window is calculated by the following relation:
Figure BDA0003346290400000091
wherein i is 0, 1, 2 respectively represent the acceleration of the three-axis gravity acceleration data respectively located in the three axes of x, y, z, T is the preset time window time length, T is the signal time coordinate, and activity represents the signal activity.
In one possible embodiment, the step count state further comprises a wait step count state.
Step S203: and judging whether the signal activity of the step counting device in the current time window is larger than a preset first threshold value.
In actual operation, whether the activity is the activity generated by the walking state of the user is judged by presetting a first threshold of the activity, so that errors generated by step counting statistics when the user performs other exercises are avoided.
Step S204: if so, judging whether the maximum values of the accelerations in the three axial directions are within a preset second threshold interval.
In actual operation, for example: the user wears the step counting device to carry out jumping or other strenuous exercise, and the exercise state of the user is a non-walking state. Through step S203, it may be determined that the activity of the triaxial acceleration data of the user is greater than a preset first threshold. Therefore, a second threshold interval is further preset, whether the maximum acceleration values of the three axial directions are within the preset second threshold interval is judged, and if yes, the user is considered to be performing normal walking exercise.
Step S205: if so, inputting the triaxial acceleration data into a pre-trained classification tree model, and outputting a classification result; the classification result is continuous walking or stop walking.
In this embodiment, the classification tree model is constructed through the following steps A1-A4:
step A1: acquiring a training data set; wherein, the proportion of the walking data, the non-walking data and the walking and stopping data in the training data set is 3:6: 1.
Step A2: and constructing an initial network model of the step counting device by using an extreme gradient lifting algorithm.
Step A3: and training the initial network model by using the training data set and taking the preset feature set of the step counting device as a training feature until a preset training condition is reached to obtain a trained classification tree model.
Here, the preset feature set includes: the pedometer comprises an autocorrelation coefficient of transverse acceleration, a maximum value of the transverse acceleration, a maximum value of longitudinal acceleration, the number of peak points of the longitudinal acceleration, an absolute accumulated value of activity in a maximum interval of combined acceleration and an accumulated value of activity in a maximum interval of 80% of vertical acceleration.
Step S206: and if the classification result is continuous walking, determining that the step counting state of the step counting equipment in the current time window is a step counting statistical state.
Further, in a specific implementation, the step S206 further includes: firstly, according to the triaxial acceleration data of the current time window, determining the number of wave crests of the combined acceleration, the average value of amplitude differences of the wave crests and the wave troughs, the average value of the triaxial acceleration and the waveform shape in the current time window. Secondly, if the number of wave crests of the combined acceleration in the current time window is larger than a preset third threshold value, the average value of amplitude differences of the wave crests and the wave troughs is larger than a preset fourth threshold value, the average value of the three-axis acceleration is within a preset range interval, and the waveform shape is a narrow and sharp peak, the step counting device is determined to be in a step counting state.
Step S207: and if the classification result is stop walking, determining that the step counting state of the step counting equipment in the current time window is a step waiting state.
In particular implementation, the method further comprises: firstly, according to the triaxial acceleration data of the current time window, determining the wave crest number, the time interval of the wave crest and the wave trough and the average value of the triaxial acceleration of the combined acceleration in the current time window. Secondly, if the number of wave crests of the combined acceleration in the current time window is smaller than the third threshold value, the time interval of the wave crests and the wave troughs is larger than the preset time length, and the average value of the three-axis acceleration is not in the preset range interval, determining that the step counting equipment is in a step counting waiting state.
Step S208: and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
In one embodiment, the step S208 is realized by the following steps B1-B2:
step B1: and capturing the wave crest and the wave trough of the acceleration data of the current time window based on the resultant acceleration of the current time window with the step counting state as the step counting statistical state.
Step B2: and determining the step counting number of the step counting equipment according to the captured wave crests and wave troughs.
In one embodiment, the number of captured peaks is determined as the number of steps counted by the step counting device in the current time window.
In another embodiment, the number of caught valleys is determined as the number of step counting steps of the step counting device in the current time window.
In actual operation, the step counting step number of the step counting device is determined according to the captured peaks and valleys, and the following steps C1-C3 are further included:
step C1: and determining the time interval variance and the time interval mean of adjacent peaks according to the captured peaks and valleys.
Step C2: and if the time interval variance and the time interval mean value meet a preset first relational expression, determining the step counting number of the step counting equipment in the current time window after adding one to the number of the captured peaks.
Step C3: and if the time interval variance and the time interval mean value meet a preset second relational expression, determining the number of the captured peaks as the number of the step counting steps of the step counting equipment in the current time window after subtracting one. Wherein the first relation is:
Figure BDA0003346290400000111
the second relation is:
Figure BDA0003346290400000112
wherein, Tp→p+1Representing the time interval from the p-th peak to the p + 1-th peak,
Figure BDA0003346290400000113
means of time interval, σ [ T ], of all neighboring peaks representing the current time windowp→p+1]Representing all neighboring peak time interval variances for the current time window.
Further, after determining that the user is in the continuous walking state, the method further includes:
according to T by the following relationnThe three-axis gravity acceleration signal pair T of a preset time window timen+1The period and amplitude of the triaxial gravitational acceleration data are corrected:
MIN_P2V_TIME(new)=MIN_P2V_TIME(last)+ALPHA×(tavg_rtime-MIN_P2V_TIME(last))
MIN_P2V_AMP(new)=MIN_P2V_AMP(last)+BTEA×(tavg_rtime-MIN_P2V_AMP(last))
wherein, TnIndicating the last time window, Tn+1Representing the current time windowMIN _ P2V _ TIME and MIN _ P2V _ AMP represent the minimum TIME difference and the minimum amplitude difference between the peaks and the valleys, respectively, of the intervals; MIN _ P2V _ TIME (new) and MIN _ P2V _ TIME (last) respectively represent the minimum time difference between peaks and valleys in the current time window and the previous time window, MIN _ P2V _ AMP (new) and MIN _ P2V _ AMP (last) respectively represent the minimum difference between peaks and valleys in the current time window and the previous time window, and ALPHA and BETA are weighted weight coefficients of the interval time and the amplitude respectively; t is tavg_rtimeAnd tavg_rampThe average rise time of the peak and the average amplitude of the peak under the current time window are respectively.
Here, the method dynamically corrects the minimum time interval and the minimum amplitude difference between the peak and the valley in the current time window by using the average rising time and the average amplitude of the peak in the previous time window, thereby achieving the effect of adaptive adjustment.
The step counting method provided by the embodiment comprises the following steps: acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length; preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting device in the current time window; the signal activity is indicative of a degree of motion of the step counting device; judging whether the signal activity of the step counting device in the current time window is greater than a preset first threshold value or not; if so, judging whether the maximum acceleration values of the three axial directions are within a preset second threshold interval or not; if so, inputting the triaxial acceleration data into a pre-trained classification tree model, and outputting a classification result; the classification result is continuous walking or stop walking; if the classification result is continuous walking, determining the step counting state of the step counting equipment in the current time window as a step counting statistical state; and if the classification result is stop walking, determining that the step counting state of the step counting equipment in the current time window is a step waiting state. According to the method, after the signal activity, the combined acceleration, the maximum acceleration value and the average acceleration value of the three-axis acceleration data of the step counting device in the current time window are analyzed, the walking state of the user is further judged through the classification tree model, and the step counting precision of the step counting device is further improved.
Example 3
The embodiment of the invention also provides a step counting device. As shown in fig. 3, a schematic diagram of a step-counting device according to an embodiment of the present invention includes:
the data acquisition module 31 is configured to acquire triaxial acceleration data of the step counting device in a current time window according to a preset window length;
the data preprocessing module 32 is configured to preprocess the triaxial acceleration data to obtain signal activity, a resultant acceleration, a maximum acceleration value and an average acceleration value of the pedometer in the current time window; the signal activity is indicative of a degree of motion of the step counting device;
the step counting state judging module 33 is configured to judge a step counting state of the step counting device in the current time window according to the signal activity of the step counting device in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet the preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state;
and the step counting module 34 is configured to determine the step counting number of the step counting device based on the resultant acceleration of the current time window in which the step counting state is the step counting statistical state.
The data acquisition module 31, the data preprocessing module 32, the step counting state judgment module 33, and the step counting step count statistics module 34 are connected in sequence.
In one possible implementation, the step counting state further includes a step waiting state, and the step counting state determining module 33 is further configured to determine whether the signal activity of the step counting device in the current time window is greater than a preset first threshold; if so, judging whether the maximum acceleration values of the three axial directions are within a preset second threshold interval or not; if so, inputting the triaxial acceleration data into a pre-trained classification tree model, and outputting a classification result; the classification result is continuous walking or stop walking; if the classification result is continuous walking, determining the step counting state of the step counting equipment in the current time window as a step counting statistical state; and if the classification result is stop walking, determining that the step counting state of the step counting equipment in the current time window is a step waiting state.
In one possible implementation, the step-counting state determining module 33 is further configured to obtain a training data set; wherein the proportion of walking data, non-walking data and walking and stopping data in the training data set is 3:6: 1; constructing an initial network model of the step counting equipment by using an extreme gradient lifting algorithm; and training the initial network model by using the training data set and taking the preset feature set of the step counting device as a training feature until a preset training condition is reached to obtain a trained classification tree model.
In one possible implementation, the preset feature set includes: the pedometer comprises an autocorrelation coefficient of transverse acceleration, a maximum value of the transverse acceleration, a maximum value of longitudinal acceleration, the number of peak points of the longitudinal acceleration, an absolute accumulated value of activity in a maximum interval of combined acceleration and an accumulated value of activity in a maximum interval of 80% of vertical acceleration.
In one possible implementation manner, the step-counting state determining module 33 is further configured to determine, according to the triaxial acceleration data of the current time window, the number of wave peaks of the combined acceleration in the current time window, an average value of amplitude differences between the wave peaks and the wave troughs, an average value of the triaxial acceleration, and a waveform shape; and if the number of wave crests of the combined acceleration in the current time window is greater than a preset third threshold value, the average value of amplitude differences of the wave crests and the wave troughs is greater than a preset fourth threshold value, the average value of the three-axis acceleration is within a preset range interval, and the waveform shape is a narrow and sharp peak, determining that the step counting equipment is in a step counting statistical state.
In one possible implementation manner, the step-counting state determining module 33 is further configured to determine, according to the triaxial acceleration data of the current time window, a number of wave crests of the combined acceleration, a time interval between the wave crest and the wave trough, and an average value of the triaxial acceleration in the current time window; and if the number of wave crests of the combined acceleration in the current time window is less than the third threshold value, the time interval between the wave crest and the wave trough is greater than the preset time length, and the average value of the three-axis acceleration is not in the preset range interval, determining that the step counting equipment is in a step counting waiting state.
In one possible implementation, the step counting step number statistics module 34 is further configured to capture a peak and a trough of acceleration data of a current time window based on a resultant acceleration of the current time window in which the step counting state is the step counting statistics state; and determining the step counting number of the step counting equipment according to the captured wave crests and wave troughs.
In one possible embodiment, the step counting statistics module 34 is further configured to determine the number of captured peaks as the step counting steps of the step counting device in the current time window.
In one possible implementation, the step counting statistics module 34 is further configured to determine a time interval variance and a time interval mean of adjacent peaks according to the captured peaks and valleys; if the time interval variance and the time interval mean value meet a preset first relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after adding one; if the time interval variance and the time interval mean value meet a preset second relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after subtracting one; the first relation is:
Figure BDA0003346290400000151
Figure BDA0003346290400000152
the second relation is:
Figure BDA0003346290400000153
wherein, Tp→p+1Representing the time interval from the p-th peak to the p + 1-th peak,
Figure BDA0003346290400000154
means of time interval, σ [ T ], of all neighboring peaks representing the current time windowp→p+1]Representing all neighboring peak time interval variances for the current time window.
The step counting device provided by the embodiment of the invention has the same technical characteristics as the step counting method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Example 4
The present embodiments provide an electronic device comprising a processor and a memory, the memory storing computer-executable instructions capable of being executed by the processor, the processor executing the computer-executable instructions to implement the steps of the step-counting method.
Referring to fig. 4, a schematic structural diagram of an electronic device is shown, where the electronic device includes: a memory 41 and a processor 42, wherein the memory stores a computer program capable of running on the processor 42, and the processor implements the steps provided by the step counting method when executing the computer program.
As shown in fig. 4, the apparatus further includes: a bus 43 and a communication interface 44, the processor 42, the communication interface 44 and the memory 41 being connected by the bus 43; the processor 42 is for executing executable modules, such as computer programs, stored in the memory 41.
The Memory 41 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 44 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used.
The bus 43 may be an ISA bus, a PCI bus, an EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
The memory 41 is used for storing a program, and the processor 42 executes the program after receiving an execution instruction, and the method executed by the step counting device according to any of the embodiments of the invention may be applied to the processor 42, or implemented by the processor 42. The processor 42 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by instructions in the form of hardware, integrated logic circuits, or software in the processor 42. The Processor 42 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 41, and a processor 42 reads information in the memory 41 and performs the steps of the method in combination with hardware thereof.
Further, embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by processor 42, cause processor 42 to implement the above-described step counting method.
The step counting method and the step counting device provided by the embodiment of the invention have the same technical characteristics, so the same technical problems can be solved, and the same technical effects can be achieved.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

Claims (10)

1. A step counting method, comprising:
acquiring triaxial acceleration data of the step counting equipment in a current time window according to a preset window length;
preprocessing the triaxial acceleration data to obtain signal activity, resultant acceleration, acceleration maximum and average values of three axial directions of the step counting equipment in a current time window; the signal activity is indicative of a degree of motion of the step counting device;
judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet a preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state;
and determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
2. The step counting method of claim 1, wherein said step counting state further comprises a wait step counting state; the step of judging the step counting state of the step counting device in the current time window according to the signal activity of the step counting device in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions comprises the following steps:
judging whether the signal activity of the step counting equipment in the current time window is greater than a preset first threshold value or not;
if so, judging whether the maximum values of the accelerations in the three axial directions are within a preset second threshold interval or not;
if so, inputting the triaxial acceleration data into a pre-trained classification tree model, and outputting a classification result; the classification result is continuous walking or stop walking;
if the classification result is continuous walking, determining that the step counting state of the step counting equipment in the current time window is a step counting statistical state;
and if the classification result is that the walking is stopped, determining that the step counting state of the step counting equipment in the current time window is a step waiting state.
3. The step counting method according to claim 2, wherein the classification tree model is constructed by:
acquiring a training data set; wherein the proportion of walking data, non-walking data and walking and stopping data in the training data set is 3:6: 1;
constructing an initial network model of the step counting equipment by using an extreme gradient lifting algorithm;
and training the initial network model by using the training data set and taking the preset feature set of the step counting device as a training feature until a preset training condition is reached to obtain a trained classification tree model.
4. The step counting method according to claim 3, wherein the preset feature set comprises:
the step counting device comprises an autocorrelation coefficient of transverse acceleration, a maximum value of the transverse acceleration, a maximum value of longitudinal acceleration, the number of peak points of the longitudinal acceleration, an absolute accumulated value of activity in a maximum interval of combined acceleration and an accumulated value of activity in a maximum interval of 80% of vertical acceleration.
5. The step counting method according to claim 2, wherein the step of determining that the step counting device is in the step counting statistic state if the three-axis acceleration data of the current time window satisfies the preset continuous walking condition comprises:
determining the number of wave crests of the combined acceleration in the current time window, the average value of amplitude differences of the wave crests and the wave troughs, the average value of the three-axis acceleration and the waveform shape according to the three-axis acceleration data of the current time window;
and if the number of wave crests of the resultant acceleration in the current time window is greater than a preset third threshold, the average value of amplitude differences of the wave crests and the wave troughs is greater than a preset fourth threshold, the average value of the three-axis acceleration is within a preset range interval, and the waveform shape is a narrow and sharp peak, determining that the step counting equipment is in a step counting statistical state.
6. The step counting method of claim 5, further comprising:
determining the number of wave crests of the combined acceleration in the current time window, the time interval of the wave crests and the wave troughs and the average value of the triaxial acceleration according to the triaxial acceleration data of the current time window;
and if the number of wave crests of the combined acceleration in the current time window is smaller than the third threshold value, the time interval of the wave crests and the wave troughs is larger than the preset time length, and the average value of the three-axis acceleration is not in the preset range interval, determining that the step counting equipment is in a step counting waiting state.
7. The step counting method according to claim 1, further comprising:
capturing the wave crest and the wave trough of the acceleration data of the current time window based on the resultant acceleration of the current time window with the step counting state as the step counting statistical state;
and determining the step counting number of the step counting equipment according to the captured wave crests and wave troughs.
8. The step counting method according to claim 7, wherein the step of determining the step count of the step counting device based on the caught peaks and valleys comprises:
and determining the number of the captured wave crests as the step counting step number of the step counting equipment in the current time window.
9. The step counting method according to claim 7, wherein the step of determining the step count of the step counting device based on the caught peaks and valleys comprises:
determining the time interval variance and the time interval mean value of adjacent wave crests according to the grabbed wave crests and wave troughs;
if the time interval variance and the time interval mean value meet a preset first relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after adding one;
if the time interval variance and the time interval mean value meet a preset second relational expression, determining the number of the captured wave crests as the number of the step counting steps of the step counting equipment in the current time window after subtracting one;
the first relation is:
Figure FDA0003346290390000031
the second relation is:
Figure FDA0003346290390000032
wherein, Tp→p+1Representing the time interval from the p-th peak to the p + 1-th peak,
Figure FDA0003346290390000033
means of time interval, σ [ T ], of all neighboring peaks representing the current time windowp→p+1]Representing all neighboring peak time interval variances for the current time window.
10. A step counter, comprising:
the data acquisition module is used for acquiring triaxial acceleration data of the step counting equipment in a current time window according to the length of a preset window;
the data preprocessing module is used for preprocessing the triaxial acceleration data to obtain the signal activity, the resultant acceleration, the acceleration maximum and the acceleration average of the step counting equipment in the current time window; the signal activity is indicative of a degree of motion of the step counting device;
the step counting state judging module is used for judging the step counting state of the step counting equipment in the current time window according to the signal activity of the step counting equipment in the current time window, the maximum acceleration value and the average acceleration value in the three axial directions; the step counting state comprises a step counting statistical state; if the triaxial acceleration data of the current time window meet a preset continuous walking condition, determining that the step counting equipment is in a step counting statistical state;
and the step counting module is used for determining the step counting number of the step counting equipment based on the combined acceleration of the current time window with the step counting state as the step counting statistical state.
CN202111324051.6A 2021-11-10 2021-11-10 Step counting method and device Active CN114034313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111324051.6A CN114034313B (en) 2021-11-10 2021-11-10 Step counting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111324051.6A CN114034313B (en) 2021-11-10 2021-11-10 Step counting method and device

Publications (2)

Publication Number Publication Date
CN114034313A true CN114034313A (en) 2022-02-11
CN114034313B CN114034313B (en) 2024-04-02

Family

ID=80137057

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111324051.6A Active CN114034313B (en) 2021-11-10 2021-11-10 Step counting method and device

Country Status (1)

Country Link
CN (1) CN114034313B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023186009A1 (en) * 2022-03-31 2023-10-05 维沃移动通信有限公司 Step counting method and apparatus

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102551735A (en) * 2011-12-31 2012-07-11 北京超思电子技术有限责任公司 Blood oxygen measuring instrument and step counting method
US20160007888A1 (en) * 2014-07-11 2016-01-14 Suunto Oy Wearable activity monitoring device and related method
CN107421560A (en) * 2017-07-31 2017-12-01 青岛真时科技有限公司 A kind of step-recording method, device and wrist type pedometer
CN107462258A (en) * 2017-07-13 2017-12-12 河海大学 A kind of step-recording method based on mobile phone 3-axis acceleration sensor
CN107941236A (en) * 2017-12-05 2018-04-20 广东乐心医疗电子股份有限公司 Step counting method, step counting device and storage medium
CN108981745A (en) * 2018-09-30 2018-12-11 深圳个人数据管理服务有限公司 A kind of step-recording method, device, equipment and storage medium
CN110057380A (en) * 2019-04-30 2019-07-26 北京卡路里信息技术有限公司 Step-recording method, device, terminal and storage medium
CN112484747A (en) * 2020-12-08 2021-03-12 北京小米松果电子有限公司 Step counting method, step counting device and storage medium
US20220362654A1 (en) * 2019-07-05 2022-11-17 Honor Device Co., Ltd. Motion data monitoring method and apparatus

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102551735A (en) * 2011-12-31 2012-07-11 北京超思电子技术有限责任公司 Blood oxygen measuring instrument and step counting method
US20160007888A1 (en) * 2014-07-11 2016-01-14 Suunto Oy Wearable activity monitoring device and related method
CN107462258A (en) * 2017-07-13 2017-12-12 河海大学 A kind of step-recording method based on mobile phone 3-axis acceleration sensor
CN107421560A (en) * 2017-07-31 2017-12-01 青岛真时科技有限公司 A kind of step-recording method, device and wrist type pedometer
CN107941236A (en) * 2017-12-05 2018-04-20 广东乐心医疗电子股份有限公司 Step counting method, step counting device and storage medium
CN108981745A (en) * 2018-09-30 2018-12-11 深圳个人数据管理服务有限公司 A kind of step-recording method, device, equipment and storage medium
CN110057380A (en) * 2019-04-30 2019-07-26 北京卡路里信息技术有限公司 Step-recording method, device, terminal and storage medium
US20220362654A1 (en) * 2019-07-05 2022-11-17 Honor Device Co., Ltd. Motion data monitoring method and apparatus
CN112484747A (en) * 2020-12-08 2021-03-12 北京小米松果电子有限公司 Step counting method, step counting device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023186009A1 (en) * 2022-03-31 2023-10-05 维沃移动通信有限公司 Step counting method and apparatus

Also Published As

Publication number Publication date
CN114034313B (en) 2024-04-02

Similar Documents

Publication Publication Date Title
CN103712632B (en) A kind of step-recording method based on 3 axle accelerometers and pedometer
DK2985572T3 (en) Step counting method and device
US10653339B2 (en) Time and frequency domain based activity tracking system
JP5952511B1 (en) Human body movement state monitoring method and apparatus
CN104406604A (en) Step counting method
CN104713568A (en) Gait recognition method and corresponding pedometer
CN103908259B (en) The monitoring of a kind of Intelligent worn device and human motion and recognition methods
CN107469326B (en) Swimming monitoring method and device for wearable equipment and wearable equipment
CN113963192A (en) Fall detection method and device and electronic equipment
CN108021888A (en) A kind of fall detection method
CN103892840A (en) Intelligent wearing device and method for extracting human body motion features
CN114034313A (en) Step counting method and device
TWI502167B (en) Method for counting step and electronic apparatus using the same
CN103519823A (en) Monitoring method for animal cultivation
CN114440884A (en) Intelligent analysis method for human body posture for intelligent posture correction equipment
CN108195395A (en) Mobile terminal and its step-recording method, storage device
CN109498001B (en) Sleep quality evaluation method and device
US20170311899A1 (en) Apparatus and method for identifying movement in a patient
CN116306766B (en) Wisdom horizontal bar pull-up examination training system based on skeleton recognition technology
CN103826202B (en) Based on the method that mobile phone sensor information improves the bounce of WiFi positioning results
CN117426755A (en) Sleep monitoring method and device and intelligent equipment
CN105760646A (en) Method and device for activity classification
CN109374014B (en) Step counting method, system and mobile device
CN107747950B (en) Step recording method and device
CN113244595B (en) Action explosive force analysis method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant