Pace detection method and device

By setting thresholds and time thresholds in the pace detection method, removing pseudo-climbs and pseudo-troughs and determining an accurate pace cycle, the problem of inaccurate pace detection in the prior art is solved and the accuracy of step detection is improved.

CN119268726APending Publication Date: 2025-01-07QINGDAO HAIER SMART TECH R & D CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310820675.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The step detection method in the prior art has inaccurate detection results due to the existence of acceleration pseudo-clides, making it difficult to improve the accuracy of step detection.

Method used

By obtaining acceleration waveform data, setting the peak threshold and trough threshold, calculating the time intervals of adjacent peaks and troughs, removing pseudo-climbs and troughs whose time intervals are greater than or equal to the threshold, determining the accurate pace period, and generating a pace count.

Benefits of technology

Improve the accuracy and accuracy of pace detection, reduce the impact of pseudo-climbs and pseudo-troughs, and ensure the accuracy of pace counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119268726A_ABST
    Figure CN119268726A_ABST
Patent Text Reader

Abstract

The invention provides a step detection method and device which are applied to a mobile device, and the method comprises the steps: obtaining acceleration waveform data; wherein the acceleration waveform data comprises a plurality of acceleration values, and each acceleration value has a corresponding moment; respectively comparing the acceleration value corresponding to each moment with a wave peak threshold and a wave trough threshold in sequence, determining the acceleration value as a wave peak value when the acceleration value is greater than the wave peak threshold, and determining the acceleration value as a wave trough value when the acceleration value is smaller than the wave trough threshold; taking the crest value as a starting point, calculating a time interval between the adjacent crest value and trough value according to moments respectively corresponding to the adjacent crest value and trough value, and determining the time interval between the adjacent crest value and trough value as a step cycle under the condition that the time interval is smaller than a time threshold value; and according to the determined pace cycle, generating a pace count. Through the step detection method provided by the invention, the step count can be quickly and accurately generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a step detection method and device. Background Art

[0002] Pace detection can obtain the step events in each walking cycle based on the acceleration information collected by the accelerometer of the smart device. When people walk, they usually show a certain periodicity. With the alternation of footsteps, the body's center of gravity fluctuates up and down; when pushing off the ground to start, the center of gravity moves up and forward, causing the vertical acceleration and forward acceleration to increase until the maximum value; when the foot falls, the body's center of gravity drops, the vertical acceleration decreases and reaches the minimum value when it lands. Therefore, the pace detection can be performed based on the periodic characteristics of the acceleration of the smart device during walking.

[0003] Commonly used algorithms in the prior art include the zero-crossing method and the peak detection method. The zero-crossing method requires accurate detection of the static state, and the detection accuracy is affected by the motion state, and the calculation complexity is high, while the peak detection method only needs to find the effective peak value, and the method is simpler to implement. The key to the peak detection method is to detect the effective peak value, but because people usually have different postures when using smart devices, the jitter or noise generated will cause pseudo peaks of acceleration, resulting in inaccurate detection results.

[0004] How to remove false peaks and improve the accuracy of detection steps is a technical problem that needs to be solved at present. Summary of the invention

[0005] The present invention provides a step detection method and device, which are used to solve the defect of inaccurate step detection result caused by acceleration pseudo peak in the prior art and improve the accuracy of step detection.

[0006] The present invention provides a step detection method, which is applied to a mobile device, and the method comprises:

[0007] Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of the acceleration values ​​having a corresponding time;

[0008] Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold in sequence, and determine the acceleration value as the peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as the trough value when the acceleration value is less than the trough threshold;

[0009] Starting from the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time interval between the adjacent peak values ​​and trough values ​​is calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle;

[0010] Based on the determined step cycle, a step count is generated.

[0011] According to a step detection method provided by the present invention, the step of sequentially comparing the acceleration value corresponding to each moment with a peak threshold and a trough threshold respectively comprises:

[0012] In a preset time period, when it is known that the acceleration values ​​in the acceleration waveform data are not zero, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold respectively.

[0013] According to a step detection method provided by the present invention, after calculating the time intervals of adjacent peak values ​​and trough values ​​based on the moments corresponding to the adjacent peak values ​​and trough values ​​starting from the peak value, the method further includes:

[0014] When the time interval is greater than or equal to the time threshold, the peak in the time interval is determined as a pseudo peak, and the trough in the time interval is determined as a pseudo trough;

[0015] The pseudo peaks and the pseudo troughs are discarded.

[0016] According to a step detection method provided by the present invention, before acquiring acceleration waveform data, the method further includes:

[0017] Obtaining individual characteristics of the current user and / or historical step data of the current user;

[0018] Based on the individual characteristics of the current user and / or the historical pace data of the current user, the corresponding peak threshold, trough threshold and time threshold are calculated.

[0019] According to a step detection method provided by the present invention, generating a step count according to a determined step cycle includes:

[0020] If it is known that the time interval during which the acceleration value continues to be zero reaches a preset time interval, determining the total number of the step cycles;

[0021] A step count is generated based on the sum of the number of step cycles.

[0022] According to a step detection method provided by the present invention, generating a step count according to a determined step cycle includes:

[0023] In case of receiving a refresh instruction, determining the total number of the step cycles in the interval between the refresh instruction and the last refresh instruction;

[0024] A step count is generated based on the sum of the number of step cycles.

[0025] According to a step detection method provided by the present invention, after generating the step count based on the sum of the number of step cycles, the method further includes:

[0026] The step count is added to the initial step count, and the initial step count is updated based on the step count obtained after the addition; wherein the initial step count is the number of steps accumulated before the current step cycle.

[0027] The present invention also provides a step detection device, which is applied to a mobile device, and the device comprises:

[0028] An acquisition module, used for acquiring acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of which has a corresponding time;

[0029] A determination module, used to compare the acceleration value corresponding to each moment with a peak threshold and a trough threshold in turn, and determine the acceleration value as a peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as a trough value when the acceleration value is less than the trough threshold;

[0030] a calculation module, for calculating the time interval between adjacent peak values ​​and trough values ​​starting from the peak value and according to the moments corresponding to the adjacent peak values ​​and trough values ​​respectively, and determining the time interval between adjacent peak values ​​and trough values ​​as a step cycle when the time interval is less than a time threshold;

[0031] The generating module is used for generating step counts according to a determined step cycle.

[0032] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned step detection methods is implemented.

[0033] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the step detection method described in any one of the above is implemented.

[0034] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the step detection method described above is implemented.

[0035] The present invention provides a step detection method and device, which obtain acceleration waveform data through a mobile device, thereby obtaining multiple acceleration values ​​and the time corresponding to each acceleration value; the acceleration value corresponding to each time is compared with a peak threshold and a trough threshold in turn, and when the acceleration value is greater than the peak threshold, the acceleration value is determined to be a peak value; when the acceleration value is less than the trough threshold, the acceleration value is determined to be a trough value; starting from the peak value, according to the time corresponding to adjacent peak values ​​and trough values, the time interval between adjacent peak values ​​and trough values ​​is calculated; when the time interval is less than the time threshold, the time interval between adjacent peak values ​​and trough values ​​is determined as a step cycle; when the peak value and the trough value simultaneously meet the corresponding threshold, the present invention adds a time threshold for judgment, thereby improving the detection accuracy of the step cycle, and quickly and accurately generating a step count according to the determined step cycle. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 It is a step detection diagram in the prior art;

[0038] Figure 2 This is one of the flow charts of the step detection method provided by the present invention;

[0039] Figure 3 is a step detection graph obtained by using the step detection method provided by the present invention;

[0040] Figure 4 This is the second flow chart of the step detection method provided by the present invention;

[0041] Figure 5 This is the third flow chart of the step detection method provided by the present invention;

[0042] Figure 6 This is the fourth flow chart of the step detection method provided by the present invention;

[0043] Figure 7 This is the fifth flow chart of the step detection method provided by the present invention;

[0044] Figure 8 It is a structural schematic diagram of the step detection device provided by the present invention;

[0045] Fig. 9It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] It should be noted that the step detection in the prior art usually obtains the step events in each walking cycle based on the acceleration information collected by the accelerometer of the smart device. The key to the commonly used peak detection method is to detect the effective peak value, but because people usually have different postures when using smart devices, the jitter or noise generated will cause pseudo peaks in the acceleration, resulting in inaccurate detection results. In response to this situation, the prior art usually performs a threshold judgment on the peak. When the acceleration value reaches the threshold, it is determined to be a peak, but this method cannot guarantee the accuracy of the detection result. For example, Figure 1 It is a step detection diagram in the prior art. Assuming that the peak threshold is 1m / s2, if the acceleration value corresponding to a certain moment exceeds 1m / s2, the acceleration value corresponding to the moment is determined as the peak value, such as Figure 1 As shown, in the time period of 0-4s, according to the detection method of the prior art, point A is determined as the trough and point B is determined as the peak. Since the peak threshold is set, the accurate peak is detected, but since the trough threshold is not set, the trough determined by the detection is not accurate; and see Figure 1 It can be seen that a long interval between point A and point B will also lead to inaccurate detection results.

[0048] Based on the problems existing in the prior art, Figure 2-Figure 9 A step detection method and device of the present invention are described.

[0049] Figure 2 is one of the flow charts of the step detection method provided in this embodiment. Figure 2 As shown, the step detection method provided in this embodiment is applied to a mobile device, and the method includes:

[0050] Step 100: Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of which has a corresponding time.

[0051] It should be noted that the mobile device may be a mobile smart device equipped with an accelerometer, such as a smart phone, a smart watch, a smart bracelet, etc., and this embodiment does not impose any special limitation on this.

[0052] Pace detection can obtain the step events in each walking cycle based on the acceleration information collected by the mobile device accelerometer. When people walk, they usually show a certain periodicity. With the alternation of footsteps, the body's center of gravity fluctuates up and down; when pushing off the ground to start, the center of gravity moves up and forward, causing the vertical acceleration and forward acceleration to increase until the maximum value; when the foot falls, the body's center of gravity drops, the vertical acceleration decreases and reaches the minimum value when it lands. Therefore, step detection can be performed based on the periodic characteristics of the acceleration value of the mobile device during walking.

[0053] Specifically, in this embodiment, the acceleration value is displayed through acceleration waveform data. After the mobile device collects corresponding acceleration values ​​at different moments, acceleration waveform data is formed, and each moment corresponds to an acceleration value.

[0054] Step 200: Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold respectively. When the acceleration value is greater than the peak threshold, determine the acceleration value as the peak value; when the acceleration value is less than the trough threshold, determine the acceleration value as the trough value.

[0055] Specifically, in order to ensure the accuracy of step detection, the present embodiment sets a peak threshold and a trough threshold. After acquiring the acceleration waveform data, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold. When the acceleration value is greater than the peak threshold, the acceleration value is determined to be the peak value. When the acceleration value is less than the trough threshold, the acceleration value is determined to be the trough value. Based on this, each peak and each trough in the acceleration waveform data is determined.

[0056] Step 300: Starting from the peak value, calculate the time interval between adjacent peak values ​​and trough values ​​according to the moments corresponding to the adjacent peak values ​​and trough values ​​respectively. When the time interval is less than the time threshold, determine the time interval between adjacent peaks and troughs as a pace cycle.

[0057] It should be noted that, in order to further improve the accuracy of step detection, after determining each peak and each trough in the acceleration waveform data, this embodiment also adds time and threshold values ​​to determine whether the time interval between adjacent peaks and troughs meets preset conditions.

[0058] Specifically, since a complete walking cycle should include at least four processes: starting-peak-trough-landing, the peak value is taken as the starting point, and the time intervals between adjacent peak values ​​and trough values ​​are calculated according to the moments corresponding to adjacent peak values ​​and trough values ​​respectively. When the time interval is less than the preset time threshold, the time interval between adjacent peaks and troughs is determined as a step cycle.

[0059] For example, Figure 3 is a step detection diagram obtained by using the step detection method provided by the present invention, such as Figure 3 As shown, each peak and each trough are determined by the peak threshold and the trough threshold, and then the time interval between adjacent peaks and troughs is determined, and the pseudo peaks and pseudo troughs are removed to form the following Figure 3 The regularity of the step detection diagram is shown.

[0060] Step 400: Generate a step count according to the determined step cycle.

[0061] Specifically, the total number of determined step cycles corresponds to a specific step count.

