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

By combining a multi-axis accelerometer and a gyroscope, the most robust axis is selected for running step monitoring, which solves the problem of insufficient running data monitoring accuracy in the existing technology, achieving higher accuracy and reducing Misjudgment.

CN115127581BActive Publication Date: 2024-08-23GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210405495.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2024-08-23
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

Existing terminal devices have problems with insufficient accuracy when monitoring running data, especially due to the impact of gravity acceleration on monitoring results and other information interference.

Method used

Using a method that combines multi-axis accelerometers and multi-axis gyroscopes, after determining the running status through acceleration data, the gyroscope data is obtained for spectrum transformation, the most robust axis is selected for peak and trough detection, and the number of steps is calculated to reduce The impact of gravity and other information on monitoring results.

Benefits of technology

It improves the accuracy of running step monitoring, enhances the overall accuracy of running data monitoring, and reduces misjudgments and interference effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115127581B
    Figure CN115127581B
Patent Text Reader

Abstract

The embodiment of the present application discloses a running data monitoring method, apparatus, terminal device and storage medium. The method is applied to a terminal device, the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope, the method includes: if it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, then the gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period is obtained; the gyroscope data corresponding to each axis is transformed to obtain the spectrum data corresponding to each axis, and the target axis is determined from the axes according to the spectrum data corresponding to each axis; the gyroscope data corresponding to the target axis is detected for peaks and troughs, and the target number of running steps corresponding to the target time period is determined according to the total number of detected peaks and troughs. The above-mentioned running data monitoring method, apparatus, terminal device and storage medium can improve the accuracy of running data monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of terminal devices, and in particular to a running data monitoring method, device, terminal device and storage medium. Background Art

[0002] Sports and physical health have become one of the focuses of people's increasing attention in life. Currently, more and more terminal devices (such as mobile phones, smart bracelets, smart watches, etc.) are available on the market to monitor users' sports conditions, and monitoring of running data is one of the key projects. When current terminal devices monitor users' running data, there is a problem of insufficient monitoring accuracy. Summary of the invention

[0003] The embodiments of the present application disclose a running data monitoring method, apparatus, terminal device and storage medium, which can improve the accuracy of running data monitoring.

[0004] The embodiment of the present application discloses a running data monitoring method, which is applied to a terminal device, wherein the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope, and the method includes:

[0005] If it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, then obtaining gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period;

[0006] 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;

[0007] The gyroscope data corresponding to the target axis is subjected to peak and trough detection, and the target number of running steps corresponding to the target time period is determined according to the total number of the detected peaks and troughs.

[0008] The embodiment of the present application discloses a running data monitoring device, which is applied to a terminal device, wherein the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope, and the device includes:

[0009] A gyroscope data acquisition module, configured to acquire gyroscope data corresponding to each axis acquired by the multi-axis gyroscope within a target time period if it is determined that the user is in a running state according to the acceleration data acquired by the multi-axis accelerometer;

[0010] A target axis determination module, used for transforming the gyroscope data corresponding to each axis to obtain the spectrum data corresponding to each axis, and determining the target axis from each axis according to the spectrum data corresponding to each axis;

[0011] The step number determination module is used to detect the peaks and troughs of the gyroscope data corresponding to the target axis, and determine the target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.

[0012] An embodiment of the present application discloses a terminal device, including 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 implements any of the above methods.

[0013] An embodiment of the present application discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor in a computer device, the processor implements any of the above methods.

[0014] The running data monitoring method, apparatus, terminal device and storage medium disclosed in the embodiments of the present application, the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope. If it is determined that the user is in a running state based on the first acceleration data collected by the multi-axis accelerometer, the gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period is obtained, the gyroscope data corresponding to each axis is transformed to obtain the spectrum data corresponding to each axis, and the target axis is determined from each axis based on the spectrum data corresponding to each axis, and then the gyroscope data corresponding to the target axis is detected for peaks and troughs, and the target number of running steps corresponding to the target time period is determined based on the total number of detected peaks and troughs. Running step monitoring using the gyroscope data collected by the multi-axis gyroscope can avoid the influence of gravity acceleration on the monitoring results, and the gyroscope data corresponding to the target axis with the best robustness in the multi-axis gyroscope is selected to determine the target number of running steps, which can reduce the influence of other information on the gyroscope data, improve the accuracy of running step monitoring, and thus improve the accuracy of running data monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 This is an application scenario diagram of a running data monitoring method in an embodiment;

[0017] Figure 2 is a flow chart of a running data monitoring method in one embodiment;

[0018] Figure 3 is a flow chart of a running data monitoring method in another embodiment;

[0019] Figure 4 A flowchart of determining a target number of running steps corresponding to a target time period in one embodiment;

[0020] Figure 5 is a block diagram of a running data monitoring device in one embodiment;

[0021] Figure 6 FIG. 4 is a structural block diagram of an electronic device in an embodiment. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0023] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0024] It is to be understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, the first acceleration data may be referred to as the second acceleration data, and similarly, the second acceleration data may be referred to as the first acceleration data. Both the first acceleration data and the second acceleration data are acceleration data collected by a multi-axis accelerometer, but they do not refer to the same acceleration data. In addition, it should be noted that the terms "multiple" and the like used in the embodiments of the present application refer to two or more.

[0025] Figure 1 FIG. 1 is an application scenario diagram of a running data monitoring method in an embodiment. Figure 1 As shown, the user 10 may carry a terminal device 20, which 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, etc. The terminal device 20 may include a multi-axis accelerometer and a multi-axis gyroscope, and the running data of the user 10 is monitored by the multi-axis accelerometer and the multi-axis gyroscope.

[0026] The terminal device 20 can collect acceleration data in real time through a multi-axis accelerometer. If it is determined that the user 10 is in a running state based on the first acceleration data collected by the multi-axis accelerometer, the gyroscope data corresponding to each axis collected during the target time period of the multi-axis gyroscope can be obtained. The terminal device 20 can transform the gyroscope data corresponding to each axis of the multi-axis gyroscope to obtain the spectrum data corresponding to each axis, and determine the target axis from each axis of the multi-axis gyroscope based on the spectrum data corresponding to each axis. The terminal device 20 can perform peak and trough detection on the gyroscope data corresponding to the target axis, and determine the target number of running steps of the user 20 corresponding to the target time period based on the total number of peaks and troughs detected.

[0027] like Figure 2 As shown, in one embodiment, a running data monitoring method is provided, which can be applied to the above-mentioned terminal device. The method may include the following steps:

[0028] Step 210: If it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, gyroscope data corresponding to each axis collected by the multi-axis gyroscope within the target time period is obtained.

[0029] The terminal device may be provided with sensors such as a multi-axis accelerometer and a multi-axis gyroscope for real-time collection of sensor data. The multi-axis accelerometer may include but is not limited to a three-axis accelerometer, a six-axis accelerometer, etc., which can be used to collect the spatial acceleration of the terminal device. Taking the three-axis accelerometer as an example, the spatial acceleration of the terminal device can be decomposed in the three directions of the X-axis, the Y-axis and the Z-axis. Optionally, the X-axis and the Y-axis may be parallel to the horizontal plane, the Z-axis may be perpendicular to the horizontal plane, and the X-axis and the Y-axis may be perpendicular to each other; it should be noted that the setting method of the three-axis accelerometer in the X-axis, the Y-axis and the Z-axis can be adjusted according to actual needs, and is not specifically limited here.

[0030] The multi-axis gyroscope may include but is not limited to a three-axis gyroscope, a six-axis gyroscope, etc., which can be used to collect the angular velocity of the terminal device. Taking the three-axis gyroscope as an example, the angular velocity of the terminal device moving in the three directions of the X-axis, the Y-axis and the Z-axis can be collected. Optionally, the X-axis and the Y-axis can be parallel to the horizontal plane, the Z-axis can be perpendicular to the horizontal plane, and the X-axis and the Y-axis can be perpendicular to each other; it should be noted that the setting method of the three-axis gyroscope in the X-axis, the Y-axis and the Z-axis can be adjusted according to actual needs, and is not specifically limited here.

[0031] The multi-axis accelerometer in the terminal device can collect the acceleration data of the terminal device in real time, and the multi-axis gyroscope can collect the multi-axis gyroscope of the terminal device in real time. The acceleration data collected by the multi-axis accelerometer in real time can be obtained, and the user can be judged whether the user is in a running state based on the acceleration data. If the user is determined to be in a running state based on the first acceleration data collected by the multi-axis accelerometer, the running data of the user during the running process can be monitored. Optionally, the first acceleration data can be the acceleration data collected by the multi-axis acceleration data in a first time period before determining that the user is in a running state. The first time period can be set according to actual needs, such as 30 seconds, 1 minute, 40 seconds, etc., but is not limited to this. The first time period can also be a time period that can accurately judge whether the user is in a running state after being deduced from multiple experimental data.

[0032] In some embodiments, the terminal device may obtain the first acceleration data collected by the multi-axis accelerometer, and calculate the first root mean square value corresponding to the first acceleration data. If the first root mean square value is greater than a preset threshold, it can be determined that the user is in a running state. The first acceleration data may include acceleration values ​​corresponding to each collection moment in the first time period. The acceleration value may be calculated based on the acceleration data collected by each axis of the multi-axis accelerometer at the same collection moment. The acceleration value may include a numerical value and a direction. As an implementation method, the first root mean square value may be calculated based on the absolute value of the acceleration value corresponding to each collection moment in the first time period (which can be understood as removing the influence of the direction), and it is determined whether the first root mean square value is greater than the preset threshold. If the first root mean square value is greater than the preset threshold, it means that the terminal device is currently in an accelerated state, and it can be determined that the user is in a running state.

