A kind of determination method and apparatus of move distance
Technical field
The present invention relates to data processing fields, more particularly to a kind of determination method and apparatus of move distance.
Background technique
With popularizing for mobile terminal, the application (English: Application, abbreviation: APP) on mobile terminal can be real
Existing function is more and more, such as movement class APP relatively common at present.User carry motion of mobile terminals (such as walk,
Running etc.) when, the movement class APP in mobile terminal can be opened, movement class APP can be by calling the positioning in mobile terminal
Information, record, analysis user movement parameter, such as move distance, speed etc., to provide a user digitized motion analysis
As a result.Location information described here can be the global positioning system (English: Global by mobile terminal
Positioning System, abbreviation: GPS) signal, mobile terminal Wireless Fidelity (English: Wireless-Fidelity, contracting
Write: Wi-Fi) signal or according to base station location signal obtain.
However, the positioning signal for obtaining location information is second-rate under some movement environments, believe even without positioning
Number, such as in built-up cell, some indoor sports centers etc..When user moves under this kind of movement environment, taken
The mobile terminal of band can not obtain effective positioning signal, so that movement class APP is unable to get accurate location information.So transport
Dynamic class APP will obviously be poor with the actual move distance of user by the calculated move distance of location information institute of these inaccuracy
It is not larger, provide a user bad user experience.
Summary of the invention
In order to solve the above-mentioned technical problems, the present invention provides a kind of determination method and apparatus of move distance, Ke Yicong
Step-length corresponding with motion state and cadence is matched in the step-length key-value pair learnt, raising can not rely on location information
In the case where, the APP determines the accuracy of move distance, and user experience is good.
The embodiment of the invention discloses following technical solutions:
A kind of determination method of move distance is applied to mobile terminal, and the APP being mounted in the mobile terminal obtains more
A state corresponding relationship, step number corresponding relationship and distance correspondence, the state corresponding relationship are a motion state and protect
Hold the corresponding relationship of the time interval of this motion state, the step number corresponding relationship be a measurement period step number sum with
The corresponding relationship of the time interval of this measurement period, the distance correspondence constitute movement rail by one group of adjacent position point
The move distance of mark and acquire corresponding relationship between time interval used in this group of adjacent position point;The APP is from the multiple shape
State corresponding relationship, step number corresponding relationship and distance correspondence transfer dbjective state corresponding relationship with overlapping time section,
Target step number corresponding relationship and target range corresponding relationship determine step-length key-value pair with this and are stored in the mobile terminal
In memory, corresponding relationship of the step-length key-value pair between step-length and motion state and cadence;The described method includes:
When the location information for judging the mobile terminal is insufficient for location requirement, the APP is according to the shifting
The acceleration transducer of terminal, the data of baroceptor and gyroscope are moved, determines the real time kinematics state and reality of the user
When cadence;
The APP according to the real time kinematics state and the cadence as occurrence, in real time and in the memory
The step-length key-value pair of preservation is matched;
The move distance of APP user according to the step size computation in the step-length key assignments being matched to, wherein specific packet
It includes:
The APP determines that a step-length key-value pair is matched a duration for institute's successful match;
The APP obtains described lasting according to the step size computation of step number and this step-length key-value pair in the duration
The move distance of the user in time.
Optionally, further includes:
The APP determines that motion state is identical from the memory, and cadence difference is less than the multiple of preset difference value
Step-length key-value pair;
The multiple step-length key-value pair is weighted merging treatment by the APP, the step-length key assignments after obtaining a merging
It is right;
The APP deletes the multiple step-length key-value pair from the memory, and by the step-length key assignments after the merging
To being saved in the memory.
Optionally, the APP obtains multiple state corresponding relationships, step number corresponding relationship and distance correspondence, comprising:
Data of the APP according to the acceleration transducer, baroceptor and gyroscope, the identification carrying movement
The motion state of the user of terminal determines the state corresponding relationship according to the time interval of holding motion state, and is stored in
In the memory;The movement step number of APP user according to the data statistics of the acceleration transducer, according to statistics
The step number sum in period determines the step number corresponding relationship, and saves in the memory;The APP believes the positioning of acquisition
Breath is screened, and determines that alignment quality meets the location point of preset requirement, according to the constituted motion profile of adjacent position point
Move distance determines the distance correspondence, and saves in the memory.
Optionally, the APP screens the location information of acquisition, determines that alignment quality meets the position of preset requirement
It sets a little, the distance correspondence is determined according to the move distance of the constituted motion profile of adjacent position point, comprising:
The APP obtains multiple location points to be determined according to location information, the location point to be determined include location parameter,
Speed parameter, the direction of motion and acquisition time;
Speed parameter is not met the position point deletion to be determined of the first preset condition by the APP;
The APP, by remaining name placement to be determined, is determined adjacent according to location parameter, the direction of motion and acquisition time
Whether time interval, the difference of location interval of location point acquisition time meet the second preset condition, will be incongruent to be determined
Position point deletion;
Remaining location point to be determined is linked in sequence into motion profile by the APP, will form not in the motion profile
The position point deletion to be determined of smooth track part;
Remaining position to be determined is determined as the location point that alignment quality meets preset requirement by the APP.
Optionally, the APP transfers tool from the multiple state corresponding relationship, step number corresponding relationship and distance correspondence
There are the dbjective state corresponding relationship, target step number corresponding relationship and target range corresponding relationship in overlapping time section, is determined with this
Step-length key-value pair out, comprising:
If respective time interval is not exactly the same in target step number corresponding relationship and target range corresponding relationship, described
APP carries out corresponding compensated distance according to the difference between time interval.
A kind of determining device of move distance, is set in mobile terminal, and the determining device includes processor, storage
Device, acceleration transducer, baroceptor, gyroscope and matching module;
The processor, for obtaining multiple state corresponding relationships, step number corresponding relationship and distance correspondence, the shape
State corresponding relationship is the corresponding relationship an of motion state with the time interval for keeping this motion state, and the step number is corresponding to close
System is the corresponding relationship of the step number sum of a measurement period and the time interval of this measurement period, the distance correspondence
The move distance of motion profile is constituted by one group of adjacent position point and is acquired between time interval used in this group of adjacent position point
Corresponding relationship;It transfers from the multiple state corresponding relationship, step number corresponding relationship and distance correspondence with overlapping time area
Between dbjective state corresponding relationship, target step number corresponding relationship and target range corresponding relationship, step-length key-value pair is determined with this
And it saves in the memory, corresponding relationship of the step-length key-value pair between step-length and motion state and cadence;
When the location information for judging the mobile terminal is insufficient for location requirement, the processor is also used to root
According to the data of the acceleration transducer, baroceptor and gyroscope, the real time kinematics state and in real time of the user is determined
Cadence;
The matching module, for according to the real time kinematics state and the cadence as occurrence, in real time and institute
The step-length key-value pair saved in memory is stated to be matched;
The processor is also used to the move distance of the user according to the step size computation in the step-length key assignments being matched to,
In, it specifically includes:
Determine that a step-length key-value pair is matched a duration for institute's successful match;
It is obtained in the duration according to the step size computation of step number and this step-length key-value pair in the duration
The move distance of the user.
Optionally, the processor is also used to determine that motion state is identical from the memory, and cadence difference is small
In multiple step-length key-value pairs of preset difference value;The multiple step-length key-value pair is weighted merging treatment, obtains a merging
Step-length key-value pair afterwards;Delete the multiple step-length key-value pair from the memory, and by the step-length key assignments after the merging
To being saved in the memory.
Optionally, the processor is specifically used for the number according to the acceleration transducer, baroceptor and gyroscope
According to identification carries the motion state of the user of the mobile terminal, determines the shape according to the time interval of holding motion state
State corresponding relationship, and save in the memory;According to the movement of user described in the data statistics of the acceleration transducer
Step number determines the step number corresponding relationship according to the step number sum of measurement period, and saves in the memory;To acquisition
Location information is screened, and determines that alignment quality meets the location point of preset requirement, constitutes movement according to adjacent position point
The move distance of track determines the distance correspondence, and saves in the memory.
Optionally, the processor is specifically used for obtaining multiple location points to be determined according to location information, described to be determined
Location point includes location parameter, speed parameter, the direction of motion and acquisition time;Speed parameter the first preset condition is not met into
Position point deletion to be determined;According to location parameter, the direction of motion and acquisition time by remaining name placement to be determined, phase is determined
Whether time interval, the difference of location interval of adjacent location point acquisition time meet the second preset condition, by incongruent to true
Point deletion is set in positioning;Remaining location point to be determined is linked in sequence into motion profile, it is uneven by being formed in the motion profile
The position point deletion to be determined of sliding path portion;Remaining position to be determined is determined as the position that alignment quality meets preset requirement
It sets a little.
Optionally, if the respective incomplete phase of time interval in target step number corresponding relationship and target range corresponding relationship
Together, the processor is specifically used for carrying out corresponding compensated distance according to the difference between time interval.
By the study to historical movement data it can be seen from above-mentioned technical proposal, APP in the terminal is installed
It can obtain moving in same overlapping time section from state corresponding relationship, step number corresponding relationship and distance correspondence
The corresponding relationship of state, step number and distance, and be further converted into including the corresponding pass between step-length and motion state and cadence
The step-length key-value pair of system.During user carries the mobile terminal and moves, when the APP judges current movement eventually
When the location information at end is insufficient for location requirement, using the real time kinematics state determined and real-time cadence as occurrence,
The step-length key-value pair saved in memory described in real-time matching, according to the duration of successful match and the step size computation being matched to
The move distance of user.Since cadence and motion state can only be needed not against location information according to described mobile whole
End own module data collected can be determined accurately, in this way by real-time, accurate motion state and cadence,
Step-length corresponding with motion state and cadence can be matched from the step-length key-value pair learnt, in different motion states
Under cadence, the step-length determined can change accordingly, it is possible thereby to accurately calculate movement by Stride length and frequency
Distance is improved in the case where that can not rely on location information, and the APP determines the accuracy of move distance, and user experience is good.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art
To obtain other drawings based on these drawings.
Fig. 1 is a kind of method flow diagram of the determination method of move distance provided in an embodiment of the present invention;
Fig. 2 is a kind of method flow diagram of location point screening technique provided in an embodiment of the present invention;
Fig. 3 is a kind of motion trail analysis schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structure drawing of device of the determining device of move distance provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention
A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
When carrying mobile terminal moves, the APP installed on the mobile terminal can analyze by the shifting user
The kinematic parameter of dynamic terminal acquisition, to provide a user digitized motion analysis result.
Some movement environments such as cell or arena etc. are preferable to the shielding of signal, interference effect, especially needle
To the GPS signal for being usually used in positioning, when user being caused to carry motion of mobile terminals under this kind of movement environment, mobile terminal is difficult to
Obtain accurate positioning signal.So movement class APP will obviously by the calculated move distance of location information institute of inaccuracy
Larger with the actual move distance difference of user, the motion analysis result for providing a user mistake can bring bad user's body
It tests.
For this problem, settling mode traditional at present is to move class APP to provide the typing of motion information for user,
Motion information described here mainly includes the information relevant to movement such as age, gender, height, step-length.Believe in this way in positioning
In the case that number such as GPS signal is bad, can be used the fixed step size of user's input, or using by the age, gender and
The fixed step size that Stature estimation goes out is multiplied with the cadence being calculated, to obtain the move distance of user.
However, step-length of the user under different motion states is different, for example, on foot when step-length and step-length when hurrying up
Just there is significant difference.Therefore the move distance under different motion state is unifiedly calculated using constant default step-length, obtained knot
Fruit accuracy is not naturally high.
For this purpose, the embodiment of the invention provides a kind of determination method and apparatus of move distance, by historical movement number
According to study, the APP installed in the terminal can be from state corresponding relationship, step number corresponding relationship and distance correspondence
The corresponding relationship in motion state, step number and distance in same overlapping time section is obtained, and is further converted into including step
Long and the corresponding relationship between motion state and cadence step-length key-value pair.Carry what the mobile terminal was moved in user
In the process, real-time by what is determined when the APP judges that the location information of current mobile terminal is insufficient for location requirement
Motion state and real-time cadence are as occurrence, the step-length key-value pair saved in memory described in real-time matching, according to matching at
The move distance of the duration of function and the step size computation user being matched to.Since cadence and motion state can be not against fixed
Position information, and only need accurately be determined according to the mobile terminal own module data collected, it is logical in this way
Real-time, accurate motion state and cadence are crossed, can be matched and motion state and step from the step-length key-value pair learnt
Frequently corresponding step-length, under different motion states and cadence, the step-length determined may all change accordingly, it is possible thereby to
Move distance is accurately calculated by Stride length and frequency, is improved in the case where location information can not be relied on, the APP is true
Determine the accuracy of move distance, user experience is good.
APP described in the embodiment of the present invention can be understood as a kind of movement class APP, install or be deployed in mobile terminal
In.User can open the APP when the carrying mobile terminal moves, and the mobile terminal passes through described in operation
Scheme provided in the embodiment of the present invention may be implemented in APP.During realizing above scheme, the APP may be at institute
The foreground of mobile terminal is stated, also may be at the backstage of the mobile terminal.
Embodiment one
Before the determination method for describing move distance provided in an embodiment of the present invention, provided by the invention go through is described first
The mode of learning of history exercise data.
In embodiments of the present invention, the study of step-length is mainly carried out, here by historical movement Data Management Analysis
Historical movement data are mainly the data that the APP is obtained in history use process, are also possible to obtain by other approach
The historical movement data for the user, the present invention do not limit this.During APP operation, it can continue
Carry out learn, update.To improve the accuracy of the step-length learnt.
The APP obtains multiple state corresponding relationships, step number corresponding relationship and distance correspondence, these corresponding relationships can
It is collected with the module being arranged by the mobile terminal itself, such as can be the acceleration sensing of the mobile terminal
Device, baroceptor and gyroscope data collected.It and further include being determined by what is obtained by the module with positioning function
Position information obtains, and the module with positioning function can be GPS module, Wi-Fi module or the module interacted with base station etc..
The state corresponding relationship is the corresponding relationship an of motion state with the time interval for keeping this motion state,
The step number corresponding relationship is the corresponding relationship of the step number sum of a measurement period and the time interval of this measurement period, institute
State this group of adjacent position point institute of move distance and acquisition that distance correspondence is made of motion profile one group of adjacent position point
With corresponding relationship between time interval.
Specifically, the APP can be identified according to the data of the acceleration transducer, baroceptor and gyroscope
The motion state for carrying the user of the mobile terminal is closed according to keeping the time interval of motion state to determine that the state is corresponding
System, and save in the memory.Memory described in the embodiment of the present invention can be arranged in the mobile terminal
Memory.The motion state running or can be divided into more careful motion state to walk.Pass through the shape
State corresponding relationship can identify the user and be moved in which with which kind of motion state period.
The APP can the user according to the data statistics of the acceleration transducer movement step number, according to statistics
The step number sum in period determines the step number corresponding relationship, and saves in the memory.By the step number corresponding relationship,
The step number that the user is moved in a period of time can be identified.
The APP can screen the location information of acquisition, determine that alignment quality meets the position of preset requirement
Point determines the distance correspondence according to the move distance of the constituted motion profile of adjacent position point, and is stored in described deposit
In reservoir.By the distance correspondence, initial time, the end time of the motion profile of the user can be identified
And total distance.
It, can be with by saving in the memory state corresponding relationship, step number corresponding relationship and distance correspondence
It calls at any time when needed.
After obtaining the multiple state corresponding relationship, step number corresponding relationship and distance correspondence, since these are right
Time interval is all had in should being related to, therefore can be by the overlapping relation in comparison time section, so that it is determined that source is in same
State corresponding relationship, step number corresponding relationship and distance correspondence in time interval, that is, a time zone can be defined
The move distance in movement step number and this time interval in interior motion state, this time interval, is equivalent to more complete
Kind synthesis kinematic parameter.
That is, the APP can be from the multiple state corresponding relationship, step number corresponding relationship and distance correspondence
Transfer dbjective state corresponding relationship, target step number corresponding relationship and target range corresponding relationship with overlapping time section.
By the dbjective state corresponding relationship, target step number corresponding relationship and target range corresponding relationship, can determine
Out in the overlapping time section motion state, step number and distance corresponding relationship.It can by overlapping time section and step number
To calculate the cadence in the overlapping time section, the user can be calculated in the overlapping time by distance and cadence
The length that an average step steps in section, that is, step-length.Using this determine step-length key-value pair described in step-length key-value pair as step-length
Corresponding relationship between motion state and cadence, and be stored in the memory of the mobile terminal.Specifically, the step-length
Key-value pair can key-value pair between [cadence+motion state] and [step-length].
Fig. 1 is a kind of method flow diagram of the determination method of move distance provided in an embodiment of the present invention, the method packet
It includes:
S101: when the location information for judging the mobile terminal is insufficient for location requirement, the APP is according to institute
The acceleration transducer of mobile terminal, the data of baroceptor and gyroscope are stated, determines the real time kinematics state of the user
With real-time cadence.
First by way of example, illustrate the application scenarios that can apply the embodiment of the present invention.It is not enough to when there is location information
When meeting location requirement, it at least can be understood as being likely to occur two kinds of situations below.
The first situation, although opening traditional positioning function, may shielding due to building or signal it is dry
It the reasons such as disturbs, causes the location information quality of the acquisition for mobile terminal too low, accurate positionin cannot be played the role of, or very
To the exercise data for leading to offer mistake.The concrete application scene for causing the first situation can be above-mentioned peculair motion
Environment (in indoor or cell etc.).
Second situation, may traditional positioning function of the mobile terminal (such as GPS module, Wi-Fi module etc. provide
Function) there is no open.Since the power consumption that mobile terminal is positioned using locating module is larger, in order to save electric energy,
User during exercise, can the module for providing positioning function for relevant of active close, and by using the embodiment of the present invention
The determination method of the move distance of offer obtains associ-ated motion parameters (such as move distance).
As can be seen that the embodiment of the present invention provided by move distance determination method, not only can location information not
Auxiliary provides accurate move distance in accurate situation, can also be in the scene of not location information, accurately really
The move distance of user is made, movement statistics data needed for the users such as speed, and play the technical effect of power saving.
The modules such as acceleration transducer, baroceptor and the gyroscope of the mobile terminal itself setting, are mainly used for
Perceive the relevant parameter of the mobile terminal external environment.That is, above-mentioned without under effective position data cases, even if
Data-signal environment is poor, these modules data collected can't also be affected because of the shielding or interference of data-signal,
It can still guarantee the accuracy of acquired data.
The APP can pass through lasting acceleration transducer, baroceptor and the gyroscope for calling the mobile terminal
The data acquired in real time calculate the real time kinematics state for carrying the user of the mobile terminal.
The APP can be by calling the movement step number of user described in the data statistics of the acceleration transducer, and root
The time determines real-time cadence according to statistics.
S102: the APP according to the real time kinematics state and the cadence as occurrence, in real time with the storage
The step-length key-value pair saved in device is matched.
For example, pass through the real-time determination of S101, it is available to follow the actual motion change of the user and change
Motion state and cadence.It and include [cadence+movement shape using real time kinematics state and cadence as a complete occurrence
State] and [step-length] between the step-length key-value pair of corresponding relationship carry out lasting matching.It is hereby achieved that in the specific period
Interior specific step-length.
The move distance of S103: the APP user according to the step size computation in the step-length key assignments being matched to.Wherein,
It specifically includes:
The APP determines that a step-length key-value pair is matched a duration for institute's successful match;
The APP obtains described lasting according to the step size computation of step number and this step-length key-value pair in the duration
The move distance of the user in time.
For example, the first step-length key-value pair and the second step-length key-value pair are saved in the memory, the first step-length key
The step-length for being worth centering is 1m, and the step-length in the second step-length key-value pair is 1.1m.Aprowl, 12: 10 assign at 12 points to user
In 20 points of this periods, the motion state and cadence determined match with the first step-length key-value pair, that is to say, that
Within this period, the average step length of the user can be the step-length in the long key-value pair of the first step: 1m.When using this
Between accumulation in section step number multiplied by the step-length in the first step-length key-value pair can be obtained by the user 12 points 10 minutes
To the move distance in 12 points of 20 minutes this periods.
Assigned in 12 points of 43 minutes this periods from 12: 21, the motion state and cadence determined with the second step
Long key-value pair matches, that is to say, that within this period, the average step length of the user can be the long key assignments of second step
The step-length of centering: 1.1m.Using the step number of the accumulation in this period multiplied by the step-length in the second step-length key-value pair just
The available user assigns to the move distance in 12 points of 43 minutes this periods 12: 21.
By the study to historical movement data it can be seen from the present embodiment, installing APP in the terminal can be with
Shape is moved from obtaining being in same overlapping time section in state corresponding relationship, step number corresponding relationship and distance correspondence
The corresponding relationship of state, step number and distance, and be further converted into including the corresponding relationship between step-length and motion state and cadence
Step-length key-value pair.During user carries the mobile terminal and moves, when the APP judges current mobile terminal
Location information when being insufficient for location requirement, it is real using the real time kinematics state determined and real-time cadence as occurrence
When match the step-length key-value pair saved in the memory, used according to the duration of successful match and the step size computation that is matched to
The move distance at family.Since cadence and motion state can only be needed not against location information according to the mobile terminal
Own module data collected can determine accurately, can in this way by real-time, accurate motion state and cadence
To match step-length corresponding with motion state and cadence from the step-length key-value pair learnt, in different motion state and
Under cadence, the step-length determined can change accordingly, it is possible thereby to by Stride length and frequency accurately calculate movement away from
From improving in the case where location information can not be relied on, the APP determines the accuracy of move distance, and user experience is good.
Embodiment two
In the present embodiment, will be described with to the mode of learning of the historical movement data it is specific refinement and it is excellent
Change.
The APP is described in detail first to screen the location information of acquisition, determines that alignment quality meets default want
The location point asked determines the process of the distance correspondence according to the move distance of the constituted motion profile of adjacent position point.
Optionally, Fig. 2 is a kind of method flow diagram of location point screening technique provided in an embodiment of the present invention, comprising:
S201: the APP obtains multiple location points to be determined according to location information, and the location point to be determined includes position
Parameter, speed parameter, the direction of motion and acquisition time.
S202: the APP does not meet speed parameter the position point deletion to be determined of the first preset condition.
For example, first preset condition can be a velocity interval, the lower limit value of this velocity interval can be with
For minimum speed possible in motion process, upper limit value can be the maximum value of sports knowledge speed.By with it is described first pre-
, can be too low by speed if condition is matched, it may belong to static location point to be determined and excessive velocities substantially, surpass
The position point deletion to be determined of sports knowledge speed out.
S203: the APP according to location parameter, the direction of motion and acquisition time by remaining name placement to be determined, really
Determine the time interval of adjacent position point acquisition time, whether the difference of location interval meets the second preset condition, will be incongruent
Position point deletion to be determined.
For example, this step carries out comprehensive sieve primarily directed to the residue location point to be determined after screening by S202
Choosing.
The time interval and location interval of adjacent location point to be determined are calculated, if the time interval of location point to be determined is poor
(it can be judged using the statistical algorithms such as standard deviation or variance are sought) away from very little, and apart from difference very little, then it is assumed that institute
It is more stable to state movement velocity of the user between these location points to be determined, can be retained.Otherwise, by position to be determined
Point deletion.
S204: the APP is linked in sequence remaining location point to be determined at motion profile, by group in the motion profile
At the position point deletion to be determined of unsmooth path portion.
For example, adjacent location point to be determined is connected to form motion profile as shown in Figure 3, two adjacent to true
A Directed Vector can be formed according to the direction of motion by determining location point, then can calculate the vector folder of adjacent Directed Vector
Angle.If the difference variation of these vector angles is gentle, then it is assumed that the motion profile of the user is than more gentle, and the user is not
Be do broken line movement or location information receive caused by interference.If it is not, will then form the position to be determined of unsmooth path portion
Set point deletion.
It is illustrated by attached drawing, Fig. 3 is a kind of motion trail analysis schematic diagram provided in an embodiment of the present invention.In Fig. 3
Share 1 to 9 totally nine location points to be determined.In 1 to 5 this five location points to be determined, Directed Vector 23 and Directed Vector
34 angle is the excessive of not perfectly flat cunning, then 1 to 5 this five location points to be determined constitute unsmooth track, it will are deleted
It removes.And in motion profile composed by 5 to 9 this five location points to be determined, the angle difference of the adjacent Directed Vector of every two becomes
Fixation is all compared in change, such as about within 15 degree, then it is assumed that motion profile composed by 5 to 9 this five location points to be determined
Belong to smooth motion profile.It can illustrate that the user moves along a relatively good route, and position letter
Breath is not interfered strongly, and the location point to be determined for forming this componental movement track can retain.
S205: the APP is determined as remaining position to be determined the location point that alignment quality meets preset requirement.
In motion profile composed by the location point remained, the motion mode of the user is basicly stable, movement is fast
Basicly stable, direction of motion variation is spent smoothly, among study.
Next, the optimization by description to the step-length key-value pair saved in memory.During study, step-length key assignments
Pair quantity will be more and more, it is appropriate to merge the accuracy that step-length key-value pair can be improved.Optionally, the embodiment of the present invention provides
A kind of pair of step-length key-value pair weighting merging treatment.
The APP determines that motion state is identical from the memory, and cadence difference is less than the multiple of preset difference value
Step-length key-value pair.The multiple step-length key-value pair is weighted merging treatment by the APP, the step-length key after obtaining a merging
Value pair.The APP deletes the multiple step-length key-value pair from the memory, and the step-length key-value pair after the merging is protected
It is stored in the memory.
For example, if the motion state of the first step-length key-value pair and the second step-length key-value pair is all the same, the first step-length key
The cadence of value pair is that 1 step is per second, and the cadence of the second step-length key-value pair is that 1.1 steps are per second, then the first step-length key-value pair and second
The cadence difference of step-length key-value pair is that 0.1 step is per second, if being less than preset difference (it is per second to be assumed to be 0.2 step), then can
The first step-length key-value pair and the second step-length key-value pair are weighted merging treatment, third step-length key-value pair is obtained.The APP
First step-length key-value pair and the second step-length key-value pair can be deleted from the memory, and third step-length key-value pair is saved
Into the memory.
The trigger condition of the weighting merging treatment of step-length key-value pair can be, if the step-length key-value pair saved in memory
The excessive certain amount of number, be weighted merging treatment.It is also possible to when new study is to a step-length key-value pair, by this
Previously stored step-length key-value pair is weighted merging treatment in step-length key-value pair and memory.
The embodiment of the invention also provides determining dbjective state corresponding relationship, target step number corresponding relationship and target range
Correcting mode during corresponding relationship.Optionally, the APP from the multiple state corresponding relationship, step number corresponding relationship and
Distance correspondence transfers dbjective state corresponding relationship, target step number corresponding relationship and target range with overlapping time section
Corresponding relationship determines step-length key-value pair with this, comprising:
If respective time interval is not exactly the same in target step number corresponding relationship and target range corresponding relationship, described
APP carries out corresponding compensated distance according to the difference between time interval.
The distance of compensation can difference between time interval it is related, certain distance can be accordingly increased, can also be with
It is corresponding to reduce certain distance.
Embodiment three
Fig. 4 is a kind of structure drawing of device of the determining device of move distance provided in an embodiment of the present invention, is applied to movement
Terminal, the determining device include processor 400, memory 401, acceleration transducer 402, baroceptor 403, gyroscope
404 and matching module 405;
The processor 400, for obtaining multiple state corresponding relationships, step number corresponding relationship and distance correspondence, institute
State the corresponding relationship that state corresponding relationship is a motion state with the time interval for keeping this motion state, the step number pair
It should be related to the corresponding relationship of the time interval of the step number sum and this measurement period for a measurement period, the distance is corresponding
Relationship constitutes time interval used in this group of adjacent position point of move distance and acquisition of motion profile by one group of adjacent position point
Between corresponding relationship.
For example, the processor 400 and memory 401, acceleration transducer 402, baroceptor 403 and gyro
Instrument 404 etc. are connected.The processor 400 lasting in use learn by historical movement Data Management Analysis
It practises, updates.To improve the accuracy of the step-length learnt.
The processor 400 obtains multiple state corresponding relationships, step number corresponding relationship and distance correspondence, these correspondences
Relationship can pass through the acceleration transducer 402, baroceptor 403 and the data collected of gyroscope 404.And it also wraps
Include by by with positioning function module obtain location information obtain, with positioning function module can be GPS module,
Wi-Fi module or the module etc. interacted with base station.
Specifically, the processor 400 is specifically used for according to the acceleration transducer 402, baroceptor 403 and top
The data of spiral shell instrument 404, identification carry the motion state of the user of the mobile terminal, according to the time interval for keeping motion state
It determines the state corresponding relationship, and is stored in the memory 401;The motion state can for walk, running or
More careful motion state can be divided into.By the state corresponding relationship, the user can be identified in which time
Section is moved with which kind of motion state.
According to the movement step number of user described in the data statistics of the acceleration transducer 402, according to the step of measurement period
Number sum determines the step number corresponding relationship, and is stored in the memory 401;It, can be with by the step number corresponding relationship
Identify the step number that the user is moved in a period of time.
The location information of acquisition is screened, determines that alignment quality meets the location point of preset requirement, according to adjacent
The move distance of the constituted motion profile of location point determines the distance correspondence, and saves in the memory.Pass through
The distance correspondence can identify initial time, end time and the total distance of the motion profile of the user.
It, can by the way that state corresponding relationship, step number corresponding relationship and distance correspondence to be stored in the memory 401
To call at any time when needed.
After obtaining the multiple state corresponding relationship, step number corresponding relationship and distance correspondence, since these are right
Time interval is all had in should being related to, therefore can be by the overlapping relation in comparison time section, so that it is determined that source is in same
State corresponding relationship, step number corresponding relationship and distance correspondence in time interval, that is, a time zone can be defined
The move distance in movement step number and this time interval in interior motion state, this time interval, is equivalent to more complete
Kind synthesis kinematic parameter.
That is, the processor 400 can be from the multiple state corresponding relationship, step number corresponding relationship and apart from right
It should be related to and transfer the corresponding pass of dbjective state corresponding relationship, target step number corresponding relationship and target range with overlapping time section
System.
By the dbjective state corresponding relationship, target step number corresponding relationship and target range corresponding relationship, can determine
Out in the overlapping time section motion state, step number and distance corresponding relationship.It can by overlapping time section and step number
To calculate the cadence in the overlapping time section, the user can be calculated in the overlapping time by distance and cadence
The length that an average step steps in section, that is, step-length.Using this determine step-length key-value pair described in step-length key-value pair as step-length
Corresponding relationship between motion state and cadence, and be stored in the memory of the mobile terminal.Specifically, the step-length
Key-value pair can key-value pair between [cadence+motion state] and [step-length].
When the location information for judging the mobile terminal is insufficient for location requirement, the processor 400 is also used
In the data according to the acceleration transducer 402, baroceptor 403 and gyroscope 404, the real-time fortune of the user is determined
Dynamic state and real-time cadence.
First by way of example, illustrate the application scenarios that can apply the embodiment of the present invention.It is not enough to when there is location information
When meeting location requirement, it at least can be understood as being likely to occur two kinds of situations below.
The first situation, although opening traditional positioning function, may shielding due to building or signal it is dry
It the reasons such as disturbs, causes the location information quality of the acquisition for mobile terminal too low, accurate positionin cannot be played the role of, or very
To the exercise data for leading to offer mistake.The concrete application scene for causing the first situation can be above-mentioned peculair motion
Environment (in indoor or cell etc.).
Second situation, may traditional positioning function of the mobile terminal (such as GPS module, Wi-Fi module etc. provide
Function) there is no open.Since the power consumption that mobile terminal is positioned using locating module is larger, in order to save electric energy,
User during exercise, can the module for providing positioning function for relevant of active close, and by using the embodiment of the present invention
The determination method of the move distance of offer obtains associ-ated motion parameters (such as move distance).
As can be seen that the move distance being set in the mobile terminal provided by the embodiment of the present invention determines dress
It sets, not only auxiliary can provide accurate move distance in the case where location information inaccuracy, can also believe in no positioning
In the scene of breath, the move distance of user is accurately determined, movement statistics data needed for the users such as speed, and play
The technical effect of power saving.
The modules such as the acceleration transducer 402, baroceptor 403 and gyroscope 404 are mainly used for perceiving the shifting
The relevant parameter of dynamic terminal external environment.That is, above-mentioned without under effective position data cases, even if data-signal ring
Border is poor, these modules data collected can't also be affected because of the shielding or interference of data-signal, can still protect
Demonstrate,prove the accuracy of acquired data.
The processor 400 can call the acceleration transducer 402, baroceptor 403 and gyro by lasting
The data that instrument 404 acquires in real time calculate the real time kinematics state for carrying the user of the mobile terminal.
The processor 400 can be by calling the movement of user described in the data statistics of the acceleration transducer 402
Step number, and real-time cadence is determined according to statistical time.
The matching module 405, for according to the real time kinematics state and the cadence as occurrence, in real time with
The step-length key-value pair saved in the memory 401 is matched.
For example, by determining in real time, the available movement for following the actual motion change of the user and changing
State and cadence.The matching module 405 and includes [step using real time kinematics state and cadence as a complete occurrence
Frequently+motion state] and [step-length] between the step-length key-value pair of corresponding relationship carry out lasting matching.It is hereby achieved that specific
Period in specific step-length.
The processor 400 be also used to the movement of the user according to the step size computation in the step-length key assignments being matched to away from
From, wherein it specifically includes:
Determine that a step-length key-value pair is matched a duration for institute's successful match;
It is obtained in the duration according to the step size computation of step number and this step-length key-value pair in the duration
The move distance of the user.
For example, the first step-length key-value pair and the second step-length key-value pair are saved in the memory, the first step-length key
The step-length for being worth centering is 1m, and the step-length in the second step-length key-value pair is 1.1m.Aprowl, 12: 10 assign at 12 points to user
In 20 points of this periods, the motion state and cadence determined match with the first step-length key-value pair, that is to say, that
Within this period, the average step length of the user can be the step-length in the long key-value pair of the first step: 1m.When using this
Between accumulation in section step number multiplied by the step-length in the first step-length key-value pair can be obtained by the user 12 points 10 minutes
To the move distance in 12 points of 20 minutes this periods.
Assigned in 12 points of 43 minutes this periods from 12: 21, the motion state and cadence determined with the second step
Long key-value pair matches, that is to say, that within this period, the average step length of the user can be the long key assignments of second step
The step-length of centering: 1.1m.Using the step number of the accumulation in this period multiplied by the step-length in the second step-length key-value pair just
The available user assigns to the move distance in 12 points of 43 minutes this periods 12: 21.
By the study to historical movement data it can be seen from the present embodiment, be arranged movement in the terminal away from
From determining device can be obtained from state corresponding relationship, step number corresponding relationship and distance correspondence in same overlapping when
Between in section motion state, step number and distance corresponding relationship, and be further converted into including step-length and motion state and cadence
Between corresponding relationship step-length key-value pair.During user carries the mobile terminal and moves, when the movement
When determination of distance device judges that the location information of current mobile terminal is insufficient for location requirement, real-time fortune that will determine
Dynamic state and real-time cadence are as occurrence, the step-length key-value pair saved in memory described in real-time matching, according to successful match
Duration and the move distance of step size computation user that is matched to.Since cadence and motion state can be not against positioning
Information, and only need accurately be determined according to the mobile terminal own module data collected, pass through in this way
In real time, accurately motion state and cadence, can match and motion state and cadence from the step-length key-value pair learnt
Corresponding step-length, under different motion states and cadence, the step-length determined can change accordingly, it is possible thereby to logical
It crosses Stride length and frequency and accurately calculates move distance, improve in the case where location information can not be relied on, the APP is determined
The accuracy of move distance, user experience are good.
Example IV
In the present embodiment, will be described with to the mode of learning of the historical movement data it is specific refinement and it is excellent
Change.
The processor 400 is specifically used for obtaining multiple location points to be determined, the position to be determined according to location information
Point includes location parameter, speed parameter, the direction of motion and acquisition time;By speed parameter do not meet the first preset condition to true
Point deletion is set in positioning;According to location parameter, the direction of motion and acquisition time by remaining name placement to be determined, adjacent bit is determined
Set the time interval of an acquisition time, whether the difference of location interval meets the second preset condition, by incongruent position to be determined
Set point deletion;Remaining location point to be determined is linked in sequence into motion profile, uneven sliding rail will be formed in the motion profile
The position point deletion to be determined of mark part;Remaining position to be determined is determined as the position that alignment quality meets preset requirement
Point.
For example, carrying out Integrated Selection primarily directed to the residue location point to be determined after screening.
The time interval and location interval of adjacent location point to be determined are calculated, if the time interval of location point to be determined is poor
(it can be judged using the statistical algorithms such as standard deviation or variance are sought) away from very little, and apart from difference very little, then it is assumed that institute
It is more stable to state movement velocity of the user between these location points to be determined, can be retained.Otherwise, by position to be determined
Point deletion.
Adjacent location point to be determined is connected to form motion profile as shown in Figure 3, two adjacent location points to be determined
A Directed Vector can be formed according to the direction of motion, then can calculate the vector angle of adjacent Directed Vector.If this
The difference variation of a little vector angles is gentle, then it is assumed that for the motion profile of the user than more gentle, the user is rolled over doing
Line movement or location information receive caused by interference.If it is not, will then form the position point deletion to be determined of unsmooth path portion.
1 to 9 totally nine location points to be determined are shared in Fig. 3.In 1 to 5 this five location points to be determined, Directed Vector
23 and the angle of Directed Vector 34 be the excessive of not perfectly flat cunning, then 1 to 5 this five location points to be determined constitute uneven sliding rail
Mark, it will be deleted.And in motion profile composed by 5 to 9 this five location points to be determined, the adjacent Directed Vector of every two
Fixation is all compared in angle difference variation, such as about within 15 degree, then it is assumed that 5 to 9 this five location points to be determined are formed
Motion profile belong to smooth motion profile.It can illustrate that the user moves along a relatively good route,
And location information is not interfered strongly, and the location point to be determined for forming this componental movement track can retain.
In motion profile composed by the location point remained, the motion mode of the user is basicly stable, movement is fast
Basicly stable, direction of motion variation is spent smoothly, among study.
Next, the optimization by description to the step-length key-value pair saved in memory.During study, step-length key assignments
Pair quantity will be more and more, it is appropriate to merge the accuracy that step-length key-value pair can be improved.Optionally, the embodiment of the present invention provides
A kind of processor to the weighting merging treatment of step-length key-value pair.
The processor 400 is also used to determine that motion state is identical from the memory, and cadence difference is less than in advance
If multiple step-length key-value pairs of difference;The multiple step-length key-value pair is weighted merging treatment, after obtaining a merging
Step-length key-value pair;The multiple step-length key-value pair is deleted from the memory, and the step-length key-value pair after the merging is protected
It is stored in the memory.
For example, if the motion state of the first step-length key-value pair and the second step-length key-value pair is all the same, the first step-length key
The cadence of value pair is that 1 step is per second, and the cadence of the second step-length key-value pair is that 1.1 steps are per second, then the first step-length key-value pair and second
The cadence difference of step-length key-value pair is that 0.1 step is per second, if being less than preset difference (it is per second to be assumed to be 0.2 step), then can
The first step-length key-value pair and the second step-length key-value pair are weighted merging treatment, third step-length key-value pair is obtained.The place
Reason device can delete the first step-length key-value pair and the second step-length key-value pair from the memory, and by third step-length key-value pair
It is saved in the memory.
The trigger condition of the weighting merging treatment of step-length key-value pair can be, if the step-length key-value pair saved in memory
The excessive certain amount of number, be weighted merging treatment.It is also possible to when new study is to a step-length key-value pair, by this
Previously stored step-length key-value pair is weighted merging treatment in step-length key-value pair and memory.
The embodiment of the invention also provides determining dbjective state corresponding relationship, target step number corresponding relationship and target range
Correcting mode during corresponding relationship.Optionally, the APP from the multiple state corresponding relationship, step number corresponding relationship and
Distance correspondence transfers dbjective state corresponding relationship, target step number corresponding relationship and target range with overlapping time section
Corresponding relationship determines step-length key-value pair with this, comprising:
If respective time interval is not exactly the same in target step number corresponding relationship and target range corresponding relationship, the place
Implement body is managed to be used to carry out corresponding compensated distance according to the difference between time interval.
The distance of compensation can difference between time interval it is related, certain distance can be accordingly increased, can also be with
It is corresponding to reduce certain distance.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and foregoing routine can be stored in a computer readable storage medium, which exists
When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned can be at least one in following media
Kind: read-only memory (English: read-only memory, abbreviation: ROM), RAM, magnetic or disk etc. are various to be can store
The medium of program code.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it
Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments.
For equipment and system embodiment, since it is substantially similar to the method embodiment, so describe fairly simple,
The relevent part can refer to the partial explaination of embodiments of method.Equipment and system embodiment described above is only schematic
, wherein unit may or may not be physically separated as illustrated by the separation member, it is shown as a unit
Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks
On unit.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
Those of ordinary skill in the art can understand and implement without creative efforts.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto,
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by anyone skilled in the art,
It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of protection of the claims
Subject to.