[0062] The above is a description of the steps of the step detection method provided by the present invention. From the description of the above steps, it can be seen that according to the step detection method provided by the present invention, acceleration waveform data is obtained through a mobile device, thereby obtaining multiple acceleration values ​​and the time corresponding to each acceleration value; the acceleration value corresponding to each time is compared with the peak threshold and the trough threshold in turn, and when the acceleration value is greater than the peak threshold, the acceleration value is determined to be the peak value, and when the acceleration value is less than the trough threshold, the acceleration value is determined to be the trough value, starting with the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time intervals of the adjacent peak values ​​and trough values ​​are calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle. In the present invention, when the peak value and the trough value simultaneously meet the corresponding threshold, the time threshold is added for judgment, so as to improve the detection accuracy of the step cycle, and quickly and accurately generate the step count according to the determined step cycle.

[0063] Based on the above embodiment, in this embodiment, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold in step 200, including:

[0064] In a preset time period, when it is known that the acceleration values ​​in the acceleration waveform data are not zero, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold respectively.

[0065] Specifically, the preset time period can be 1s. When it is known that the acceleration values ​​in the acceleration waveform data are not zero and are all greater than zero, it means that the corresponding acceleration values ​​within this 1s may have a peak value. The acceleration value corresponding to each moment is compared with the peak threshold to determine whether there is a peak.

[0066] Furthermore, when it is known that the acceleration values ​​in the acceleration waveform data are not zero and are all less than zero, it indicates that the corresponding acceleration values ​​within the 1s may have a trough value. The acceleration value corresponding to each moment is compared with the trough threshold to determine whether there is a trough.

[0067] The step detection method provided in this embodiment determines each peak and each trough in the acceleration waveform data by comparing the acceleration value corresponding to each moment with the peak threshold and the trough threshold respectively, thereby ensuring the accuracy of the judgment.

[0068] Based on the above embodiments, in this embodiment, Figure 4 FIG. 2 is a flow chart of the step detection method provided in this embodiment. Figure 4 As shown, after calculating the time intervals between adjacent peak values ​​and trough values ​​based on the moments corresponding to the adjacent peak values ​​and trough values ​​in step 300, the method further includes:

[0069] Step 410: when the time interval is greater than or equal to the time threshold, the peak within the time interval is determined as a pseudo peak, and the trough within the time interval is determined as a pseudo trough.

[0070] Specifically, see Figure 1 In the prior art, since no time threshold is set to judge the time interval between the peak and the trough, the peak and the trough automatically identified by the mobile device are not accurate, thus causing the step detection to be inaccurate.

[0071] Based on this, the present embodiment sets a time threshold, and the time threshold can be determined according to the walking signs of the mobile device user himself, such as the normal walking speed, etc., and the present embodiment does not impose any special limitation on this.

[0072] Specifically, starting from the peak, when the adjacent time interval is greater than or equal to the time threshold, the peak in the time interval can be determined as a pseudo peak, and the trough in the time interval can be determined as a pseudo trough.

[0073] Step 420: discard the pseudo peaks and the pseudo troughs.

[0074] Specifically, the pseudo peaks and pseudo troughs may be caused by non-walking events such as mobile phone shaking, and therefore are not considered as specific steps and need to be discarded. After discarding each determined pseudo peak and pseudo trough, an accurate step detection graph can be formed. For details, see Figure 3 .

[0075] The step detection method provided in this embodiment, when the peak value and the trough value simultaneously meet the corresponding thresholds, further adds a time threshold for judgment, thereby improving the detection accuracy of the step cycle, and quickly and accurately generates a step count based on the determined step cycle.

[0076] Based on the above embodiments, in this embodiment, Figure 5 FIG. 3 is a flow chart of the step detection method provided in this embodiment. Figure 5 As shown, before acquiring the acceleration waveform data in step 100, the method further includes:

[0077] Step 510: Obtain individual characteristics of the current user and / or historical step data of the current user.

[0078] It should be noted that the walking speed, walking habits and individual characteristics of different individual users may be different. Therefore, in order to improve the accuracy and flexibility of step detection, different relevant thresholds need to be set for different individual users.

[0079] Step 520: Based on the individual characteristics of the current user and / or the historical pace data of the current user, the corresponding peak threshold, trough threshold and time threshold are calculated.

