CN115127581A - Running data monitoring method and device, terminal equipment and storage medium - Google Patents

Running data monitoring method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115127581A
CN115127581A CN202210405495.0A CN202210405495A CN115127581A CN 115127581 A CN115127581 A CN 115127581A CN 202210405495 A CN202210405495 A CN 202210405495A CN 115127581 A CN115127581 A CN 115127581A
Authority
CN
China
Prior art keywords
axis
running
time period
target
gyroscope
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
CN202210405495.0A
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.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN202210405495.0A priority Critical patent/CN115127581A/en
Publication of CN115127581A publication Critical patent/CN115127581A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers
    • G01C22/006Pedometers

Abstract

The embodiment of the application discloses a running data monitoring method and device, terminal equipment and a storage medium. The method is applied to terminal equipment, the terminal equipment comprises a multi-axis accelerometer and a multi-axis gyroscope, and the method comprises the following steps: if the user is determined to be in a running state according to the first acceleration data acquired by the multi-axis accelerometer, acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period; converting the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining a target axis from each axis according to the frequency spectrum data corresponding to each axis; and performing peak and trough detection on gyroscope data corresponding to the target axis, and determining a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs. The running data monitoring method, the running data monitoring device, the terminal equipment and the storage medium can improve the running data monitoring accuracy.

Description