[0033] As another implementation, the first acceleration data may include the acceleration values ​​corresponding to each axis of the multi-axis accelerometer at each acquisition time in the first time period. The first root mean square value corresponding to each axis of the multi-axis accelerometer can be calculated based on the acceleration values ​​corresponding to each acquisition time in the first time period, and it is determined whether the first root mean square value corresponding to each axis of the multi-axis accelerometer is greater than a preset threshold. If the first root mean square value corresponding to any axis is greater than the preset threshold, it can be determined that the user is in a running state. The acceleration data collected by the multi-axis acceleration can accurately identify that the user is in a running state, and timely monitor the user's running data to improve the monitoring accuracy.

[0034] The above-mentioned preset threshold can be set according to actual needs, or it can be set by collecting the user's historical running speed and setting it according to the historical running speed, so that the set preset threshold matches the user's actual running situation, has personalized settings, fits the user's actual situation, and reduces misjudgment.

[0035] In some embodiments, a threshold range corresponding to the running state can also be set. If the first root mean square value is within the threshold range, it can be determined that the user is in the running state. This can avoid misjudgment caused by the user in certain high-speed moving states (such as riding in a car), thereby improving the detection accuracy of the running state.

[0036] After the terminal device determines that the user is in a running state, it can monitor the user's running data, and the running data may include the number of running steps. In some embodiments, the terminal device can determine the number of running steps of the user based on the gyroscope data collected by the multi-axis gyroscope. The gyroscope data corresponding to each axis collected by the multi-axis gyroscope within the target time period can be obtained. The target time period can be any monitoring time period after the user enters the running state. The monitoring duration of the target time period can be set according to actual needs, such as 3 minutes, 1 minute, 4 minutes, etc., but not limited thereto. The terminal device can determine the target number of running steps of the user in each target time period once every target time period.

[0037] Step 220 , transforming the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining the target axis from each axis according to the frequency spectrum data corresponding to each axis.

[0038] The terminal device can transform the gyroscope data corresponding to each axis of the multi-axis gyroscope within the target time period respectively to obtain the spectrum data corresponding to each axis. As a specific implementation method, the gyroscope data corresponding to each axis can be subjected to transformation processing such as FFT (fast Fourier transform) to obtain the spectrum data corresponding to each axis, and a spectrum diagram can be constructed based on the spectrum data corresponding to each axis. The spectrum diagram can be used to reflect the relationship between signal frequency and energy.

[0039] In some embodiments, the terminal device may analyze the spectrum data corresponding to each axis of the multi-axis gyroscope according to the spectrum diagram to determine the robustness of the gyroscope data collected by each axis of the multi-axis gyroscope in the target time period, and select the axis with the strongest robustness as the target axis, and determine the target number of running steps corresponding to the target time period according to the gyroscope data corresponding to the target axis in the target time period. Since the gyroscope data collected by each axis of the multi-axis gyroscope may be interfered by other information when the user is running, the target axis with the strongest robustness may be selected, which can improve the accuracy of running step monitoring and reduce interference.

[0040] Step 230 , performing peak and trough detection on the gyroscope data corresponding to the target axis, and determining the target number of running steps corresponding to the target time period according to the total number of the detected peaks and troughs.

[0041] In an embodiment of the present application, the terminal device may be a terminal device that can be worn in the user's hand area or can be held by the user, such as a smart watch, a smart bracelet, a mobile phone, etc. During the running process, the user's hands will swing back and forth, and the reciprocating swing of the hands can be understood as a periodic motion. The motion of the hand is mapped to the three-dimensional space coordinate system and can be converted into a periodic motion that rotates around three coordinate axes respectively. In each cycle, the hand swing speed usually does not change much, and the hand posture will change periodically, so the angular velocity on the three coordinate axes will show a sinusoidal motion trend. And each periodic change of the hand posture is coordinated with the user's foot movement, that is, a combination of changes in the left foot and the right foot, so each periodic change of the hand can correspond to 2 steps.

[0042] The terminal device can collect data generated by the periodic movement of the user's hand. In the gyroscope data collected by each axis of the multi-axis gyroscope, a maximum value and a minimum value will appear in each periodic change of the hand posture, that is, a peak and a trough. Therefore, the number of peaks and troughs appearing in each cycle (2) can be determined as the number of steps corresponding to the cycle (2 steps).

[0043] The gyroscope data corresponding to the target axis can be detected for peaks and troughs. As a specific implementation, the gyroscope values ​​at each moment in the gyroscope data can be compared with the gyroscope values ​​at the previous moment and the next moment, respectively. If the gyroscope value at a certain moment is greater than the gyroscope values ​​at the previous moment and the next moment, the gyroscope value at that moment can be determined as a peak; if the gyroscope value at a certain moment is less than the gyroscope values ​​at the previous moment and the next moment, the gyroscope value at that moment can be determined as a trough.