[0080] Specifically, the mobile device can pre-set default related thresholds. After obtaining the individual characteristics of the user, the peak threshold, trough threshold and time threshold corresponding to the user can be calculated based on the individual characteristics of the user; the user can also choose to continue to use the pre-set default threshold. For example, the elderly have a characteristic of walking slower than young people. Therefore, when the mobile device obtains that the current user is an elderly person, the default peak threshold can be lowered, the default peak threshold can be increased, and the time threshold can be expanded.

[0081] Furthermore, new relevant thresholds can also be calculated based on the historical step data stored in the mobile device. After obtaining the user's historical step data, the peak threshold, trough threshold and time threshold corresponding to the user can be calculated based on the user's historical step data; the user can also choose to continue to use the pre-set default threshold.

[0082] The step detection method provided in this embodiment sets different peak thresholds, trough thresholds and time thresholds for different users, thereby ensuring the accuracy of step detection while providing targeted services to users.

[0083] Based on the above embodiments, in this embodiment, Figure 6 FIG. 4 is a flow chart of the step detection method provided in this embodiment. Figure 6 As shown, in step 400, a step count is generated according to the determined step cycle, including:

[0084] Step 610: If it is known that the time interval during which the acceleration value continues to be zero reaches a preset time interval, the total number of the step cycles is determined.

[0085] It should be noted that if the time interval during which the acceleration value remains zero reaches a preset time interval, which may be 5 minutes, 10 minutes, etc., it means that the current user has temporarily stopped walking or does not need to continue step detection. Therefore, the step count on the mobile device can be updated.

[0086] Step 620: Generate a step count based on the sum of the number of step cycles.

[0087] Specifically, firstly, the valid step cycles within the user's walking event segment are determined, and a step count is generated based on the sum of the number of step cycles.

[0088] The step detection method provided in this embodiment obtains the acceleration value in real time, and generates a step count after it is learned that the time interval during which the acceleration value is continuously zero reaches a preset time interval, thereby ensuring the real-time generation of the step count.

[0089] Based on the above embodiments, in this embodiment, Figure 7 FIG. 5 is a flow chart of the step detection method provided in this embodiment. Figure 7 As shown, in step 400, a step count is generated according to the determined step cycle, including:

[0090] Step 710: When a refresh instruction is received, determine the total number of the step cycles in the interval between the refresh instruction and the last refresh instruction.

[0091] Step 720: Generate a step count based on the sum of the number of step cycles.

[0092] It should be noted that, in another situation, the user can refresh the step count in real time without waiting for the time interval during which the acceleration value is continuously zero to reach the preset time interval.

[0093] Specifically, when a user refresh instruction is received, the total number of step cycles in the time period between the current refresh instruction and the last refresh instruction is determined. For example, in a continuous walking process, if the first refresh is performed after walking for 1 minute and the second refresh is performed after walking for 5 minutes, it is necessary to determine the total number of step cycles between the 1st minute and the 5th minute. The step count is generated based on the total number of step cycles between the 1st minute and the 5th minute.

[0094] The step detection method provided in this embodiment, upon receiving a refresh instruction, determines the total number of step cycles in a corresponding time period in real time and generates a step count, thereby ensuring the real-time generation of the step count.

[0095] Based on the above embodiment, in this embodiment, after step 400 generates a step count based on the sum of the number of step cycles, the method further includes:

[0096] The step count is added to the initial step count, and the initial step count is updated based on the step count obtained after the addition; wherein the initial step count is the number of steps accumulated before the current step cycle.

[0097] It should be noted that whether it is the step count determined after the user stops walking or the step count determined based on real-time refresh during walking, it can be added to the initial step count to update the initial step count so that the user can know the latest step count.

[0098] The step detection method provided in this embodiment updates the step count displayed on the mobile device by adding the step count to the initial step count.

[0099] The step detection device provided by the present invention is described below. The step detection device described below and the step detection method described above can be referenced to each other.

[0100] Figure 8 is a schematic diagram of the structure of the step detection device provided in this embodiment. Figure 8 As shown, the step detection device provided in this embodiment is applied to a mobile device, and the device includes:

[0101] The acquisition module 801 is used to acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of which has a corresponding time;