Running data monitoring method and device, terminal equipment and storage medium
Technical Field
The application relates to the technical field of terminal equipment, in particular to a running data monitoring method and device, terminal equipment and a storage medium.
Background
Sports and physiological health become one of the important points of people's daily attention in life, more and more terminal devices (such as mobile phones, smart bracelets, smart watches and the like) are available on the market at present, and the monitoring of running data is one of the important attention items. The problem of insufficient monitoring accuracy exists when the current terminal equipment monitors the running data of a user.
Disclosure of Invention
The embodiment of the application discloses a running data monitoring method and device, terminal equipment and a storage medium, and the running data monitoring accuracy can be improved.
The embodiment of the application discloses a running data monitoring method, which is applied to terminal equipment, wherein the terminal equipment comprises a multi-axis accelerometer and a multi-axis gyroscope, and the method comprises the following steps:
if the user is determined to be in a running state according to the first acceleration data acquired by the multi-axis accelerometer, acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period;
converting the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining a target axis from each axis according to the frequency spectrum data corresponding to each axis;
and performing peak and trough detection on gyroscope data corresponding to the target axis, and determining a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.
The embodiment of the application discloses data monitoring devices runs is applied to terminal equipment, terminal equipment includes multiaxis accelerometer and multiaxis gyroscope, the device includes:
the gyroscope data acquisition module is used for acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period if the user is determined to be in a running state according to the acceleration data acquired by the multi-axis accelerometer;
a target axis determining module, configured to transform the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determine a target axis from each axis according to the frequency spectrum data corresponding to each axis;
and the step number determining module is used for detecting wave crests and wave troughs of the gyroscope data corresponding to the target shaft and determining a target running step number corresponding to the target time period according to the total number of the detected wave crests and wave troughs.
The embodiment of the application discloses a terminal device, which comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is enabled to realize the method.
An embodiment of the application discloses a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor in a computer device, causes the processor to implement the method as described in any one of the above.
The embodiment of the application discloses a running data monitoring method, a device, a terminal device and a storage medium, wherein the terminal device comprises a multi-axis accelerometer and a multi-axis gyroscope, if the user is determined to be in a running state according to first acceleration data collected by the multi-axis accelerometer, gyroscope data corresponding to each axis collected by the multi-axis gyroscope in a target time period are obtained, the gyroscope data corresponding to each axis are transformed to obtain frequency spectrum data corresponding to each axis, a target axis is determined from each axis according to the frequency spectrum data corresponding to each axis, peak and trough detection is carried out on the gyroscope data corresponding to the target axis, a target running step number corresponding to the target time period is determined according to the total number of the detected peak and trough, running step number monitoring is carried out through the gyroscope data collected by the multi-axis gyroscope, and the influence of gravity acceleration on a monitoring result can be avoided, and the gyroscope data corresponding to the target axis with the best robustness in the multi-axis gyroscope is selected to determine the target running step number, so that the influence of other information on the gyroscope data can be reduced, the running step number monitoring accuracy is improved, and the running data monitoring accuracy is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram illustrating an exemplary application of a method for monitoring running data;
FIG. 2 is a flow diagram of a method of running data monitoring in one embodiment;
FIG. 3 is a flow chart of a method of running data monitoring in another embodiment;
FIG. 4 is a flow diagram of determining a target number of running steps corresponding to a target time period in one embodiment;
FIG. 5 is a block diagram of a running data monitoring device in one embodiment;
FIG. 6 is a block diagram of an electronic device in one embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is to be noted that the terms "comprises" and "comprising" and any variations thereof in the examples and figures of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, the first acceleration data may be referred to as second acceleration data, and similarly, the second acceleration data may be referred to as first acceleration data, without departing from the scope of the present application. The first acceleration data and the second acceleration data both belong to acceleration data collected by the multi-axis accelerometer, but they do not refer to the same acceleration data. In addition, the terms "plurality" or the like used in the embodiments of the present application mean two or more.
Fig. 1 is a diagram illustrating an application scenario of the running data monitoring method according to an embodiment. As shown in fig. 1, a user 10 may carry a terminal device 20 with him, and the terminal device 20 may include, but is not limited to, a mobile phone, a wearable device (such as a smart watch, smart glasses, a smart bracelet, etc.), a tablet computer, a digital phone, and the like. A multi-axis accelerometer and a multi-axis gyroscope may be included in the terminal device 20 and may be used to monitor the running data of the user 10.
The terminal device 20 may acquire acceleration data in real time through the multi-axis accelerometer, and if it is determined that the user 10 is in a running state according to the first acceleration data acquired by the multi-axis accelerometer, may acquire gyroscope data corresponding to each axis acquired within a target time period of the multi-axis gyroscope. The terminal device 20 may convert the gyroscope data corresponding to each axis of the multi-axis gyroscope to obtain the spectrum data corresponding to each axis, and determine a target axis from each axis of the multi-axis gyroscope according to the spectrum data corresponding to each axis. The terminal device 20 may perform peak and valley detection on the gyroscope data corresponding to the target axis, and determine a target running step number corresponding to the user 20 in the target time period according to the total number of the detected peaks and valleys.
As shown in fig. 2, in one embodiment, a running data monitoring method is provided, which can be applied to the terminal device described above, and the method can include the following steps:
step 210, if it is determined that the user is in a running state according to the first acceleration data acquired by the multi-axis accelerometer, acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period.
The terminal equipment can be provided with sensors such as a multi-axis accelerometer and a multi-axis gyroscope and is used for collecting sensing data in real time. The multi-axis accelerometer may include, but is not limited to, a three-axis accelerometer, a six-axis accelerometer, and the like, and may be configured to acquire a spatial acceleration of the terminal device, and in an example of the three-axis accelerometer, the spatial acceleration of the terminal device may be resolved in three directions, i.e., an X axis, a Y axis, and a Z axis. Alternatively, the X and Y axes may be parallel to the horizontal plane, the Z axis may be perpendicular to the horizontal plane, and the X and Y axes may be perpendicular to each other; it should be noted that the arrangement of the three axes of the three-axis accelerometer, i.e., the X axis, the Y axis, and the Z axis, may be adjusted according to actual requirements, and is not limited herein.
The multi-axis gyroscope may include, but is not limited to, a three-axis gyroscope, a six-axis gyroscope, etc., and may be used to acquire the angular velocity of the terminal device, and for example, the three-axis gyroscope may acquire the angular velocity of the terminal device moving in three directions, i.e., the X-axis direction, the Y-axis direction, and the Z-axis direction. Alternatively, the X and Y axes may be parallel to the horizontal plane, the Z axis may be perpendicular to the horizontal plane, and the X and Y axes may be perpendicular to each other; it should be noted that the arrangement of the three-axis gyroscope in the three axes of the X axis, the Y axis and the Z axis may be adjusted according to actual requirements, and is not specifically limited herein.
The multi-axis accelerometer in the terminal equipment can acquire acceleration data of the terminal equipment in real time, the multi-axis gyroscope can acquire the acceleration data of the terminal equipment in real time, and whether the user is in a running state or not is judged according to the acceleration data. If the user is determined to be in a running state according to the first acceleration data acquired by the multi-axis accelerometer, the running data of the user in the running process can be monitored. Alternatively, the first acceleration data may be acceleration data collected from multi-axis acceleration data for a first period of time prior to determining that the user is in a running state. The first time period may be set according to actual requirements, for example, 30 seconds, 1 minute, 40 seconds, and the like, but is not limited thereto, and the first time period may also be a time period which is calculated through a plurality of experimental data and can accurately determine whether the user is in a running state.
In some embodiments, the terminal device may acquire first acceleration data acquired by the multi-axis accelerometer, calculate a first root mean square value corresponding to the first acceleration data, and determine that the user is in a running state if the first root mean square value is greater than a preset threshold. The first acceleration data may include acceleration values corresponding to respective acquisition times within the first time period, the acceleration values may be calculated according to acceleration data acquired at the same acquisition time for each axis of the multi-axis accelerometer, and the acceleration values may include a numerical value and a direction. As an implementation manner, a first root mean square value may be calculated according to absolute values (may be understood as removing directional influences) of acceleration values corresponding to each acquisition time in a first time period, and it is determined whether the first root mean square value is greater than a preset threshold, and if the first root mean square value is greater than the preset threshold, it is determined that the terminal device is currently in an acceleration state, it is determined that the user is in a running state.
As another embodiment, the first acceleration data may include acceleration values corresponding to each acquisition time of each axis of the multi-axis accelerometer in the first time period, a first root mean square value corresponding to each axis of the multi-axis accelerometer may be obtained through respective calculation according to the acceleration values corresponding to each acquisition time of each axis of the multi-axis accelerometer in the first time period, and whether the first root mean square value corresponding to each axis of the multi-axis accelerometer is greater than a preset threshold value is determined. If the first root mean square value corresponding to any axis is larger than the preset threshold value, the user can be determined to be in a running state. The acceleration data acquired through the multi-axis acceleration can accurately identify that the user is in a running state, so that the running data of the user can be monitored in time, and the monitoring accuracy is improved.
The preset threshold value can be set according to actual requirements, historical running speed of the user can also be acquired, and the preset threshold value is set according to the historical running speed, so that the set preset threshold value is matched with the actual running condition of the user, personalized setting is achieved, the actual condition of the user is fitted, and misjudgment is reduced.
In some embodiments, a threshold range corresponding to the running state may also be set, and if the first root mean square value is within the threshold range, it may be determined that the user is in the running state, which may avoid erroneous determination caused by the user in some high-speed moving states (such as riding a car, etc.), and improve the detection accuracy of the running state.
After the terminal device determines that the user is in a running state, the terminal device may monitor running data of the user, where the running data may include running steps. Gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period can be acquired, the target time period can be any monitoring time period after the user enters a running state, and the monitoring duration of the target time period can be set according to actual requirements, for example, 3 minutes, 1 minute, 4 minutes and the like, but is not limited thereto. The terminal equipment can determine the target running steps of the user in each target time period every other target time period.
And step 220, transforming the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining a target axis from each axis according to the frequency spectrum data corresponding to each axis.
As a specific implementation manner, the terminal device may perform FFT (fast Fourier transform ) and other transformation processing on the gyroscope data corresponding to each axis respectively to obtain the spectrum data corresponding to each axis, and may construct a spectrogram according to the spectrum data corresponding to each axis, where the spectrogram may be used to reflect a relationship between signal frequency and energy.
In some embodiments, the terminal device may analyze the spectrum data corresponding to each axis of the multi-axis gyroscope according to the spectrogram to determine robustness of gyroscope data acquired by each axis of the multi-axis gyroscope in a target time period, select an axis with the strongest robustness as a target axis, and determine a target running step number corresponding to the target time period according to the gyroscope data corresponding to the target axis in the target time period. Because the gyroscope data acquired by each axis of the multi-axis gyroscope may be interfered by other information when the user is in a running state, a target axis with the strongest robustness can be selected from the gyroscope data, the running step number monitoring accuracy can be improved, and the interference situation can be reduced.
And step 230, performing peak and trough detection on the gyroscope data corresponding to the target axis, and determining a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.
In this embodiment of the application, the terminal device may be a terminal device that can be worn in a hand area of a user or can be held by the user, such as a smart watch, a smart bracelet, a mobile phone, and the like. During running, the hands of the user swing back and forth, which can be understood as periodic motion, and the motion of the hands is mapped into a three-dimensional space coordinate system and can be converted into periodic motion rotating around three coordinate axes respectively. In each period, the hand swing speed usually does not change much, and the hand gesture changes periodically, so that the angular speeds on the three coordinate axes show a sinusoidal motion trend. And each periodic variation of the hand gesture is coordinated with the foot motion of the user, i.e. a combination of left and right foot variations, so each periodic variation of the hand may correspond to 2 steps.
The terminal equipment can acquire data generated by periodic motion of the hand of a user, and in gyroscope data acquired by each axis of the multi-axis gyroscope, a maximum value and a minimum value appear in each period change of the hand posture, namely a peak and a trough appear, so that the number (2) of the peaks and the troughs appearing in each period can be determined as the number of steps (2 steps) corresponding to the period.
The wave crest and the wave trough detection can be carried out on the gyroscope data corresponding to the target axis. As a specific embodiment, the gyroscope values at each time in the gyroscope data may be respectively compared with the gyroscope values at the previous time and the next time, and if the gyroscope value at a certain time is greater than the gyroscope values at the previous time and the next time, the gyroscope value at the certain time may be determined as a peak; if the gyroscope value at a certain moment is smaller than the gyroscope values at the previous moment and the next moment, the gyroscope value at the moment can be determined as a trough.
As another embodiment, the slope corresponding to each time in the gyroscope data corresponding to the target axis may be calculated, and the gyroscope value corresponding to the time at which the slope is 0 may be determined as the peak or the trough. It should be noted that other methods may also be used to perform peak and valley detection on the gyroscope data corresponding to the target axis, which is not limited in the embodiment of the present application.
The target running step number corresponding to the target time period can be determined according to the total number of the wave crests and the wave troughs detected in the gyroscope data corresponding to the target axis. As an embodiment, the total number of the peaks and the troughs detected in the gyroscope data corresponding to the target axis may be directly used as the target running step number corresponding to the target time period. For example, from the gyroscope data acquired within 3 seconds for the target axis, detecting that there are 6 peaks and 6 troughs, the target number of running steps within 3 seconds can be determined to be 12 steps.
In some embodiments, after determining the target running steps corresponding to the current target time period, the terminal device may continue to monitor the running steps of the next target time period, and may also accumulate the target running steps corresponding to each determined target time period to obtain the total steps corresponding to the user in the current running process. Optionally, the total number of steps can be output in real time, so that a user can conveniently know the running condition of the running process.
In the embodiment of the application, the terminal device comprises a multi-axis accelerometer and a multi-axis gyroscope, if the running state of a user is determined according to first acceleration data acquired by the multi-axis accelerometer, gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period are acquired, the gyroscope data corresponding to each axis are transformed to acquire frequency spectrum data corresponding to each axis, a target axis is determined from each axis according to the frequency spectrum data corresponding to each axis, peak and trough detection is performed on the gyroscope data corresponding to the target axis, a target running step number corresponding to the target time period is determined according to the total number of the detected peak and trough, the running step number is monitored according to the gyroscope data acquired by the multi-axis gyroscope, the influence of gravity acceleration on a monitoring result can be avoided, and the target running step number is determined by selecting the gyroscope data corresponding to the target axis with the best robustness in the multi-axis gyroscope, the influence of other information on the gyroscope data can be reduced, and the accuracy of running step number monitoring is improved, so that the accuracy of running data monitoring is improved.
In another embodiment, as shown in fig. 3, a running data monitoring method is provided, which can be applied to the terminal device, and the method can include the following steps:
step 302, if it is determined that the user is in a running state according to the first acceleration data acquired by the multi-axis accelerometer, acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope within a target time period.
And 304, transforming the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining a target axis from each axis according to the frequency spectrum data corresponding to each axis.
The descriptions of steps 302-304 can refer to the related descriptions in the above embodiments, and are not repeated herein.
In some embodiments, before the terminal device transforms the gyroscope data corresponding to each axis in the multi-axis gyroscope, filtering may be performed on the gyroscope data corresponding to each axis acquired by the multi-axis gyroscope within a target time period, and then the filtered gyroscope data corresponding to each axis may be transformed to obtain the spectrum data corresponding to each axis. The filtering process may include, but is not limited to, one or more of a gaussian smoothing filtering process, a median filtering process, a SG (Savitzky-Golay) filtering process, and the like.
As a specific embodiment, for the gyroscope data corresponding to each axis in the multi-axis gyroscope, gaussian smoothing filtering may be performed on the gyroscope data, then median filtering is performed on the gyroscope data subjected to gaussian smoothing, and then SG filtering is performed on the gyroscope data subjected to median filtering, so as to obtain filtered gyroscope data.
It should be noted that other filtering processing methods may be used to filter the gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in the target time period, and the filtering processing method is not limited to the above-described method. The gyroscope data corresponding to each axis is subjected to filtering processing, and then the filtered gyroscope data is transformed, so that the accuracy of the selected target axis can be improved, and further, the filtered gyroscope data corresponding to the target axis can be subjected to peak and trough detection to determine the target running step number corresponding to the target time period, so that the noise influence can be reduced, and the running step number monitoring accuracy can be improved.
In some embodiments, the step of determining the target axis from the spectrum data corresponding to each axis may include: determining the spectrum data with the maximum amplitude value according to the spectrum data corresponding to each axis; and taking the axis corresponding to the spectrum data with the maximum amplitude value as a target axis.
As an embodiment, for the spectrum data corresponding to each axis in the multi-axis gyroscope, the maximum amplitude value in the spectrum data corresponding to each axis may be determined respectively (i.e., each axis corresponds to one maximum amplitude value), and the maximum amplitude values in the spectrum data corresponding to each axis are compared to determine the maximum amplitude value, and the spectrum data corresponding to the maximum amplitude value is determined as the spectrum data with the maximum amplitude value.
As another embodiment, for the spectrum data corresponding to each axis in the multi-axis gyroscope, the average amplitude of the spectrum data corresponding to each axis may be determined respectively, and the average amplitudes of the spectrum data corresponding to each axis are compared to determine the largest average amplitude, and the spectrum data corresponding to the largest average amplitude is determined as the spectrum data with the largest amplitude value.
The axis corresponding to the spectrum data with the maximum amplitude value can be regarded as the axis with the strongest robustness in the target time period in the multi-axis gyroscope, and therefore the axis corresponding to the spectrum data with the maximum amplitude value can be used as the target axis, and accuracy of subsequently monitoring the number of running steps is improved.
And step 306, performing peak and trough detection on the gyroscope data corresponding to the target axis, and determining the target running steps corresponding to the target time period according to the total number of the detected peaks and troughs.
In some embodiments, to improve the accuracy of running step count monitoring, running step count may be monitored in conjunction with gyroscope data collected by a multi-axis gyroscope and acceleration data collected by a multi-axis accelerometer. As shown in fig. 4, the step 306 determines a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs, and may include steps 402 to 406:
step 402, determining the total number of the peaks and the troughs detected in the gyroscope data corresponding to the target axis as a first running step number corresponding to the target time period.
The method can detect the wave crests and the wave troughs of the gyroscope data corresponding to the target axis in the target time period, and determine the total number of the detected wave crests and wave troughs as a first running step number corresponding to the target time period, wherein the first running step number is the running step number monitored only according to the multi-axis gyroscope.
And step 404, determining a second running step number corresponding to the target time period according to second acceleration data acquired by the multi-axis accelerometer in the target time period.
The terminal equipment can acquire second acceleration data acquired by the multi-axis accelerometer in a target time period, and determines a second running step number corresponding to the target time period according to the second acceleration data, wherein the second running step number is the running step number monitored only according to the multi-axis accelerometer.
In some embodiments, before determining the second running step number corresponding to the target time period according to the second acceleration data acquired by the multi-axis accelerometer in the target time period, the terminal device may further perform filtering processing on the second acceleration data acquired by the multi-axis accelerometer in the target time period, and then determine the second running step number corresponding to the target time period according to the second acceleration data after the filtering processing. The filtering process may include, but is not limited to, one or more of a high-pass filtering process, a low-pass filtering process, a gaussian smoothing filtering process, and the like.
As a specific embodiment, the second acceleration data may be subjected to high-pass filtering, then the second acceleration data subjected to the high-pass filtering may be subjected to low-pass filtering, and then the second acceleration data subjected to the low-pass filtering may be subjected to gaussian smoothing filtering, so as to obtain the filtered second acceleration data.
The second acceleration data may be filtered by another filtering method, and the filtering method is not limited to the above-described method. After the second acceleration data are subjected to filtering processing, the second running step number corresponding to the target time period is determined according to the second acceleration data after filtering processing, noise interference can be eliminated, and the accuracy of the determined second running step data is improved.
In some embodiments, the second acceleration data may include second acceleration data corresponding to each axis of the multi-axis accelerometer over a target time period. The terminal equipment can respectively detect wave crests and wave troughs of second acceleration data corresponding to each axis in the multi-axis accelerometer, and determines the total number of the detected wave crests and wave troughs in the second acceleration data corresponding to each axis of the multi-axis accelerometer as the running step number corresponding to each axis of the multi-axis accelerometer. The detection method for detecting the peak and the trough of the second acceleration data corresponding to each axis in the multi-axis accelerometer may be similar to the detection method for detecting the peak and the trough of the gyroscope data corresponding to the target axis in the target time period, and reference may be made to the description about the peak and the trough detection in each embodiment, which is not repeated herein.
After the running steps corresponding to each axis of the multi-axis accelerometer are obtained, a second root mean square value of second acceleration data corresponding to each axis can be calculated according to the acceleration absolute values of wave crests and wave troughs contained in the second acceleration data corresponding to each axis respectively, and the axis with the maximum second root mean square value is determined. The number of running steps corresponding to the axis having the largest second root mean square value may be determined as the second number of running steps corresponding to the target time period.
Specifically, for second acceleration data corresponding to each axis of the multi-axis accelerometer, after each peak and each trough included in the second acceleration data are detected, an acceleration value corresponding to each peak and each trough can be obtained, and root mean square calculation is performed on an absolute value of the acceleration value corresponding to each peak and each trough to obtain a second root mean square value corresponding to the second acceleration data.
The second root mean square values corresponding to the second acceleration data of each axis of the multi-axis accelerometer can be compared, the axis corresponding to the second acceleration data with the largest second root mean square value is determined, and the running step number corresponding to the determined axis is determined as the second running step number corresponding to the target time period. In the embodiment of the application, the acceleration axis most suitable for the running motion posture can be found, so that the accuracy of the monitored second running step number is improved, and the accuracy of the subsequently obtained target running step number is further improved.
It should be noted that the absolute values of the accelerations of the peak and the trough included in the second acceleration data corresponding to each axis may be averaged to obtain an average value corresponding to the second acceleration data of each axis, and the running step number corresponding to the axis with the largest average value may be determined as the second running step number corresponding to the target time period.
And step 406, fusing the first running step number and the second running step number to obtain a target running step number corresponding to the target time period.
In some embodiments, different weights may be configured for the first running step number and the second running step number respectively, and the first running step number and the second running step number are weighted and calculated according to the weights corresponding to the first running step number and the second running step number respectively, so as to obtain a target running step number corresponding to the target time period. For example, the first running step number may correspond to a weight of 0.6, and the second running step number may correspond to a weight of 0.4; or the weights corresponding to the first running step number and the second running step number are both 0.5 (i.e. the two are averaged), etc., but not limited thereto.
Optionally, since the acceleration data acquired by the multi-axis accelerometer may be influenced by gravity, the accuracy of the first running step number determined by the multi-axis gyroscope is higher than that of the second running step number determined by the multi-axis accelerometer, and the weight corresponding to the first running step number may be configured to be larger than that corresponding to the second running step number, so as to improve the accuracy of the target running step number corresponding to the determined target time period.
In the embodiment of the application, the target running step number corresponding to the user in the target time period is determined jointly by combining the data acquired by the multi-axis gyroscope and the multi-axis accelerometer, and the running step number monitoring accuracy can be improved.
And 308, determining step size data corresponding to the target time period according to the target running step number and the physiological data of the user.
In some embodiments, the running data monitored by the terminal device may also include running distance. The target running step number and the user physiological data can be brought into a preset step calculation model to obtain step data corresponding to the target time period, and the user physiological data can comprise user height, user weight and the like. The step data corresponding to the target time period may be an average step of the user in the target time period, and for the same user, the average steps in different target time periods may be the same or different, for example, in the running process of the user, the physical strength may decrease with the increase of the running time, so that the step size decreases. Therefore, for each target time period, the step data corresponding to the target time period can be determined according to the target running step number corresponding to the target time period and the user physiological data, so that the monitoring accuracy of the running distance is improved.
It should be noted that the step calculation model may be a mathematical calculation model summarized according to a large amount of experimental data, or an artificial intelligence model trained according to a large amount of running sample data, and the artificial intelligence model may be trained by collecting a large amount of data such as the number of running steps and the step size corresponding to physiological data of different users as the running sample data to obtain a model with a function of outputting an accurate step size.
And 310, multiplying the step data by the target running step number to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.
In some embodiments, after the step data corresponding to the target time period is multiplied by the target running step number to obtain a PDR (pedestrian dead reckoning) distance corresponding to the target time period, the PDR distance may be directly used as the running distance corresponding to the target time period.
In some embodiments, the terminal device may determine the running distance corresponding to the target time period by combining a GPS (Global Positioning System) and the PDR distance obtained by the above calculation. The positioning accuracy of the GPS over the target time period may be obtained and compared to an accuracy threshold. And if the positioning accuracy is greater than or equal to the accuracy threshold, determining the GPS distance according to the GPS coordinates acquired by the GPS in the target time period, and taking the GPS distance as the running distance corresponding to the target time period. If the positioning accuracy is smaller than the accuracy threshold, the PDR distance may be used as the running distance corresponding to the target time period.
When the positioning accuracy of the GPS is high, the GPS distance measured by the GPS is more accurate, and therefore the GPS distance can be determined according to the GPS coordinates acquired within the target time period, and the GPS distance is used as the running distance corresponding to the target time period. Optionally, the GPS distance may be calculated according to the GPS coordinate corresponding to the start time and the GPS coordinate corresponding to the end time of the target time period; and distance accumulation can be carried out on the change of the GPS coordinates according to the GPS coordinates corresponding to each moment in the target time period so as to obtain the GPS distance.
As an embodiment, the positioning accuracy of the GPS may be determined by the number of GPS satellites connected to the terminal device, and if the number of GPS satellites connected to the terminal device is less than a number threshold, it may be determined that the positioning accuracy of the GPS is low, and the PDR distance may be used as a running distance corresponding to the target time period; if the number of the GPS satellites connected to the terminal device is greater than or equal to the number threshold, it is determined that the positioning accuracy of the GPS is high, and the GPS distance in the target time period may be used as the running distance corresponding to the target time period.
As another embodiment, the positioning accuracy of the GPS may be determined by the signal strength of the GPS, and if the GPS signal strength received by the terminal device is smaller than the strength threshold, it may be determined that the positioning accuracy of the GPS is low, and the PDR distance may be used as the running distance corresponding to the target time period; if the strength of the GPS signal received by the terminal device is greater than or equal to the strength threshold, it can be determined that the positioning accuracy of the GPS is high, and the GPS distance of the target time period can be used as the running distance corresponding to the target time period.
In some embodiments, if the positioning accuracy of the GPS in the target time period is greater than or equal to the accuracy threshold, the step data corresponding to the determined target time period may be corrected according to the GPS distance corresponding to the target time period, for example, if the GPS distance is greater than the PDR distance, the step data may be increased, and if the GPS distance is less than the PDR distance, the step data may be decreased, so that the step calculation model may be adjusted according to the corrected step data, and the accuracy of the step calculation may be improved by continuously adjusting the step data and the step calculation model.
In some embodiments, after determining the running distance corresponding to the current target time period, the terminal device may continue to monitor the running steps and running distances of the next target time period, and may also accumulate the determined running distances corresponding to each target time period to obtain the total distance corresponding to the user in the current running process. Optionally, the total distance can be output in real time, so that the user can conveniently know the running condition of the running process.
In the embodiment of the application, the running step number and the running distance of the user in each target time period in the running process can be accurately monitored, the accuracy of running data monitoring is improved, the requirement of the user on running data monitoring is met, and the user experience is improved.
As shown in fig. 5, in an embodiment, a running data monitoring apparatus 500 is provided, which can be applied to the terminal device, and the running data monitoring apparatus 500 can include a gyroscope data acquisition module 510, a target axis determination module 520, and a step number determination module 530.
A gyroscope data obtaining module 510, configured to obtain gyroscope data corresponding to each axis collected by the multi-axis gyroscope in a target time period if it is determined that the user is in a running state according to the acceleration data collected by the multi-axis accelerometer.
And a target axis determining module 520, configured to transform the gyroscope data corresponding to each axis to obtain spectrum data corresponding to each axis, and determine a target axis from each axis according to the spectrum data corresponding to each axis.
The step number determining module 530 is configured to perform peak and trough detection on the gyroscope data corresponding to the target axis, and determine a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.
In one embodiment, the running data monitoring device 500 further comprises a running status determining module.
The running state determining module is used for acquiring first acceleration data acquired by the multi-axis accelerometer; and calculating a first root mean square value corresponding to the first acceleration data, and if the first root mean square value is greater than a preset threshold value, determining that the user is in a running state.
In the embodiment of the application, running step number monitoring is carried out through gyroscope data acquired by the multi-axis gyroscope, so that the influence of gravity acceleration on a monitoring result can be avoided, the gyroscope data corresponding to the target axis with the best robustness in the multi-axis gyroscope is selected to determine the target running step number, the influence of other information on the gyroscope data can be reduced, the running step number monitoring accuracy is improved, and the running data monitoring accuracy is improved.
In an embodiment, the target axis determining module 520 is further configured to determine, according to the spectrum data corresponding to each axis, the spectrum data with the largest amplitude value; and taking the axis corresponding to the spectrum data with the maximum amplitude value as a target axis.
In one embodiment, the step number determining module 530 includes a first determining unit, a second determining unit, and a fusing unit.
And the first determining unit is used for determining the total number of the detected wave crests and wave troughs as a first running step number corresponding to the target time period.
And the second determining unit is used for determining a second running step number corresponding to the target time period according to second acceleration data acquired by the multi-axis accelerometer in the target time period.
In an embodiment, the second determining unit is further configured to perform peak and valley detection on the second acceleration data corresponding to each axis in the multi-axis accelerometer, and determine the total number of peaks and valleys detected in the second acceleration data corresponding to each axis of the multi-axis accelerometer as the number of running steps corresponding to each axis of the multi-axis accelerometer; calculating a second root mean square value of the second acceleration data corresponding to each axis according to the acceleration absolute values of the wave crest and the wave trough contained in the second acceleration data corresponding to each axis, and determining the axis with the maximum second root mean square value; and determining the running step number corresponding to the axis with the maximum second root mean square value as a second running step number corresponding to the target time period.
And the fusion unit is used for fusing the first running step number and the second running step number to obtain a target running step number corresponding to the target time period.
In one embodiment, the running data monitoring device 500 further comprises a PDR distance calculation module.
The PDR distance calculation module is used for determining step length data corresponding to a target time period according to the target running step number and the user physiological data; and multiplying the step data by the target running step number to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.
In one embodiment, the running data monitoring device 500 further comprises a running distance determination module.
The running distance determining module is used for acquiring the positioning accuracy of a Global Positioning System (GPS) in a target time period; if the positioning accuracy is greater than or equal to the accuracy threshold, determining the GPS distance according to the GPS coordinates acquired by the GPS in the target time period, and taking the GPS distance as the running distance corresponding to the target time period; and if the positioning accuracy is smaller than the accuracy threshold, taking the PDR distance as the running distance corresponding to the target time period.
In the embodiment of the application, the running step number and the running distance of the user in each target time period in the running process can be accurately monitored, the accuracy of running data monitoring is improved, the requirement of the user on running data monitoring is met, and the user experience is improved.
Fig. 6 is a block diagram of a terminal device in one embodiment. As shown in fig. 6, terminal device 600 may include one or more of the following components: a processor 610, a memory 620 coupled to the processor 610, wherein the memory 620 may store one or more computer programs that may be configured to implement the methods described in the embodiments above when executed by the one or more processors 610.
The processor 610 may include one or more processing cores. The processor 610 connects various parts within the entire terminal apparatus 600 using various interfaces and lines, and performs various functions of the terminal apparatus 600 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 620 and calling data stored in the memory 620. Alternatively, the processor 610 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 610 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 610, but may be implemented by a communication chip.
The Memory 620 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). The memory 620 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like. The storage data area may also store data created by the terminal device 600 in use, and the like.
It is understood that the terminal device 600 may include more or less structural elements than those shown in the above structural block diagrams, for example, a power module, a physical button, a WiFi (Wireless Fidelity) module, a speaker, a bluetooth module, a sensor, etc., and is not limited herein.
The embodiment of the application discloses a computer readable storage medium, which stores a computer program, wherein the computer program realizes the method described in the above embodiment when being executed by a processor.
Embodiments of the present application disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program, when executed by a processor, implements the method as described in the embodiments above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a ROM, etc.
Any reference to memory, storage, database, or other medium as used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM can take many forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), Rambus Direct RAM (RDRAM), and Direct Rambus DRAM (DRDRAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application.
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Each functional unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present application, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, may be embodied in the form of a software product, stored in a memory, including several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of the embodiments of the present application.
The running data monitoring method, the running data monitoring device, the terminal device and the storage medium disclosed in the embodiments of the present application are described in detail above, and specific examples are applied in the present application to explain the principles and embodiments of the present application. Meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A running data monitoring method is applied to a terminal device, the terminal device comprises a multi-axis accelerometer and a multi-axis gyroscope, and the method comprises the following steps:
if the user is determined to be in a running state according to the first acceleration data acquired by the multi-axis accelerometer, acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period;
converting the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining a target axis from each axis according to the frequency spectrum data corresponding to each axis;
and performing peak and trough detection on gyroscope data corresponding to the target axis, and determining a target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.
2. The method of claim 1, wherein the determining a target axis from the respective axes according to the spectrum data corresponding to the respective axes comprises:
determining the spectrum data with the maximum amplitude value according to the spectrum data corresponding to each axis;
and taking the axis corresponding to the spectrum data with the maximum amplitude value as a target axis.
3. The method of claim 1, wherein prior to the obtaining gyroscope data for each axis acquired by the multi-axis gyroscope within a target time period if the user is determined to be in a running state from the first acceleration data acquired by the multi-axis accelerometer, the method further comprises:
acquiring first acceleration data acquired by the multi-axis accelerometer;
and calculating a first root mean square value corresponding to the first acceleration data, and if the first root mean square value is greater than a preset threshold value, determining that the user is in a running state.
4. The method of claim 1, further comprising:
determining step length data corresponding to the target time period according to the target running step number and the user physiological data;
and multiplying the step data by the target running step number to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.
5. The method of claim 4, wherein after said obtaining the pedestrian dead reckoning PDR distance corresponding to the target time period, the method further comprises:
acquiring the positioning precision of a Global Positioning System (GPS) in the target time period;
if the positioning accuracy is greater than or equal to an accuracy threshold, determining a GPS distance according to a GPS coordinate acquired by the GPS in the target time period, and taking the GPS distance as a running distance corresponding to the target time period;
and if the positioning accuracy is smaller than the accuracy threshold, taking the PDR distance as a running distance corresponding to the target time period.
6. The method according to any one of claims 1 to 5, wherein the determining the target running step number corresponding to the target time period according to the total number of the detected peaks and troughs comprises:
determining the total number of the detected wave crests and wave troughs as a first running step number corresponding to the target time period;
determining a second running step number corresponding to the target time period according to second acceleration data acquired by the multi-axis accelerometer in the target time period;
and fusing the first running step number and the second running step number to obtain a target running step number corresponding to the target time period.
7. The method of claim 6, wherein the second acceleration data comprises second acceleration data corresponding to each axis of the multi-axis accelerometer over the target time period; determining a second running step number corresponding to the target time period according to second acceleration data acquired by the multi-axis accelerometer in the target time period, including:
respectively detecting wave crests and wave troughs of second acceleration data corresponding to each axis in the multi-axis accelerometer, and determining the total number of the detected wave crests and wave troughs in the second acceleration data corresponding to each axis of the multi-axis accelerometer as the running step number corresponding to each axis of the multi-axis accelerometer;
calculating a second root mean square value of the second acceleration data corresponding to each axis according to the acceleration absolute values of the wave crest and the wave trough contained in the second acceleration data corresponding to each axis, and determining the axis with the maximum second root mean square value;
and determining the running step number corresponding to the axis with the maximum second root mean square value as a second running step number corresponding to the target time period.
8. A running data monitoring device is applied to a terminal device, the terminal device comprises a multi-axis accelerometer and a multi-axis gyroscope, and the device comprises:
the gyroscope data acquisition module is used for acquiring gyroscope data corresponding to each axis acquired by the multi-axis gyroscope in a target time period if the user is determined to be in a running state according to the acceleration data acquired by the multi-axis accelerometer;
a target axis determining module, configured to transform the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determine a target axis from each axis according to the frequency spectrum data corresponding to each axis;
and the step number determining module is used for detecting wave crests and wave troughs of the gyroscope data corresponding to the target shaft and determining the target running step number corresponding to the target time period according to the total number of the detected wave crests and wave troughs.
9. A terminal device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor in a computer device, causes the processor to carry out the method according to any one of claims 1 to 7.
CN202210405495.0A 2022-04-18 2022-04-18 Running data monitoring method and device, terminal equipment and storage medium Pending CN115127581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210405495.0A CN115127581A (en) 2022-04-18 2022-04-18 Running data monitoring method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210405495.0A CN115127581A (en) 2022-04-18 2022-04-18 Running data monitoring method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115127581A true CN115127581A (en) 2022-09-30

Family

ID=83376681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210405495.0A Pending CN115127581A (en) 2022-04-18 2022-04-18 Running data monitoring method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115127581A (en)

Similar Documents

Publication Publication Date Title
JP6201469B2 (en) Biological information processing apparatus and biological information processing method
CN109959379B (en) Positioning method and electronic equipment
CN104780217A (en) Method, system and client terminal for detecting working efficiency of user
CN109893111B (en) Dynamic blood pressure measurement mode selection method and device
Lan et al. Early diagnosis of Parkinson's disease using a smartphone
EP3289435B1 (en) User interface control using impact gestures
CN107270931A (en) A kind of IOS and the general gait auto-correlation pedometer of Android platform
CN110151136A (en) It has ready conditions with reference to heart rate sleep state monitoring method, device, equipment and medium
CN109029492B (en) Step counting method and device and wrist step counting equipment
Hongman et al. Acceleration and orientation multisensor pedometer application design and implementation on the android platform
JP6848571B2 (en) Posture calculation device, posture measurement system, and posture calculation method
CN115127581A (en) Running data monitoring method and device, terminal equipment and storage medium
CN111803902B (en) Swimming stroke identification method and device, wearable device and storage medium
EP3330674A1 (en) Method and apparatus for realizing step counting
WO2014191803A1 (en) Acceleration-based step activity detection and classification on mobile devices
CN114739412B (en) Pedestrian gait real-time detection method and device based on smart phone
CN112237426A (en) Method and device for detecting steps, detection equipment and computer storage medium
CN107632966B (en) Motion trajectory determination method and electronic equipment
CN110960222B (en) Motion type detection method and device
CN113340322B (en) Step counting method and device, electronic equipment and readable storage medium
CN116943130A (en) Counting method, counting device, counting equipment and storage medium
CN103505195B (en) Method and device for measuring human body pulse and mobile terminal
CN113790734A (en) Step counting method and system based on swing arm shaft and terminal equipment
CN107747950B (en) Step recording method and device
CN107631736B (en) Stride estimation 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