CN110246561A - A kind of moving distance calculation method, device and system - Google Patents

A kind of moving distance calculation method, device and system Download PDF

Info

Publication number
CN110246561A
CN110246561A CN201910364520.3A CN201910364520A CN110246561A CN 110246561 A CN110246561 A CN 110246561A CN 201910364520 A CN201910364520 A CN 201910364520A CN 110246561 A CN110246561 A CN 110246561A
Authority
CN
China
Prior art keywords
motion
preset
moving
preset motion
models
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.)
Pending
Application number
CN201910364520.3A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201910364520.3A priority Critical patent/CN110246561A/en
Publication of CN110246561A publication Critical patent/CN110246561A/en
Priority to PCT/CN2020/086524 priority patent/WO2020221109A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/10Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration
    • G01C21/12Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning
    • G01C21/16Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation
    • G01C21/165Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 by using measurements of speed or acceleration executed aboard the object being navigated; Dead reckoning by integrating acceleration or speed, i.e. inertial navigation combined with non-inertial navigation instruments
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • G01S19/45Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement
    • G01S19/47Determining position by combining measurements of signals from the satellite radio beacon positioning system with a supplementary measurement the supplementary measurement being an inertial measurement, e.g. tightly coupled inertial
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/30ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to physical therapies or activities, e.g. physiotherapy, acupressure or exercising

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Automation & Control Theory (AREA)
  • Biophysics (AREA)
  • Physical Education & Sports Medicine (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Public Health (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

本申请实施例提供一种移动距离计算方法、装置以及系统,涉及终端领域,解决了现有技术中估计移动距离时引起的误差较大的问题。该方法包括:终端检测到运动目标处于运动状态的情况下,终端确定运动目标的加速度信息和第一运动参数;终端根据加速度信息和N个预设运动模型确定运动目标在运动时间内的第二运动参数;其中,第一运动参数为运动目标的步数,第二运动参数为运动目标的步幅;或者,第一运动参数为运动目标的运动时间,第二运动参数为运动目标的运动速度;N为大于或等于2的整数;终端根据第一运动参数和第二运动参数确定运动目标的移动距离。用于提高计算运动目标距离的准确度。

Embodiments of the present application provide a method, device, and system for calculating a moving distance, which relate to the field of terminals and solve the problem of large errors caused when estimating moving distances in the prior art. The method includes: when the terminal detects that the moving object is in a moving state, the terminal determines the acceleration information and the first motion parameter of the moving object; the terminal determines the second speed of the moving object within the moving time according to the acceleration information and N preset motion models Motion parameters; wherein, the first motion parameter is the number of steps of the motion target, and the second motion parameter is the stride of the motion target; or, the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target ; N is an integer greater than or equal to 2; the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter. It is used to improve the accuracy of calculating the distance of moving targets.

Description

Moving distance calculation method, device and system
Technical Field
The present application relates to the field of terminals, and in particular, to a method, an apparatus, and a system for calculating a moving distance.
Background
With more and more importance placed on sports and health, the detection of the health and the motion state of a moving object becomes a necessary function of an intelligent terminal (such as a mobile phone or a sports bracelet). The intelligent terminal can determine the motion amount of the moving target by detecting the motion step number and the moving distance of the moving target, further determine parameters of the moving target such as motion intensity and heat consumption, and provide good motion detection for the moving target.
However, when determining the moving distance of the moving object, the stride of the moving object is usually determined, but there is an error in determining the stride by the motion detection algorithm, which results in a large error in estimating the moving distance.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for calculating a moving distance, and solves the problem of large error caused by estimating the moving distance in the prior art.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a moving distance calculation method, where the method includes: under the condition that the terminal detects that the moving target is in a moving state, the terminal determines acceleration information and a first moving parameter of the moving target; the terminal determines a second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models; the first motion parameter is the step number of the motion target, and the second motion parameter is the stride of the motion target; or the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2; and the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter.
The embodiment of the application provides a moving distance calculating method. And the terminal determines a second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models. The first motion parameter is the step number of the motion target, and the second motion parameter is the stride of the motion target; or the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2; and the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter. The moving distance of the moving target is calculated by utilizing the N preset moving models, the second moving parameter can be determined by integrating the calculation results of the N preset moving models, the problem that when the moving distance of the moving target is calculated through a single preset moving model, the calculation error of the moving distance is large due to the fact that the difference between the acceleration of the single preset moving model and the acceleration information of the moving target is large is solved, and therefore the accuracy of calculating the moving distance of the moving target can be improved.
In a possible implementation manner, the determining, by the terminal, the moving distance according to the first motion parameter and the second motion parameter includes: and the terminal determines the moving distance according to the product of the step number and the stride.
In one possible implementation manner, the first motion parameter is the motion time of the moving object, and the second motion parameter is the motion speed of the moving object; the terminal determines the moving distance according to the first motion parameter and the second motion parameter, and the method comprises the following steps: and the terminal determines the moving distance according to the product of the moving time and the moving speed.
In a possible implementation manner, the determining, by the terminal, the second motion parameter of the moving object within the motion time according to the acceleration information and the N preset motion models includes: the terminal inputs the acceleration information into the N preset motion models to obtain a third motion parameter corresponding to each preset motion model in the N preset motion models; and the terminal determines a second motion parameter according to the third motion parameter corresponding to each preset motion model and the respective weight of each preset motion model. The second motion parameter may be made to conform to the motion characteristics of the moving object by setting weights for the respective preset motion models.
In a possible implementation manner, the method provided in the embodiment of the present application further includes: and the terminal determines the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models. The weight of each preset motion model is determined according to the similarity of the acceleration information and the preset motion model, so that the weight of each preset motion model can be set more reasonably, for example, a larger weight can be distributed to the preset motion model with higher similarity to the acceleration information, and the accuracy of the calculation of the moving distance is improved.
In a possible implementation manner, the determining, by the terminal, the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models includes: the terminal determines the average value of the acceleration variance and the average value of the step frequency of each preset motion model; the terminal determines the similarity of the acceleration information and each preset motion model according to the acceleration variance average value and the step frequency average value of each preset motion model and the acceleration variance and the step frequency of the acceleration information; and the terminal determines the weight of each preset motion model according to the acceleration information and the similarity of each preset motion model. The similarity between the acceleration information and each preset motion model in the N preset motion models can be more accurately determined through the acceleration variance and the step frequency.
In one possible implementation manner, the N preset motion models are preset motion models in the M preset motion models, a similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N. The calculation amount of the terminal can be reduced by selecting the N motion models with higher similarity in the M preset motion models, and the interference of the motion models with lower similarity to the calculation result is eliminated.
In one possible implementation, the acceleration information includes first acceleration information corresponding to each of a plurality of time windows within the exercise time; when the second motion parameter is the motion speed of the moving object, the terminal determines the second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models, and the method comprises the following steps: and the terminal determines the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models. So as to calculate the corresponding movement speed in each time window.
In a possible implementation manner, the determining, by the terminal, the moving distance of the moving object according to the first motion parameter and the second motion parameter includes: and the terminal determines the moving distance of the moving object according to the moving speed corresponding to each time window and the respective time length of each time window. The moving distance is determined according to the corresponding moving speed in each time window, so that the result of determining the moving distance according to the moving speed is more accurate.
In a possible implementation manner, the method provided in the embodiment of the present application further includes: the terminal obtains N preset motion models from the server. The terminal obtains N pre-trained preset motion models of the server, so that the calculation amount of the terminal can be reduced, and the calculation time is saved.
In one possible implementation manner, the N preset motion models are stored in the terminal in advance.
In a second aspect, an embodiment of the present application provides a moving distance calculation method, including: the server obtains historical data. The historical data includes motion data of different motion types. The server divides the history data into N types of history data. And the server performs preset motion model training on the N types of historical data to obtain N preset motion models.
The embodiment of the application provides a moving distance calculating method, wherein a server acquires historical data; the server divides the historical data into N types of historical data; and the server performs preset motion model training on the N types of historical data to obtain N preset motion models. The server classifies the historical data and respectively conducts preset motion model training on different types of historical data to obtain N preset motion models. The adaptability to different operation type scenes is improved.
In a possible implementation manner, after the server performs preset motion model training on N types of historical data to obtain N preset motion models, the method further includes: and the server sends the N preset motion models to the terminal.
In a possible implementation manner, the sending, by the server, the N preset motion models to the terminal includes: the server receives an acquisition request from the terminal. The acquisition request is used for requesting N preset motion models. And the server sends N preset motion models to the terminal according to the acquisition request.
It should be understood that if N preset motion models are selected from the M preset motion models by the terminal, the terminal acquires at least the M preset motion models from the server.
In one possible implementation manner, the N preset motion models are preset motion models in the M preset motion models, a similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N.
It should be understood that if the server selects N preset motion models from the M preset motion models, the terminal also needs to carry acceleration information of the moving object in the acquisition request sent to the server.
In a third aspect, an embodiment of the present application provides a moving distance calculation apparatus, including: the processing unit is used for determining acceleration information and a first motion parameter of the moving target under the condition that the moving target is detected to be in a motion state; the processing unit is further used for determining second motion parameters of the moving object in the motion time according to the acceleration information and the N preset motion models; the first motion parameter is the step number of the motion target, and the second motion parameter is the stride of the motion target; or the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2; and the processing unit is also used for determining the moving distance of the moving target according to the first motion parameter and the second motion parameter.
In one possible implementation manner, the first motion parameter is the number of steps of the moving target, and the second motion parameter is the stride of the moving target; the processing unit is further specifically configured to: and determining the moving distance according to the product of the step number and the step length.
In one possible implementation manner, the first motion parameter is the motion time of the moving object, and the second motion parameter is the motion speed of the moving object; the processing unit is further specifically configured to: and determining the moving distance according to the product of the moving time and the moving speed.
In one possible implementation, the processing unit is further specifically configured to: inputting the acceleration information into N preset motion models to obtain a third motion parameter corresponding to each preset motion model in the N preset motion models; and determining a second motion parameter according to the third motion parameter corresponding to each preset motion model and the respective weight of each preset motion model.
In one possible implementation, the processing unit is further specifically configured to: and determining the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models.
In one possible implementation, the processing unit is further specifically configured to: determining an acceleration variance average value and a step frequency average value of each preset motion model; determining the similarity of the acceleration information and each preset motion model according to the acceleration variance average value and the step frequency average value of each preset motion model and the acceleration variance and the step frequency of the acceleration information; and determining the weight of each preset motion model according to the acceleration information and the similarity of each preset motion model.
According to one possible implementation manner, the N preset motion models are preset motion models in the M preset motion models, the similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N.
In one possible implementation manner, the acceleration information includes first acceleration information corresponding to each of a plurality of time windows within the exercise time; the processing unit is further specifically configured to: and determining the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models.
In one possible implementation, the processing unit is further specifically configured to: and determining the moving distance of the moving target according to the corresponding moving speed of each time window and the respective time length of each time window.
In one possible implementation, the moving distance calculating device further includes: and the communication unit is used for acquiring the N preset motion models from the server.
For another example, an embodiment of the present application provides a moving distance calculating device, where the moving distance calculating device may be a terminal or a chip in the terminal. When the moving distance calculation device is a terminal, the communication unit may be a communication interface. The processing unit may be a processor. The movement distance calculation means may further include a storage unit. The storage unit may be a memory. The memory unit is to store computer program code, the computer program code comprising instructions. The processing unit executes the instructions stored by the storage unit to enable the terminal to implement the moving distance calculating method described in the first aspect or any one of the possible implementation manners of the first aspect. When the moving distance calculating device is a chip within a terminal, the processing unit may be a processor, and the communication unit may be collectively referred to as: a communication interface. For example, the communication interface may be an input/output interface, a pin or a circuit, or the like. The processing unit executes computer program code stored by a storage unit, which may be a storage unit within the chip (e.g., a register, a cache, etc.) or a storage unit external to the chip within the terminal (e.g., a read-only memory, a random access memory, etc.), to cause the terminal to implement a moving distance calculation method described in the first aspect or any one of the possible implementations of the first aspect.
Optionally, the processor, the communication interface and the memory are coupled to each other.
In a fourth aspect, an embodiment of the present application provides a moving distance calculating device, including: a communication unit for acquiring history data of the motion; the processing unit is used for dividing the historical data into N types of historical data; and the processing unit is also used for carrying out preset motion model training on the N types of historical data to obtain N preset motion models.
In a possible implementation manner, after the processing unit performs preset motion model training on the N types of historical data to obtain N preset motion models, the communication unit is further specifically configured to: and sending the N preset motion models to the terminal.
In a possible implementation manner, the communication unit is further specifically configured to: receiving an acquisition request from a terminal; the acquisition request is used for requesting N preset motion models. The communication unit is further specifically configured to: and sending the N preset motion models to the terminal.
It should be understood that, if N preset motion models are selected by the terminal from the M preset motion models, the communication unit is further specifically configured to: and sending at least M preset motion models to the terminal.
In one possible implementation manner, the N preset motion models are preset motion models in the M preset motion models, a similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N.
It should be understood that if the processing unit selects N preset motion models from the M preset motion models, the terminal also needs to carry acceleration information of the moving object in the acquisition request sent to the server.
For another example, the embodiment of the present application provides a moving distance calculating device, which may be a server or a chip within the server. When the mobile distance calculation means is a server, the communication unit may be a communication interface. The processing unit may be a processor. The movement distance calculation means may further include a storage unit. The storage unit may be a memory. The memory unit is to store computer program code, the computer program code comprising instructions. The processing unit executes the instructions stored by the storage unit to cause the server to implement a movement distance calculation method described in the second aspect or any one of the possible implementations of the second aspect. When the moving distance calculating device is a chip within a server, the processing unit may be a processor, and the communication unit may be collectively referred to as: a communication interface. For example, the communication interface may be an input/output interface, a pin or a circuit, or the like. The processing unit executes computer program code stored by a storage unit, which may be a storage unit within the chip (e.g., a register, a cache, etc.) or a storage unit external to the chip within the server (e.g., a read-only memory, a random access memory, etc.), to cause the terminal to implement a movement distance calculation method described in the second aspect or any one of the possible implementations of the second aspect.
Optionally, the processor, the communication interface and the memory are coupled to each other.
In a fifth aspect, an embodiment of the present application provides a moving distance calculation apparatus, including: a processor and a communication interface; the communication interface is coupled to a processor for executing a computer program or instructions for implementing the movement distance calculation method as described in the first aspect and any one of the possible implementations of the first aspect.
In a sixth aspect, an embodiment of the present application provides another moving distance calculating apparatus, including: a processor and a communication interface; the communication interface is coupled to a processor for executing a computer program or instructions for implementing the movement distance calculation method as described in the second aspect and any possible implementation manner of the second aspect.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored, and when the instructions are executed on a moving distance calculation apparatus, the moving distance calculation apparatus is caused to execute the moving distance calculation method described in the first aspect and any possible implementation manner of the first aspect.
In an eighth aspect, embodiments of the present application provide a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a moving distance calculation apparatus, the moving distance calculation apparatus is caused to execute a moving distance calculation method as described in the second aspect and any possible implementation manner of the second aspect.
In a ninth aspect, embodiments of the present application provide a computer program product containing instructions that, when run on a mobile distance calculation apparatus, cause the mobile distance calculation apparatus to perform the mobile distance calculation method as described in the first aspect and any one of the possible implementations of the first aspect.
In a tenth aspect, embodiments of the present application provide a computer program product containing instructions that, when run on a mobile distance calculation apparatus, cause the mobile distance calculation apparatus to perform the mobile distance calculation method as described in the second aspect and any one of the possible implementations of the second aspect.
In an eleventh aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, and the communication interface is coupled to the processor, and the processor is configured to execute a computer program or instructions to implement the moving distance calculation method as described in the first aspect and any possible implementation manner of the first aspect.
In particular, the chip provided in the embodiments of the present application further includes a memory for storing a computer program or instructions.
In a twelfth aspect, embodiments of the present application provide a chip, where the chip includes a processor and a communication interface, and the communication interface is coupled to the processor, and the processor is configured to execute a computer program or instructions to implement the moving distance calculation method as described in the second aspect and any possible implementation manner of the second aspect.
In particular, the chip provided in the embodiments of the present application further includes a memory for storing a computer program or instructions.
In a thirteenth aspect, an embodiment of the present application provides a moving distance calculation system, including: a terminal for performing the movement distance calculation method as described in the first aspect and any one of the possible implementations of the first aspect, and a server in communication with the terminal for performing the movement distance calculation method as described in the second aspect and any one of the possible implementations of the second aspect.
It should be appreciated that the description of technical features, solutions, benefits, or similar language in this application does not imply that all of the features and advantages may be realized in any single embodiment. Rather, it is to be understood that the description of a feature or advantage is intended to include the specific features, aspects or advantages in at least one embodiment. Therefore, the descriptions of technical features, technical solutions or advantages in the present specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions and advantages described in the present embodiments may also be combined in any suitable manner. One skilled in the relevant art will recognize that an embodiment may be practiced without one or more of the specific features, aspects, or advantages of a particular embodiment. In other instances, additional features and advantages may be recognized in certain embodiments that may not be present in all embodiments.
Drawings
Fig. 1 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
fig. 2 is a system architecture diagram of a mobile distance calculating system according to an embodiment of the present application;
FIG. 3 is a system architecture diagram of another travel distance calculation system provided by an embodiment of the present application;
fig. 4a is a schematic interface diagram of a mobile phone displaying motion data of a moving object according to an embodiment of the present application;
fig. 4b is an interface schematic diagram of a sports bracelet displaying sports data of a sports object according to an embodiment of the present application;
fig. 5 is a first flowchart illustrating a moving distance calculating method according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram illustrating a method for interaction between a terminal and a server according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a second method for calculating a moving distance according to an embodiment of the present disclosure;
fig. 8 is a third schematic flowchart of a moving distance calculating method according to an embodiment of the present application;
fig. 9 is a fourth schematic flowchart of a moving distance calculating method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of a moving distance calculating method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a moving distance device according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of another moving distance device according to an embodiment of the present disclosure.
Detailed Description
In the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same or similar items having substantially the same function and action. For example, the first motion parameter and the second motion parameter are only used for distinguishing different motion parameters, and the sequence thereof is not limited. Those skilled in the art will appreciate that the terms "first," "second," etc. do not denote any order or quantity, nor do the terms "first," "second," etc. denote any order or importance.
It is noted that, in the present application, words such as "exemplary" or "for example" are used to mean exemplary, illustrative, or descriptive. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
Before describing the embodiments of the present application, the terms related to the embodiments of the present application will be explained as follows:
step counting algorithm: when a person moves, an acceleration is generated in each of three dimensions (up and down, front and back, and left and right, respectively, with an artifact) of a space. During the motion process of the moving object, the acceleration of one of the three dimensions is changed periodically with the time change. The value of the periodically varying acceleration varies with time, the periodically varying acceleration being placed in a coordinate system with time as an axis, the acceleration curve generally appearing as a sinusoid. During a person's movement, each step corresponds to a peak in the sinusoid. We generally note the primary peak as one step.
The essence of the step calculation method is to determine the period of the acceleration waveform. When the acceleration goes through one peak-valley-peak, or valley-peak-valley, it is recorded as one step. Determining the duration of a step (e.g., determining that there are n acceleration samples in a step period, then the duration t of the step1N × (1/F)); wherein, t1For the duration of this step, n is the number of acceleration samples and F is the sampling frequency of the acceleration. Determining the step frequency of the moving object according to the duration of each step, and determining the corresponding step frequency
The step-counting algorithm can also countAt time t2The number q of the steps of the inner walking is the corresponding step frequency
Step frequency: the frequency of steps taken by the moving object during motion. The step frequency is calculated by dividing the number of steps taken by the moving object in a period of time by the duration of the period of time (the duration unit is generally minutes). Illustratively, if the moving object takes 1200 steps in 10 minutes, the step frequency of the moving object is 120.
Stride: the amplitude of the step of the moving object during the moving process, that is, the length of the step of the moving object during the moving process.
Acceleration: the variation of the speed of the moving object during the moving process due to the stepping and the stepping.
Since the moving speed of the moving object is related to the step frequency of the moving object, the server needs to collect a large amount of historical data of a plurality of moving objects, which can reflect the step frequency of the moving object, when training the moving model. Further, the historical data may further include: step frequency corresponding to the moving distance.
Currently, the server performs model training on the historical data to obtain a motion model (the motion model is a mathematical model, the input parameter is the step frequency of the moving object, the output parameter is the stride of the moving object or the moving speed of the moving object, where the output parameter is related to the model training, the model training output for the stride is the stride, and the training output for the moving speed is the moving speed). The server sends the motion model to the terminal, and the terminal receives the motion model sent by the server. After the acceleration data of the moving object collected by the terminal (the acceleration data is the original acceleration data of the moving object collected by the sensor, and the acceleration information can be obtained after the acceleration data is processed), the step number (or the moving time) and the step frequency of the moving object are recorded by using a step counting algorithm. And the terminal inputs the step frequency into the motion model to obtain the step length. And the terminal multiplies the step length by the step number determined by the step counting algorithm to obtain the moving distance of the moving target. Or the terminal inputs the step frequency into the motion model to obtain the motion speed of the moving object; and multiplying the motion speed by the motion time of the motion target to obtain the moving distance of the motion target.
However, since the moving object may have a plurality of motion states during the moving process, different motion states generally correspond to different motion models. The use of a single motion model in estimating the moving distance of the moving object may cause a large error between the estimated moving distance and the real moving distance of the moving object.
In one implementation, the server, when training the acceleration model, introduces an acceleration variance as a parameter of the motion model, in addition to comprehensively considering the step frequency and the height of the motion target. And before training the motion model, the server classifies the motion of the moving object according to the difference of the step frequency of each motion. And respectively determining different motion types corresponding to different motion models according to different historical motion parameters (including height, step frequency and acceleration variance) of each type of motion. An exemplary such motion model is:
Mk=ak*f+bk*v+ck*h+dk
where f represents the step frequency, v represents the acceleration variance, and h represents the height. a isk,bk,ck,dkAre model parameters representing the motion type numbered k. Exemplary, ak,bk,ck,dkMay be constants obtained after model training. k denotes the number of the motion type. MkRepresenting the stride (or speed of movement) for the type of movement numbered k.
Model parameters a of motion model obtained by training historical data of different motion typesk,bk,ck,dkDifferent.
When calculating the moving distance of the moving target, firstly, the step frequency of the moving target is determined, a moving model corresponding to the step frequency is determined according to the step frequency of the moving target, the step frequency, the acceleration variance and the height are used as input parameters to be input into the model, and the stride (or the moving speed) is output. After the output parameters are obtained, the moving distance of the moving target can be obtained by further calculating the output parameters.
For example, if the output parameter is the stride, the step number of the moving object is determined in the step counting algorithm, and the moving distance of the moving object is obtained by multiplying the stride by the step number. Or the output parameter is the movement speed, the movement time of the moving object is determined, and the movement distance of the moving object is obtained by multiplying the movement speed of the moving object by the movement time.
In this implementation, although the server classifies the motion states of the moving object and trains the motion states to obtain a plurality of motion models, when the motion state of the moving object is located at a junction of two motion states, a calculation result may generate a large error regardless of which motion model of the two motion states the terminal selects. And when the moving distance of the moving object is calculated by using the model, selecting the moving model according to the step frequency of the moving object does not always select the moving model most similar to the current moving state. Especially in the running state, the step frequency of the moving object is not completely correlated with the motion state. Resulting in the inability to select the best motion model.
In view of the above, embodiments of the present application provide a moving distance calculating method, which can be applied to a terminal for calculating a moving distance of a moving object. For example, the terminal may be any terminal having a moving distance calculating function, such as a mobile phone, a wearable device (e.g., a sports bracelet), a tablet computer, a Personal Digital Assistant (PDA), and the like, and of course, in the following embodiments, the specific form of the terminal is not limited at all.
The following describes an embodiment specifically by taking the terminal as a mobile phone 100. It should be understood that the illustrated handset 100 is only one example of a terminal and that the handset 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components.
As shown in fig. 1, the mobile phone 100 may specifically include: processor 101, Radio Frequency (RF) circuitry 102, memory 103, touch screen 104, bluetooth device 105, one or more sensors 106, Wi-Fi device 107, positioning device 108, audio circuitry 109, peripheral interface 110, and power supply 111. These components may communicate over one or more communication buses or signal lines (not shown in fig. 1). Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 is not intended to be limiting, and that the handset 100 may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes the components of the handset 100 in detail with reference to fig. 1:
the processor 101 is a control center of the cellular phone 100, connects various parts of the cellular phone 100 using various interfaces and lines, and performs various functions of the cellular phone 100 and processes data by running or executing an application program stored in the memory 103 and calling data stored in the memory 103. In some embodiments, processor 101 may include one or more processing units. For example, the processor 101 may be an kylin 960 chip manufactured by Huanti technologies, Inc. In some embodiments of the present application, the processor 101 may further include a fingerprint verification chip for verifying the acquired fingerprint.
The rf circuit 102 may be used for receiving and transmitting wireless signals during the transmission and reception of information or calls. In particular, the rf circuit 102 may receive downlink data of the base station and then process the received downlink data to the processor 101; in addition, data relating to uplink is transmitted to the base station. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency circuitry 102 may also communicate with other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
The memory 103 is used for storing application programs and data, and the processor 101 executes various functions and data processing of the mobile phone 100 by running the application programs and data stored in the memory 103. The memory 103 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs (such as a sound playing function and an image playing function) required by at least one function; the storage data area may store data (e.g., audio data, a phonebook, etc.) created from use of the handset 100. Further, the memory 103 may include high speed random access memory, and may also include non-volatile memory, such as a magnetic disk storage device, a flash memory device, or other volatile solid state storage device. The memory 103 may store various operating systems, such as those developed by apple IncOperating System, developed by GoogleAn operating system, etc. The memory 103 may be independent and connected to the processor 101 through the communication bus; the memory 103 may also be integrated with the processor 101.
The touch screen 104 may include a touch pad 104-1 and a display (also referred to as a display screen) 104-2. Wherein the touch pad 104-1 can capture touch events on or near the touch pad 104-1 by a user of the cell phone 100 (e.g., user operation on or near the touch pad 104-1 using any suitable object such as a finger, a stylus, etc.), and transmit the captured touch information to other devices, such as the processor 101. Among them, a touch event of a user near the touch pad 104-1 can be called a hover touch; hover touch may refer to a user not having to directly contact the touchpad in order to select, move, or drag a target (e.g., an icon, etc.), but rather only having to be located near the electronic device in order to perform a desired function. In the context of a hover touch application, the terms "touch," "contact," and the like do not imply a direct contact to the touch screen, but rather a nearby or near contact. The touch pad 104-1 capable of performing floating touch can be implemented by using capacitive type, infrared sensing, ultrasonic wave, and the like. In addition, the touch pad 104-1 can be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. The display (which may also be referred to as a display screen) 104-2 may be used to display information entered by or provided to the user as well as various menus of the handset 100. The display 104-2 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The trackpad 104-1 may be overlaid on the display 104-2, and when the trackpad 104-1 detects a touch event thereon or nearby, it is communicated to the processor 101 to determine the type of touch event, and the processor 101 may then provide a corresponding visual output on the display 104-2 based on the type of touch event. Although in FIG. 1, the touch pad 104-1 and the display 104-2 are shown as two separate components to implement the input and output functions of the cell phone 100, in some embodiments, the touch pad 104-1 and the display 104-2 may be integrated to implement the input and output functions of the cell phone 100. It is understood that the touch screen 104 is formed by stacking multiple layers of materials, and only the touch pad (layer) and the display screen (layer) are shown in the embodiment of the present application, and other layers are not described in the embodiment of the present application. In addition, in some other embodiments of the present application, the touch pad 104-1 may be covered on the display 104-2, and the size of the touch pad 104-1 is larger than that of the display 104-2, so that the display 104-2 is completely covered under the touch pad 104-1, or the touch pad 104-1 may be disposed on the front surface of the mobile phone 100 in a full-panel manner, that is, a user's touch on the front surface of the mobile phone 100 can be sensed by the mobile phone, so that a full-touch experience on the front surface of the mobile phone can be achieved. In other embodiments, the touch pad 104-1 is disposed on the front surface of the mobile phone 100 in a full-panel manner, and the display 104-2 may also be disposed on the front surface of the mobile phone 100 in a full-panel manner, so that a Bezel-free (Bezel) structure can be implemented on the front surface of the mobile phone.
The handset 100 may also include a bluetooth device 105 for enabling data exchange between the handset 100 and other short-range electronic devices (e.g., cell phones, smartwatches, etc.). The bluetooth device in the embodiment of the present application may be an integrated circuit or a bluetooth chip.
The handset 100 also includes at least one sensor 106, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display of the touch screen 104 according to the brightness of ambient light, and a proximity sensor that turns off the power of the display when the mobile phone 100 is moved to the ear.
In the present application, as one type of motion sensor, an accelerometer sensor is used to detect the magnitude of acceleration in each direction (generally three axes), the acceleration sensor is used to collect acceleration data of a moving object, and the processor 101 processes the acceleration data to obtain the moving distance of the moving object.
The accelerometer sensor can also be used for detecting the size and direction of gravity when the mobile phone is static, and can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching, related games and magnetometer gesture calibration), vibration identification related functions (such as pedometer and knocking) and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone 100, further description is omitted here.
The Wi-Fi device 107 is used for providing network access for the mobile phone 100 according to Wi-Fi related standard protocols, the mobile phone 100 can be accessed to a Wi-Fi access point through the Wi-Fi device 107, so that the mobile phone helps a user to send and receive e-mails, browse webpages, access streaming media and the like, and wireless broadband internet access is provided for the user. In other embodiments, the Wi-Fi apparatus 107 can also be a Wi-Fi wireless access point, which can provide Wi-Fi network access to other electronic devices.
And a positioning device 108 for providing a geographical position for the handset 100. It is understood that the positioning device 108 may be a receiver of a Global Positioning System (GPS) or a positioning system such as the beidou satellite navigation system, russian GLONASS, etc. After receiving the geographical location transmitted by the positioning system, the positioning device 108 transmits the information to the processor 101 for processing or transmits the information to the memory 103 for storage. In still other embodiments, the positioning device 108 may also be a receiver of an Assisted Global Positioning System (AGPS) that assists the positioning device 108 in performing ranging and positioning services by acting as an assistance server, in which case the assistance positioning server provides positioning assistance by communicating with the positioning device 108 (i.e., GPS receiver) of an electronic device, such as the handset 100, over a wireless communication network. In other embodiments, the location device 108 may also be a Wi-Fi access point based location technology. Because each Wi-Fi access point has a globally unique MAC address, the electronic equipment can scan and collect broadcast signals of the surrounding Wi-Fi access points under the condition of starting Wi-Fi, and therefore the MAC addresses broadcasted by the Wi-Fi access points can be obtained; the electronic device sends the data (e.g., MAC address) indicating the Wi-Fi access points to the location server through the wireless communication network, and the location server retrieves the geographical location of each Wi-Fi access point, and calculates the geographical location of the electronic device according to the strength of the Wi-Fi broadcast signal and sends the geographical location of the electronic device to the positioning device 108 of the electronic device.
The audio circuitry 109, speaker 113, microphone 114 can provide an audio interface between a user and the handset 100. The audio circuit 109 may transmit the electrical signal converted from the received audio data to the speaker 113, and convert the electrical signal into a sound signal by the speaker 113 to output. On the other hand, the microphone 114 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 109, and outputs the audio data to the RF circuit 102 to be transmitted to, for example, another cellular phone, or outputs the audio data to the memory 103 for further processing.
Peripheral interface 110, which is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, SIM card, etc.). For example, a mouse via a Universal Serial Bus (USB) interface, and a subscriber identity module card (SIM) card provided by a telecommunications carrier via metal contacts on a SIM card slot. Peripheral interface 110 may be used to couple the aforementioned external input/output peripherals to processor 101 and memory 103.
The mobile phone 100 may further include a power supply device 111 (such as a battery and a power management chip) for supplying power to each component, and the battery may be logically connected to the processor 101 through the power management chip, so as to implement functions of managing charging, discharging, and power consumption through the power supply device 111.
Although not shown in fig. 1, the mobile phone 100 may further include a camera (front camera and/or rear camera), a flash, a micro-projector, a Near Field Communication (NFC) device, etc., which will not be described herein.
The moving distance calculating method provided by the embodiment of the application is applied to a moving distance calculating system shown in fig. 2. As shown in fig. 2, the moving distance calculating system includes: a terminal 201 and a server 202 in communication with the terminal.
The terminal 201 is configured to obtain acceleration data of the moving object, and determine a moving distance of the moving object according to the acceleration data of the moving object.
The server 202 is configured to obtain historical data of a plurality of moving objects, and divide the historical data of the moving objects into N classes according to the step frequency and the acceleration data. The server 202 is further configured to perform model training on each type of historical data to obtain N preset motion models.
In conjunction with fig. 2, as shown in fig. 3, the terminal 201 may include a processor 2012, and a sensor 2011 and a memory 2013 coupled to the processor 2012.
The sensor 2011 is configured to detect and acquire acceleration information of the moving object, and send the acquired acceleration data to the processor 2012. For example, the sensor 2011 may be an acceleration sensor. Further, the sensor 2011 is also used to detect whether or not a moving object is in a moving state.
The memory 2013 is used for storing N preset motion models. Illustratively, the memory 2013 may be a Read Only Memory (ROM).
The processor 2012 is configured to receive the acceleration information sent by the sensor 2011, and obtain N preset motion models from the memory 2013. The processor 2012 may also be configured to determine a moving distance of the moving object according to the acceleration information. Illustratively, the processor 2012 is a Central Processing Unit (CPU).
The processor 2012 may further process the acceleration information according to the N preset motion models to obtain a moving distance of the moving object.
The terminal can be a mobile phone or a sports bracelet exemplarily, and the mobile phone and the sports bracelet are provided with display interfaces and can display the sports data of a sports object.
As shown in fig. 4a, taking the terminal as a mobile phone as an example, an Application (APP) for displaying motion data of a moving object may be run on the mobile phone, and when the APP runs, the motion data of the moving object is as shown in fig. 4 a. The motion data of the moving object may include: distance traveled, time traveled, average speed, number of steps, and stride. Optionally, the motion data of the moving object may further include: caloric, average pace, average heart rate, and average number of steps.
It should be understood that the motion data of the moving object displayed by the APP is merely exemplary. In the actual display, the motion data of the moving object may be all or part of the data shown in the figure, or the motion data of the moving object may be data other than the data shown in the figure.
As shown in fig. 4b, taking the terminal as a sports bracelet as an example, the display screen of the sports bracelet can display the sports data of the sports object shown in fig. 4 b. The motion data of the moving object includes: distance traveled, time traveled, average speed, number of steps, and stride. Optionally, the motion data of the moving object may further include: heat and average number of steps.
It should be understood that the motion data of the moving object displayed in the display screen of the sports bracelet is merely exemplary. In the actual display, the motion data of the moving object may be all or part of the data shown in the figure, or the motion data of the moving object may be data other than the data shown in the figure.
In an implementation manner of the present application, the sports bracelet may further send the sports data of the sports object to the mobile phone, so that the mobile phone displays the sports data of the sports object as shown in fig. 4 a.
Hereinafter, a moving distance calculation method provided by the embodiments of the present application will be described in detail with reference to specific embodiments, as shown in fig. 5, the method includes:
step 101, under the condition that the terminal detects that the moving object is in a moving state, the terminal determines acceleration information and a first moving parameter of the moving object.
For example, the motion state may be walking, running, or riding. The first motion parameter is the number of steps of the moving object or the motion time of the moving object. The acceleration information includes an acceleration variance and a step frequency.
In the embodiment of the application, the acceleration information is obtained by processing the acceleration data acquired by the terminal according to the sensor.
If the first motion parameter is the number of steps, the first motion parameter can be obtained by processing acceleration data acquired by the sensor by the terminal according to a step counting algorithm.
The acceleration of the moving object changes along with the time change in the moving state (in the walking or running process of the moving object, the acceleration of the moving object is recorded by taking the time as the horizontal axis and the acceleration as the vertical axis, and the acceleration curve is close to a sinusoidal curve).
In the embodiment of the application, the detection that the moving target is in the moving state by the terminal can be realized by the following two ways:
in the first mode, the terminal acquires acceleration data of a moving target. And the terminal analyzes the acceleration data of the moving target to determine the acceleration characteristics of the moving target. And if the acceleration characteristic meets a preset condition, the terminal determines that the moving target is in a moving state.
Illustratively, the acceleration characteristic is an acceleration variance. The preset conditions are as follows: and if the acceleration variance is larger than a preset threshold value. And when the terminal determines that the acceleration variance of the moving target is greater than a preset threshold value, determining that the moving target is in a moving state. It should be understood that the acceleration characteristic may also be other characteristics of the moving object acceleration, such as chi-square distribution, etc. This is not a limitation of the present application.
And secondly, the terminal processes the acceleration data of the moving target through a step counting algorithm, judges whether the acceleration data meets a step counting condition (namely whether the waveform period of the acceleration in the acceleration data has a peak-trough-peak or an acceleration period with the characteristics of trough-peak-trough), and if the acceleration data meets the step counting condition, the terminal determines that the moving target is in a moving state.
Illustratively, the terminal may determine the acceleration information of the moving object by the following mode 1 or mode 2:
in the mode 1, a sensor in the terminal detects acceleration data of a moving target in real time and sends the acceleration data to a processor in the terminal. The processor receives acceleration data sent by the sensor, and then the processor acquires acceleration information according to the acceleration data.
Mode 2, the sensor detects acceleration data of the moving object in real time. The sensor processes the acceleration data to obtain acceleration information, and then sends the acceleration information to the processor.
For example, after the terminal detects the acceleration change of the moving object, the process of processing the acceleration data acquired by the sensor according to the step counting algorithm to obtain the acceleration information specifically includes:
and the terminal counts the acceleration in the recording period and counts the variation trend of all the accelerations. Every time the acceleration of the moving object has a peak value, the acceleration is recorded as one step. After the recording period is finished, the acceleration variance in the current recording period is calculated according to the formula for calculating the acceleration variance, and the step frequency of the moving target is determined by dividing the step number of the moving target by the duration of the current recording period.
For example, the acceleration variance can be calculated by the following formula:
wherein s is the acceleration variance, a1、a2、…anRespectively n accelerations recorded during the period. b is the average of the n accelerations,
and 102, the terminal determines a second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models. Wherein N is an integer greater than or equal to 2.
For example, the N preset motion models may be a stride motion model or a speed motion model. The stride motion model is used for calculating the stride of the moving target. The velocity motion model may be used to calculate the velocity of a moving object.
The N preset motion models are a plurality of motion models obtained by classifying historical data of a plurality of moving targets according to acceleration variance and step frequency and then conducting mathematical model training.
And when the first motion parameter is the step number of the motion target, the second motion parameter is the stride of the motion target. When the first motion parameter is the motion time of the moving object, the second motion parameter is the motion speed of the moving object.
Specifically, the N preset motion models may be trained from a plurality of historical data. In order to more accurately calculate the moving distance of the moving target in different moving states, the N preset moving models in the embodiment of the present application have different motion types. For example, the motion types of the N preset motion models may include any one or more combinations of the following: the motion model of the moving object in the running state, the motion model of the moving object in the walking state or the motion model of the moving object in the riding state.
The N preset motion models may be obtained by the terminal from the server. Of course, the N preset motion models may also be stored in the terminal in advance (e.g., in a ROM of the terminal).
If the N preset motion models are obtained from the server by the terminal, the method provided by the embodiment of the present application further includes: and the terminal sends an acquisition request to the server, wherein the acquisition request is used for acquiring the N preset motion models. The server receives an acquisition request from the terminal. The server sends the N preset motion models to the terminal, so that the terminal obtains the N preset motion models from the server.
It should be understood that, in the case that N preset motion models are prestored in the terminal, the terminal may also obtain the N preset motion models from the server, where the priority of the N preset motion models obtained by the terminal from the server is higher than the priority of the N preset motion models prestored in the terminal, that is, the terminal may calculate the second motion parameter by using the N preset motion models obtained from the server.
And 103, the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter.
Example 1), the first motion parameter is the number of steps of the moving object, and the second motion parameter is the stride of the moving object.
In a possible implementation manner, step 103 in the embodiment of the present application may be specifically implemented by the following method: and the terminal determines the moving distance of the moving target according to the step number of the moving target and the stride of the moving target. Specifically, the terminal determines the moving distance according to the product of the number of steps and the stride.
Example 2), the first motion parameter is a motion time of the moving object, and the second motion parameter is a motion speed of the moving object.
In another possible implementation manner, step 103 in the embodiment of the present application may be specifically implemented by: and the terminal determines the moving distance of the moving target according to the step number of the moving target and the stride of the moving target. Specifically, the terminal determines the moving distance according to the product of the moving time and the moving speed.
The embodiment of the application provides a moving distance calculating method. And the terminal determines a second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models. The first motion parameter is the step number of the motion target, and the second motion parameter is the stride of the motion target; or the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2; and the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter. And calculating the moving distance of the moving target by using the N preset motion models. The second motion parameter can be determined by integrating the calculation results of the N preset motion models, the problem that when the moving distance of the moving target is calculated through a single preset motion model, the calculation error of the moving distance is large due to the fact that the difference between the acceleration of the single preset motion model and the acceleration information of the moving target is large is solved, and therefore the accuracy of calculating the moving distance of the moving target can be improved.
With reference to fig. 5, as shown in fig. 6, before step 102, the method provided in this embodiment of the present application further includes:
step 201, the terminal sends an acquisition request to the server, where the acquisition request is used to request to acquire N preset motion models.
Optionally, the obtaining request may further include any one of a height or an age of the moving object.
It should be understood that if the server selects N preset motion models from the M preset motion models, the terminal also needs to carry acceleration information of the moving object in the acquisition request sent to the server.
Step 202, the server receives an acquisition request from the terminal.
And step 203, the server sends the N preset motion models to the terminal.
In the embodiment of the application, the server can actively send the N preset motion models to the terminal after training the N preset motion models, and can also send the N preset motion models to the terminal under the trigger of the acquisition request sent by the terminal. In case that N preset motion models are actively transmitted to the terminal by the server, steps 201 and 202 may be omitted.
And step 204, the terminal receives the N preset motion models from the server.
With reference to fig. 5, as shown in fig. 7, step 102 in the embodiment of the present application may be specifically implemented in the following manner:
step 1021, the terminal inputs the acceleration information into the N preset motion models to obtain a third motion parameter corresponding to each preset motion model in the N preset motion models.
In one specific implementation, the values of the third motion parameters corresponding to different preset motion models in the N preset motion models are different. Of course, the values of the corresponding third motion parameters in any two or more preset motion models may also be the same in the N preset motion models.
Specifically, the terminal calculates acceleration data in the recording period to obtain acceleration information of the moving object. And the terminal respectively inputs the acceleration information into each preset motion model of the N preset motion models. And each preset motion model respectively outputs a third motion parameter. The third motion parameter is of the same type as the parameter of the second motion parameter described above. That is, if the second motion parameter is stride, the third motion parameter is also stride. If the second motion parameter is velocity, the third motion parameter is also velocity.
For example, when the second motion parameter is the stride of the moving object, the stride motion model may be represented by the following mathematical model:
Xi=ai*f+bi*v+di
where f denotes the step frequency and v denotes the acceleration variance. a isi,bi,diModel parameters representing the type of motion numbered i. Exemplary, ai,bi,diMay be constants obtained after model training. i denotes the number of the motion type. XiRepresenting the stride for the type of motion numbered i.
Model parameters a of motion model obtained by training historical data of different motion typesi,bi,diDifferent.
In one implementation, the server adds the height factor of the moving target in addition to considering the step frequency of the moving target when performing model training on the historical data. When the terminal calculates the moving distance of the moving target, the height of the moving target and the moving parameters of the moving target are simultaneously input into the moving model of the moving target, so that the accuracy of calculating the moving distance is improved. Of course, the N preset motion models may also be divided in combination with different age groups or different heights. Specifically, the server or the terminal may select N preset motion models matched with the height in combination with the height of the moving target. The server or the terminal may select N preset motion models matched with the ages in combination with the ages of the moving objects.
For another example, taking the preset motion model as a velocity motion model as an example, when the second motion parameter is the motion velocity of the moving object, the velocity motion model may be represented by the following mathematical model: y isj=aj*f+bj*v+dj. Wherein, aj,bj,djModel parameters representing the motion type numbered j. Exemplary, aj,bj,djMay be constants obtained after model training. j denotes the number of the motion type. Y isjThe movement speed of the movement type denoted by j.
In a possible implementation manner, if the preset motion model is trained and the heights of a plurality of motion targets are added, the stride motion model may be further represented by the following mathematical model: xi=ai*f+bi*v+ci*h+di. h represents the height of the moving object. c. CiMay be constants obtained after model training. The velocity motion model can also be represented by the following mathematical model: y isj=aj*f+bj*v+cj*h+dj。cjMay be constants obtained after model training.
For example, if the acceleration information is a, the N preset motion models are a first preset motion model and a second preset motion model respectively, and the output of the preset motion model is a stride, then a is input into the first preset motion model to obtain a third motion parameter X1. Inputting a into a second preset motion model to obtain a third motion parameter X2
And step 1022, the terminal determines the second motion parameter according to the third motion parameter corresponding to each preset motion model and the respective weight of each preset motion model.
Each preset motion model corresponds to a weight, and the weight corresponding to one preset motion model may be the same as or different from the weights corresponding to other preset motion models. The sum of the weights of the N preset motion models is equal to 1.
The weight is used for representing the degree of correlation between the preset motion model and the motion process of the moving object in the recording period. It should be understood that a larger weight of one of the N preset motion models indicates a higher degree of correlation between the preset motion model and the motion process of the moving object. The smaller the weight of one preset motion model in the N preset motion models is, the lower the correlation degree between the preset motion model and the motion process of the moving object is.
For example, in the process of training the preset motion models, each preset motion model has a corresponding acceleration.
Specifically, the terminal calculates the third motion parameter output by each preset motion model and the weight corresponding to the preset motion model according to a preset algorithm to obtain the second motion parameter.
Illustratively, when the second exercise parameter is a stride of the exercise target, step 1022 may be specifically implemented as follows: terminal according to formulaA second motion parameter is determined.
Wherein,representing the step length of the movement of the moving object, wiWeight, X, representing a preset motion model numbered iiRepresenting the stride representing the type of motion numbered i, i being the number of the type of motion, i taken from 1, 2, …, N.
Illustratively, when the second motion parameter is a motion speed of the moving object, step 1022 may be specifically implemented by: terminal according to formulaA second motion parameter is determined.
Wherein,representing the speed of movement, λ, of a moving objectjWeight, Y, representing a preset motion model numbered jjThe movement speed of the movement type denoted by j.
For example, taking the acceleration information as a, the N preset motion models are respectively a first preset motion model and a second preset motion model, and the weight of the first preset motion model isThe second predetermined motion model has a weight ofThe second motion parameter
In the embodiment of the application, the respective weight of each preset motion model may be obtained by the terminal from the server, that is, the server assigns a weight to each preset motion model, and then sends the mapping relationship between each preset motion model and the respective weight to the terminal. Or the respective weight of each preset motion model is automatically assigned by the terminal. Specifically, the terminal may assign a weight to each preset motion model by itself, which is implemented by the following step 104.
Referring to fig. 7, as shown in fig. 8, the method according to the embodiment of the present application further includes, before step 1021:
and step 104, the terminal determines the weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models.
With reference to fig. 8, as shown in fig. 9, step 104 in the embodiment of the present application may be specifically implemented by the following steps:
and 1041, the terminal determines an acceleration variance average value and a step frequency average value of the preset motion model.
Specifically, in the process of training N preset motion models by the server, after the training is completed, an average value of the acceleration variance and an average value of the step frequency corresponding to each preset motion model are obtained. And when the terminal receives the N preset motion models from the server, the average value of the acceleration variance and the average value of the step frequency of each preset motion model are acquired simultaneously.
In an implementation manner of this step, the terminal or the server may also configure a weight for each preset motion model in advance. The terminal can directly input the acceleration information into each preset motion model to obtain a third motion parameter corresponding to the acceleration information in each preset motion model. And the terminal multiplies the third motion parameter corresponding to each preset motion model by the weight corresponding to each preset motion model and then accumulates to obtain a second motion parameter. The server distributes the weight to each preset motion model, so that the calculation amount of the terminal can be reduced.
And 1042, the terminal determines the similarity of the acceleration information and the preset motion model according to the acceleration variance average value and the step frequency average value of the preset motion model and the acceleration variance and the step frequency of the acceleration information.
Specifically, an algorithm for calculating the similarity between a preset motion model and the motion of the moving object is preconfigured in the terminal. And respectively substituting the acceleration variance average value and the step frequency average value of the preset motion model and the acceleration variance and the step frequency of the acceleration information into the similarity calculation method to obtain the similarity of the acceleration information and the preset motion model.
For example, in the embodiment of the present application, the euclidean distance between the acceleration variance average and the step frequency average of the preset motion model and the acceleration variance and the step frequency of the acceleration information may be calculated. And taking the Euclidean distance as the similarity of the preset motion model and the acceleration information. The calculation formula of the Euclidean distance is as follows:
wherein l represents the Euclidean distance between the preset motion model and the acceleration information, a1Normalized mean value representing the variance of the acceleration of a preset motion model, a2Normalized value representing the acceleration variance of the acceleration information, b1Normalized mean value representing the step frequency of a preset motion model, b2A normalized value representing the step frequency of the acceleration information.
It should be understood that the above-mentioned euclidean distance is used as the similarity between the acceleration information and the preset motion model to explain the calculation method of the above-mentioned similarity in a more intuitive and understandable way, and should not be understood as a limitation of the method for calculating the similarity in the present application. The similarity between the acceleration information and the preset motion model can be determined by a plurality of methods by those skilled in the art, and the method is not limited in this application.
In one implementation, since the value of the acceleration variance is usually small, and the value of the step frequency is usually large, if the euclidean distance between the acceleration variance average value and the step frequency average value of the preset motion model and the acceleration variance and the step frequency of the acceleration information are directly calculated, the proportion of the acceleration variance is small, which may result in inaccurate calculation of the similarity. Therefore, it is necessary to first perform normalization processing on the acceleration variance average and the step frequency average of the preset motion model and the acceleration variance and the step frequency of the acceleration information. The method specifically comprises the following steps:
order toWherein a isxMean value of the acceleration variance representing a predetermined motion model, axminPresetting the minimum value of the acceleration variance of the motion model, axmaxThe maximum value of the acceleration variance of the motion model is preset.
Order toWherein a isyAcceleration variance representing acceleration information, ayminMinimum value of acceleration variance of acceleration information, aymaxThe maximum value of the acceleration variance of the acceleration information.
Order toWherein b isxMean value of the step frequency representing a predetermined motion model, bxminPresetting the minimum value of the step frequency of the motion model, bxmaxThe maximum value of the step frequency of the motion model is preset.
Order toWherein b isyRepresenting the step frequency of the acceleration information, byminMinimum value of step frequency of acceleration information, bymaxThe maximum value of the step frequency of the acceleration information.
And 1043, the terminal determines the weight of the preset motion model according to the similarity of the acceleration information and the preset motion model.
In an implementation manner of step 1043, the terminal determines the weight of the preset motion model according to the similarity between the acceleration information and the preset motion model, which may specifically be implemented as:
and the terminal determines the sum of the similarity of the acceleration information and the N preset motion models to obtain the sum of the similarity.
The terminal determines the ratio of the similarity of each preset motion model in the N preset motion models in the similarity sum.
And the terminal determines the ratio of the similarity of each preset motion model in the similarity sum as the respective weight of each preset motion model.
Illustratively, N is 5, and the N preset motion models are a first preset motion model, a second preset motion model, a third preset motion model, a fourth preset motion model, and a fifth preset motion model, respectively. The similarity between the first to fifth preset motion models and the acceleration information is 10, 30, 2, 5 and 3 respectively. The sum of the similarity between the acceleration information and the first to fifth preset motion models is 50, and the proportions of the similarity between the acceleration information and the first to fifth preset motion models, which account for the sum of the similarity, are respectively 20%, 60%, 4%, 10% and 6%. 20%, 60%, 4%, 10%, 6% are respectively used as the weights of the first to fifth preset motion models. That is, the weight of the first preset motion model is 20%, the weight of the second preset motion model is 60%, the weight of the third preset motion model is 4%, the weight of the fourth preset motion model is 10%, and the weight of the fifth preset motion model is 6%.
In one implementation of the present application, the server may classify the motion states into a plurality of motion types according to the acceleration variance and the step frequency (e.g., classify the motion states into walking and running. Since moving objects are usually only similar to a few types of motion during this movement cycle. For example, the moving object is largely different from a running state in a walking state. In this case, if the acceleration information of the moving object in the current recording period is taken into all the acceleration models, the amount of unnecessary calculation may be increased, and the accuracy of the calculation result may be reduced by a model having a low similarity to the acceleration information of the moving object.
In order to reduce the calculation amount of the terminal and avoid interference of the preset motion model with too low similarity on the calculation of the moving distance, the method provided by the embodiment of the application further includes: the N preset motion models are preset motion models with the similarity larger than or equal to a preset threshold value in the M preset motion models, and M is an integer larger than or equal to N.
The method specifically comprises the following steps: and the server divides the acceleration and the step frequency of each movement in the historical data into M types according to a preset rule. And the server trains each type of historical data in the M types to obtain M preset motion models. The server sends the M preset motion models to the terminal, the terminal receives the M preset motion models from the server, and the terminal calculates and obtains the similarity between each preset motion model of the M preset motion models and the acceleration information according to the methods described in the step 1042 and the step 1043. And taking N preset motion models of which the similarity with the acceleration information is greater than a preset threshold value in the M preset motion models, or taking N preset motion models of which the similarity with the acceleration information is the maximum in the M preset motion models. Of course, the server may also select, for the terminal, N preset motion models with the greatest similarity to the acceleration information from the M preset motion models. It should be understood that, when N preset motion models are selected from the M preset motion models by the terminal, the terminal acquires the M preset motion models from the server.
In one implementation manner of the embodiment of the present application, when the terminal calculates the moving distance of the moving object according to the moving speed and the moving time of the moving object, the moving object may be in different moving states in different time periods (for example, the moving object walks to the training field and then starts to perform a running exercise, and then walks for a distance after the running exercise). If the plurality of motion states are recorded in one cycle to calculate the moving distance, the calculation result has larger error.
Therefore, the movement time may be further divided into a plurality of time windows (for example, the time windows are divided by taking each second or each minute as a time length), and the terminal determines the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models.
Specifically, the acceleration information includes first acceleration information corresponding to each of a plurality of time windows within the exercise time. And the terminal determines the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models.
And the terminal determines the moving distance of the moving object according to the moving speed corresponding to each time window and the respective time length of each time window.
More specifically, the terminal divides the movement time into a plurality of time windows according to a preset time length. The terminal brings the acceleration information in each time window into the N preset motion models, respectively, to obtain the motion velocity of the moving object in each time window (the process is the same as the previous process in the embodiment of the present application, and is not described here again). And the terminal multiplies the movement speed of the moving object in each time window by the time length of the time window to obtain the moving distance of the moving object in each time window. And the terminal sums the moving distances of the moving targets in each time window to obtain the total moving distance of the moving targets.
As shown in fig. 10, fig. 10 shows a process of obtaining N preset motion models by the server training, where the method includes:
step 301, the server obtains history data.
Wherein, the historical data comprises the motion data of different motion types. The historical data is the collected motion tracks of a plurality of moving targets, and the historical data comprises the acceleration variance, the step frequency, the step number, the stride (or the motion speed and the motion time) and the moving distance of each moving target in each motion track.
The history data may be stored in the server, or may be stored in another storage device that establishes a communication connection with the server.
Step 302, the server divides the history data into N types of history data.
Specifically, the server classifies the gait of the historical data according to a preset acceleration variance interval and a preset step frequency interval.
Illustratively, the gait types of the moving object are divided into five types, namely a first step type, a second step type, a third step type, a fourth gait type and a fifth gait type. Acceleration variance range of all possible data in the historical data is c1To c6(ii) a Step frequency range is d1To d6
The variance of the acceleration is set at c1To c2Step frequency in d1To d2The historical data in between is divided into a first step type. The variance of the acceleration is set at c2To c3Step frequency in d2To d3The historical data in between is divided into a second step type. The variance of the acceleration is set at c3To c4Step frequency in d3To d4The history data in between is divided into a third step type. The variance of the acceleration is set at c4To c5Step frequency in d4To d5The historical data in between is divided into a fourth gait type. The variance of the acceleration is set at c5To c6Step frequency in d5To d6The historical data in between is divided into a fifth gait type.
Step 303, the server performs preset motion model training on the N types of historical data to obtain N preset motion models.
Specifically, the server inputs the classified historical data into a corresponding mathematical model for training. There are various methods for the server to perform model training on the historical data. For example, the server operates on the historical data by a least square method to determine the preset motion model.
The server calculates the historical data through a least square method, and the specific process of determining the preset motion model comprises the following steps:
the server extracts the step frequency and the acceleration variance at each time point in the historical data. The server arranges the points in a coordinate system with the step frequency and the acceleration variance as axes. The spots are substantially distributed in a band. By finding a straight line, the sum of the squares of the distances of all the points mentioned above from the straight line is minimized. The mathematical expression of the straight line is the preset motion model obtained by training.
In one implementation manner of the embodiment of the present application, after step 103, the server may further accept second history data sent by the terminal or other device. The second history data is history data generated by the terminal in the process of calculating the moving distance of the moving object. And further classifying and training a preset motion model by combining the historical data and the other historical data. And obtaining N new preset training models. And sending the N preset training models to the terminal so that the terminal determines the moving distance of the moving target according to the N preset training models.
It should be understood that the second historical data information may also be other historical data, such as historical data of the motion of other moving objects collected by other devices.
It is to be understood that the above-mentioned terminal, server, etc. may include hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
In the embodiment of the present application, the terminal, the server, or the like may be divided into functional modules according to the method example, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
In the case of dividing each function module by corresponding functions, fig. 11 shows a schematic diagram of a possible structure of a moving distance calculating apparatus according to the above-described embodiment, the moving distance calculating apparatus includes: a processing unit 301.
In one possible implementation, the moving distance calculating device may further include: a communication unit 302.
An example of the moving distance calculating device is a terminal or a chip applied in the terminal, and the processing unit 301 is configured to execute the steps 101, 102 and 103.
In a possible implementation manner, the processing unit 301 is further configured to perform step 1021, step 1022, step 104, step 1041, step 1042, and step 1043.
In a possible implementation manner, the communication unit 302 is configured to perform the step 201 and the step 204.
As another example, the moving distance calculating device is a server or a chip applied to the server, and the processing unit 301 is used for the above steps 302 and 303.
In a possible implementation manner, the communication unit 302 is configured to perform step 301, step 202, and step 203.
Optionally, the movement distance calculation means may further include a storage unit. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In the case of using an integrated unit, fig. 12 shows a schematic view of a possible structure of the moving distance calculating device involved in the above embodiment. The movement distance calculation device includes: a processing module 412 and a communication module 413. The processing module 412 is used for controlling and managing the movement of the mobile distance calculating device. The communication module 413 is used to support the communication of the mobile distance calculating device with other network entities. The moving distance calculating device may further include a storage module 411 for storing program codes and data of the moving distance calculating device.
In an example, the moving distance calculating device is a terminal or a chip applied in the terminal, and the processing module 412 is configured to execute the steps 101, 102, and 103.
In a possible implementation manner, the processing module 412 is further configured to perform step 1021, step 1022, step 104, step 1041, step 1042, and step 1043.
In a possible implementation manner, the communication module 413 is configured to perform the step 201 and the step 204.
For another example, the moving distance calculating device is a server or a chip applied in the server, and the processing module 412 is configured to perform the steps 302 and 303.
In a possible implementation manner, the communication module 413 is configured to perform the step 301, the step 202, and the step 203.
The processing module 412 may be a Processor or a controller, such as a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 413 may be a communication interface or the like. The storage module 411 may be a memory.
When the processing module 412 is the processor 101, the communication module 413 is the rf circuit 102, and the storage module 411 is the memory 103, the terminal provided in the embodiment of the present application may be the terminal shown in fig. 1.
In further embodiments of the present application, a computer-readable storage medium is provided, having stored therein instructions that, when executed, cause a moving distance calculating device to perform steps 101, 102, and 103 of the embodiments.
In one aspect, a computer-readable storage medium is provided, in which instructions are stored, and when executed, cause a moving distance calculating apparatus to perform step 1021, step 1022, step 104, step 1041, step 1042, and step 1043 in the embodiment.
In one aspect, a computer-readable storage medium having stored therein instructions that, when executed, cause a moving distance calculation apparatus to perform steps 201 and 204 in an embodiment is provided.
In another aspect, a computer-readable storage medium is provided, having stored therein instructions that, when executed, cause a moving distance calculating device to perform steps 302 and 303 in an embodiment.
In one aspect, a computer-readable storage medium having stored therein instructions that, when executed, cause a moving distance calculating device to perform steps 301, 202, and 203 in an embodiment is provided.
The aforementioned readable storage medium may include: u disk, removable hard disk, read only memory, random access memory, magnetic or optical disk, etc. for storing program codes.
In one aspect, a computer program product comprising instructions stored therein, which when executed, cause a mobile distance calculating apparatus to perform steps 101, 102, 103, 1021, 1022, 104, 1041, 1042, and 1043 in an embodiment is provided.
In another aspect, a computer program product is provided comprising instructions stored therein, which when executed, cause a moving distance calculating device to perform steps 201 and 204.
In yet another aspect, a computer program product is provided comprising instructions stored therein, which when executed, cause a mobile distance calculation device to perform steps 302 and 303.
In yet another aspect, a computer program product is provided comprising instructions stored therein, which when executed, cause a moving distance calculation means to perform steps 301, 202 and 203.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof. When implemented using a software program, may take the form of a computer program product, either entirely or partially. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (21)

1. A moving distance calculation method, comprising:
under the condition that a terminal detects that a moving target is in a moving state, the terminal determines acceleration information and a first moving parameter of the moving target;
the terminal determines a second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models; wherein the first motion parameter is the step number of the moving target, and the second motion parameter is the stride of the moving target; or, the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2;
and the terminal determines the moving distance of the moving target according to the first motion parameter and the second motion parameter.
2. The method according to claim 1, wherein the terminal determines a second motion parameter of the moving object within the motion time according to the acceleration information and N preset motion models, and the method comprises:
the terminal inputs the acceleration information into the N preset motion models to obtain a third motion parameter corresponding to each preset motion model in the N preset motion models;
and the terminal determines the second motion parameter according to the third motion parameter corresponding to each preset motion model and the respective weight of each preset motion model.
3. The method according to any one of claims 1-2, further comprising:
and the terminal determines the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models.
4. The method according to claim 3, wherein the determining, by the terminal, the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models comprises:
the terminal determines the average value of the acceleration variance and the average value of the step frequency of each preset motion model;
the terminal determines the similarity of the acceleration information and each preset motion model according to the acceleration variance average value and the step frequency average value of each preset motion model and the acceleration variance and the step frequency of the acceleration information;
and the terminal determines the weight of each preset motion model according to the acceleration information and the similarity of each preset motion model.
5. The method according to any one of claims 1 to 4, wherein the N preset motion models are preset motion models of M preset motion models, and the similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N.
6. The method according to any one of claims 1-5, wherein the acceleration information comprises first acceleration information corresponding to each of a plurality of time windows within the exercise time; when the second motion parameter is the motion speed of the moving object, the terminal determines the second motion parameter of the moving object in the motion time according to the acceleration information and the N preset motion models, including:
and the terminal determines the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models.
7. The method of claim 6, wherein the terminal determines the moving distance of the moving object according to the first motion parameter and the second motion parameter, and comprises:
and the terminal determines the moving distance of the moving target according to the moving speed corresponding to each time window and the respective time length of each time window.
8. The method according to any one of claims 1-7, further comprising:
and the terminal acquires the N preset motion models from the server.
9. A moving distance calculation apparatus, characterized in that the apparatus comprises:
the processor is used for determining the acceleration information and the first motion parameter of the moving target under the condition that the moving target is detected to be in a motion state;
the processor is further configured to determine a second motion parameter of the moving object within the motion time according to the acceleration information and N preset motion models; wherein the first motion parameter is the step number of the moving target, and the second motion parameter is the stride of the moving target; or, the first motion parameter is the motion time of the motion target, and the second motion parameter is the motion speed of the motion target; n is an integer greater than or equal to 2;
the processor is further configured to determine a moving distance of the moving object according to the first motion parameter and the second motion parameter.
10. The apparatus of claim 9, wherein the processor is further specifically configured to:
inputting the acceleration information into the N preset motion models to obtain a third motion parameter corresponding to each preset motion model in the N preset motion models;
and determining the second motion parameter according to the third motion parameter corresponding to each preset motion model and the respective weight of each preset motion model.
11. The apparatus of any one of claims 9-10, wherein the processor is further specific to:
and determining the respective weight of each preset motion model according to the similarity between the acceleration information and each preset motion model in the N preset motion models.
12. The apparatus of claim 11, wherein the processor is further specifically configured to:
determining an acceleration variance average value and a step frequency average value of each preset motion model;
determining the similarity of the acceleration information and each preset motion model according to the average value of the acceleration variance and the average value of the step frequency of each preset motion model and the acceleration variance and the step frequency of the acceleration information;
and determining the weight of each preset motion model according to the acceleration information and the similarity of each preset motion model.
13. The apparatus according to any one of claims 9-12, wherein the N preset motion models are preset motion models among M preset motion models, and a similarity between the N preset motion models and the acceleration information is greater than or equal to a preset threshold, and M is an integer greater than N.
14. The apparatus according to any one of claims 9-13, wherein the acceleration information comprises first acceleration information corresponding to each of a plurality of time windows within the exercise time; the processor is further specifically configured to:
and determining the movement speed corresponding to each time window according to the first acceleration information corresponding to each time window and the N preset movement models.
15. The apparatus of claim 14, wherein the processor is further specifically configured to:
and determining the moving distance of the moving target according to the corresponding moving speed of each time window and the respective time length of each time window.
16. The apparatus of any one of claims 9-15, further comprising: a communication interface;
the communication interface is used for acquiring the N preset motion models from a server.
17. A moving distance calculation apparatus, comprising: a processor and a communication interface; the communication interface is coupled to the processor, which is configured to run a computer program or instructions to implement the movement distance calculation method according to any one of claims 1 to 8.
18. A computer-readable storage medium having instructions stored therein, which when run on a terminal, cause the terminal to perform a movement distance calculation method according to any one of claims 1 to 8.
19. A computer program product comprising instructions for causing a terminal to perform the method of calculating a movement distance according to any of claims 1-8 when the computer program product is run on the terminal.
20. A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a computer program or instructions to implement the method of any of claims 1-8.
21. A mobile distance calculation system, comprising: a terminal and a server in communication with the terminal, the server being configured to determine N preset motion models, the terminal being configured to perform the method as described in any one of claims 1-8.
CN201910364520.3A 2019-04-30 2019-04-30 A kind of moving distance calculation method, device and system Pending CN110246561A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910364520.3A CN110246561A (en) 2019-04-30 2019-04-30 A kind of moving distance calculation method, device and system
PCT/CN2020/086524 WO2020221109A1 (en) 2019-04-30 2020-04-24 Method for calculating moving distance, device, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910364520.3A CN110246561A (en) 2019-04-30 2019-04-30 A kind of moving distance calculation method, device and system

Publications (1)

Publication Number Publication Date
CN110246561A true CN110246561A (en) 2019-09-17

Family

ID=67883606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910364520.3A Pending CN110246561A (en) 2019-04-30 2019-04-30 A kind of moving distance calculation method, device and system

Country Status (2)

Country Link
CN (1) CN110246561A (en)
WO (1) WO2020221109A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020221109A1 (en) * 2019-04-30 2020-11-05 华为技术有限公司 Method for calculating moving distance, device, and system
CN112781580A (en) * 2019-11-06 2021-05-11 佛山市云米电器科技有限公司 Positioning method of household equipment, intelligent household equipment and storage medium
CN113534118A (en) * 2020-04-17 2021-10-22 北京小米移动软件有限公司 Moving distance determining method, device and storage medium
CN113866712A (en) * 2020-06-30 2021-12-31 华为技术有限公司 A kind of motion distance determination method and wearable device
CN113870977A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Method and device for processing motion data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278023A1 (en) * 2011-04-29 2012-11-01 Zheng Han Method of confirming motion parameters apparatus for the same, and motion assisting device
CN105403228A (en) * 2015-12-18 2016-03-16 北京朗动科技有限公司 Determination method and device of movement distance
CN105411593A (en) * 2014-09-12 2016-03-23 三星电子株式会社 Method and apparatus for recognizing gait task
CN106289311A (en) * 2016-08-04 2017-01-04 北京妙医佳信息技术有限公司 A kind of motion duration and the detection method of distance
CN107506684A (en) * 2016-06-14 2017-12-22 中兴通讯股份有限公司 Gait recognition method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105628028A (en) * 2016-01-04 2016-06-01 成都卫士通信息产业股份有限公司 Indoor three-dimensional positioning system and positioning method based on mobile phone built-in sensor
CN107727110A (en) * 2017-09-11 2018-02-23 上海斐讯数据通信技术有限公司 The statistical method and device of a kind of step number
CN110246561A (en) * 2019-04-30 2019-09-17 华为技术有限公司 A kind of moving distance calculation method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120278023A1 (en) * 2011-04-29 2012-11-01 Zheng Han Method of confirming motion parameters apparatus for the same, and motion assisting device
CN105411593A (en) * 2014-09-12 2016-03-23 三星电子株式会社 Method and apparatus for recognizing gait task
CN105403228A (en) * 2015-12-18 2016-03-16 北京朗动科技有限公司 Determination method and device of movement distance
CN107506684A (en) * 2016-06-14 2017-12-22 中兴通讯股份有限公司 Gait recognition method and device
CN106289311A (en) * 2016-08-04 2017-01-04 北京妙医佳信息技术有限公司 A kind of motion duration and the detection method of distance

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020221109A1 (en) * 2019-04-30 2020-11-05 华为技术有限公司 Method for calculating moving distance, device, and system
CN112781580A (en) * 2019-11-06 2021-05-11 佛山市云米电器科技有限公司 Positioning method of household equipment, intelligent household equipment and storage medium
CN112781580B (en) * 2019-11-06 2024-04-26 佛山市云米电器科技有限公司 Positioning method of home equipment, intelligent home equipment and storage medium
CN113534118A (en) * 2020-04-17 2021-10-22 北京小米移动软件有限公司 Moving distance determining method, device and storage medium
CN113866712A (en) * 2020-06-30 2021-12-31 华为技术有限公司 A kind of motion distance determination method and wearable device
CN113870977A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Method and device for processing motion data

Also Published As

Publication number Publication date
WO2020221109A1 (en) 2020-11-05

Similar Documents

Publication Publication Date Title
CN109997348B (en) A terminal interface display method and terminal
CN105917246B (en) Proximity determination without ranging
CN110246561A (en) A kind of moving distance calculation method, device and system
CN108701495B (en) Method for integrating and providing data collected from a plurality of devices and electronic device for implementing the method
EP4109218B1 (en) Mobile phone comprising a touch screen with an in-display fingerprint sensor
WO2018196788A1 (en) Destination place recommendation method and apparatus, server and storage medium
US10972861B2 (en) Electronic device and system for providing point of interest information
KR102498362B1 (en) Method for calculating location information and an electronic device thereof
CN109164477A (en) A kind of application positioning method and mobile terminal
US11059438B2 (en) Vehicle on-boarding recognition method and electronic device implementing same
CN110083742B (en) Video query method and device
CN110708673A (en) Position determination method and portable multifunctional equipment
CN106997052B (en) Position information processing method and device and computer equipment
CN106294087B (en) Statistical method and device for operation frequency of business execution operation
CN108886548A (en) Method for determining device power consumption of electronic equipment, electronic equipment and storage medium
CN107835304B (en) Method, device, mobile terminal and storage medium for controlling mobile terminal
CN111159551B (en) User-generated content display method and device and computer equipment
WO2018133313A1 (en) Motion recording method and electronic device
CN112188864A (en) Motion index evaluation method and device
CN110967712A (en) An information processing method and electronic device
CN115248050B (en) A motion distance measurement method and wearable device
CN111401879A (en) Method and device for calibrating station position information
CN112365088B (en) Method, device and equipment for determining travel key points and readable storage medium
CN120010014B (en) A formation porosity calculation method, system, device and storage medium
CN110979345B (en) Verification method and device of vehicle control system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190917