[0102] A determination module 802 is used to compare the acceleration value corresponding to each moment with a peak threshold and a trough threshold in sequence, and determine the acceleration value as a peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as a trough value when the acceleration value is less than the trough threshold;

[0103] The calculation module 803 is used to calculate the time interval between adjacent peak values ​​and trough values ​​starting from the peak value and according to the moments corresponding to the adjacent peak values ​​and trough values ​​respectively, and when the time interval is less than the time threshold, determine the time interval between adjacent peak values ​​and trough values ​​as a step cycle;

[0104] The generating module 804 is used to generate a step count according to the determined step cycle.

[0105] The step detection device provided in this embodiment obtains acceleration waveform data through a mobile device, thereby obtaining multiple acceleration values ​​and the time corresponding to each acceleration value; the acceleration value corresponding to each time is compared with the peak threshold and the trough threshold in turn, when the acceleration value is greater than the peak threshold, the acceleration value is determined to be the peak value, when the acceleration value is less than the trough threshold, the acceleration value is determined to be the trough value, starting from the peak value, according to the moments corresponding to adjacent peak values ​​and trough values, the time interval of adjacent peak values ​​and trough values ​​is calculated, when the time interval is less than the time threshold, the time interval between adjacent peaks and troughs is determined as a step cycle, when the time interval is less than the time threshold, the time interval between adjacent peaks and troughs is determined as a step cycle, when the peak value and the trough value simultaneously meet the corresponding threshold, the present invention adds a time threshold for judgment, thereby improving the detection accuracy of the step cycle, and quickly and accurately generating a step count according to the determined step cycle.

[0106] Based on the above embodiment, in this embodiment, the determining module 802 is specifically used for:

[0107] In a preset time period, when it is known that the acceleration values ​​in the acceleration waveform data are not zero, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold respectively.

[0108] Based on the above embodiment, in this embodiment, the device further includes a discarding module, which is specifically used to:

[0109] After calculating the time intervals of adjacent peak values ​​and trough values ​​based on the moments corresponding to the adjacent peak values ​​and trough values ​​respectively starting from the peak value, if the time interval is greater than or equal to the time threshold, determining the peak within the time interval as a pseudo peak, and determining the trough within the time interval as a pseudo trough;

[0110] The pseudo peaks and the pseudo troughs are discarded.

[0111] Based on the above embodiment, in this embodiment, the device further includes a calculation module, which is specifically used to:

[0112] Before acquiring the acceleration waveform data, acquiring individual characteristics of the current user and / or historical pace data of the current user;

[0113] Based on the individual characteristics of the current user and / or the historical pace data of the current user, the corresponding peak threshold, trough threshold and time threshold are calculated.

[0114] Based on the above embodiment, in this embodiment, the generating module 804 is specifically used for:

[0115] If it is known that the time interval during which the acceleration value continues to be zero reaches a preset time interval, determining the total number of the step cycles;

[0116] A step count is generated based on the sum of the number of step cycles.

[0117] Based on the above embodiment, in this embodiment, the generating module 804 is specifically used for:

[0118] In case of receiving a refresh instruction, determining the total number of the step cycles in the interval between the refresh instruction and the last refresh instruction;

[0119] A step count is generated based on the sum of the number of step cycles.

[0120] Based on the above embodiment, in this embodiment, the device further includes an updating module, which is specifically used to:

[0121] After generating a step count based on the sum of the number of step cycles, the step count is added to the initial step count, and the initial step count is updated based on the number of steps obtained after the addition; wherein the initial step count is the number of steps accumulated before the current step cycle.

[0122] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute the step detection method, which is applied to the mobile device, and the method includes:

[0123] Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of the acceleration values ​​having a corresponding time;

[0124] Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold in sequence, and determine the acceleration value as the peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as the trough value when the acceleration value is less than the trough threshold;

[0125] Starting from the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time interval between the adjacent peak values ​​and trough values ​​is calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle;

[0126] Based on the determined step cycle, a step count is generated.

[0127] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0128] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the step detection method provided by the above methods, applied to a mobile device, the method includes:

[0129] Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of the acceleration values ​​having a corresponding time;

[0130] Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold in sequence, and determine the acceleration value as the peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as the trough value when the acceleration value is less than the trough threshold;

