CN112833907B - Step counting method, device, equipment and storage medium - Google Patents
Step counting method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN112833907B CN112833907B CN202110099238.4A CN202110099238A CN112833907B CN 112833907 B CN112833907 B CN 112833907B CN 202110099238 A CN202110099238 A CN 202110099238A CN 112833907 B CN112833907 B CN 112833907B
- Authority
- CN
- China
- Prior art keywords
- historical
- time period
- user
- measurement information
- pace
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C22/00—Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
- G01C22/006—Pedometers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2465—Query processing support for facilitating data mining operations in structured databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Mathematical Physics (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Fuzzy Systems (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
The present disclosure relates to a step counting method, device, equipment and storage medium, wherein the method comprises: acquiring speed data of a current time period of terminal equipment; determining the pace measurement information of the user in the current time period according to the speed data; inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period; and determining the total step result of the user in the current time period according to the single-step measurement result. The method and the device can realize accurate single-step counting aiming at the self characteristics of the user, and further can realize the follow-up accurate determination of the total step result based on the single-step counting result.
Description
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a step counting method, a step counting device, step counting equipment and a storage medium.
Background
In the related art, the pedometer function of the terminal device can record the number of steps taken by the user, so that the user can know the own motion quantity. The current health class APP can access this data frequently to complete the health record. However, the pedometer in the terminal device has a strong limitation that only the most typical steps can be identified, and the step counting results may be different for different users due to the body types, the heights, the weights, the step speeds and the like, so that the current step counting scheme cannot realize accurate step counting for different users.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide a step counting method, apparatus, device, and storage medium, which are used to solve the drawbacks in the related art.
According to a first aspect of embodiments of the present disclosure, there is provided a step counting method, the method comprising:
acquiring speed data of a current time period of terminal equipment;
determining the pace measurement information of the user in the current time period according to the speed data;
inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
and determining the total step result of the user in the current time period according to the single-step measurement result.
In one embodiment, the stride measurement information includes a pace speed and a stride;
and under the condition that the speed data is acceleration, determining the pace measurement information of the user in the current time period according to the speed data, wherein the step measurement information comprises the following steps:
integrating the acceleration to obtain the pace of the user in the current time period;
and carrying out integral operation on the pace speed to obtain the pace of the user in the current time period.
In an embodiment, the method further comprises training the machine learning model based on:
acquiring historical acceleration of the terminal equipment in a plurality of historical time periods;
determining historical pace measurement information of the user in each historical time period according to the historical acceleration;
determining a single-step measurement result corresponding to the historical step measurement information of each historical time period;
and training a pre-built machine learning model by taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
In an embodiment, the method further comprises:
acquiring body information of the user;
the training of the machine learning model built in advance by taking the historical step measurement information of each historical time period and the corresponding single step measurement result as a training set comprises the following steps:
and training a pre-constructed machine learning model by taking the body information of the user, the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
In an embodiment, the method further comprises:
body information of the user is determined based on the historical pace measurement information.
According to a second aspect of embodiments of the present disclosure, there is provided a step counting device, the device comprising:
the speed acquisition module is used for acquiring speed data of the current time period of the terminal equipment;
the measurement information determining module is used for determining the pace measurement information of the user in the current time period according to the speed data;
the single step counting module is used for inputting the step measurement information into a machine learning model which is trained on the basis of the historical step measurement information of the user in advance to obtain a single step measurement result of the current time period;
and the total step module is used for determining the total step result of the user in the current time period according to the single-step measurement result.
In one embodiment, the stride measurement information includes a pace speed and a stride;
in the case where the speed data is acceleration, the measurement information determining module includes:
the pace speed obtaining unit is used for carrying out integral operation on the acceleration to obtain the pace speed of the user in the current time period;
and the stride obtaining unit is used for carrying out integral operation on the pace speed to obtain the stride of the user in the current time period.
In an embodiment, the apparatus further comprises a learning model training module;
The learning model training module comprises:
a history data acquisition unit configured to acquire history accelerations of a plurality of history periods of the terminal device;
a history information determining unit configured to determine, according to the history acceleration, history pace measurement information of the user in each history period;
a single step counting unit, configured to determine a single step measurement result corresponding to the historical step measurement information of each historical time period;
and the learning model training unit is used for taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set to train a pre-constructed machine learning model.
In an embodiment, the learning model training module further comprises:
a body information acquisition unit configured to acquire body information of the user;
the learning model training unit is further configured to train a machine learning model built in advance by using the physical information of the user, the historical pace measurement information of each historical time period, and the corresponding single-step measurement result as a training set.
In an embodiment, the body information obtaining unit is further configured to determine body information of the user based on the historical step measurement information.
According to a third aspect of embodiments of the present disclosure, there is provided an electronic device, the device comprising:
a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring speed data of a current time period of terminal equipment;
determining the pace measurement information of the user in the current time period according to the speed data;
inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
and determining the total step result of the user in the current time period according to the single-step measurement result.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements:
acquiring speed data of a current time period of terminal equipment;
determining the pace measurement information of the user in the current time period according to the speed data;
inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
And determining the total step result of the user in the current time period according to the single-step measurement result.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method and the device, the speed data of the current time period of the terminal equipment are obtained, the step measurement information of the user in the current time period is determined according to the speed data, then the step measurement information is input into the machine learning model trained on the basis of the historical step measurement information of the user in advance, the single step measurement result of the current time period is obtained, and further the total step result of the user in the current time period is determined according to the single step measurement result.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart of a step counting method according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating how the user's cadence measurement information during the current time period is determined from the speed data, according to an exemplary embodiment;
FIG. 3 is a flowchart illustrating how the machine learning model is trained, according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating how historical pace measurement information for the user is determined for various historical time periods based on the historical acceleration according to an exemplary embodiment;
FIG. 5 is a flowchart illustrating how the machine learning model is trained according to yet another exemplary embodiment;
FIG. 6 is a block diagram of a step counting device, according to an example embodiment;
FIG. 7 is a block diagram of a step-counting device according to yet another exemplary embodiment;
fig. 8 is a block diagram of an electronic device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
FIG. 1 is a flow chart of a step counting method according to an exemplary embodiment; the method of the embodiment can be applied to terminal equipment (such as a smart phone, a tablet computer, a notebook computer or a wearable device) with a step counting function.
As shown in fig. 1, the method includes the following steps S101-S103:
in step S101, speed data of a current period of the terminal device is acquired.
In this embodiment, the terminal device may acquire, through a built-in sensor, speed data of a current time period of the terminal device, where the speed data in this embodiment may be acceleration, speed, or other data capable of determining acceleration in the current time period.
The length of the above-mentioned time period may be freely set by a developer based on the service requirement, which is not limited in this embodiment.
In step S102, step measurement information of the user in the current time period is determined according to the speed data.
In this embodiment, after obtaining the speed data of the current time period of the terminal device, the step measurement information of the user in the current time period may be determined according to the speed data.
The step measurement information may include steps, pace, etc. for measuring characteristics of the user, which is not limited in this embodiment.
In an embodiment, after obtaining the speed data of the current time period of the terminal device, the speed data may be processed correspondingly to obtain the step measurement information of the user in the current time period.
In another embodiment, the above manner of determining the step measurement information of the user during the current time period according to the speed data may be referred to the embodiment shown in fig. 2 described below, which will not be described in detail herein.
In step S103, the step measurement information is input into a machine learning model trained in advance based on the historical step measurement information of the user, and a single step measurement result of the current time period is obtained.
In this embodiment, a machine learning model may be trained in advance based on the historical pace measurement information of the user, and then after determining the pace measurement information of the user in the current time period according to the speed data, the pace measurement information may be input into the machine learning model trained in advance, so as to obtain a single step measurement result in the current time period.
For example, the single-step measurement result of the current time period may be 1, 0, 1, … …,1, 0, 1 single-step measurement result. Where "1" may indicate that the user is walking and "0" may indicate that the user is not walking.
In step S104, an aggregate step result of the user during the current time period is determined from the single step measurement result.
In this embodiment, when the step measurement information is input into a machine learning model trained based on the historical step measurement information of the user in advance, after obtaining the single step measurement result in the current time period, the single step measurement result may be accumulated to obtain the total step result of the user in the current time period, so as to determine the total step result of the user in the current time period according to the single step measurement result.
For example, if the single step measurement result for each time period is: 1. 0, 1, … …,1, 0, 1, then these single step measurements may be accumulated to obtain a total step result for the user during the current time period, i.e., a total number of steps the user has walked during the current stage.
As can be seen from the foregoing description, in this embodiment, by acquiring the speed data of the current time period of the terminal device, determining the step measurement information of the user in the current time period according to the speed data, inputting the step measurement information into a machine learning model trained on the basis of the historical step measurement information of the user in advance, obtaining the single step measurement result in the current time period, and further determining the total step result of the user in the current time period according to the single step measurement result.
FIG. 2 is a flow chart illustrating how the user's cadence measurement information during the current time period is determined from the speed data, according to an exemplary embodiment; the present embodiment is exemplified on the basis of the above-described embodiments by taking as an example how to determine the step measurement information of the user in the current time period from the speed data.
In this embodiment, the pace measurement information may include a pace (a speed at which the user walks one step) and a stride (a distance at which the user walks one step).
As shown in fig. 2, in the case where the speed data is acceleration, determining the step measurement information of the user in the current time period according to the speed data in the step S102 may include the following steps S201 to S202:
in step S201, an integral operation is performed on the acceleration, so as to obtain the pace of the user in the current time period.
In this embodiment, the terminal device may acquire the acceleration of its own current time period through the built-in acceleration sensor.
For example, the acceleration may be a plurality of axial accelerations acquired by two or more axial acceleration sensors. Taking the three-axis acceleration sensor as an example, the above-described obtained acceleration may include acceleration of the three-axis acceleration sensor in the x-axis direction, acceleration in the y-axis direction, acceleration in the z-axis direction, and the like. After the acceleration of the terminal equipment is obtained, integral operation can be carried out on the acceleration to obtain the pace of the user in the current time period.
In step S202, an integral operation is performed on the pace speed, so as to obtain a pace of the user in the current time period.
In this embodiment, after obtaining the pace of the user in the current time period, the pace may be subjected to integral operation, so as to obtain the pace of the user in the current time period.
The acceleration may be a continuous curve in time, so that the pace data obtained by integrating the acceleration may be a continuous curve in time, and the data obtained by integrating the pace data may be a continuous displacement curve in time, so that the stride of the user may be determined from the peak and the valley of the displacement curve. In addition, other algorithms may be used to calculate the stride according to the stride rate in this embodiment, and the method for calculating the stride according to the stride rate in this embodiment is not limited. Further, when the speed data is the speed, the pace of the user in the current time period can be obtained according to the speed of the current time period, and then the pace is subjected to integral operation to obtain the stride of the user in the current time period.
As can be seen from the foregoing description, in this embodiment, by performing integral operation on the acceleration to obtain the pace of the user in the current time period and performing integral operation on the pace to obtain the stride of the user in the current time period, accurate calculation of the pace and stride of the user based on the acceleration collected by the terminal device of the user can be achieved, and further, subsequent input of the pace and stride of the user into a machine learning model trained in advance based on the historical pace measurement information of the user can be achieved, so as to obtain a single-step measurement result in the current time period, and therefore, by determining the total step result of the user in the current time period according to the single-step measurement result, more accurate step counting can be achieved according to the self characteristics of the user.
FIG. 3 is a flowchart illustrating how the machine learning model is trained, according to an exemplary embodiment; the present embodiment is exemplified on the basis of the above-described embodiments by taking as an example how to train the machine learning model. As shown in fig. 3, the step counting method of the present embodiment may further include training the machine learning model based on the following steps S301 to S304:
in step S301, historical accelerations of the terminal device for a plurality of historical time periods are acquired.
In this embodiment, in order to train a machine learning model for determining a single-step measurement result of a user in each period, historical accelerations of a plurality of historical periods of a terminal device of the user may be acquired.
For example, in the initial use stage of the terminal device, in order to train the machine learning model for determining the single-step measurement result of the user in each time period, a general step counting model may be used to implement a step counting function, and whether the user is in a walking state or not is identified based on a sensor in the terminal device, so as to implement the collection of the historical acceleration. The general step counting model is a model that does not take personal body information such as the user's personal body shape, height, weight, and pace into consideration.
The length of the history period may be freely set by a developer based on the service requirement, which is not limited in this embodiment.
In an embodiment, the historical acceleration may be a plurality of axial historical accelerations acquired by two or more axial acceleration sensors during a plurality of historical time periods. Taking the three-axis acceleration sensor as an example, the above-described obtained historical acceleration may include a historical acceleration of the three-axis acceleration sensor in the x-axis direction, a historical acceleration in the y-axis direction, a historical acceleration in the z-axis direction, and the like.
In step S302, historical pace measurement information of the user in each historical time period is determined according to the historical acceleration.
In this embodiment, after the historical accelerations of the terminal device in the plurality of historical time periods are obtained, the historical pace measurement information of the user in each historical time period may be determined according to the historical accelerations.
The historical pace measurement information may include information for measuring the pace characteristics of the user, such as a stride, a pace speed, etc., which is not limited in this embodiment.
In an embodiment, after the historical accelerations of the plurality of historical time periods of the terminal device are obtained, the historical accelerations may be correspondingly processed to obtain the historical pace measurement information of the user in each historical time period.
In another embodiment, the above manner of determining the historical pace measurement information of the user in each historical time period according to the historical acceleration may be referred to the embodiment shown in fig. 4 below, which is not described in detail herein.
In step S303, a single step measurement result corresponding to the history step measurement information of each of the history periods is determined.
In this embodiment, after determining the historical step measurement information of the user in each historical time period according to the historical acceleration, a manual calibration method or the like may be adopted to determine a single step measurement result corresponding to the historical step measurement information of each historical time period.
In step S304, the historical step measurement information and the corresponding single step measurement result of each historical time period are used as a training set to train a machine learning model constructed in advance.
In this embodiment, after determining the single step measurement result corresponding to the historical step measurement information of each historical time period, the historical step measurement information of each historical time period and the corresponding single step measurement result may be used as a training set to train a machine learning model constructed in advance.
For example, after a training set composed of the historical pace measurement information of each historical time period and the corresponding single-step measurement result is obtained, a pre-constructed machine learning model can be trained based on the training set, and then after a set training termination condition is reached, the model training process is ended, so as to obtain a trained machine learning model.
It should be noted that, the type of the machine learning model may be set by a developer based on actual service requirements, for example, set as a pre-built deep neural network, or directly adopt a general step counting model for multi-user setting in the related art, which is not limited in this embodiment.
As can be seen from the foregoing description, in this embodiment, by acquiring the historical accelerations of a plurality of historical time periods of the terminal device, determining the historical step measurement information of the user in each historical time period according to the historical accelerations, and determining the single step measurement result corresponding to the historical step measurement information of each historical time period, further taking the historical step measurement information of each historical time period and the corresponding single step measurement result as a training set, training a machine learning model built in advance, training the machine learning model based on the historical step measurement information of the user can be achieved, further, the step speed and the step of the user can be input into the trained machine learning model, and the single step measurement result of the current time period can be obtained, so that the total step result of the user in the current time period can be determined according to the single step measurement result, and more accurate step counting can be achieved for the self-characteristics of the user.
FIG. 4 is a flowchart illustrating how historical pace measurement information for the user is determined for various historical time periods based on the historical acceleration according to an exemplary embodiment; the present embodiment is exemplified on the basis of the above-described embodiments by taking as an example how to determine the historical pace measurement information of the user in each historical period from the historical acceleration. As shown in fig. 4, the determining the historical pace measurement information of the user in each historical time period according to the historical acceleration in the step S302 may include the following steps S401-S402:
in step S401, integral operation is performed on the historical acceleration of each historical time period, so as to obtain the historical pace of each historical time period.
In this embodiment, after the historical accelerations of the plurality of historical time periods of the terminal device are obtained, integral operation may be performed on the historical accelerations of the respective historical time periods to obtain the historical pace of the respective historical time periods.
In step S402, an integral operation is performed on the historical pace of each historical time period, so as to obtain a historical pace of each historical time period.
In this embodiment, after the historical acceleration of each historical time period is subjected to integral operation to obtain the historical pace of each historical time period, the historical pace of each historical time period may be subjected to integral operation to obtain the historical stride of each historical time period.
As can be seen from the foregoing description, in this embodiment, by performing an integral operation on the historical acceleration of each historical time period to obtain the historical pace of each historical time period, and performing an integral operation on the historical pace of each historical time period to obtain the historical stride of each historical time period, the obtained historical pace, the historical stride and the corresponding single-step measurement result of each historical time period may be further used as a training set to train a machine learning model that is built in advance, so as to improve the training effect of the machine learning model, thereby enabling the subsequent determination of the single-step measurement result of the user in the current time period based on the trained machine learning model, enabling the step counting for the own characteristics of the user, and improving the accuracy of the step counting.
FIG. 5 is a flowchart illustrating how the machine learning model is trained according to yet another exemplary embodiment; the present embodiment is exemplified on the basis of the above-described embodiments by taking as an example how to train the machine learning model. As shown in fig. 5, the step counting method of the present embodiment may further include training the machine learning model based on the following steps S501 to S504:
In step S501, historical accelerations of the terminal device for a plurality of historical time periods are acquired.
In step S502, historical pace measurement information of the user in each historical time period is determined according to the historical acceleration.
In step S503, a single step measurement result corresponding to the history step measurement information of each of the history periods is determined.
The explanation and explanation of steps S501-S503 can be referred to steps S301-S303 in the above embodiments, and will not be repeated here.
In step S504, body information of the user is determined based on the historical pace measurement information.
In this embodiment, the body information of the user may be determined based on the average value of the above-determined historical step measurement information; alternatively, the user may be requested to input his own body information in the corresponding input field at the system initialization stage.
For example, an input box for the user to input the body information such as the height, the weight, etc. of the individual may be displayed at the initialization stage of the step counting program, so as to obtain the body information of the user input by the user based on the input box.
For another example, a target model for estimating the body information may be constructed and trained based on correspondence between sample pace measurement information and actual body information of a plurality of sample users, and then, after obtaining historical pace measurement information of the current user, the historical pace measurement information may be input into the target model to obtain an estimation result of the body information of the current user, so that the body information of the user is determined based on the historical pace measurement information. In an embodiment, the estimated result of the physical information may include at least one of an estimated height, an estimated weight, etc. of the user, which is not limited in this embodiment
In step S505, the body information of the user, the historical step measurement information of each historical time period, and the corresponding single step measurement result are used as training sets to train a machine learning model constructed in advance.
In this embodiment, after determining the single step measurement result corresponding to the historical step measurement information of each historical time period and the body information of the user, the historical step measurement information of each historical time period and the corresponding single step measurement result may be used as a training set to train a machine learning model constructed in advance.
For example, after a training set composed of body information of the user, historical pace measurement information of the user in each historical time period and corresponding single-step measurement results is obtained, a machine learning model constructed in advance can be trained based on the training set, and then after a set training termination condition is reached, a model training process is ended, so that a trained machine learning model is obtained. Furthermore, network parameters in the machine learning model can be optimized continuously according to the obtained step measurement information, so that the accuracy of obtaining a single-step measurement result through the machine learning model is improved.
As can be seen from the foregoing description, in this embodiment, by using the body information of the user, the historical pace measurement information of each historical time period, and the corresponding single-step measurement result as a training set, training a machine learning model constructed in advance can implement a training machine learning model that is more accurate based on the historical pace measurement information of the user and the body information such as the height and weight of the user, and can implement a subsequent input of the pace and stride of the user into the trained machine learning model, so as to obtain the single-step measurement result that is more accurate in the current time period.
FIG. 6 is a block diagram of a step counting device, according to an example embodiment; the device of the embodiment can be applied to terminal equipment (such as a smart phone, a tablet computer, a notebook computer or a wearable device) with a step counting function. As shown in fig. 6, the apparatus includes: a speed acquisition module 110, a measurement information determination module 120, a single step calculation module 130, and a total step module 140, wherein:
a speed obtaining module 110, configured to obtain speed data of a current time period of the terminal device;
a measurement information determining module 120, configured to determine, according to the speed data, step measurement information of the user in the current time period;
A single step counting module 130, configured to input the step measurement information into a machine learning model trained in advance based on the historical step measurement information of the user, to obtain a single step measurement result in the current time period;
and a total step module 140, configured to determine a total step result of the user in the current time period according to the single-step measurement result.
As can be seen from the foregoing description, in this embodiment, by acquiring the speed data of the current time period of the terminal device, determining the step measurement information of the user in the current time period according to the speed data, inputting the step measurement information into a machine learning model trained on the basis of the historical step measurement information of the user in advance, obtaining the single step measurement result in the current time period, and further determining the total step result of the user in the current time period according to the single step measurement result.
FIG. 7 is a block diagram of a step-counting device according to yet another exemplary embodiment; the device of the embodiment can be applied to terminal equipment (such as a smart phone, a tablet computer, a notebook computer or a wearable device) with a step counting function. The speed obtaining module 210, the measurement information determining module 220, the single step counting module 230, and the total step counting module 240 are the same as the speed obtaining module 110, the measurement information determining module 120, the single step counting module 130, and the total step counting module 140 in the embodiment shown in fig. 6, and are not described herein.
In this embodiment, the stride measurement information may include a stride rate and a stride;
in the case that the speed data is acceleration, the measurement information determining module 220 may include:
a pace speed obtaining unit 221, configured to perform an integral operation on the acceleration to obtain a pace speed of the user in the current time period;
and the stride obtaining unit 222 is configured to perform an integral operation on the pace speed to obtain a stride of the user in the current time period.
In one embodiment, the apparatus may further include a learning model training module 250;
the learning model training module 250 may include:
A history data acquiring unit 251 configured to acquire history accelerations of a plurality of history periods of the terminal device;
a history information determining unit 252 for determining, based on the history acceleration, history pace measurement information of the user at each history period;
a single step counting unit 253 for determining a single step measurement result corresponding to the history step measurement information of each history period;
and the learning model training unit 254 is configured to train a machine learning model built in advance by using the historical step measurement information and the corresponding single step measurement result of each historical time period as a training set.
In one embodiment, the historical pace measurement information may include a historical pace and a historical pace;
on this basis, the history information determination unit 252 described above may also be configured to:
performing integral operation on the historical acceleration of each historical time period to obtain the historical pace of each historical time period;
and performing integral operation on the historical pace of each historical time period to obtain the historical pace of each historical time period.
In an embodiment, the learning model training module 250 may further include:
A body information acquisition unit 255 for acquiring body information of the user;
on this basis, the learning model training unit 254 may be further configured to train a machine learning model constructed in advance using the body information of the user, the history step measurement information of the respective history periods, and the corresponding single step measurement results as a training set.
In an embodiment, the body information obtaining unit 255 may further be configured to determine body information of the user based on the historical step measurement information.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 8 is a block diagram of an electronic device, according to an example embodiment. For example, apparatus 900 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 8, apparatus 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communication component 916.
The processing component 902 generally controls overall operations of the apparatus 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 902 can include one or more modules that facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operations at the apparatus 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power component 906 provides power to the various components of the device 900. Power components 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 900.
The multimedia component 908 comprises a screen between the device 900 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the apparatus 900 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, the sensor assembly 914 may detect the on/off state of the device 900, the relative positioning of the components, such as the display and keypad of the device 900, the sensor assembly 914 may also detect the change in position of the device 900 or one component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration/deceleration of the device 900, and the change in temperature of the device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communication between the apparatus 900 and other devices in a wired or wireless manner. The device 900 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, apparatus 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as a memory 904 including instructions executable by the processor 920 of the apparatus 900 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (8)
1. A method of step counting, the method comprising:
acquiring speed data of a current time period of terminal equipment;
determining pace measurement information of a user in the current time period according to the speed data, wherein the pace measurement information comprises pace speed and stride;
inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
Determining an overall step result of the user in the current time period according to the single-step measurement result;
and under the condition that the speed data is acceleration, determining the pace measurement information of the user in the current time period according to the speed data, wherein the step measurement information comprises the following steps:
integrating the acceleration to obtain the pace of the user in the current time period;
performing integral operation on the pace speed to obtain the pace of the user in the current time period;
the method further includes training the machine learning model based on:
acquiring historical acceleration of the terminal equipment in a plurality of historical time periods;
determining historical pace measurement information of the user in each historical time period according to the historical acceleration;
determining a single-step measurement result corresponding to the historical step measurement information of each historical time period;
and training a pre-built machine learning model by taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
2. The method according to claim 1, wherein the method further comprises:
acquiring body information of the user;
The training of the machine learning model built in advance by taking the historical step measurement information of each historical time period and the corresponding single step measurement result as a training set comprises the following steps:
and training a pre-constructed machine learning model by taking the body information of the user, the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
3. The method according to claim 2, wherein the method further comprises:
body information of the user is determined based on the historical pace measurement information.
4. A step counting device, the device comprising:
the speed acquisition module is used for acquiring speed data of the current time period of the terminal equipment;
the measurement information determining module is used for determining the pace measurement information of the user in the current time period according to the speed data, wherein the pace measurement information comprises a pace speed and a stride;
the single step counting module is used for inputting the step measurement information into a machine learning model which is trained on the basis of the historical step measurement information of the user in advance to obtain a single step measurement result of the current time period;
a total step module, configured to determine a total step result of the user in the current time period according to the single-step measurement result;
In the case where the speed data is acceleration, the measurement information determining module includes:
the pace speed obtaining unit is used for carrying out integral operation on the acceleration to obtain the pace speed of the user in the current time period;
the stride obtaining unit is used for carrying out integral operation on the pace speed to obtain the stride of the user in the current time period;
the device also comprises a learning model training module;
the learning model training module comprises:
a history data acquisition unit configured to acquire history accelerations of a plurality of history periods of the terminal device;
a history information determining unit configured to determine, according to the history acceleration, history pace measurement information of the user in each history period;
a single step counting unit, configured to determine a single step measurement result corresponding to the historical step measurement information of each historical time period;
and the learning model training unit is used for taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set to train a pre-constructed machine learning model.
5. The apparatus of claim 4, wherein the learning model training module further comprises:
A body information acquisition unit configured to acquire body information of the user;
the learning model training unit is further configured to train a machine learning model built in advance by using the physical information of the user, the historical pace measurement information of each historical time period, and the corresponding single-step measurement result as a training set.
6. The apparatus of claim 5, wherein the body information acquisition unit is further configured to determine body information of the user based on the historical pace measurement information.
7. An electronic device, the device comprising:
a processor and a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring speed data of a current time period of terminal equipment;
determining pace measurement information of a user in the current time period according to the speed data, wherein the pace measurement information comprises pace speed and stride;
inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
determining an overall step result of the user in the current time period according to the single-step measurement result;
And under the condition that the speed data is acceleration, determining the pace measurement information of the user in the current time period according to the speed data, wherein the step measurement information comprises the following steps:
integrating the acceleration to obtain the pace of the user in the current time period;
performing integral operation on the pace speed to obtain the pace of the user in the current time period;
the processor is further configured to train the machine learning model based on:
acquiring historical acceleration of the terminal equipment in a plurality of historical time periods;
determining historical pace measurement information of the user in each historical time period according to the historical acceleration;
determining a single-step measurement result corresponding to the historical step measurement information of each historical time period;
and training a pre-built machine learning model by taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
8. A computer readable storage medium having stored thereon a computer program, the program being embodied when executed by a processor:
acquiring speed data of a current time period of terminal equipment;
determining pace measurement information of a user in the current time period according to the speed data, wherein the pace measurement information comprises pace speed and stride;
Inputting the step measurement information into a machine learning model which is trained in advance based on the historical step measurement information of the user, and obtaining a single-step measurement result of the current time period;
determining an overall step result of the user in the current time period according to the single-step measurement result;
and under the condition that the speed data is acceleration, determining the pace measurement information of the user in the current time period according to the speed data, wherein the step measurement information comprises the following steps:
integrating the acceleration to obtain the pace of the user in the current time period;
performing integral operation on the pace speed to obtain the pace of the user in the current time period;
the program when executed by the processor further enables training the machine learning model based on:
acquiring historical acceleration of the terminal equipment in a plurality of historical time periods;
determining historical pace measurement information of the user in each historical time period according to the historical acceleration;
determining a single-step measurement result corresponding to the historical step measurement information of each historical time period;
and training a pre-built machine learning model by taking the historical step measurement information of each historical time period and the corresponding single-step measurement result as a training set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110099238.4A CN112833907B (en) | 2021-01-25 | 2021-01-25 | Step counting method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110099238.4A CN112833907B (en) | 2021-01-25 | 2021-01-25 | Step counting method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112833907A CN112833907A (en) | 2021-05-25 |
CN112833907B true CN112833907B (en) | 2023-07-18 |
Family
ID=75931471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110099238.4A Active CN112833907B (en) | 2021-01-25 | 2021-01-25 | Step counting method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112833907B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103712632A (en) * | 2013-12-31 | 2014-04-09 | 英华达(上海)科技有限公司 | Step counting method and pedometer based on three-axis accelerometer |
CN103997572A (en) * | 2014-06-03 | 2014-08-20 | 深圳市爱康伟达智能医疗科技有限公司 | Step counting method and device based on data of acceleration sensor of mobile phone |
WO2018086321A1 (en) * | 2016-11-11 | 2018-05-17 | 华为技术有限公司 | Step counting method and device |
CN109426829A (en) * | 2017-08-28 | 2019-03-05 | 中兴通讯股份有限公司 | A kind of estimation method, device and the computer readable storage medium of user's height |
CN109489683A (en) * | 2017-09-13 | 2019-03-19 | 中兴通讯股份有限公司 | A kind of step-size estimation method, mobile terminal and storage medium |
CN110811578A (en) * | 2019-11-27 | 2020-02-21 | 青岛歌尔智能传感器有限公司 | Step counting device and step counting method thereof, controller and readable storage medium |
CN112067015A (en) * | 2020-09-03 | 2020-12-11 | 青岛歌尔智能传感器有限公司 | Step counting method and device based on convolutional neural network and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8831909B2 (en) * | 2011-09-22 | 2014-09-09 | Microsoft Corporation | Step detection and step length estimation |
US10001386B2 (en) * | 2014-04-03 | 2018-06-19 | Apple Inc. | Automatic track selection for calibration of pedometer devices |
-
2021
- 2021-01-25 CN CN202110099238.4A patent/CN112833907B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103712632A (en) * | 2013-12-31 | 2014-04-09 | 英华达(上海)科技有限公司 | Step counting method and pedometer based on three-axis accelerometer |
CN103997572A (en) * | 2014-06-03 | 2014-08-20 | 深圳市爱康伟达智能医疗科技有限公司 | Step counting method and device based on data of acceleration sensor of mobile phone |
WO2018086321A1 (en) * | 2016-11-11 | 2018-05-17 | 华为技术有限公司 | Step counting method and device |
CN109426829A (en) * | 2017-08-28 | 2019-03-05 | 中兴通讯股份有限公司 | A kind of estimation method, device and the computer readable storage medium of user's height |
CN109489683A (en) * | 2017-09-13 | 2019-03-19 | 中兴通讯股份有限公司 | A kind of step-size estimation method, mobile terminal and storage medium |
CN110811578A (en) * | 2019-11-27 | 2020-02-21 | 青岛歌尔智能传感器有限公司 | Step counting device and step counting method thereof, controller and readable storage medium |
CN112067015A (en) * | 2020-09-03 | 2020-12-11 | 青岛歌尔智能传感器有限公司 | Step counting method and device based on convolutional neural network and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112833907A (en) | 2021-05-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109858524B (en) | Gesture recognition method and device, electronic equipment and storage medium | |
EP3258418B1 (en) | Fingerprint entry prompting method and device | |
CN112713322B (en) | Battery temperature determination method, battery temperature determination device, and storage medium | |
CN109919829B (en) | Image style migration method, device and computer readable storage medium | |
CN109410276B (en) | Key point position determining method and device and electronic equipment | |
CN106648063B (en) | Gesture recognition method and device | |
CN107656682B (en) | Mobile terminal and bending angle calculation method | |
CN105955821B (en) | Pre-reading method and device | |
CN113244565B (en) | Rope skipping handle, rope skipping and rope skipping counting and determining method | |
CN111539617B (en) | Data processing method and device, electronic equipment, interaction system and storage medium | |
CN107239758B (en) | Method and device for positioning key points of human face | |
CN112833907B (en) | Step counting method, device, equipment and storage medium | |
CN104991644A (en) | Method and apparatus for determining use object of mobile terminal | |
EP3200127B1 (en) | Method and device for fingerprint recognition | |
CN112764658B (en) | Content display method and device and storage medium | |
CN104954683B (en) | Determine the method and device of photographic device | |
CN112925466B (en) | Touch control method and device | |
CN116266418A (en) | Motion recognition method, motion recognition device, electronic equipment and storage medium | |
CN108470160B (en) | Mobile terminal and method for controlling processing based on fingerprint identification component | |
CN107239280B (en) | Method and device for determining notification importance and mobile terminal | |
CN105962942A (en) | Motion state determining method and device | |
CN114563012B (en) | Step counting method, device, equipment and storage medium | |
CN109670432B (en) | Action recognition method and device | |
CN106293398B (en) | Method, device and terminal for recommending virtual reality resources | |
CN111898019A (en) | Information pushing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |