Specific implementation mode
Below in conjunction with the drawings and examples in the present invention, the technical solution in the present invention is carried out clearly and completely
Description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained without creative efforts
Example, shall fall within the protection scope of the present invention.
The invention discloses a kind of pedometer, the accuracy to carrying out meter step when user's walking or running can be improved.With
It is lower to be described in detail respectively.
Referring to Fig. 1, Fig. 1 is a kind of structural schematic diagram of pedometer disclosed by the invention.As shown in Figure 1, the pedometer
100 may include with lower module:
Acquisition module 101, the 3-axis acceleration for acquiring arms swing according to preset sample frequency.
In the embodiment of the present invention, acquisition module 101 can detect user's arm pendulum by 3-axis acceleration sensor first
Dynamic 3-axis acceleration.Wherein, pedometer can be applied to the intelligent terminals such as Intelligent bracelet, smartwatch, smart mobile phone, this hair
Bright embodiment does not limit.Preset sample frequency can be 40Hz, 50Hz or even 100Hz, and the embodiment of the present invention does not limit.
In the embodiment of the present invention, 3-axis acceleration sensor is that the basic principle based on acceleration goes to realize work, by
It is space vector in acceleration, accurately understands the motion state of object, it is necessary to measures component in three of them reference axis (i.e.
X-axis, y-axis and z-axis).Also, under the occasion for not knowing movement direction of object in advance, only 3-axis acceleration is applied to sense
Device detects acceleration signal.Since 3-axis acceleration sensor is also based on gravity principle, passed with 3-axis acceleration
The inclination angle of twin shaft positive and negative 90 degree or 0~360 degree of twin shaft may be implemented in sensor, and after correction, precision is higher than twin shaft acceleration
It spends sensor and is more than the case where measurement angle is 60 degree.Therefore, 3-axis acceleration be x-axis in 3 d space coordinate, y-axis and
Component of acceleration in z-axis.
It should be noted that the 3-axis acceleration being mentioned in the embodiment of the present invention, reference acceleration, processing acceleration,
The expressions such as characteristic acceleration, validity feature acceleration and target effective characteristic acceleration are acceleration information signal, this hair
Bright embodiment repeats no more.
As an example it is assumed that preset sample frequency is 50Hz, then, within the 1S times, acquisition module 101 can acquire
To 50 3-axis acceleration data.
Processing module 102, the reference acceleration for obtaining the 3-axis acceleration in default acquisition duration, and to the benchmark
Acceleration is smoothed to obtain processing acceleration.
In the embodiment of the present invention, after acquisition module 101 collects 3-axis acceleration, processing module 102 can obtain pre-
If acquiring the reference acceleration value of each group of 3-axis acceleration in duration, then again to benchmark acquired in default acquisition duration
Acceleration is smoothed, and obtains processing acceleration.It should be noted that processing module 102 puts down reference acceleration
Sliding processing can eliminate the noise in default acquisition duration.Wherein, smoothing processing is mainly using neighborhood weighting smothing filtering
Mode is more smooth to make in default acquisition duration reference acceleration signal be formed by waveform, i.e.,:
ACC [i]=ACC [i-2]/9+2*ACC [i-1]/9+ACC [i]/3+2*ACC [i+1]/9+ACC [i+2]/9.
In the embodiment of the present invention, it can be 1s to preset acquisition duration, can also be 2s, can also be that 5s, the present invention are implemented
Example does not limit.
In the specific implementation, processing module 102 obtains the tool of the reference acceleration of the 3-axis acceleration in default acquisition duration
Body mode is mainly:
The square root for calculating the quadratic sum that three axis in default acquisition duration accelerate, to obtain the base of the 3-axis acceleration
Quasi- acceleration.
Specifically, reference acceleration is the resultant acceleration of each group of 3-axis acceleration.Therefore, pedometer can be respectively to pre-
If each group of 3-axis acceleration in acquisition duration calculates the square root of its quadratic sum, so as to obtain each group of three axis
The corresponding reference acceleration of acceleration.I.e.Wherein, ACC_X,
ACC_Y, ACC_Z are respectively the X of pedometer acquisition, Y, the acceleration of Z axis.
First acquisition module 103, it is effectively special for being obtained from the processing acceleration obtained in above-mentioned processing module 102
Levy acceleration.
In the embodiment of the present invention, validity feature acceleration is characteristic acceleration in the processing acceleration in default acquisition duration
Virtual value.Wherein, characteristic acceleration includes peak accelerator and valley acceleration.Therefore, validity feature acceleration can be with
It is interpreted as the virtual value of peak-to-valley value acceleration in processing acceleration in default acquisition duration.It should be noted that the processing accelerates
Validity feature acceleration more than one in degree often occurs in pairs, i.e., effective peak acceleration necessarily corresponds to an effective paddy
It is worth acceleration.
Logging modle 104 is adopted for recording the validity feature acceleration that above-mentioned first acquisition module 103 is got default
Collect the time location in duration.
In the embodiment of the present invention, when the first acquisition module 103 obtained from the processing acceleration validity feature acceleration it
Afterwards, logging modle 104, which can improve, records the time location of each validity feature acceleration.Wherein, the record of logging modle 104 has
Time location of the effect characteristic acceleration in default acquisition duration can be understood as:Each effective peak-to-valley value acceleration is in default acquisition
Time in duration corresponding to present position.
As an example it is assumed that default acquisition duration 2s gets 200 processing acceleration, then the first acquisition module 103
Peak accelerator and valley acceleration can be got from this 200 processing acceleration, to peak accelerator and valley
After acceleration is screened, effective peak acceleration and effective valley acceleration are obtained.Assuming that these effective peaks accelerate
Spending the position handled at this 200 in acceleration is respectively:
The position that effective peak acceleration is handled at this 200 in acceleration has:10、30、52、72、88、130、154、
174 and 195;
The position that effective valley acceleration is handled at this 200 in acceleration has:24,43,67,81,116,147,163 with
And 191.
So logging modle 104 can record these effective peak accelerations and effective valley acceleration in the pre- of 2S
If in acquiring in duration, relative to the time corresponding to 200 processing acceleration present positions.
Determining module 105, for determining the first time window centered on the time location of target signature acceleration.
In the embodiment of the present invention, target signature acceleration is any one in validity feature acceleration, and the present invention is implemented
Example does not limit.Therefore, after the first acquisition module 103 gets validity feature acceleration from the processing acceleration, note
Record module 104 can record time location of the validity feature acceleration in the default acquisition duration, then 105 meeting of determining module
Further determine that with any one validity feature acceleration (i.e. target signature acceleration) in the validity feature acceleration when
The first time window centered on the time point corresponding to position on countershaft, the first time window are preset one
Time window minimum value, and the duration of the first time window is less than default acquisition duration, can be 1s, or 2s,
It can also be minimum single step duration etc., the embodiment of the present invention does not limit.
In the embodiment of the present invention, target signature acceleration can be the peak accelerator in validity feature acceleration, also may be used
To be the valley acceleration in validity feature acceleration, the embodiment of the present invention does not limit.
Computing module 106, for calculating in the processing Acceleration pulse and the second time window in the first time window
Processing Acceleration pulse similarity.
In the embodiment of the present invention, first time window is adjacent with the second time window present position, and the first time window
The duration of mouth is equal with the duration of second time window.Therefore, which can be with position residing for the target signature acceleration
Centered on the time point set, using the half of first time window as time radius, obtains and handle acceleration in first time window
Waveform, then slide first time window (obtaining the second time window), and obtain the second time window in processing accelerate
The waveform of degree, then computing module 106 calculate both waveform similarity.
Specifically, computing module 106 calculates the processing Acceleration pulse and the second time window in the first time window
The similarity of interior processing Acceleration pulse can be understood as:Computing module 106 is with the target signature acceleration present position
Centered on time point, using the half of first time window as time radius, according to first time window duration from left to right according to
Similarity between the secondary processing acceleration wavelength calculated in default acquisition duration.
First judgment module 107, for according to the similarity, judging whether the processing acceleration has periodically.
In the embodiment of the present invention, after above-mentioned computing module 106 calculates similarity, the first judgment module 107 can root
Judge whether the processing acceleration in default acquisition duration has periodically according to the similarity.That is, working as similarity ratio
When higher, the first judgment module 107 is assured that the processing acceleration has periodically, wherein periodicity here
It can refer to reliable double periodicity;When similarity-rough set is low, the first judgment module 107 be assured that this first when
Between window duration be not the processing acceleration gait cycle.
In the embodiment of the present invention, the first judgment module 107 calculates similarity and judges that the processing accelerates according to similarity
The periodic mode of degree can be understood as:
First judgment module 107 arbitrarily chooses two adjacent waveform segments in handling acceleration and calculates its related coefficient, by
It is small that waveform position is gradually converted by left and right to waveform length (i.e. time window duration) is gradually increased greatly, when related coefficient and
It when waveform length reaches the parameter and standard of setting, that is, stops search, waveform length at this time corresponds to gait cycle.To avoid week
Period caused by property once in a while or falseness peak valley point that phase captures judges by accident, need to further carry out period verification.
In the processing acceleration, using the gait cycle got statistical testing of business cycles successively from left to right, if statistical result
Reach specified value.The parameter foundation that cycle length at this time is just walked as next step period meter.
In the specific implementation, (1) determines the effective range of gait cycle.
Normally natural cadence is 95~125 steps/min for each person, in the case where sample frequency is 50Hz, normally for each person
Single step sampling length is [24~32], in the case of natural cadence, the existence form in period:
Monocycle:T1,2 × T1 ... ..., N1 × T1, minimum period include step number 1;
Binary cycle:T2,2 × T2 ... ..., N2 × T2, minimum period include step number 2;
Multicycle:T3,2 × T3 ... ..., N3 × T3, minimum period include that step number is unknown;Wherein T1, T2, T3 are respectively three
The minimum positive period of kind situation.
In the case that monocycle is present in wearer's arms swing very standard or in the case of running.In fact, natural
Under cadence, the state of wearer's walking loosens formula more, and swinging arm is mostly the pendulum model in non-critical meaning, and each
Wearer has been substantially all its independent swing arm custom, and walking rule at this time exists mostly in the form of binary cycle;Multicycle is then
Periodic abnormal gait, situation is rare, is not in be sentenced by cycle length in the later stage when default acquisition duration is smaller
It is disconnected to be excluded.Monocycle situation can also be included in binary cycle or multicycle situation, can be by controlling minimum search length from double
Period, therefore for later stage convenience of calculation and most cases are taken into account, binary cycle situation is only judged in calculating process.
According to normally single step sampling length for each person, sampling length [48~64] shared by normal two-step for each person can be defined,
Namely the effective range of walking binary cycle correspondingly;It is found in statistical test, the regularity of running is stronger compared with walking, just
Ordinary person's nature running cadence that is averaged is 150~190 steps/min, and sampling length shared by its corresponding two-step of same sample frequency is
[32~40], so the effective range of binary cycle can be according to normally the two-step sampling length of running cadence is suitably put naturally for each person
It is wide.
(2) the first time window of binary cycle is determined.
Binary cycle search length CYCLE_WINDOW should be located at certain interval range [minimum value, maximum value], minimum value
It should be greater than the maximum sampling length under nature cadence shared by normal single step for each person and be less than shared by normal two-step for each person most
Small sampling length, i.e. minimum value should be located in (32~48).Maximum value should be greater than the maximum sampling shared by normal two-step for each person
Length and less than the minimum sampling length shared by normal three steps for each person, i.e. maximum value should be located in (64~72), particularly under
The effective range that limit can refer to binary cycle is bound.
(3) similarity of Acceleration pulse is handled by first time window calculation.
The starting point PEAK [k], progressive acquisition first time window W of first time length of window statistics are determined first
(k)=[W1 (k), W2 (k) ... Wn (k)].To obtain the cycle length of binary cycle, minimum first time window is from two
The spacing of peak accelerator starts, i.e. W1 (k) is corresponding between three peak-to-peak value acceleration of peak accelerator sequence after starting point
Away from average headway.N+2 peak-to-peak value acceleration of peak accelerator sequence is flat after the gradual incrementally statistics starting points of Wn (k)
Equal spacing.
After obtaining Wn (k) every time, corresponding internal adjacent waveforms section ACC1 and ACC2 are found, it is similar then to calculate its
Degree:
ACC1←(ACC[i]-DataMeani←VALLEY[k+n]-Wn(k)to VALLEY[k+n])
ACC2←(ACC[i]-DataMeani←VALLEY[k+n]to VALLEY[k+n]+Wn(k))
For (int i=VALLEY [k+n]-Wn (k);i<VALLEY[k+n];i++)
{
A+=ACC1 [i] × ACC2 [i+Wn (k)];
B+=ACC1 [i] × ACC1 [i];
C+=ACC2 [i+Wn (k)] × ACC2 [i+Wn (k)];
}
Rn (k)=A/ (sqrt (B × C));// calculate related coefficient.
Base=abs ((ACC12_MAX+ACC12_MIN)/(ACC12_MAX-ACC12_MIN));
Wherein, PEAK [k] and VALLEY [k] sequence are respectively the peak valley position of resultant acceleration, and DataMean is parent signal
The mean value of section ACC, ACC12_MAX-ACC12_MIN are the maximin of two subsignal sections ACC1, ACC2;Base is that two sons are believed
Departure degree of the number section relative to baseline.
Complete progressive time window sequence processing acceleration similarity calculating after, find out similarity it is maximum when
Between window, i.e.,:
R (k)=[R1 (k), R2 (k) ... Rn (k)];
Rmax=max (R (k));
If Rmax and corresponding Base meet certain threshold accuracy condition and Wn (k) is located at the effective of binary cycle
In range, then terminate to search, corresponding Wn (k) is gait cycle length.
The judgment condition of gait cycle is:
ifRmax>0.9&&BaseMark<1then judges Wn (k) length
else if Rmax>0.8&&BaseMark<0.8then judges Wn (k) length
else if Rmax>0.7&&BaseMark<0.6then judges Wn (k) length
If not finding the Wn (k) of the condition of satisfaction, returns to the position for starting to move starting point PEAK [k] and continue to search for, directly
The section of parent signal section is overflowed to PEAK [k] or ACC1, ACC2.Parameter in above-mentioned judgment condition is the present invention according to reality
Statistical test is constantly adjusted and is defined, since its resolution ratio and sample frequency of different acceleration transducers can be not quite similar,
Therefore actual threshold parameter should do corresponding adjustment according to actual conditions, and the embodiment of the present invention does not limit.
(4) period is verified
If the gait cycle that previous step obtains exists, and there are consistency with signal amplitude for gait cycle, then need this
Gait cycle moves the statistical testing of business cycles that starting point carries out the period as sliding window successively, if most of statistical result is attained by
Very high similarity, cycle length at this time just can be used as the period meter step that gait cycle enters next step.
In present example, the signal amplitude variation of cadence of walking naturally to the processing acceleration of running cadence naturally is bright
It is aobvious, according to the effective breadth distribution statistics cloth of processing acceleration define one walk naturally cadence to running cadence naturally effective width
Spend threshold value.
If the effective breadth of corresponding processing acceleration meets above-mentioned effective breadth threshold condition under current gait cycle,
Carry out period verification.
The period specific implementation process of verification is as follows:
ACC1 starting points:Begin1=0;Signal length:Length1=Gait_Cycle;
ACC2 starting points:Begin2=Gait_Cycle;Signal length:Length2=Gait_Cycle;
The degree of correlation for calculating ACC1 and ACC2 subsignals, then moves the position of Begin1 and Begin2, moving step length
It can freely set, for example, moving step length can be set to a quarter of Gait_Cycle.After calculating from left to right, if full
The number of sufficient verification condition and the ratio of total verification item number meet the threshold value of setting, and Gait_Cycle at this time can be used as reliably
Binary cycle length carry out the period meter step.
Pedometer module 108, for when the first judgment module 107 judges that the processing acceleration has periodical, by this
The duration of first time window is determined as gait cycle, and carries out meter step to the processing acceleration to obtain according to the gait cycle
Multiple effective steps.
In the embodiment of the present invention, when the first judgment module 107 judges that the processing acceleration has periodical, meter step mould
Block 108 to the processing acceleration will walk in terms of gait by the when a length of gait cycle of the first time window.It needs to illustrate
, for pedometer module 108 when carrying out period meter step, the meter step number amount in a gait cycle is 2, that is to say, that, it is assumed that
In default acquisition duration, the gait cycle for handling acceleration has 3, then meter step number amount should be 6 accordingly.Carrying out gait
When period meter step, the step number in default acquisition duration is all considered as effective step.
In the embodiment of the present invention, pedometer is after collecting the 3-axis acceleration of arms swing, when can be acquired to presetting
The reference acceleration of 3-axis acceleration is smoothed to obtain processing acceleration in long, is obtained from the processing acceleration effective
Characteristic acceleration, and time location of the validity feature acceleration in default acquisition duration is recorded, it determines with the validity feature
First time window centered on the time location of target signature acceleration in acceleration, according to the place in first time window
The similarity for managing the processing Acceleration pulse in Acceleration pulse and the second time window, judges whether the processing acceleration has
Reliable double periodicity, if so, the duration of the first time window is determined as gait cycle, and according to the gait cycle to this
It handles acceleration and carries out gait meter step.Through the embodiment of the present invention, pedometer can screen processing acceleration, and it is invalid to reject
Characteristic acceleration, then again by progressive lookup method search in the preset duration handle acceleration gait cycle, press
Meter step is carried out to user movement according to gait cycle, the error count of meter step or leakage meter feelings when to user's walking or running can be reduced in this way
Condition improves meter step accuracy.
Referring to Fig. 2, Fig. 2 is the structural schematic diagram of another pedometer disclosed by the invention.Wherein, meter shown in Fig. 2
Step device 100 is to optimize on the basis of pedometer 100 shown in Fig. 1 to obtain.As shown in Fig. 2, the pedometer can also include:
In the embodiment of the present invention, the first acquisition module 103 may include first acquisition unit 1031 and screening unit
1032, wherein:
First acquisition unit 1031, for according to preset time window, characteristic acceleration to be obtained from the processing acceleration.
Screening unit 1032 obtains this feature and adds for being screened to this feature acceleration according to default screening rule
Validity feature acceleration in speed.
Specifically, the concrete mode that first acquisition unit 1031 obtains characteristic acceleration from the processing acceleration can be with
For:First acquisition unit 1031 searches method according to 5 points first and seeks handling the peak valley acceleration in acceleration respectively, if for example,
ACC [i+2] is the maximum for meeting condition in { ACC [i] ACC [i+1] ACC [i+2] ACC [i+3] ACC [i+4] }, then can be first
It is the local peaking's acceleration handled in acceleration, i.e. characteristic acceleration to walk true ACC [i+2].Determining local peak valley acceleration
It spends after (characteristic acceleration), first acquisition unit 1031 can carry out neighborhood to local peak valley acceleration successively and most be worth verification, if
Some peak accelerator is in left and right neighborhood-N0+~N0Interior and non-process acceleration most value, then deleted, if so, giving
To retain.Wherein, neighborhood is most worth the radius length N of verification0Need the length according to effectively step time window (i.e. preset time window)
It spends to determine, show that the length of effectively step time window is usually 0.2s~2s according to a large number of experiments.It is 50Hz in sample frequency
In the case of, the sampling length for effectively walking time window is just [10~100], and radius of neighbourhood N0=WINDOW_MIN/2, i.e.,
The effectively half of the minimum length of step time window.In fact, since step number detection is easy to be interfered by noise, the time is effectively walked
The setting of window can suitably be loosened, and according to multiple test analysis, effectively walk time window and may range from [15~100], this hair
Bright embodiment does not limit.
Specifically, after first acquisition unit 1031 gets the characteristic acceleration in processing acceleration, screening unit
1032 can screen these characteristic accelerations according to screening rule is preset, to obtain validity feature acceleration.Screening unit
1032 can be according to the concrete mode that screening rule screens characteristic acceleration is preset:
For two peak accelerators of arbitrary neighborhood in this feature acceleration, judge between the two neighboring peak accelerator
The first interval duration whether be less than default minimum single step duration;
If the first interval duration is less than the default minimum single step duration, retain number in the two neighboring peak accelerator
It is worth maximum peak accelerator;
If the first interval duration is greater than or equal to the default minimum single step duration, judge that the two neighboring peak value accelerates
It whether there is a valley acceleration between degree;
If there are valley acceleration between the two neighboring peak accelerator, by the two neighboring peak accelerator and
The valley acceleration is determined as validity feature acceleration;
If valley acceleration is not present between the two neighboring peak accelerator, retain the two neighboring peak accelerator
The middle maximum peak accelerator of numerical value;
Valley acceleration between the peak accelerator of reservation and the peak accelerator of the reservation is determined as effective spy
Levy acceleration.
In the specific implementation, default minimum single step duration is that basis largely tests the minimum single step duration obtained.Therefore, it screens
Unit 1032 successively can repeatedly screen this feature acceleration.Screening unit 1032 first sieves characteristic acceleration
Choosing, judges whether the first interval duration between two peak accelerators of arbitrary neighborhood is less than default minimum single step duration successively,
If the first interval duration is less than default minimum single step duration, it is maximum just to retain numerical value in the two neighboring peak accelerator
Peak accelerator rejects the peak accelerator of numerical value minimum in the two neighboring peak accelerator, then again with other adjacent peaks
It is worth acceleration repeatedly relatively screen, until until first interval, duration is more than default minimum single step duration;If this
As soon as being spaced duration is more than default minimum single step duration, screening unit 1032 is to remaining characteristic acceleration is again after screening
It is screened, judges to whether there is a valley acceleration between the two neighboring peak accelerator, if the two neighboring peak
Have between value acceleration and only there are one valley acceleration, just adds the two neighboring peak accelerator and the valley between it
Speed is determined as validity feature acceleration;If not having valley acceleration between the two neighboring peak accelerator, just retaining should
The maximum peak accelerator of numerical value in two neighboring peak accelerator rejects numerical value minimum in the two neighboring peak accelerator
Then peak accelerator is screened again, until have between the two neighboring peak accelerator and only there are one valley accelerate
Until degree is long.
In the specific implementation, method and peak value that screening unit 1032 screens the valley acceleration in characteristic acceleration
The screening technique of acceleration is identical, and details are not described herein for the embodiment of the present invention.Screening unit 1032 to peak accelerator and
It when valley acceleration is screened, can be carried out at the same time, can also first screen peak accelerator, then screen valley acceleration, this
Inventive embodiments do not limit.
In the embodiment of the present invention, which may include:
Second judgment module 109, for judging whether the effective breadth that computing module 106 calculates is effective more than default
Amplitude.
Wherein, computing module 106 are additionally operable to first acquisition unit 1031 in the first acquisition module 103 from the processing
After getting characteristic acceleration in acceleration, according to this feature acceleration, the effective breadth of the processing acceleration is calculated.
Specifically, when first acquisition unit 1031 gets the characteristic acceleration of processing acceleration in the default acquisition duration
Later, computing module 106 can calculate the amplitude of the processing acceleration by characteristic acceleration (i.e. peak-to-valley value acceleration), then
The effective breadth for taking the processing acceleration amplitude, as the amplitude of certain amount characteristic acceleration should in duration as default acquire
Handle the effective breadth of acceleration.
Specifically, why computing module 106 calculates the effective breadth of the processing acceleration, if being because the processing accelerates
Degree is the acceleration signal that user generates under motion state, then may have noise or interference in the processing acceleration
Signal, so comprising characteristic information largely can all concentrate on a tentering of processing acceleration in the default acquisition duration
It spends in range, the data for being more than the amplitude range may be the acceleration signal under noise signal or other non-athletic states.
In the embodiment of the present invention, after computing module 106 calculates the effective breadth of the processing acceleration, second judges
Module 109 will judge whether the effective breadth is more than default effective breadth.The default effective breadth is by largely testing
The minimum effective breadth gone out.If the effective breadth is more than default effective breadth.The pedometer 100 is assured that out the processing
Acceleration information signal is valid data signal, and not noise signal or the acceleration signal of non-athletic generation, therefore, really
Cover half block 105 will be obtained from time location of the validity feature acceleration that logging modle 104 records in default acquisition duration
The time location of target signature acceleration is taken, when then determining first centered on the time location of the target signature acceleration
Between window;If the effective breadth is less than default effective breadth, indicate that there is no include movement in the processing acceleration
The characteristic information of state elder generation, therefore invalid data-signal can be considered as, when then processing module 102 can reacquire default acquisition
The reference acceleration of the 3-axis acceleration in long, and the reference acceleration is smoothed to obtain processing acceleration.
As a kind of feasible embodiment, it is default effective to judge that the effective breadth is more than in second judgment unit 109
After amplitude, which can also be performed following operation:
A) the validity feature acceleration filtered out according to screening unit 1032 calculates the series of features ginseng of the processing acceleration
Number carries out quality evaluation according to characteristic parameter to the processing acceleration.
In the specific implementation, the concrete mode that pedometer 100 carries out the processing acceleration quality evaluation can be:
A) validity feature acceleration is obtained respectively according to the position of the amplitude of validity feature acceleration and validity feature acceleration
The amplitude criteria difference of degree and the separation criteria of validity feature acceleration are poor.
Specifically, pedometer 100 obtain the validity feature acceleration amplitude criteria difference and separation criteria difference mode such as
Under:
Corresponding amplitude sequence and pitch sequence are obtained according to validity feature acceleration first, then pass through standard meter
It calculates formula and obtains corresponding standard deviation.
Amplitude sequence:RANGE[k]←ACC[PEAK[k]]-ACC[VALLEY[k]]
Pitch sequence:
INTERVAL [k] ← PEAK [k+1]-PEAK [k] and VALLEY [k+1]-VALLEY [k]
Wherein PEAK [k] and VALLEY [k] is respectively the time location of validity feature acceleration, ACC [PEAK [k]] and
ACC [VALLEY [k]] is respectively the amplitude size of validity feature acceleration;
B) it is scored the processing acceleration according to amplitude criteria difference and separation criteria difference.
DATA_SCORE=100 (1-RANGE_STD/RANGE_MEAN) × (1-INTERVAL_STD/INTERVAL_
MEAN)
Wherein RANGE_STD and RANGE_MEAN is respectively the amplitude criteria difference and amplitude equalizing value of validity feature acceleration,
INTERVAL_STD and INTERVAL_MEAN is respectively the separation criteria difference and spacing mean value of validity feature acceleration.
Aforesaid operations are to carry out ranking for processing acceleration, judge the central tendency of the processing acceleration and good and bad journey
Degree.
B) judge whether the series of features parameter meets preset condition threshold, if so, determining module 105 execute determine with
First time window centered on the time location of the target signature acceleration;If it is not, the pedometer 100 does not do any operation.
The setting of score threshold is that basis is effectively treated the fractional statistics of acceleration and defines, and the embodiment of the present invention does not limit
It is fixed.
As a kind of feasible embodiment, the first judgment module 107 may include that judging unit 1071, first determines list
Member 1072 and adding unit 1073, wherein:
Judging unit 1071, for judging whether 106 calculated similarity of computing module is more than default similarity threshold.
First determination unit 1072, for judging that the similarity is more than default similarity threshold in above-mentioned judging unit 1071
When value, determine that the processing acceleration has periodically.
Above-mentioned judging unit 1071 is additionally operable to when judging that the similarity is less than default similarity threshold, and judging should
Whether the duration of first time window is more than time window duration threshold value.
Adding unit 1073, for when above-mentioned judging unit 1071 judges that the duration of the first time window is less than
Between window duration threshold value when, the duration of the first time window increases target duration, and triggers computing module 106 and execute that calculate should
The operation of the similarity of processing Acceleration pulse in processing Acceleration pulse and the second time window in first time window.
Above-mentioned first determination unit 1072 is additionally operable to when above-mentioned judging unit 1071 judges the first time window
When length is more than time window duration threshold value, determine that the processing acceleration does not have periodically.
In the specific implementation, calculating the processing Acceleration pulse and second in the first time window in computing module 106
After the similarity of processing Acceleration pulse in time window, judging unit 1071 can judge whether the similarity is more than default
Similarity threshold.If the similarity is more than the default similarity, judging unit 1071 can be successively with the first time window
Mouth verifies the period of the processing acceleration, if the above default similarity of most of similarity, then first determines list
Member 1072 is assured that the processing acceleration has reliable double periodicity, to which pedometer module 108 can determine the processing
The gait cycle of acceleration is the duration of the first time window;If the similarity is less than the default similarity, increase
Add unit 1073 that can the duration of the first time window be increased target duration, then triggers computing module 106 again to increase
Add the first time window after target duration to calculate the similarity in each period between processing Acceleration pulse.
Optionally, when judging unit 1071 judges that the similarity is less than default similarity, 1071 meeting of judging unit
Further judge whether the duration of the first time window is more than time window duration threshold value, wherein the time window duration threshold
Value can refer to the seeking scope of binary cycle, and the seeking scope of the binary cycle is effective single step step-length in strict accordance with natural cadence
It extrapolates, is limited to as follows (32~48), the upper limit is (64~72) etc., and the embodiment of the present invention does not limit.Judging unit 1071
It can also judge whether the corresponding waveform terminal of the second time window is more than default acquisition duration.If the first time window
Duration is more than the seeking scope of binary cycle or the corresponding waveform terminal of the second time window is more than default sampling duration, is indicated that
The processing acceleration does not have reliable double periodicity, then pedometer module 108 will be according to each validity feature acceleration (i.e. peak
Valley acceleration) time of present position in default acquisition duration, peak valley meter step is carried out to the processing acceleration, such as in the time
It can be determined as a step, therefore, Yong Hu between two peak accelerators on axis corresponding to two adjacent time points of position
Meter step number amount in default acquisition duration can add 1;If the duration of the first time window is less than the lookup of the binary cycle
Range or the corresponding waveform terminal of the second time window are less than default sampling duration, adding unit 1073 will by this first
The duration of time window increases target duration, and then judging unit 1071 is again examined the first time window after increase by left and right
The similarity between processing Acceleration pulse is tested, twice until the duration of the first time window is greater than or equal to default acquisition
Until duration, if similarity degree both less than presets always similarity, the first determination unit 1072 is assured that out should
It handles acceleration and does not have reliable double periodicity;If after the duration of the first time window is increased target duration, judged
Unit 1071 is again by the processing Acceleration pulse phase of the processing Acceleration pulse and the second time window of the first time window
It is compared with default similarity like degree, when obtaining the similarity than or equal to default similarity, the first determination unit 1072
It is determined that the processing acceleration has periodically.
In the specific implementation, target duration mainly is increased to the duration of first time window in a manner of progressive lookup, from
And judge the processing acceleration whether have stronger regularity.
As an example it is assumed that in the default acquisition duration of 5s, processing module 102 is by the smooth filter to 3-axis acceleration
Wave processing has got 500 processing acceleration, has been handled in acceleration at this 500, the first acquisition module 103 has been got
It includes effective peak acceleration and effective valley acceleration to imitate characteristic acceleration, shares 100, then 104 meeting of logging modle
It records this 100 validity feature acceleration and handles location in acceleration at 500, and according to its present position, obtain
To time point on a timeline.When the first judgment module 107 judges the processing acceleration obtained in this 5s in binary cycle
Do not have within seeking scope it is proper periodical or without it is periodical when, pedometer module 108 will with this 100
The location of a validity feature acceleration carries out peak valley meter step.Specifically by judge between validity feature acceleration when
Between interval it is whether consistent with the amplitude of variation of validity feature acceleration and determine whether that meter walks, if between effective characteristic acceleration
Time interval it is consistent with the amplitude of variation of validity feature acceleration, indicate that and meet meter step item between the validity feature acceleration
Part.The variable quantity that each step acceleration is represented per the amplitude of variation of a pair of effectively peak-to-valley value, for same wearer, with
Its acceleration of the variation of each step time window can also change, the variation width of its smaller effective peak-to-valley value of single step time window
Degree is bigger, otherwise smaller.Each group of single step time interval [WINDOW~WINDOW+DELTA] has it corresponding in pedometer module
Single step amplitude threshold PEAK_VALLEY_RANGE.Wherein, the upsample length DELTA of each group of single step time interval can be with
It is 3, can also be 5, corresponding adjustment can be done according to actual conditions, the specific of single step amplitude threshold determines that method is according to wearing
In person's motion process under different movement velocitys the changing rule of acceleration and set, the embodiment of the present invention does not limit.
For example, if the amplitude of two adjacent validity feature acceleration its effective peak-to-valley values of position met between the corresponding time
Single step amplitude threshold under, then this adjacent two it is effective be denoted as a step between peak-to-peak value or paddy valley, present position it
Between between be divided into time of a step, otherwise, smaller that of validity feature acceleration amplitude does not enter meter step.
In the embodiment of the present invention, pedometer module 108, for judging the processing acceleration not in the first judgment module 107
When with reliable double periodicity, the processing is accelerated according to time location of the validity feature acceleration in default acquisition duration
Degree carries out meter step.
As a kind of feasible embodiment, the pedometer module 108 is according to validity feature acceleration in default acquisition duration
Interior time location to the processing acceleration carry out meter step concrete mode may include:
Judge whether the second interval duration in validity feature acceleration between two peak accelerators of arbitrary neighborhood is less than
Equal to default maximum single step duration;When duration is less than or equal to the default maximum single step duration when second interval, judge that two have
Whether the time interval imitated between peak-to-peak value is consistent with the amplitude of variation of effective peak-to-valley value, and the two neighboring peak is determined if consistent
It is worth between acceleration and is effectively walked for one, otherwise, smaller a pair of of the peak-to-valley value of amplitude does not enter meter step, need to find another and its
Larger that of adjacent effective peak-to-valley value and amplitude judges effective peak-to-valley value;When the second interval duration is default more than this
When maximum single step duration, determine between the two neighboring peak accelerator as an invalid step.
Specifically, pedometer module 108 when carrying out peak valley meter step, can judge between each adjacent two peak accelerator when
Between be spaced, if the time interval has been more than preset maximum single step duration, determine that the two neighboring peak accelerator
Between meter step be an invalid step.Opposite, if the time interval is less than preset maximum single step duration, just sentence
Whether the time interval between the two neighboring peak accelerator of breaking is consistent with the amplitude of variation of effective peak-to-valley value and determines whether
Meter step between the two neighboring peak accelerator is considered as an effectively step.
In the embodiment of the present invention, which can also include:
Step number determining module 111, by obtaining step data based on pedometer module 108, when effectively step is a in the meter step data
When number reaches the first quantity, fixed effective step is added in meter step number amount;It is reached when walking number in vain in the meter step data
It is cumulative without step number when to the second quantity or effectively step number is not up to the first quantity, it continually looks for effectively walking and invalid
Step.
In the embodiment of the present invention, the first quantity is more than the second quantity, which can be 5 or 4, the second number
Amount can be 2, and the embodiment of the present invention does not limit.It therefore, should after pedometer module 108 is determined effectively to walk and walk in vain
Step number determining module 111 can obtain the meter step data of pedometer module 108, and total step is counted to be counted to obtain to step data in terms of this
Quantity.
For example, step number determining module 111 carries out step number when determining, when count effectively walk number in step data and reach 5 when,
This 5 effectively steps can be included in step number amount by the step number determining module 111, and enter the pattern of determination.Step number determining module
111 enter after determining pattern, one or 2 effectively step often occur, will meter step number amount be added 1 or plus 2.When counting in step data
When invalid step number reaches 2 or when effectively step number is less than 5, which will enter search pattern, because
This, under search pattern, which will not carry out meter step to effectively walking, therefore, the meter step number under search pattern
Amount can remain unchanged.In this way, which can obtain a total step number amount, the total step number
Amount can be considered as meter step number amount of the user under actual motion state.
In the embodiment of the present invention, after step number determining module 111 is determined to amount to step number amount, which can be with
The length that strides that user runs under state or ambulatory status is obtained according to the height of the user of default storage, so as to calculate
Go out the speed of user movement, that is, the product between the long and step number of unit interval that strides.When the total time for getting user movement
When, so that it may to be obtained at a distance from user movement according to product of the speed of movement between total time.
Further, which can also be according to consuming under the distance of user movement and various motion states
Calorie determine the calorie total flow during user movement.Under user's running state, calorie in the unit interval
Consumption=1.25* velocities.The mode embodiment of the present invention for calculating calorie total flow does not limit.Finally counting
It, can will after step device 100 obtains these data such as motion state, move distance, movement velocity, calorie consumption amount of user
These data are uploaded to user terminal by wireless networks such as bluetooth, NFC or cloud server is backed up.
Again for example, referring to Fig. 3, waveform diagram when Fig. 3 is a kind of pedometer meter step disclosed by the invention.Such as
Shown in Fig. 3, after collecting the 3-axis acceleration in default acquisition duration such as 5s, processing module 102 can incite somebody to action acquisition module 101
3-axis acceleration carries out that reference acceleration is calculated, and (a) and figure (b) are schemed in the waveform such as Fig. 3 between each reference acceleration
Reference acceleration waveform, then again to these reference acceleration waveforms carry out the disposal of gentle filter, obtain it is respective processing plus
Speed.First acquisition module 103 can find out characteristic acceleration, i.e. oscillogram in handling acceleration in such a way that neighborhood is verified
In peak-to-valley value, then screened to obtain effective peak-to-valley value to the peak-to-valley value found again, logging modle 104 and recording has
Time location of the peak-to-valley value in default acquisition duration is imitated, if A, B, C, M, N point in Fig. 3 are effective valley point, i.e. paddy
It is worth acceleration.Assuming that user during the motion, has swing arm interference, and the first acquisition module 103 is in default acquisition duration
Peak-to-valley value when being screened, as schemed D points, E points and F points in (a), it is assumed that the F point peak values that swing arm is interfered and generated do not screen
Go out, thus pedometer found by first time window the processing acceleration in the default acquisition duration gait cycle it
Afterwards, during carrying out period meter step, the peak interferences of F points does not interfere with meter step as a result, therefore, can be with by period meter step
Avoid influence of the disturbing acceleration omitted to meter step so that meter step is more accurate.By the verification layer by layer to gait cycle
Later, when the first judgment module 107 determines that the processing acceleration does not have reliable double periodicity, pedometer module 108 will be with
The peak-to-valley value (i.e. validity feature acceleration) handled in acceleration carries out peak valley meter step, i.e., an effective peak is adjacent thereto has
(or between an effective valley effective valley adjacent thereto) is determined as a meter and walks duration between effect peak value.Wherein, such as
Scheme in (b) to walk duration between M points and N points for a meter, P points and Q points are due to when carrying out effective peak-to-valley value and screening, at that time
Between interval be less than minimum single step duration, just only remain P points, and be determined as effective peak acceleration.If interference peak Q points are hided
The screening for having crossed effective peak enters peak valley meter step link, and the intervention that meter walks Q points in processing procedure can lead to currently processed add
Single step duration is obviously shortened in speed, at this time, it may be necessary to the relationship of duration and acceleration amplitude be judged, in the feelings that duration is obviously shortened
Under condition, because the corresponding acceleration amplitude of Q points and single step duration are inconsistent, single step amplitude threshold corresponding less than under corresponding duration and
It cannot function as effective peak acceleration and carry out meter step.
In the embodiment of the present invention, which can also include:
Second acquisition module 110, for obtaining respective motion state in the adjacent m default acquisition durations.
In the embodiment of the present invention, when pedometer module 108 carries out gait meter step to the processing acceleration in default acquisition duration
Later, the second acquisition module 110 can further obtain respective motion state in the adjacent m default acquisition durations.
As a kind of embodiments possible, the second acquisition module 110 includes second acquisition unit 1101, computing unit 1102
And second determination unit 1103, then the second acquisition module 110 is obtaining motion state in each default acquisition duration
Mode can with for:
Second acquisition unit 1101, for obtaining effective step number amount in the adjacent m default acquisition durations.
It is default to calculate this for default acquisition duration for each according to effective step number amount for computing unit 1102
The cadence in duration is acquired, and obtains the amplitude of the processing acceleration in the default acquisition duration.
Second determination unit 1103, for being more than the first cadence threshold value when the cadence, and the amplitude is more than the first amplitude threshold
When value, the motion state in the default acquisition duration is determined as the first motion state;When the cadence is less than the first cadence threshold
It is worth and is more than the second cadence threshold value, when which is less than first amplitude threshold and is more than the second amplitude threshold, this is preset and is adopted
Motion state in collection duration is determined as the second motion state.
In the specific implementation, when the second acquisition module 110 determines the motion state in a default acquisition duration, second obtains
Unit 1101 can obtain the meter step number amount that processing acceleration in the adjacent m default acquisition durations carries out meter step first, then count
Unit 1102 is calculated for each default acquisition duration, the cadence in the default acquisition duration is calculated according to the meter step number amount,
That is meter step number amount divided by the default acquisition duration obtains cadence, and obtains the width of the processing acceleration in the default acquisition duration
Then degree successively judges the amplitude of cadence and processing acceleration in the default acquisition duration.When judging the step
Frequency is more than the first cadence threshold value, and when the amplitude is more than the first amplitude threshold, and the second determination unit 1103 determines the default acquisition
Motion state in duration is the first motion state;When judge the cadence be less than the first cadence threshold value and be more than the second cadence threshold
Value, when which is less than the first amplitude threshold and is more than the second amplitude threshold, the second determination unit 1103 determines the default acquisition
Motion state in duration is the second motion state.
Judge that cadence in the default acquisition duration is greater than or equal under normal running state most in the specific implementation, working as
Small cadence, amplitude is also greater than or equal to minimum radius under normal running state, then the second determination unit 1103 can be true
Motion state in the fixed default acquisition duration is running state;And works as and judge that cadence in the default acquisition duration is less than just
Minimum cadence under normal running state, and more than the minimum cadence jogged under state, amplitude is less than under normal running state most
By a small margin, and more than the minimum radius jogged under state, then when the second determination unit 1103 is assured that the default acquisition
Motion state in length is state of jogging.Ambulatory status and cadence under other motion states and acceleration amplitude are sentenced
Disconnected, details are not described herein for the embodiment of the present invention.
In the embodiment of the present invention, the motion state of user can be divided into the state of hurrying up, state of jogging, quick walk state with
And stroll state etc., the embodiment of the present invention does not limit.
In the embodiment of the present invention, determining module 105 is additionally operable to get adjacent m in the second acquisition module 110 that this is default
When acquiring respective motion state in duration, by under same kind motion state, at most comprising the default acquisition duration quantity
Motion state is determined as user movement state.
Specifically, when the second acquisition module 110 gets the default acquisition duration of each in m adjacent default acquisition durations
Motion state after, determining module 105 can count the motion state of each type, and selects and wrap default adopt
The motion state for collecting the most types of duration quantity, is determined as user movement state by the motion state.Wherein, m can be 20,
30,50 etc., the embodiment of the present invention does not limit.
In the embodiment of the present invention, pedometer is screened to the characteristic acceleration in processing acceleration, obtains effective spy
After levying acceleration, the effective breadth of the processing acceleration is determined by validity feature acceleration, by effective breadth come to this
The reliability of processing signal is verified again, can carry out meter step, raising pair to avoid to unnecessary acceleration signal in this way
The accuracy of meter step is carried out when user's walking or running.And pedometer is judging the processing acceleration in default acquisition duration
Period meter step can be carried out when with reliable double periodicity, judging the processing acceleration without reliable double periodicity
When can carry out peak valley meter step, this adaptometer one step process can be improved walks efficiency and accuracy to the meter of user.Meter step
After device carries out meter step to the processing acceleration in each default acquisition duration, it can determine whether its motion state, be then stored in
In the database of the pedometer.Pedometer can count the movement in multiple default acquisition durations when determining user movement state
State, only in the motion state in multiple default acquisition durations, same type of motion state quantity reaches present count
When amount, it just can determine whether that the motion state of the type is user movement state.Through the embodiment of the present invention, pedometer can be by more
Motion state in a default acquisition duration determines the motion state of user, reduces contingency of the motion state when determining,
Improve the accuracy to user movement condition adjudgement.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory medium
In, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.