[0044] As another implementation, the slope corresponding to each moment in the gyroscope data corresponding to the target axis can be calculated, and the gyroscope value corresponding to the moment when the slope is 0 is determined as a peak or a trough. It should be noted that other methods can also be used to detect peaks and troughs of the gyroscope data corresponding to the target axis, and the embodiments of the present application are not limited to this.

[0045] The target number of running steps corresponding to the target time period can be determined according to the total number of peaks and troughs detected in the gyroscope data corresponding to the target axis. As an implementation method, the total number of peaks and troughs detected in the gyroscope data corresponding to the target axis can be directly used as the target number of running steps corresponding to the target time period. For example, according to the gyroscope data collected by the target axis within 3 seconds, 6 peaks and 6 troughs are detected, and the target number of running steps within 3 seconds can be determined to be 12 steps.

[0046] In some embodiments, after the terminal device determines the target running step count corresponding to the current target time period, it can continue to monitor the running step count for the next target time period, and can also accumulate the target running step counts corresponding to each determined target time period to obtain the total number of steps corresponding to the user during the current running process. Optionally, the total number of steps can be output in real time to facilitate the user to understand the running situation during the current running process.

[0047] In an embodiment of the present application, the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope. If it is determined that the user is in a running state based on the first acceleration data collected by the multi-axis accelerometer, the gyroscope data corresponding to each axis collected by the multi-axis gyroscope within the target time period is obtained, the gyroscope data corresponding to each axis is transformed to obtain the spectrum data corresponding to each axis, and the target axis is determined from each axis based on the spectrum data corresponding to each axis. Then, the gyroscope data corresponding to the target axis is detected for peaks and troughs, and the target number of running steps corresponding to the target time period is determined based on the total number of detected peaks and troughs. Monitoring the number of running steps using the gyroscope data collected by the multi-axis gyroscope can avoid the influence of gravity acceleration on the monitoring results, and the gyroscope data corresponding to the target axis with the best robustness in the multi-axis gyroscope is selected to determine the target number of running steps, which can reduce the influence of other information on the gyroscope data, improve the accuracy of running step monitoring, and thus improve the accuracy of running data monitoring.

[0048] like Figure 3 As shown, in another embodiment, a running data monitoring method is provided, which can be applied to the above-mentioned terminal device, and the method may include the following steps:

[0049] Step 302: If it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period is obtained.

[0050] Step 304 , transforming the gyroscope data corresponding to each axis to obtain frequency spectrum data corresponding to each axis, and determining the target axis from each axis according to the frequency spectrum data corresponding to each axis.

[0051] The description of steps 302 to 304 may refer to the relevant description in the above embodiments, and will not be repeated here.

[0052] In some embodiments, before the terminal device transforms the gyroscope data corresponding to each axis in the multi-axis gyroscope, the gyroscope data corresponding to each axis collected by the multi-axis gyroscope within the target time period may be filtered, 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 Gaussian smoothing filtering, median filtering, SG (Savitzky-Golay) filtering, etc.

[0053] As a specific implementation method, for the gyroscope data corresponding to each axis in the multi-axis gyroscope, the gyroscope data can be first subjected to Gaussian smoothing filtering, and then the gyroscope data subjected to Gaussian smoothing can be subjected to median filtering, and then the gyroscope data subjected to median filtering can be subjected to SG filtering, thereby obtaining the filtered gyroscope data.

[0054] It should be noted that other filtering processing methods can also be used to filter the gyroscope data corresponding to each axis collected by the multi-axis gyroscope in the target time period, and are not limited to the above-mentioned methods. By filtering the gyroscope data corresponding to each axis and then transforming the filtered gyroscope data, the accuracy of the selected target axis can be improved. Furthermore, the peak and trough detection of the filtered gyroscope data corresponding to the target axis can be performed to determine the target running steps corresponding to the target time period, thereby reducing the impact of noise and improving the accuracy of running step monitoring.

[0055] In some embodiments, the step of determining the target axis from each axis according to the spectral data corresponding to each axis may include: determining the spectral data with the largest amplitude value according to the spectral data corresponding to each axis; and taking the axis corresponding to the spectral data with the largest amplitude value as the target axis.

[0056] As an implementation method, for the spectral data corresponding to each axis in a multi-axis gyroscope, the amplitude maximum value in the spectral data corresponding to each axis can be determined respectively (that is, each axis corresponds to an amplitude maximum value), and the amplitude maximum values ​​in the spectral data corresponding to each axis can be compared to determine the largest amplitude maximum value, and the spectral data corresponding to the largest amplitude maximum value is determined as the spectral data with the largest amplitude value.

[0057] As another implementation, for the spectral data corresponding to each axis in the multi-axis gyroscope, the average amplitude of the spectral data corresponding to each axis can be determined respectively, and the average amplitudes of the spectral data corresponding to each axis can be compared to determine the largest average amplitude, and the spectral data corresponding to the largest average amplitude can be determined as the spectral data with the largest amplitude value.