[0131] Starting from the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time interval between the adjacent peak values ​​and trough values ​​is calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle;

[0132] Based on the determined step cycle, a step count is generated.

[0133] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the step detection method provided by the above methods, and is applied to a mobile device, the method comprising:

[0134] Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of the acceleration values ​​having a corresponding time;

[0135] Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold in sequence, and determine the acceleration value as the peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as the trough value when the acceleration value is less than the trough threshold;

[0136] Starting from the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time interval between the adjacent peak values ​​and trough values ​​is calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle;

[0137] Based on the determined step cycle, a step count is generated.

[0138] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0139] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A step detection method, characterized in that: Applied to a mobile device, the method comprises: Acquire acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of the acceleration values ​​having a corresponding time; Compare the acceleration value corresponding to each moment with the peak threshold and the trough threshold in sequence, and determine the acceleration value as the peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as the trough value when the acceleration value is less than the trough threshold; Starting from the peak value, according to the moments corresponding to the adjacent peak values ​​and trough values, the time interval between the adjacent peak values ​​and trough values ​​is calculated, and when the time interval is less than the time threshold, the time interval between the adjacent peak values ​​and trough values ​​is determined as a step cycle; Based on the determined step cycle, a step count is generated.

2. The step detection method according to claim 1, characterized in that: The step of sequentially comparing the acceleration value corresponding to each moment with a peak threshold and a trough threshold respectively includes: In a preset time period, when it is known that the acceleration values ​​in the acceleration waveform data are not zero, the acceleration value corresponding to each moment is sequentially compared with the peak threshold and the trough threshold respectively.

3. The step detection method according to claim 1, characterized in that: After calculating the time intervals between adjacent peak values ​​and trough values ​​based on the moments corresponding to the adjacent peak values ​​and trough values, starting from the peak value, the method further includes: When the time interval is greater than or equal to the time threshold, the peak in the time interval is determined as a pseudo peak, and the trough in the time interval is determined as a pseudo trough; The spurious peaks and the spurious troughs are discarded.

4. The step detection method according to claim 1, characterized in that: Before acquiring the acceleration waveform data, the method further includes: Obtaining individual characteristics of the current user and / or historical step data of the current user; Based on the individual characteristics of the current user and / or the historical pace data of the current user, the corresponding peak threshold, trough threshold and time threshold are calculated.

5. The step detection method according to claim 1, characterized in that: The step count is generated according to the determined step cycle, including: If it is known that the time interval during which the acceleration value continues to be zero reaches a preset time interval, determining the total number of the step cycles; A step count is generated based on the sum of the number of step cycles.

6. The step detection method according to claim 1, characterized in that: The step count is generated according to the determined step cycle, including: In case of receiving a refresh instruction, determining the total number of the step cycles in the interval between the refresh instruction and the last refresh instruction; A step count is generated based on the sum of the number of step cycles.

7. The step detection method according to claim 5 or 6, characterized in that: After generating the step count based on the sum of the number of step cycles, the method further includes: The step count is added to the initial step count, and the initial step count is updated based on the step count obtained after the addition; wherein the initial step count is the number of steps accumulated before the current step cycle.

8. A step detection device, characterized in that: Applied to a mobile device, the device comprises: An acquisition module, used for acquiring acceleration waveform data; wherein the acceleration waveform data includes a plurality of acceleration values, each of which has a corresponding time; A determination module, used to compare the acceleration value corresponding to each moment with a peak threshold and a trough threshold in turn, and determine the acceleration value as a peak value when the acceleration value is greater than the peak threshold, and determine the acceleration value as a trough value when the acceleration value is less than the trough threshold; a calculation module, for calculating the time interval between adjacent peak values ​​and trough values ​​starting from the peak value and according to the moments corresponding to the adjacent peak values ​​and trough values ​​respectively, and determining the time interval between adjacent peak values ​​and trough values ​​as a step cycle when the time interval is less than a time threshold; The generating module is used for generating step counts according to a determined step cycle.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the step detection method as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the step detection method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the step detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and system of updating number of steps in pedometer

    CN106197468A

  • Step counting algorithm based on wave peak and wave trough detection

    CN106767888A

  • Mobile device pedometer system and gait analysis method thereof

    TWI579530B