CN107167159B - Mobile terminal step counting method and mobile terminal - Google Patents

Mobile terminal step counting method and mobile terminal Download PDF

Info

Publication number
CN107167159B
CN107167159B CN201710282152.9A CN201710282152A CN107167159B CN 107167159 B CN107167159 B CN 107167159B CN 201710282152 A CN201710282152 A CN 201710282152A CN 107167159 B CN107167159 B CN 107167159B
Authority
CN
China
Prior art keywords
state
motion
user
mobile terminal
motion parameter
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.)
Active
Application number
CN201710282152.9A
Other languages
Chinese (zh)
Other versions
CN107167159A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201710282152.9A priority Critical patent/CN107167159B/en
Publication of CN107167159A publication Critical patent/CN107167159A/en
Application granted granted Critical
Publication of CN107167159B publication Critical patent/CN107167159B/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)
  • Telephone Function (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Measurement Of Distances Traversed On The Ground (AREA)

Abstract

The invention discloses a step counting method of a mobile terminal and the mobile terminal, and belongs to the field of communication. The method comprises the following steps: acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal; calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal; determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information; and when the motion state is the biped walking state, counting the steps of the biped walking of the user. The device comprises: the device comprises an acquisition module, a calculation module, a determination module and a trigger module. The invention can improve the step counting precision.

Description

Mobile terminal step counting method and mobile terminal
Technical Field
The present invention relates to the field of communications, and in particular, to a method for counting steps of a mobile terminal and a mobile terminal.
Background
With the rapid development of mobile terminal technology, the functions of mobile terminals are more and more. For example, many mobile terminals have a step counting function, a step counting program is installed in the mobile terminal, and the step counting program is controlled to count the number of steps taken by a user every day and display the number of steps taken by the user to the user, so that the user can know the walking condition of the user in one day.
The mobile terminal comprises a motion sensor, and the mobile terminal collects motion data in real time through the motion sensor, wherein the motion data is a sine wave. At present, when a mobile terminal controls a step counting program to start step counting, the step counting program acquires the motion data in real time, and when the amplitude of a certain waveform in the motion data is greater than a preset threshold value, the step counting program determines that a user walks with two feet and increases the number of steps of the user.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
when a user rides a car or rides a bike, the amplitude of the waveform acquired by the motion sensor is increased and may be larger than a preset threshold value due to the continuous vibration of the car, so that the user can be mistakenly considered to walk with both feet by a step counting program, and the step counting precision is low.
Disclosure of Invention
In order to improve the step counting precision, the invention provides a step counting method of a mobile terminal and the mobile terminal. The technical scheme is as follows:
in a first aspect, the present invention provides a method for counting steps of a mobile terminal, where the method includes:
acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal;
determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information;
and when the motion state is the biped walking state, counting the steps of the biped walking of the user.
Optionally, the determining the motion state of the user according to the first motion parameter, the second motion parameter, and the speed information includes:
when the first motion parameter is larger than a preset first threshold value, determining that the motion state of the user corresponding to the terminal is a running state;
when the first motion parameter is larger than a preset second threshold and smaller than or equal to the first threshold, determining the motion state of the user according to the second motion parameter and the speed information;
when the first motion parameter is larger than a preset third threshold and smaller than or equal to the second threshold, determining the motion state of the user according to the speed information;
and when the first motion parameter is smaller than the third threshold value, determining that the motion state of the user is a static state.
Optionally, the determining the motion state of the user according to the second motion parameter and the speed information includes:
when the second motion parameter is smaller than a preset fourth threshold value, determining that the motion state of the user is a walking state;
when the second motion parameter is greater than or equal to the fourth threshold value, when the speed information is greater than a preset fifth threshold value, the motion state of the user is determined to be a riding state, and when the speed information is less than or equal to the fifth threshold value, the motion state of the user is determined to be a walking state.
Optionally, the determining the motion state of the user according to the speed information includes:
when the speed information is larger than a preset sixth threshold value, determining that the motion state of the user is a vehicle-mounted state;
and when the speed information is less than or equal to the sixth threshold value, determining that the motion state of the user is a static state.
Optionally, after acquiring the data collected by the sensor of the mobile terminal, the method further includes:
calculating a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, wherein the third motion parameter is used for representing the stability degree of the mobile terminal, and the fourth motion parameter is used for representing the degree of sudden change of the motion state of the mobile terminal;
after the determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information, the method further comprises:
when the motion state of the user is determined to be the walking state, verifying whether the motion state of the user is the determined walking state or not according to the motion state of the user, the third motion parameter and the fourth motion parameter which are determined last time.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the motion state of the user, the third motion parameter, and the fourth motion parameter determined last time includes:
when the motion state of the user which is determined last time is a vehicle-mounted state or a riding state, verifying whether the current motion state of the user is the determined walking state or not according to the third motion parameter;
and when the motion state of the user which is determined last time is a static state, verifying whether the current motion state of the user is the determined walking state or not according to the fourth motion parameter.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the third motion parameter includes:
when the third motion parameter is larger than a preset seventh threshold value, verifying that the current motion state of the user is the determined walking state;
and when the third motion parameter is smaller than or equal to the seventh threshold value, verifying that the current motion state of the user is the last determined motion state of the user.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the fourth motion parameter includes:
when the fourth motion parameter is larger than a preset eighth threshold value, verifying that the current motion state of the user is the determined walking state;
and when the fourth motion parameter is smaller than or equal to the eighth threshold value, verifying that the motion state of the user is a static state.
Optionally, the counting the number of steps taken by both feet of the user includes:
acquiring the starting time and the ending time of the user in the biped walking state;
determining an effective time period according to a preset time offset, the starting time and the ending time, wherein the time offset is time consumed for determining the motion state of the user;
and triggering the step counting program to count the steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
In a second aspect, the present invention provides a mobile terminal, comprising:
the acquisition module is used for acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
the calculation module is used for calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal;
the determining module is used for determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information;
and the triggering module is used for counting the steps of the walking of the feet of the user when the motion state is the walking state of the feet.
Optionally, the determining module includes:
the first determining unit is used for determining that the motion state of the user corresponding to the terminal is a running state when the first motion parameter is greater than a preset first threshold value;
a second determining unit, configured to determine, when the first motion parameter is greater than a preset second threshold and is less than or equal to the first threshold, a motion state of the user according to the second motion parameter and the speed information;
a third determining unit, configured to determine, when the first motion parameter is greater than a preset third threshold and is less than or equal to the second threshold, a motion state of the user according to the speed information;
a fourth determining unit, configured to determine that the motion state of the user is a stationary state when the first motion parameter is smaller than the third threshold.
Optionally, the second determining unit is configured to:
when the second motion parameter is smaller than a preset fourth threshold value, determining that the motion state of the user is a walking state;
when the second motion parameter is greater than or equal to the fourth threshold value, when the speed information is greater than a preset fifth threshold value, the motion state of the user is determined to be a riding state, and when the speed information is less than or equal to the fifth threshold value, the motion state of the user is determined to be a walking state.
Optionally, the third determining unit is configured to:
when the speed information is larger than a preset sixth threshold value, determining that the motion state of the user is a vehicle-mounted state;
and when the speed information is less than or equal to the sixth threshold value, determining that the motion state of the user is a static state.
Optionally, the calculating module is further configured to calculate a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, where the third motion parameter is used to represent a stability degree of the mobile terminal, and the fourth motion parameter is used to represent a degree of a sudden change of a motion state of the mobile terminal
The mobile terminal further includes:
and the verification module is used for verifying whether the current motion state of the user is the determined walking state or not according to the last determined motion state of the user, the third motion parameter and the fourth motion parameter when the motion state of the user is determined to be the walking state.
Optionally, the verification module includes:
the first verification unit is used for verifying whether the motion state of the user is the determined walking state or not according to the third motion parameter when the motion state of the user determined last time is the vehicle-mounted state or the riding state;
and the second verification unit is used for verifying whether the motion state of the user is the determined walking state or not according to the fourth motion parameter when the motion state of the user determined last time is the static state.
Optionally, the first verification unit is configured to:
when the third motion parameter is larger than a preset seventh threshold value, verifying that the current motion state of the user is the determined walking state;
and when the third motion parameter is smaller than or equal to the seventh threshold value, verifying that the current motion state of the user is the last determined motion state of the user.
Optionally, the second verification unit is configured to:
when the fourth motion parameter is larger than a preset eighth threshold value, verifying that the current motion state of the user is the determined walking state;
and when the fourth motion parameter is smaller than or equal to the eighth threshold value, verifying that the motion state of the user is a static state.
Optionally, the triggering module includes:
the acquisition unit is used for acquiring the starting time and the ending time of the user in the biped walking state;
a fifth determining unit, configured to determine an effective time period according to a preset time offset, the start time, and the end time, where the time offset is time consumed for determining a motion state of the user;
and the triggering unit is used for triggering the step counting program to count the number of steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
In a third aspect, the present invention provides a computer-readable storage medium comprising:
the command is used for acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
instructions for calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, the first motion parameter being used for characterizing a vibration amplitude of the mobile terminal, the second motion parameter being used for characterizing a vibration frequency of the mobile terminal;
instructions for determining a motion state of a user according to the first motion parameter, the second motion parameter, and the speed information; and the number of the first and second groups,
and counting the steps of the walking of the feet of the user when the motion state is the walking state of the feet.
The technical scheme provided by the invention has the beneficial effects that:
by obtaining a first motion parameter and a second motion parameter of the mobile terminal, the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal, so that the first motion parameter of the mobile terminal is obtained. The second motion parameter and the speed information can determine the motion state of the user, and only when the motion state of the user is the biped walking state, the number of steps of the biped walking of the user is counted, so that the step counting precision is improved.
Drawings
Fig. 1 is a flowchart of a method for counting steps of a mobile terminal according to an embodiment of the present invention;
fig. 2-1 is a flowchart of another step counting method of a mobile terminal according to an embodiment of the present invention;
fig. 2-2 is a flow chart for determining a motion state according to an embodiment of the present invention;
FIGS. 2-3 are flow diagrams for verifying walking status according to embodiments of the present invention;
fig. 3-1 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 3-2 is a schematic structural diagram of another mobile terminal provided in the embodiment of the present invention;
fig. 4 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for counting steps of a mobile terminal, where the method includes:
step 101: and acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal.
Step 102: and calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal.
Step 103: and determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information.
Step 104: and when the motion state is the biped walking state, counting the steps of the biped walking of the user.
Wherein the motion parameters comprise a first motion parameter for characterizing the vibration amplitude and a second motion parameter for characterizing the vibration frequency;
optionally, step 103 may include:
1031: and when the first motion parameter is larger than a preset first threshold value, determining that the motion state of the user corresponding to the mobile terminal is a running state.
1032: when the first motion parameter is larger than a preset second threshold and smaller than or equal to a first threshold, determining the motion state of the user according to the second motion parameter and the speed information;
1033: when the first motion parameter is larger than a preset third threshold and smaller than or equal to a second threshold, determining the motion state of the user according to the speed information;
1034: and when the first motion parameter is smaller than the third threshold value, determining that the motion state of the user is a static state.
Optionally, for the 1032, the method may include:
when the second motion parameter is smaller than a preset fourth threshold value, determining that the motion state of the user is a walking state;
when the second motion parameter is larger than or equal to the fourth threshold value, when the speed information is larger than a preset fifth threshold value, the motion state of the user is determined to be a riding state, and when the speed information is smaller than or equal to the fifth threshold value, the motion state of the user is determined to be a walking state.
Optionally, the 1033 may include:
when the speed information is larger than a preset sixth threshold value, determining that the motion state of the user is a vehicle-mounted state;
and when the speed information is less than or equal to a sixth threshold value, determining that the motion state of the user is a static state.
Optionally, the method of this embodiment further includes:
step 105: and calculating a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, wherein the third motion parameter is used for representing the stability degree of the mobile terminal, and the fourth motion parameter is used for representing the degree of sudden change of the motion state of the mobile terminal.
The method of the embodiment further comprises the following steps:
step 106: and when the motion state of the user is determined to be the walking state, verifying whether the motion state of the current user is the determined walking state or not according to the motion state of the user, the third motion parameter and the fourth motion parameter which are determined last time.
Optionally, for the step 106, the method may include:
1061: when the motion state of the user which is determined last time is the vehicle-mounted state or the riding state, verifying whether the motion state of the current user is the determined walking state or not according to the third motion parameter;
1062: and when the motion state of the user which is determined last time is a static state, verifying whether the motion state of the current user is a determined walking state or not according to the fourth motion parameter.
Optionally, the 1061 may include:
when the third motion parameter is larger than a preset seventh threshold value, verifying that the motion state of the current user is a determined walking state;
and when the third motion parameter is less than or equal to the seventh threshold value, verifying that the motion state of the current user is the motion state of the user determined last time.
Optionally, the 1062 may include:
when the fourth motion parameter is larger than a preset eighth threshold value, verifying that the motion state of the current user is a determined walking state;
and when the fourth motion parameter is less than or equal to the eighth threshold value, verifying that the motion state of the user is a static state.
Optionally, the step 104 may include:
1041: acquiring the starting time and the ending time of a user in a biped walking state;
1042: determining an effective time period according to a preset time offset, the starting time and the ending time, wherein the time offset is the time consumed for determining the motion state of the user;
1043: and triggering the step counting program to count the number of steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
In the embodiment of the invention, the motion parameters of the mobile terminal are acquired, the motion state of the user is determined according to the motion parameters of the mobile terminal, and the number of steps of the walking of the feet of the user is counted only when the motion state of the user is the walking state of the feet, so that the step counting precision is improved.
Referring to fig. 2-1, an embodiment of the present invention provides a method for controlling a step counting program, including:
step 201: n data collected by a motion sensor of the mobile terminal and speed information collected by a positioning module of the mobile terminal are obtained, wherein N is an integer greater than or equal to 1.
The mobile terminal can be mobile terminals such as a mobile phone, a tablet personal computer or wearable equipment, wherein the wearable equipment can be a smart bracelet, a smart watch or a smart necklace and the like. The mobile terminal comprises a motion sensor and a positioning module. The motion sensor is used for acquiring data of the mobile terminal in real time, and the motion sensor can comprise an acceleration sensor, a gyroscope and the like. In this step, when the motion sensor collects data for each period of time, N pieces of data are randomly selected from the data for each period.
The duration of the period of time may be 2 seconds, 3 seconds, 4 seconds, or the like. For example, every time a motion sensor acquires data of a length of 2 seconds, N data are randomly picked from the data of the length of 2 seconds. The data collected by the motion sensor is seed waveform data, and the collected N data can be located at the wave crest, the wave trough and any position between the wave crest and the wave trough of the waveform data.
The positioning module is used for acquiring the speed information of the mobile terminal in real time. The speed information may be a moving speed of the mobile terminal. The Positioning module may be a GPS (Global Positioning System) module or a beidou navigation module.
Step 202: and calculating the motion parameters of the mobile terminal according to the N data, wherein the motion parameters comprise a first motion parameter, a second motion parameter, a third motion parameter and a fourth motion parameter.
The first motion parameter may be a power spectral density of the N data, and is used to characterize a vibration amplitude of the mobile terminal performing the up-and-down reciprocating motion. When a user walks, runs, rides or sits on a vehicle, the body of the user can vibrate up and down in a reciprocating manner; usually, the mobile terminal is located on a user, the mobile terminal vibrates up and down along with the user, and the first motion parameter may represent the vibration amplitude of the user. The larger the first motion parameter is, the larger the amplitude of the up-and-down reciprocating motion of the user is. Generally, the vibration amplitude of the body of the user is the largest when the user does running exercise, the vibration amplitude of the body is smaller than the vibration amplitude when the user does running exercise, and the vibration amplitude of the body is smaller than the vibration amplitude when the user does cycling exercise or rides on a vehicle.
For the first motion parameter, the first motion parameter can be calculated as follows:
respectively carrying out Fourier transform on each data in the acquired N data to obtain N power values PiI is 1, 2 … … N, the first motion parameter is equal to
Figure BDA0001279780060000101
Where f is the sampling frequency of the acquired data.
The second motion parameter may be a median frequency of the N data, and is used to represent a vibration frequency of the mobile terminal for performing up-down reciprocating vibration, and may also represent a vibration frequency of the user's body for performing up-down reciprocating vibration. When a user does walking exercise, the vibration frequency of the body doing up-and-down reciprocating vibration is lower due to the lower movement speed, and is lower than the vibration frequency of the body doing up-and-down reciprocating vibration when the user does running exercise or riding exercise.
For the second motion parameter, the second motion parameter can be calculated as follows:
carrying out Fourier transformation on the collected N data to obtain N power values PiI 1, 2 … … N, calculating a total power PA=P1+P2+……+PN(ii) a For each power value PiAccording to the power value PiAnd the calculated total power PACalculating the proportional frequency Fi=Pi/PAF/N, thus calculating F1、F2……FNWhere F is the sampling frequency of the acquired data and the second motion parameter is equal to F1+F2+……+FN
The third motion parameter may be a mean square error of the N data, and is used to represent a state stability degree of the mobile terminal, that is, to indicate whether a state of the mobile terminal changes; when a user does exercise, abrupt changes of the exercise state may occur, such as changing from a walking state to a running state, changing from a walking state to a riding state, changing from a walking state to a vehicle-mounted state, changing from a vehicle-mounted state to a walking state, or changing from a running state to a walking state. When the motion state of the user changes abruptly, the third motion parameter becomes large.
For the third motion parameter, the third motion parameter may be calculated as follows:
the collected N data are respectively A1、A2……AN(ii) a Calculating a sum of the N data, the sum being equal to A1+A2+……+AN(ii) a According to the A motion data and the sum value AAThe calculated third motion parameter is equal to
Figure BDA0001279780060000102
Wherein i is 1, 2 … … N.
The fourth motion parameter may be a zero crossing rate of the N data, and is used to characterize a characteristic that the mobile terminal follows the periodic motion of the human body. When the mobile terminal changes from being stationary to following the movement of the user's feet, the fourth movement parameter becomes larger.
For the fourth motion parameter, the fourth motion parameter may be calculated as follows:
counting the number N of zero crossings0The method can be as follows: if the ith data is greater than 0 and the (i + 1) th data is less than 0, the zero crossing point count N0Adding one; alternatively, if the ith data is less than 0 and the (i + 1) th data is greater than 0, the zero crossing count N is counted0Adding one; according to the number of zero crossings N0Calculating a fourth motion parameter with the number N of acquired data, i.e. calculating a zero crossing rate equal to N0/N。
Step 203: and determining the current motion state of the user according to the first motion parameter and the second motion parameter.
Referring to fig. 2-2, this step may be implemented by the following process 11 to 21, including:
11. and judging the first motion parameter.
A first threshold value, a second threshold value and a third threshold value are preset in advance, the first threshold value is larger than the second threshold value, and the second threshold value is larger than the third threshold value. And in fig. 2-2, a is the first motion parameter, b is the second motion parameter, c is the third motion parameter, d is the fourth motion parameter; f. of1Is a first threshold value, f2Is a second threshold value, f3Is a third threshold value, and f1>f2>f3
The method comprises the following steps: and comparing the first motion parameter with a first threshold, a second threshold and a third threshold respectively, wherein the comparison result comprises four types, namely the first motion parameter is greater than the first threshold, the first motion parameter is greater than the second threshold and is less than or equal to the first threshold, the first motion parameter is greater than the third threshold and is less than or equal to the second threshold, and the first motion parameter is less than or equal to the third threshold. I.e. a is respectively connected with f1、f2、f3Comparing the obtained results with a>f1、f2<a≤f1、f3<a≤f2、a≤f3
12: if the first motion parameter is greater than the first threshold value, a>f1And when the user runs, determining that the motion state of the user is a running state, and ending and returning.
When a user does running exercise, the vibration amplitude of the body of the user doing up-and-down reciprocating motion is larger than that of the body of the user doing walking exercise, cycling exercise or riding on a vehicle. Therefore, when the first specific parameter is larger than the first threshold value, the vibration amplitude indicating that the body of the user does up-and-down reciprocating motion is larger, and the motion state of the user is determined to be a running state.
13: if the first motion parameter is greater than the second threshold and less than or equal to the first threshold, f2<a≤f1And judging the second motion parameter.
A fourth threshold is preset, and the second motion parameter may be compared with the fourth threshold, and as a result of the comparison, the second motion parameter is greater than the fourth threshold or the second motion parameter is less than or equal to the fourth threshold. In FIGS. 2-2 f4Is a fourth threshold, i.e. b and f4The result of the comparison is a > f4Or a is less than or equal to f4
When the first motion parameter is larger than the second threshold value and smaller than or equal to the first threshold value, the vibration amplitude of the user body doing up-and-down reciprocating motion is still larger, but the vibration amplitude is smaller than that of the user body doing running motion. In this case, the user may do a walking motion or a cycling motion, so the motion state of the user may be determined according to the second motion parameter and the speed information, and the specific determination process may be implemented through steps 13 to 17.
14: if the second motion parameter b is less than or equal to the fourth threshold f4I.e. b ≦ f4And if so, determining the motion state of the user as the walking state, and ending the return.
Since the second motion parameter b is less than or equal to the fourth threshold value f4The user can be determined to be in a walking state by the lower vibration frequency and the lower movement speed of the user in the vertical reciprocating vibration.
15: if the second motion parameter b is greater than the fourth threshold value f4I.e. b > f4And judging the speed information.
Since the second motion parameter b is greater than the fourth threshold value f4The user performs vertical reciprocating vibration with a high vibration frequency and a high movement speed, so that the movement state of the user needs to be further determined according to the speed information.
A fifth threshold is preset, and the speed information may be compared with the preset fifth threshold, as a result of the comparison, the speed information is greater than the fifth threshold or the speed information is less than or equal to the fifth threshold. In FIG. 2-2, f5Is a fifth threshold value, s is the speed information, i.e. s and f5Comparing the obtained data to obtain a comparison result s > f5Or s is less than or equal to f5
16: if the speed information is greater than a fifth threshold, i.e., s > f5And when the user moves, determining that the motion state of the user is the riding state, and ending and returning.
Since the speed information is greater than the fifth threshold, which indicates that the speed of the user's movement is greater, it may be determined that the movement state of the user is the riding state.
17: if the speed information is less than or equal to the fifth threshold, i.e., s ≦ f5And when the user moves, determining that the motion state of the user is the walking state, and ending the return.
Since the speed information is greater than the fifth threshold, which indicates that the speed of the user's movement is less than the movement speed in the riding state, the user may be in a fast walking state, and thus the movement state of the user may be determined to be a walking state.
18: if the first motion parameter is greater than the third threshold value and less than or equal to the second threshold value, f3<a≤f2Then, the speed information s is judged.
A sixth threshold is preset, and the speed information may be compared with the preset sixth threshold, as a result of the comparison, the speed information is greater than the sixth threshold or the speed information is less than or equal to the sixth threshold. In FIG. 2-2, f6Is a sixth threshold, i.e. s and f6Comparing the obtained data to obtain a comparison result s > f6Or s is less than or equal to f6
The first motion parameter is larger than the third threshold value and smaller than or equal to the second threshold value, and represents that the vibration amplitude of the body of the user reciprocating up and down is smaller than the vibration amplitude in walking or riding motion. Since the vehicle is stable during operation, in which case the user may be sitting on the vehicle or the user may be stationary, the movement state of the user may be determined from the speed information, and the specific determination may be performed through steps 18 to 20.
19: if the speed information is greater than a sixth threshold, i.e., s > f6And if so, determining that the motion state of the user is the vehicle-mounted state, and ending the return.
The speed information is larger than the sixth threshold value, which indicates that the user moves faster, and usually, the user seat can achieve the conditions of small body vibration amplitude and fast movement speed in the automobile, so that the movement state of the user can be determined to be the vehicle-mounted state.
20: if the speed informationIs less than or equal to a sixth threshold, i.e. s is less than or equal to f6And if so, determining that the motion state of the user is a static state, and ending the return.
The speed information is less than or equal to the sixth threshold, which indicates that the speed of the user movement is small, and usually, the user can achieve the situation that the vibration amplitude of the body is small and the movement speed is slow when the user is at rest, so that the movement state of the user can be determined to be a rest state.
21: if the first motion parameter is less than the third threshold, i.e. a ≦ f3And when the user is in the static state, determining that the motion state of the user is the static state, and ending and returning.
The first motion parameter is smaller than the third threshold value, which indicates that the vibration frequency of the body vibration of the user is very small, and usually the vibration amplitude of the body of the user is very small when the user is still, so that the motion state of the user can be determined to be a static state.
Step 204: and judging and determining that the motion state of the user is a walking state, if the motion state is the walking state, executing the step 205, and if the motion state is not the walking state, executing the step 206.
Step 205: and verifying whether the motion state of the current user is the determined walking state or not according to the motion state of the user, the third motion parameter and the fourth motion parameter which are determined last time.
Referring to fig. 2-3, this step may be implemented by a process 31 through 21, including:
31: and judging the motion state of the user which is determined last time.
When the last determined motion state of the user is the vehicle-mounted state or the riding state, whether the current motion state of the user is the determined walking state or not can be verified according to the third motion parameter, and the detailed implementation process can be referred to in the following steps 32 to 34.
When the motion state of the user determined last time is a static state, verifying whether the motion state of the current user is a determined walking state according to the fourth motion parameter, and the detailed implementation process can refer to the following steps 35 to 37.
When the motion state of the user, which was last determined, is a walking state or a running state, step 38 is performed.
32: and if the vehicle-mounted state or the riding state is adopted, judging the third motion parameter.
And presetting a seventh threshold, comparing the third motion parameter with the seventh threshold, wherein the comparison result is that the third motion parameter is larger than the seventh threshold or the third motion parameter is smaller than or equal to the seventh threshold. f. of7Is a seventh threshold value, c is a third motion parameter, i.e., c and f7Comparing the obtained results with c > f7Or c is less than or equal to f7
33: if the third motion parameter is greater than the seventh threshold value, i.e., c > f7And then, verifying that the motion state of the current user is the walking state, and ending and returning.
34: if the third motion parameter is less than or equal to the seventh threshold value, i.e., c ≦ f7And then, verifying that the motion state of the current user is the motion state of the user determined last time, and ending and returning.
And if the motion state of the user determined last time is the vehicle-mounted state, modifying the motion state of the current user from the determined walking state to the vehicle-mounted state. And if the motion state of the user is determined to be the riding state last time, modifying the motion state of the current user from the determined walking state to the riding state.
35: and if the state is a static state, judging the fourth motion parameter.
And presetting an eighth threshold, comparing the fourth motion parameter with the eighth threshold, wherein the comparison result is that the fourth motion parameter is greater than the eighth threshold or the fourth motion parameter is less than or equal to the eighth threshold. f. of8Is a seventh threshold value, d is a fourth motion parameter, i.e., d and f8Comparing the two solutions to obtain a comparison result d > f8Or d is less than or equal to f8
36: if the fourth motion parameter is greater than the eighth threshold value, i.e., d > f8And then, verifying that the motion state of the current user is the walking state, and ending and returning.
The fourth motion parameter is greater than the eighth threshold value, which indicates that the device generates periodic motion following the user, i.e., the user is more likely to change from a stationary state to a walking state, thereby verifying that the motion state of the current user is the walking state.
37: if the fourth motion parameter is less than or equal to the eighth threshold value, i.e., d ≦ f8And then, verifying that the motion state of the current user is a static state, and ending and returning.
Namely, the motion state of the current user is modified from the walking state to the static state in the step. The fourth motion parameter is less than or equal to the eighth threshold, which indicates that the device does not currently follow the user to generate periodic motion, i.e. the motion state of the user may not change, thereby verifying that the motion state of the current user is a static state.
38: and if the walking state or the running state is achieved, verifying that the motion state of the current user is the walking state, and ending and returning.
Step 206: and when the motion state is the biped walking state, counting the steps of the biped walking of the user.
The biped walking state may be a walking state or a running state. The step counting program also acquires and caches the motion data acquired by the motion sensor of the mobile terminal in real time, and each acquired motion data comprises time information.
The method comprises the following steps: acquiring the starting time and the ending time of a user in a biped walking state; determining an effective time period according to a preset time offset, the starting time and the ending time, wherein the time offset is the time consumed for determining the motion state of the user; and triggering a step counting program to count the steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
For example, it is obtained that the starting time t1 and the ending time t2 of the user in the bipedal walking state are respectively t1 and t2, and it is assumed that the time consumed for determining the motion state of the user in the above steps 201 to 205 is e, i.e. the time offset is e, so that the valid time period is determined from the time t1-e to the time t2-e according to the preset time offset e, the starting time t1 and the ending time t 2. And then providing the effective time period from the time t1-e to the time t2-e to the step counting program, so that the step counting program can acquire the motion data from the cached motion data within the time t1-e to the time t2-e, and count the steps of the double-foot walking of the user according to the motion data within the time t1-e to the time t 2-e.
In the embodiment of the invention, the motion sensor is used for acquiring the motion data of the mobile terminal, the motion parameter of the mobile terminal is acquired according to the data, the motion state of the user is determined according to the motion parameter of the mobile terminal, and only when the motion state of the user is the biped walking state, the number of steps of the biped walking of the user is counted, so that the step counting precision is improved. In addition, when the determined motion state is the walking state, whether the current motion state of the user is the determined walking state is further verified through the third motion parameter and the fourth motion parameter, and the step counting precision is further improved.
Referring to fig. 3-1, an embodiment of the present invention provides a mobile terminal 300, where the mobile terminal 300 may be the mobile terminal in the embodiment shown in fig. 2-1, and includes:
an obtaining module 301, configured to obtain data collected by a motion sensor of a mobile terminal and speed information collected by a positioning module of the mobile terminal;
a calculating module 302, configured to calculate a first motion parameter and a second motion parameter of the mobile terminal according to the data, where the first motion parameter is used to represent a vibration amplitude of the mobile terminal, and the second motion parameter is used to represent a vibration frequency of the mobile terminal;
a determining module 303, configured to determine a motion state of the user according to the first motion parameter, the second motion parameter, and the speed information;
a triggering module 304, configured to count the number of steps taken by both feet of the user when the motion state is a biped walking state.
Optionally, the determining module 303 includes:
the first determining unit is used for determining that the motion state of the user corresponding to the mobile terminal is a running state when the first motion parameter is greater than a preset first threshold value;
a second determining unit, configured to determine, when the first motion parameter is greater than a preset second threshold and is less than or equal to the first threshold, a motion state of the user according to the second motion parameter and the speed information;
a third determining unit, configured to determine, when the first motion parameter is greater than a preset third threshold and is less than or equal to the second threshold, a motion state of the user according to the speed information;
a fourth determining unit, configured to determine that the motion state of the user is a stationary state when the first motion parameter is smaller than the third threshold.
Optionally, the second determining unit is configured to:
when the second motion parameter is smaller than a preset fourth threshold value, determining that the motion state of the user is a walking state;
when the second motion parameter is greater than or equal to the fourth threshold value, when the speed information is greater than a preset fifth threshold value, the motion state of the user is determined to be a riding state, and when the speed information is less than or equal to the fifth threshold value, the motion state of the user is determined to be a walking state.
Optionally, the third determining unit is configured to:
when the speed information is larger than a preset sixth threshold value, determining that the motion state of the user is a vehicle-mounted state;
and when the speed information is less than or equal to the sixth threshold value, determining that the motion state of the user is a static state.
Optionally, the calculating module 302 is further configured to calculate a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, where the third motion parameter is used to represent a stability degree of the mobile terminal, and the fourth motion parameter is used to represent a degree of sudden change of a motion state of the mobile terminal;
referring to fig. 3-2, the mobile terminal 300 further includes:
a verification module 303, configured to verify whether the current motion state of the user is the determined walking state according to the last determined motion state of the user, the third motion parameter, and the fourth motion parameter when it is determined that the motion state of the user is the walking state.
Optionally, the verification module 303 includes:
the first verification unit is used for verifying whether the motion state of the user is the determined walking state or not according to the third motion parameter when the motion state of the user determined last time is the vehicle-mounted state or the riding state;
and the second verification unit is used for verifying whether the motion state of the user is the determined walking state or not according to the fourth motion parameter when the motion state of the user determined last time is the static state.
Optionally, the first verification unit is configured to:
when the third motion parameter is larger than a preset seventh threshold value, verifying that the current motion state of the user is the determined walking state;
and when the third motion parameter is smaller than or equal to the seventh threshold value, verifying that the current motion state of the user is the last determined motion state of the user.
Optionally, the second verification unit is configured to:
when the fourth motion parameter is larger than a preset eighth threshold value, verifying that the current motion state of the user is the determined walking state;
and when the fourth motion parameter is smaller than or equal to the eighth threshold value, verifying that the motion state of the user is a static state.
Optionally, the triggering module 304 includes:
the acquisition unit is used for acquiring the starting time and the ending time of the user in the biped walking state;
a fifth determining unit, configured to determine an effective time period according to a preset time offset, the start time, and the end time, where the time offset is time consumed for determining a motion state of the user;
and the triggering unit is used for triggering the step counting program to count the number of steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
In the embodiment of the invention, by acquiring the first motion parameter and the second motion parameter of the mobile terminal, the motion state of the user can be determined according to the first motion parameter and the second motion parameter of the mobile terminal because the first motion parameter is used for representing the vibration amplitude of the mobile terminal and the second motion parameter is used for representing the vibration frequency of the mobile terminal, and the number of steps walked by the feet of the user is counted only when the motion state of the user is a biped walking state, so that the step counting precision is improved.
Fig. 4 is a block diagram illustrating a mobile terminal 400 according to an example embodiment. For example, the mobile terminal 400 may be a mobile terminal such as a mobile phone, a tablet computer, or a wearable device.
Referring to fig. 4, the mobile terminal 400 may include one or more of the following components: a processing component 402, a memory 404, a power component 406, a multimedia component 408, an audio component 410, an input/output (I/O) interface 412, a sensor component 414, and a communication component 416 and a positioning module 417, the sensor component 414 may be a motion sensor, for example, an acceleration sensor or a gyroscope, etc.
The processing component 402 generally controls overall operation of the mobile terminal 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operation at the mobile terminal 400. Examples of such data include instructions for any application or method operating on the mobile terminal 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power components 406 provide power to the various components of the mobile terminal 400. The power components 406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the mobile terminal 400.
The multimedia component 408 comprises a screen providing an output interface between the mobile terminal 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the mobile terminal 400 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 may include a Microphone (MIC) configured to receive external audio signals when the mobile terminal 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of state assessment for the mobile terminal 400. For example, the sensor assembly 414 may detect an open/closed state of the mobile terminal 400, relative positioning of components, such as a display and keypad of the mobile terminal 400, a change in position of the mobile terminal 400 or a component of the mobile terminal 400, the presence or absence of user contact with the mobile terminal 400, orientation or acceleration/deceleration of the mobile terminal 400, and a change in temperature of the mobile terminal 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate communications between the mobile terminal 400 and other devices in a wired or wireless manner. The mobile terminal 400 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the mobile terminal 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the mobile terminal 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium, instructions in which, when executed by a processor of a mobile terminal 400, enable the mobile terminal 400 to perform a method of controlling a step counter, the method comprising:
acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
calculating a first motion parameter and a second motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, and the second motion parameter is used for representing the vibration frequency of the mobile terminal;
determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information;
and when the motion state is the biped walking state, counting the steps of the biped walking of the user.
Optionally, the determining the motion state of the user according to the first motion parameter, the second motion parameter, and the speed information includes:
when the first motion parameter is larger than a preset first threshold value, determining that the motion state of the user corresponding to the mobile terminal is a running state;
when the first motion parameter is larger than a preset second threshold and smaller than or equal to the first threshold, determining the motion state of the user according to the second motion parameter and the speed information;
when the first motion parameter is larger than a preset third threshold and smaller than or equal to the second threshold, determining the motion state of the user according to the speed information;
and when the first motion parameter is smaller than the third threshold value, determining that the motion state of the user is a static state.
Optionally, the determining the motion state of the user according to the second motion parameter and the speed information includes:
when the second motion parameter is smaller than a preset fourth threshold value, determining that the motion state of the user is a walking state;
when the second motion parameter is greater than or equal to the fourth threshold value, when the speed information is greater than a preset fifth threshold value, the motion state of the user is determined to be a riding state, and when the speed information is less than or equal to the fifth threshold value, the motion state of the user is determined to be a walking state.
Optionally, the determining the motion state of the user according to the speed information includes:
when the speed information is larger than a preset sixth threshold value, determining that the motion state of the user is a vehicle-mounted state;
and when the speed information is less than or equal to the sixth threshold value, determining that the motion state of the user is a static state.
Optionally, after acquiring the data collected by the sensor of the mobile terminal, the method further includes:
calculating a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, wherein the third motion parameter is used for representing the stability degree of the mobile terminal, and the fourth motion parameter is used for representing the degree of sudden change of the motion state of the mobile terminal;
after the determining the motion state of the user according to the first motion parameter, the second motion parameter and the speed information, the method further comprises:
when the motion state of the user is determined to be the walking state, verifying whether the motion state of the user is the determined walking state or not according to the motion state of the user, the third motion parameter and the fourth motion parameter which are determined last time.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the motion state of the user, the third motion parameter, and the fourth motion parameter determined last time includes:
when the motion state of the user which is determined last time is a vehicle-mounted state or a riding state, verifying whether the current motion state of the user is the determined walking state or not according to the third motion parameter;
and when the motion state of the user which is determined last time is a static state, verifying whether the current motion state of the user is the determined walking state or not according to the fourth motion parameter.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the third motion parameter includes:
when the third motion parameter is larger than a preset seventh threshold value, verifying that the current motion state of the user is the determined walking state;
and when the third motion parameter is smaller than or equal to the seventh threshold value, verifying that the current motion state of the user is the last determined motion state of the user.
Optionally, the verifying whether the current motion state of the user is the determined walking state according to the fourth motion parameter includes:
when the fourth motion parameter is larger than a preset eighth threshold value, verifying that the current motion state of the user is the determined walking state;
and when the fourth motion parameter is smaller than or equal to the eighth threshold value, verifying that the motion state of the user is a static state.
Optionally, the counting the number of steps taken by both feet of the user includes:
acquiring the starting time and the ending time of the user in the biped walking state;
determining an effective time period according to a preset time offset, the starting time and the ending time, wherein the time offset is time consumed for determining the motion state of the user;
and triggering the step counting program to count the steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A method for counting steps of a mobile terminal is characterized by comprising the following steps:
acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
calculating a first motion parameter, a second motion parameter, a third motion parameter and a fourth motion parameter of the mobile terminal according to the data, wherein the first motion parameter is used for representing the vibration amplitude of the mobile terminal, the second motion parameter is used for representing the vibration frequency of the mobile terminal, the third motion parameter is used for representing the stability degree of the mobile terminal, and the fourth motion parameter is used for representing the degree of sudden change of the motion state of the mobile terminal;
when the first motion parameter is larger than a preset first threshold value, determining that the motion state of the user corresponding to the mobile terminal is a running state;
when the first motion parameter is larger than a preset second threshold and smaller than or equal to the first threshold, determining that the motion state of the user is a fast walking state in a walking state, a riding state or a walking state according to the second motion parameter and the speed information;
when the first motion parameter is larger than a preset third threshold and smaller than or equal to the second threshold, determining that the motion state of the user is a vehicle-mounted state or a static state according to the speed information;
when the first motion parameter is smaller than the third threshold value, determining that the motion state of the user is a static state;
if the motion state of the user is determined to be a walking state and the last determined motion state of the user is a vehicle-mounted state or a riding state, when the third motion parameter is greater than a seventh threshold value, the motion state of the current user is verified to be the walking state, when the third motion parameter is less than or equal to the seventh threshold value, the motion state of the current user is verified to be the last determined motion state of the user, and the motion state of the current user is modified from the determined walking state to the last determined motion state of the user;
if the motion state of the user is determined to be a walking state and the last motion state of the user is determined to be a static state, when the fourth motion parameter is larger than an eighth threshold value, the motion state of the current user is verified to be the walking state, when the fourth motion parameter is smaller than or equal to the eighth threshold value, the motion state of the current user is verified to be the static state, and the motion state of the current user is modified from the determined walking state to the static state;
and when the motion state is the biped walking state, counting the steps of the biped walking of the user.
2. The method of claim 1, wherein the counting the number of steps the user walks in both feet comprises:
acquiring the starting time and the ending time of the user in the biped walking state;
determining an effective time period according to a preset time offset, the starting time and the ending time, wherein the time offset is time consumed for determining the motion state of the user;
and triggering a step counting program to count the steps of the walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
3. A mobile terminal, characterized in that the mobile terminal comprises:
the acquisition module is used for acquiring data acquired by a motion sensor of the mobile terminal and speed information acquired by a positioning module of the mobile terminal;
a calculating module, configured to calculate a first motion parameter, a second motion parameter, a third motion parameter, and a fourth motion parameter of the mobile terminal according to the data, where the first motion parameter is used to characterize a vibration amplitude of the mobile terminal, the second motion parameter is used to characterize a vibration frequency of the mobile terminal, the third motion parameter is used to characterize a stability degree of the mobile terminal, and the fourth motion parameter is used to characterize a degree of sudden change in a motion state of the mobile terminal;
the determining module is used for determining that the motion state of the user corresponding to the mobile terminal is a running state when the first motion parameter is greater than a preset first threshold value; when the first motion parameter is larger than a preset second threshold and smaller than or equal to the first threshold, determining that the motion state of the user is a fast walking state in a walking state, a riding state or a walking state according to the second motion parameter and the speed information; when the first motion parameter is larger than a preset third threshold and smaller than or equal to the second threshold, determining that the motion state of the user is a vehicle-mounted state or a static state according to the speed information; when the first motion parameter is smaller than the third threshold value, determining that the motion state of the user is a static state;
the verification module is used for verifying that the motion state of the current user is the walking state when the third motion parameter is larger than a seventh threshold value and the motion state of the current user is the last determined motion state when the third motion parameter is smaller than or equal to the seventh threshold value if the motion state of the user is determined to be the walking state and the last determined motion state of the user is determined to be the last determined motion state of the user;
the verification module is further configured to verify that the motion state of the current user is the walking state when the motion state of the user is determined to be the walking state and the last motion state of the user determined to be the static state, when the fourth motion parameter is greater than an eighth threshold, verify that the motion state of the current user is the walking state, and when the fourth motion parameter is less than or equal to the eighth threshold, modify the motion state of the current user from the determined walking state to the static state;
and the triggering module is used for counting the steps of the walking of the feet of the user when the motion state is the walking state of the feet.
4. The mobile terminal of claim 3, wherein the triggering module comprises:
the acquisition unit is used for acquiring the starting time and the ending time of the user in the biped walking state;
a fifth determining unit, configured to determine an effective time period according to a preset time offset, the start time, and the end time, where the time offset is time consumed for determining a motion state of the user;
and the triggering unit is used for triggering a step counting program to count the number of steps of walking of the feet of the user according to the motion data collected by the motion sensor in the effective time period.
CN201710282152.9A 2017-04-26 2017-04-26 Mobile terminal step counting method and mobile terminal Active CN107167159B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710282152.9A CN107167159B (en) 2017-04-26 2017-04-26 Mobile terminal step counting method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710282152.9A CN107167159B (en) 2017-04-26 2017-04-26 Mobile terminal step counting method and mobile terminal

Publications (2)

Publication Number Publication Date
CN107167159A CN107167159A (en) 2017-09-15
CN107167159B true CN107167159B (en) 2020-06-23

Family

ID=59812292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710282152.9A Active CN107167159B (en) 2017-04-26 2017-04-26 Mobile terminal step counting method and mobile terminal

Country Status (1)

Country Link
CN (1) CN107167159B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908497B (en) * 2017-11-28 2021-08-31 广东乐心医疗电子股份有限公司 Step frequency calculation method and device and wearable device
CN109141465B (en) * 2018-07-19 2021-06-22 歌尔科技有限公司 Step counting method, wearable device and computer readable storage medium
CN109708634A (en) * 2018-12-12 2019-05-03 平安科技(深圳)有限公司 Judge automatically method, apparatus, storage medium and the electronic equipment of driving behavior
CN110081903B (en) * 2019-04-24 2021-11-02 珠海必要工业科技股份有限公司 Step counting, exchange and step counting data sending method, device, equipment and storage medium
CN112945257B (en) * 2019-12-11 2024-06-21 瑞昱半导体股份有限公司 Step counting device and method
CN111833652A (en) * 2020-07-06 2020-10-27 江苏泽景汽车电子股份有限公司 Active protection system for children traffic safety based on Bluetooth broadcast

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103308068A (en) * 2012-03-15 2013-09-18 精工爱普生株式会社 State detection device, electronic apparatus, measurement system and program
CN106491138A (en) * 2016-10-26 2017-03-15 歌尔科技有限公司 A kind of motion state detection method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140074431A1 (en) * 2012-09-10 2014-03-13 Apple Inc. Wrist Pedometer Step Detection
CN106017502B (en) * 2016-05-17 2019-02-26 中国地质大学(武汉) A kind of step-recording method and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103308068A (en) * 2012-03-15 2013-09-18 精工爱普生株式会社 State detection device, electronic apparatus, measurement system and program
CN106491138A (en) * 2016-10-26 2017-03-15 歌尔科技有限公司 A kind of motion state detection method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
低功耗自适应计步器的研究;何林荟 等;《实验科学与技术》;20141231;第361-364页 *
便携式运动检测仪的设计与实现;韩熙熙;《中国优秀硕士学位论文全文数据库》;20160831;第1138-1168页 *
在穿戴设备中开发一个计步器;张明星 等;《Android 智能传递设备开发实战详解》;《中国铁道出版社》;20160131;第207-210页 *

Also Published As

Publication number Publication date
CN107167159A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
CN107167159B (en) Mobile terminal step counting method and mobile terminal
CN108256555B (en) Image content identification method and device and terminal
CN108510987B (en) Voice processing method and device
CN110827253A (en) Training method and device of target detection model and electronic equipment
CN105959587B (en) Shutter speed acquisition methods and device
CN109951476B (en) Attack prediction method and device based on time sequence and storage medium
CN107820024B (en) Image shooting method, device and storage medium
CN107656682B (en) Mobile terminal and bending angle calculation method
CN110751659B (en) Image segmentation method and device, terminal and storage medium
CN106648063B (en) Gesture recognition method and device
CN107562349B (en) Method and device for executing processing
CN110191085B (en) Intrusion detection method and device based on multiple classifications and storage medium
CN110992979B (en) Detection method and device and electronic equipment
CN110059547B (en) Target detection method and device
CN112713322A (en) Battery temperature determination method, battery temperature determination device, and storage medium
CN107007999B (en) A kind of method and device obtaining motion state
CN109981624B (en) Intrusion detection method, device and storage medium
CN108427618A (en) Interim card state determines method, apparatus and computer readable storage medium
CN112948704A (en) Model training method and device for information recommendation, electronic equipment and medium
CN112489653B (en) Speech recognition method, device and storage medium
CN111125388B (en) Method, device and equipment for detecting multimedia resources and storage medium
CN105786561B (en) Method and device for calling process
CN111859097A (en) Data processing method and device, electronic equipment and storage medium
CN106227402B (en) Information prompting method and device
EP3200127B1 (en) Method and device for fingerprint recognition

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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.