[0058] The axis corresponding to the spectrum data with the largest amplitude value can be considered as the axis with the strongest robustness in the multi-axis gyroscope within the target time period. Therefore, the axis corresponding to the spectrum data with the largest amplitude value can be used as the target axis to improve the accuracy of subsequent monitoring of running steps.

[0059] Step 306 , performing peak and trough detection on the gyroscope data corresponding to the target axis, and determining the target number of running steps corresponding to the target time period according to the total number of the detected peaks and troughs.

[0060] In some embodiments, in order to improve the accuracy of running step monitoring, the gyroscope data collected by the multi-axis gyroscope and the acceleration data collected by the multi-axis accelerometer can be combined to monitor the running step count. Figure 4 As shown, step 306 determines the target number of running steps corresponding to the target time period according to the total number of detected peaks and troughs, which may include steps 402 to 406:

[0061] Step 402: Determine the total number of peaks and troughs detected in the gyroscope data corresponding to the target axis as the first number of running steps corresponding to the target time period.

[0062] The gyroscope data corresponding to the target axis within the target time period can be subjected to peak and trough detection, and the total number of detected peaks and troughs can be determined as the first number of running steps corresponding to the target time period, which is the number of running steps monitored only by the multi-axis gyroscope.

[0063] Step 404: Determine a second number of running steps corresponding to the target time period according to the second acceleration data collected by the multi-axis accelerometer during the target time period.

[0064] The terminal device can obtain the second acceleration data collected by the multi-axis accelerometer during the target time period, and determine the second number of running steps corresponding to the target time period based on the second acceleration data. The second number of running steps is the number of running steps monitored only by the multi-axis accelerometer.

[0065] In some embodiments, before determining the second number of running steps corresponding to the target time period according to the second acceleration data collected by the multi-axis accelerometer during the target time period, the terminal device may also filter the second acceleration data collected by the multi-axis accelerometer during the target time period, and then determine the second number of running steps corresponding to the target time period according to the filtered second acceleration data. The filtering process may include, but is not limited to, one or more of high-pass filtering, low-pass filtering, and Gaussian smoothing filtering.

[0066] As a specific implementation, the second acceleration data may be first subjected to high-pass filtering, then subjected to low-pass filtering, and then subjected to Gaussian smoothing filtering to obtain filtered second acceleration data.

[0067] It should be noted that other filtering methods may be used to filter the second acceleration data, and are not limited to the above methods. By filtering the second acceleration data and then determining the second running step number corresponding to the target time period based on the filtered second acceleration data, noise interference can be eliminated and the accuracy of the determined second running step data can be improved.

[0068] In some embodiments, the second acceleration data may include the second acceleration data corresponding to each axis in the multi-axis accelerometer in the target time period. The terminal device may perform peak and trough detection on the second acceleration data corresponding to each axis in the multi-axis accelerometer, and determine the total number of peaks and troughs 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. The detection method of performing peak and trough detection on the second acceleration data corresponding to each axis in the multi-axis accelerometer may be similar to the detection method of performing peak and trough detection on the gyroscope data corresponding to the target axis in the target time period. The description of peak and trough detection in the above embodiments may be referred to, and will not be repeated here.

[0069] After obtaining the number of running steps corresponding to each axis of the multi-axis accelerometer, the second root mean square value of the second acceleration data corresponding to each axis can be calculated according to the absolute values ​​of the peaks and troughs of the acceleration contained in the second acceleration data corresponding to each axis, and the axis with the largest second root mean square value can be determined. The number of running steps corresponding to the axis with the largest second root mean square value can be determined as the second number of running steps corresponding to the target time period.

[0070] Specifically, for the second acceleration data corresponding to each axis of the multi-axis accelerometer, after detecting each peak and trough contained in the second acceleration data, the acceleration values ​​corresponding to each peak and trough can be obtained, and the absolute values ​​of the acceleration values ​​corresponding to each peak and trough can be calculated by root mean square calculation to obtain the second root mean square value corresponding to the second acceleration data.

[0071] The second RMS values ​​corresponding to the second acceleration data of each axis of the multi-axis accelerometer can be compared, and the axis corresponding to the second acceleration data with the largest second RMS value can be determined, and the number of running steps corresponding to the determined axis can be determined as the second number of running steps corresponding to the target time period. In the embodiment of the present application, the acceleration axis that best matches the running motion posture can be found, thereby improving the accuracy of the monitored second number of running steps, and further improving the accuracy of the target number of running steps obtained subsequently.

[0072] It should be noted that the absolute values ​​of the acceleration of the peaks and troughs contained in the second acceleration data corresponding to each axis can also be averaged to obtain the average value corresponding to the second acceleration data of each axis, and the number of running steps corresponding to the axis with the largest average value can be determined as the second number of running steps corresponding to the target time period.

[0073] Step 406: merge the first running step count and the second running step count to obtain a target running step count corresponding to the target time period.

[0074] In some embodiments, different weights may be configured for the first running step number and the second running step number, 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, so as to obtain the target running step number corresponding to the target time period. For example, the weight corresponding to the first running step number may be 0.6, and the weight corresponding to the second running step number may be 0.4; or the weights corresponding to the first running step number and the second running step number are both 0.5 (i.e., taking the average of the two), etc., but not limited thereto.

[0075] Optionally, since the acceleration data collected by the multi-axis accelerometer will be affected by the gravity factor, the first number of running steps determined by the multi-axis gyroscope is more accurate than the second number of running steps determined by the multi-axis accelerometer. The weight corresponding to the first number of running steps can be configured to be greater than the weight corresponding to the second number of running steps to improve the accuracy of the target number of running steps corresponding to the determined target time period.

[0076] In an embodiment of the present application, by combining the data collected by the multi-axis gyroscope and the multi-axis accelerometer to jointly determine the target number of running steps corresponding to the user in the target time period, the accuracy of running step monitoring can be improved.

[0077] Step 308: Determine the step length data corresponding to the target time period according to the target number of running steps and the user's physiological data.

[0078] In some embodiments, the running data monitored by the terminal device may also include the running distance. The target running steps and the user's physiological data may be brought into a preset step length calculation model to obtain the step length data corresponding to the target time period. The user's physiological data may include the user's height, the user's weight, etc. The step length data corresponding to the target time period may be the user's average step length during the target time period. For the same user, the average step lengths in different target time periods may be the same or different. For example, during the user's running process, the physical strength may decrease as the running time increases, resulting in a decrease in the step length, etc. Therefore, for each target time period, the step length data corresponding to the target time period can be determined based on the target running steps corresponding to the target time period and the user's physiological data, thereby improving the monitoring accuracy of the running distance.

[0079] It should be noted that the above-mentioned step length calculation model can be a mathematical calculation model summarized based on a large amount of experimental data, or it can be an artificial intelligence model trained based on a large amount of running sample data. The artificial intelligence model can be trained by collecting a large amount of running step count and step length data corresponding to the physiological data of different users as running sample data to obtain a model with the function of outputting accurate step length.

[0080] Step 310: multiply the step length data by the target running step number to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.

[0081] In some embodiments, after multiplying the stride length data corresponding to the target time period by the target running step number to obtain the PDR (pedestrian dead reckoning) distance corresponding to the target time period, the PDR distance can be directly used as the running distance corresponding to the target time period.

[0082] In some embodiments, the terminal device can combine GPS (Global Positioning System) and the PDR distance calculated above to determine the running distance corresponding to the target time period. The positioning accuracy of the GPS in the target time period can be obtained, and the positioning accuracy is compared with the accuracy threshold. If the positioning accuracy is greater than or equal to the accuracy threshold, the GPS distance is determined based on the GPS coordinates collected by the GPS in the target time period, and the GPS distance is used as the running distance corresponding to the target time period. If the positioning accuracy is less than the accuracy threshold, the PDR distance can be used as the running distance corresponding to the target time period.

[0083] When the positioning accuracy of GPS is high, the GPS distance measured by GPS is more accurate. Therefore, the GPS distance can be determined according to the GPS coordinates collected during the target time period, and the GPS distance can be used as the running distance corresponding to the target time period. Optionally, the GPS distance can be calculated according to the GPS coordinates corresponding to the start time of the target time period and the GPS coordinates corresponding to the end time; or the GPS coordinates corresponding to each time in the target time period can be used to accumulate the distance of the GPS coordinate changes to obtain the GPS distance.

[0084] As an implementation method, the positioning accuracy of GPS can be determined by the number of GPS satellites connected to the terminal device. If the number of GPS satellites connected to the terminal device is less than a quantity threshold, it can be determined that the positioning accuracy of GPS is low, and the PDR distance can be used as the running distance corresponding to the target time period; if the number of GPS satellites connected to the terminal device is greater than or equal to the quantity threshold, it can be determined that the positioning accuracy of 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.

[0085] As another implementation, the positioning accuracy of GPS can be determined by the signal strength of GPS. If the GPS signal strength received by the terminal device is less than the strength threshold, it can be determined that the positioning accuracy of GPS is low, and the PDR distance can be used as the running distance corresponding to the target time period; if the GPS signal strength received by the terminal device is greater than or equal to the strength threshold, it can be determined that the positioning accuracy of 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.

[0086] In some embodiments, if the positioning accuracy of GPS within the target time period is greater than or equal to the accuracy threshold, the step length data corresponding to the target time period determined above can 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 length data can be increased; if the GPS distance is less than the PDR distance, the step length data can be reduced, etc., so that the step length calculation model can be adjusted according to the corrected step length data. By continuously adjusting the step length data and the step length calculation model, the accuracy of the step length calculation can be improved.

[0087] In some embodiments, after the terminal device determines the running distance corresponding to the current target time period, it can continue to monitor the number of running steps and running distance in the next target time period, and can also accumulate the running distances corresponding to each determined target time period to obtain the total distance corresponding to the user's current running process. Optionally, the total distance can be output in real time to facilitate the user to understand the running situation of the current running process.

[0088] In the embodiment of the present application, the number of running steps and the running distance of the user in each target time period during the running process can be accurately monitored, which improves the accuracy of running data monitoring, meets the user's needs for running data monitoring, and improves the user experience.

[0089] like Figure 5 As shown, in one embodiment, a running data monitoring device 500 is provided, which can be applied to the above-mentioned terminal device. The running data monitoring device 500 may include a gyroscope data acquisition module 510, a target axis determination module 520 and a step number determination module 530.

[0090] The gyroscope data acquisition module 510 is used to acquire the gyroscope data corresponding to each axis collected by the multi-axis gyroscope within 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.

[0091] The target axis determination module 520 is used to transform the gyroscope data corresponding to each axis to obtain the spectrum data corresponding to each axis, and determine the target axis from each axis according to the spectrum data corresponding to each axis.

[0092] The step number determination module 530 is used to detect the peaks and troughs of the gyroscope data corresponding to the target axis, and determine the target running step number corresponding to the target time period according to the total number of the detected peaks and troughs.

[0093] In one embodiment, the above-mentioned running data monitoring device 500 further includes a running state determination module.

[0094] The running state determination module is used to obtain the first acceleration data collected by the multi-axis accelerometer; calculate the 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, it is determined that the user is in a running state.

[0095] In the embodiment of the present application, running step count monitoring is performed using gyroscope data collected by a multi-axis gyroscope, which can avoid the influence of gravity acceleration on the monitoring results, 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 count, which can reduce the influence of other information on the gyroscope data, improve the accuracy of running step count monitoring, and thus improve the accuracy of running data monitoring.

[0096] In one embodiment, the target axis determination module 520 is further used to determine the spectrum data with the largest amplitude value according to the spectrum data corresponding to each axis; and to use the axis corresponding to the spectrum data with the largest amplitude value as the target axis.

[0097] In one embodiment, the step number determination module 530 includes a first determination unit, a second determination unit and a fusion unit.

[0098] The first determining unit is used to determine the total number of the detected peaks and troughs as a first running step number corresponding to the target time period.

[0099] The second determining unit is used to determine a second number of running steps corresponding to the target time period according to second acceleration data collected by the multi-axis accelerometer within the target time period.

[0100] In one embodiment, the second determination unit is further used to perform peak and trough detection on the second acceleration data corresponding to each axis in the multi-axis accelerometer, and determine the total number of peaks and troughs 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; calculate the second root mean square value of the second acceleration data corresponding to each axis according to the absolute values ​​of the acceleration of the peaks and troughs contained in the second acceleration data corresponding to each axis, and determine the axis with the largest second root mean square value; determine the number of running steps corresponding to the axis with the largest second root mean square value as the second number of running steps corresponding to the target time period.

[0101] The fusion unit is used to fuse the first running step count and the second running step count to obtain a target running step count corresponding to a target time period.

[0102] In one embodiment, the running data monitoring device 500 further includes a PDR distance calculation module.

[0103] The PDR distance calculation module is used to determine the step length data corresponding to the target time period according to the target running step number and the user's physiological data; multiply the step length data by the target running step number to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.

[0104] In one embodiment, the above-mentioned running data monitoring device 500 further includes a running distance determination module.

[0105] The running distance determination module is used to obtain the positioning accuracy of the global positioning system GPS within the target time period; if the positioning accuracy is greater than or equal to the accuracy threshold, the GPS distance is determined according to the GPS coordinates collected by the GPS within the target time period, and the GPS distance is used as the running distance corresponding to the target time period; if the positioning accuracy is less than the accuracy threshold, the PDR distance is used as the running distance corresponding to the target time period.

[0106] In the embodiment of the present application, the number of running steps and the running distance of the user in each target time period during the running process can be accurately monitored, which improves the accuracy of running data monitoring, meets the user's needs for running data monitoring, and improves the user experience.

[0107] Figure 6 FIG. 1 is a block diagram of a terminal device in an embodiment. Figure 6 As shown, the terminal device 600 may include one or more of the following components: a processor 610, and a memory 620 coupled to the processor 610, wherein the memory 620 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above embodiments when executed by one or more processors 610.

[0108] The processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts of the entire terminal device 600, and executes various functions and processes data of the terminal device 600 by running or executing instructions, programs, code sets or instruction sets stored in the memory 620, and calling data stored in the memory 620. Optionally, the processor 610 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 610 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 610, but may be implemented separately through a communication chip.

[0109] 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, codes, code sets or instruction sets. The memory 620 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data created by the terminal device 600 during use, etc.

[0110] It is understandable that the terminal device 600 may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., and is not limited here.

[0111] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program implements the method described in the above embodiment when executed by a processor.

[0112] An embodiment of the present application discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.

[0113] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a ROM, etc.

[0114] As used herein, any reference to memory, storage, database, or other medium may include nonvolatile and / or volatile memory. Suitable nonvolatile memory may include ROM, programmable ROM (Programmable ROM, PROM), erasable PROM (Erasable PROM, EPROM), electrically erasable PROM (Electrically Erasable PROM, EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. By way of illustration and not limitation, RAM may be in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus direct RAM (RDRAM) and direct memory bus dynamic RAM (DRDRAM).

[0115] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0116] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0117] Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0118] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0119] The above is a detailed introduction to a running data monitoring method, device, terminal device and storage medium disclosed in the embodiment of the present application. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A running data monitoring method, characterized in that: Applied to a terminal device, the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope, and the method includes: If it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, then obtaining gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period; 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; Performing peak and trough detection on the gyroscope data corresponding to the target axis, and determining the target number of running steps corresponding to the target time period according to the total number of the detected peaks and troughs; The method of determining the target number of running steps corresponding to the target time period according to the total number of detected peaks and troughs includes: determining the total number of detected peaks and troughs as a first number of running steps corresponding to the target time period; determining a second number of running steps corresponding to the target time period according to second acceleration data collected by the multi-axis accelerometer within the target time period; configuring different weights for the first number of running steps and the second number of running steps, respectively, and performing weighted calculation on the first number of running steps and the second number of running steps according to the weights corresponding to the first number of running steps and the second number of running steps, so as to obtain the target number of running steps corresponding to the target time period.

2. The method according to claim 1, characterized in that: The step of determining a target axis from the axes according to the frequency spectrum data corresponding to the axes comprises: Determine the spectrum data with the largest amplitude value according to the spectrum data corresponding to each axis; The axis corresponding to the spectrum data with the largest amplitude value is used as the target axis.

3. The method according to claim 1, characterized in that Before obtaining gyroscope data corresponding to each axis collected by the multi-axis gyroscope within a target time period if it is determined that the user is in a running state according to the first acceleration data collected by the multi-axis accelerometer, the method further includes: Acquire first acceleration data collected by the multi-axis accelerometer; A first root mean square value corresponding to the first acceleration data is calculated, and if the first root mean square value is greater than a preset threshold, it is determined that the user is in a running state.

4. The method according to claim 1, characterized in that The method further comprises: Determine the step length data corresponding to the target time period according to the target number of running steps and the user's physiological data; The step length data is multiplied by the target number of running steps to obtain the pedestrian dead reckoning PDR distance corresponding to the target time period.

5. The method according to claim 4, characterized in that After obtaining the pedestrian dead reckoning PDR distance corresponding to the target time period, the method further includes: Obtaining the positioning accuracy of the global positioning system GPS within the 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 collected by the GPS within the target time period, and using the GPS distance as the running distance corresponding to the target time period; If the positioning accuracy is less than the accuracy threshold, the PDR distance is used as the running distance corresponding to the target time period.

6. The method according to claim 1, characterized in that The second acceleration data includes second acceleration data corresponding to each axis of the multi-axis accelerometer in the target time period; and determining the second number of running steps corresponding to the target time period according to the second acceleration data collected by the multi-axis accelerometer in the target time period includes: Performing peak and trough detection on the second acceleration data corresponding to each axis of the multi-axis accelerometer respectively, and determining the total number of peaks and troughs 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 absolute values ​​of the acceleration of the peaks and troughs contained in the second acceleration data corresponding to each axis, and determining the axis with the largest second root mean square value; The number of running steps corresponding to the axis with the largest second root mean square value is determined as the second number of running steps corresponding to the target time period.

7. A running data monitoring device, characterized in that: Applied to a terminal device, the terminal device includes a multi-axis accelerometer and a multi-axis gyroscope, and the device includes: A gyroscope data acquisition module, configured to acquire gyroscope data corresponding to each axis acquired by the multi-axis gyroscope within a target time period if it is determined that the user is in a running state according to the acceleration data acquired by the multi-axis accelerometer; A target axis determination module, used for transforming the gyroscope data corresponding to each axis to obtain the spectrum data corresponding to each axis, and determining the target axis from each axis according to the spectrum data corresponding to each axis; A step number determination module, used to detect peaks and troughs of the gyroscope data corresponding to the target axis, and determine the target number of running steps corresponding to the target time period according to the total number of detected peaks and troughs; The step determination module is further used to determine the total number of detected peaks and troughs as a first running step corresponding to the target time period; determine a second running step corresponding to the target time period based on second acceleration data collected by the multi-axis accelerometer within the target time period; configure different weights for the first running step and the second running step, respectively, and perform weighted calculation on the first running step and the second running step according to the weights corresponding to the first running step and the second running step, so as to obtain a target running step corresponding to the target time period.

8. A terminal device, characterized in that: The method 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 implements the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor in a computer device, the processor implements the method according to any one of claims 1 to 6.