Sit-up counting method, wearable device and storage medium

Through gyroscope signal detection and dynamic threshold adjustment, the problems of artificial subjectivity and equipment complexity in sit-up counting are solved, and a simple and highly accurate sit-up counting method is realized, which is suitable for the personalized counting needs of different users. .

CN116115984BActive Publication Date: 2024-11-26HUAQIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211600074.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2024-11-26
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

The existing sit-up counting method is affected by the interference of artificial subjective factors and equipment complexity, and the counting accuracy is poor, and camera detection is strict for user posture and is not portable.

Method used

The gyroscope signal is used to detect the user's movement status, and the number of sit-ups is counted by the number of peaks in the preset time period, and the threshold is dynamically adjusted to eliminate false peaks, simplify the equipment structure, and improve counting accuracy.

Benefits of technology

It realizes the accuracy and simplicity of sit-up counting, reduces equipment complexity and power consumption, and adapts to the personalized counting habits of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116115984B_ABST
    Figure CN116115984B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of intelligent wearable technology, and discloses a method for counting sit-ups, a wearable device, and a storage medium. In the present invention, a preset time period is used as a detection period, and the motion state of the user in each preset time period is detected; if the motion state is a sit-up state, the number of sit-ups in the preset time period is counted according to the detected gyroscope signal; if the motion state is a static state, the number of sit-ups in the preset time period is counted as zero; the number of sit-ups counted in all detection periods is accumulated to obtain a final counting result. This simplifies the complexity of the device structure required for counting sit-ups while improving the accuracy of counting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of intelligent wearable technology, and in particular to a sit-up counting method, a wearable device and a storage medium. Background Art

[0002] Sit-ups are one of the common exercise methods in daily life. The number of sit-ups can generally be counted manually or by using a camera to detect the number of times a face appears in a fixed position.

[0003] The inventors have found that there are at least the following problems in the counting method of sit-ups: the manual counting method is subject to the subjective factors of the counting personnel, which is easy to cause counting errors. In addition, the method of detecting the face of the user through the camera has specific requirements for the user's posture when doing sit-ups, which has a serious impact on the accuracy of the counting when the user's posture does not meet the specific requirements. In addition, the camera detection device has a complex structure and is not easy to carry. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method for counting sit-ups, a wearable device, and a storage medium, which simplifies the complexity of the device structure required for counting sit-ups while improving the accuracy of counting.

[0005] To solve the above technical problems, an embodiment of the present invention provides a method for counting sit-ups, comprising: taking a preset time period as a detection period, detecting the movement state of the user in each preset time period; if the movement state is a sit-up state, counting the number of sit-ups in the preset time period according to the detected gyroscope signal; if the movement state is a stationary state, the number of sit-ups in the preset time period is counted as zero; and accumulating the number of sit-ups counted in all detection periods to obtain a final counting result.

[0006] An embodiment of the present invention also provides a wearable device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned sit-up counting method.

[0007] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned sit-up counting method when executed by a processor.

[0008] Compared with the prior art, the embodiment of the present invention uses the gyroscope signal as the statistical data of the number of sit-ups, that is, only the gyroscope is needed to realize the statistics of the number of sit-ups, no additional requirements are placed on the user's posture, and the required equipment is simple and easy to carry. In addition, the present invention uses a preset time period as a detection period, periodically detects the motion state during the user's sit-ups, and does not perform counting statistics when the user remains in a stationary state during the sit-ups, thereby reducing power consumption while reducing counting errors and improving counting accuracy.

[0009] In addition, counting the number of sit-ups within a preset time period according to the detected gyroscope signal includes: detecting the number of peaks in the gyroscope signal, and determining the number of sit-ups within the preset time period according to the number of peaks.

[0010] In addition, the number of sit-ups in a preset time period is determined according to the number of peaks, including: calculating the sampling time interval between the sampling points corresponding to two adjacent peaks; if the sampling time interval is less than a preset threshold, one of the two adjacent peaks is taken as a false peak; calculating the total number of peaks excluding the false peaks, and taking the total number of peaks as the number of sit-ups in the preset time period. The false peaks caused by some interference factors are eliminated by the sampling time interval of adjacent peaks, so that the counting result is more accurate.

[0011] In addition, after counting the number of sit-ups in a preset time period according to the detected gyroscope signal, the method further includes: adjusting a preset threshold according to the number, and using the adjusted preset threshold as a preset threshold for determining a false peak in the next detection cycle. According to the number of sit-ups counted in each detection cycle, the judgment parameter for determining a false peak in the next cycle is dynamically adjusted, that is, the preset threshold for comparison with the sampling time interval is dynamically adjusted. In this way, personalized counting rules suitable for different users can be set according to the user's sit-up behavior, so that the counting results are more suitable for users with different sit-up behavior habits.

[0012] In addition, adjusting the preset threshold according to the number includes: if the number is less than the preset number, increasing the preset threshold; if the number is greater than the preset number, decreasing the preset threshold. That is, if the number of sit-ups done by the user per unit time is large, then the sampling time interval corresponding to the sampling points of adjacent wave peaks that can reflect the number of sit-ups will be relatively small. On the contrary, if the number of sit-ups done by the user per unit time is small, then the sampling time interval corresponding to the sampling points of adjacent wave peaks that can reflect the number of sit-ups will be relatively large. Dynamically adjusting the preset threshold based on such a rule can make the counting result more accurate.

[0013] In addition, before counting the number of sit-ups within a preset time period according to the detected gyroscope signal, the method further includes: filtering the gyroscope signal to delete sampling point data whose deviation from the fitting curve corresponding to the gyroscope signal is greater than a preset distance, wherein the gyroscope signal includes a plurality of sampling point data. This can prevent interference signals from affecting the counting result.

[0014] In addition, detecting the motion state of the user in each preset time period includes: collecting a plurality of acceleration signals in the preset time period; calculating the difference value of the collected plurality of acceleration signals; and determining the motion state in the preset time period according to the size of the difference value.

[0015] In addition, the acceleration signal includes: a fitting signal of three-axis acceleration; calculating the difference values ​​of the collected acceleration signals, including: determining the maximum value and the minimum value in all fitting signals, and calculating the difference between the maximum value and the minimum value as the difference value. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.

[0017] Figure 1 is a flow chart of a method for counting sit-ups according to an embodiment of the present invention;

[0018] Figure 2 is a flowchart of an implementation of step 102 according to an embodiment of the present invention;

[0019] Figure 3 is a schematic diagram of the structure of a wearable device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented.

[0021] The following embodiments are divided for the convenience of description and shall not constitute any limitation on the specific implementation of the present invention. The embodiments may be combined with each other and referenced to each other without contradiction.

[0022] The embodiment of the present invention relates to a method for counting sit-ups, including: taking a preset time period as a detection period, detecting the motion state of the user in each preset time period; if the motion state is a sit-up state, counting the number of sit-ups in the preset time period according to the detected gyroscope signal; if the motion state is a stationary state, the number of sit-ups in the preset time period is counted as zero; accumulating the number of sit-ups counted in all detection periods to obtain a final counting result. The complexity of the device structure required for counting sit-ups is simplified while improving the counting accuracy. The implementation details of the sit-up counting method of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for implementing this solution.

[0023] The counting method of sit-ups in this embodiment is as follows Figure 1 As shown, including:

[0024] Step 101, taking a preset time period as a detection cycle, detecting the motion state of the user in each preset time period.

[0025] Including: determining the detection period according to the frequency of the user doing sit-ups, ensuring that the user can do at least one complete sit-up in each detection period. In practical applications, the detection period can be set to any value between 2 seconds and 4 seconds based on experience. When determining the detection period, the user can set it according to his or her actual situation, or use the default time period as the detection period when the user sets the detection period. In addition, while the user is doing sit-ups, the detection period can be dynamically adjusted according to the changes in the frequency of the user doing sit-ups. When the frequency of the user doing sit-ups decreases, the duration of the detection period can be appropriately increased.

[0026] After determining the detection cycle, each time it is detected that the elapsed time meets the preset time period defined by the detection cycle, the user's motion state within the preset time period is detected. The detection of the motion state is mainly divided into sit-up state and stationary state. If it is detected that the user is in a stationary state within the detection cycle, the number of sit-ups within the detection cycle does not need to be counted, which can save computing costs.

[0027] There are several ways to detect the user's motion status within a preset time period:

[0028] The first motion state detection method is: the acceleration sensor collects a number of acceleration signals within the preset time period, and determines the motion state within the preset time period according to the difference values ​​of the collected acceleration signals. Specifically, the acceleration sensor collects three-axis acceleration signals, and the X, Y, and Z three-axis acceleration signals are respectively ACC x , ACC y , ACCz Indicates that the X-axis and Y-axis are parallel to the ground, the X-axis is set along the direction of the user's torso, and the Z-axis is set perpendicular to the ground. When comparing the difference values ​​of the acceleration signals, the acceleration signal of either the X-axis or Z-axis can be selected for comparison to determine the difference value, or the fitting signal can be obtained by using the three-axis acceleration calculation, and the difference between the maximum and minimum values ​​of the fitting signal is used as the difference value of the acceleration signal within the preset time period. The calculation formula for the fitting signal is: in, Represents the fitting signal of the three-axis acceleration. If the calculated difference value is greater than the static threshold, it is detected that the user is in a sit-up state, and the subsequent statistical number calculation continues. If the difference value is less than or equal to the static threshold, it is detected that the user is in a static state, and the subsequent statistical number calculation is not performed. The number of sit-ups in this detection phase is directly counted as zero. The static threshold setting range can be [0.2*9.8, 0.5*9.8].

[0029] The second motion state detection method is: based on the back sensor at the user's backrest position, the pressure value applied by the user's back to the backrest position is detected. When the user is in a static state, the pressure value detected by the back sensor remains unchanged; when the user is in a sit-up state, the pressure detected changes periodically. The user's motion state is determined based on the change in the pressure value detected by the back sensor during the detection period.

[0030] In practical applications, in addition to the above two motion state detection methods, the motion state can also be determined by using the angular velocity changes detected by the gyroscope, or by using the camera to capture portrait changes to determine the motion state, etc. There is no specific restriction on the motion state detection method.

[0031] Step 102: If the exercise state is a sit-up state, the number of sit-ups within a preset time period is counted according to the detected gyroscope signal.

[0032] Specifically, if the motion state is a sit-up state, the number of peaks in the gyroscope signal is detected, and the number of sit-ups within a preset time period is determined according to the number of peaks. Figure 2 As shown, including:

[0033] Step 1021, detecting the peak in the gyroscope signal.

[0034] Including: the acquired gyroscope signal includes X, Y, Z three-axis gyroscope signals, wherein the X-axis and Y-axis are parallel to the ground, and the X-axis is set along the direction of the user's torso, and the Z-axis is set perpendicular to the ground. The gyroscope signal detected by the gyroscope is the angular velocity of rotation along the X, Y, and Z three axes. When counting the number of sit-ups, the three-axis gyroscope signals can be detected, and the fitting signal can be calculated using the three-axis gyroscope signals to detect the peak in the fitting signal; the peak in the gyroscope signal of one of the axes can also be detected. When selecting the gyroscope signal of one of the axes for detecting the peak, it is best to select a gyroscope signal that is consistent with the movement direction of the user when doing sit-ups. This selection can make the change of the gyroscope signal more obvious and facilitate statistical analysis.

[0035] In addition, when collecting the gyroscope signal, the angular velocity information detected by the gyroscope can be collected according to a preset step length, for example, 25 angular velocity information is collected per second within a preset time period, and all the collected angular velocity information constitutes the gyroscope signal of the detection cycle. After collecting the gyroscope signal, the gyroscope signal is filtered with a low-pass filter to delete the sampling point data whose fitting curve deviation corresponding to the gyroscope signal is greater than the preset distance, so as to avoid the interference signal collected during the collection process from affecting the counting result.

[0036] Finally, after the peaks in the gyroscope signal are detected, the number of peaks and the index corresponding to each peak are recorded as the first peak set, where the index can be the acquisition sequence number of the sampling point corresponding to the peak, or the acquisition time of the sampling point corresponding to the peak, etc., which can be used as information that can be used as a unique identifier of the peak.

[0037] Step 1022, calculating the sampling time interval between the sampling points corresponding to two adjacent peaks, and determining the false peaks.

[0038] The method comprises: if the sampling time interval is less than a preset threshold, taking one of two adjacent peaks as a false peak, and forming a false peak set using the indexes corresponding to the sampling points determined as the false peaks.

[0039] Step 1023, calculate the total number of peaks excluding false peaks, and use the total number of peaks as the number of sit-ups in a preset time period.

[0040] The method includes: calculating the intersection of the first peak set and the false peak set according to the index in the set to obtain the first intersection, deleting the elements in the first intersection in the first peak set, and obtaining the second peak set. The number of elements in the second peak set is the number of sit-ups performed by the user in the detection period.

[0041] Step 103: If the motion state is a static state, the number of sit-ups performed within a preset time period is counted as zero.

[0042] Step 104, accumulating the number of sit-ups counted in all detection cycles to obtain a final counting result.

[0043] Including: after detecting that the user has completed the sit-up exercise, the number of sit-ups counted in all detection cycles is accumulated, or the number of sit-ups counted in the detection cycles of all motion states is accumulated to obtain the total number of sit-ups. The judgment standard of whether the user has completed the sit-up exercise can be that according to the total duration of the sit-up exercise pre-set by the user, the sit-up exercise is completed after the exercise duration reaches the set total duration of the exercise; or when the user is detected to be in a static state for several consecutive detection cycles, it is determined that the user has completed the sit-up exercise. In actual applications, other user behaviors or time rules can also be used as the basis for judging whether the user has completed the sit-up exercise, and the judgment conditions are not limited here.

[0044] In addition, when the number of sit-ups counted in each detection cycle is not zero, the preset threshold for judging false peaks in the next cycle can be adjusted according to the number of sit-ups counted, that is, the preset threshold for comparing with the sampling time interval is dynamically adjusted. If the number of sit-ups done in the user unit time is large, the sampling time interval corresponding to the sampling points of the adjacent peaks that can reflect the number of sit-ups will be relatively small, and the preset threshold set can be appropriately reduced; on the contrary, if the number of sit-ups done in the user unit time is small, the sampling time interval corresponding to the sampling points of the adjacent peaks that can reflect the number of sit-ups will be relatively large, and the preset threshold set can be appropriately increased. In this way, while eliminating interference data, a more accurate peak reflecting the number of sit-ups can be captured, thereby avoiding misjudgment of interference data to the greatest extent and ensuring the accuracy of the statistical results.

[0045] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0046] An embodiment of the present invention also relates to a sit-up counting device, comprising: a detection module, a statistical module and an accumulation module; the detection module is used to detect the user's motion state in each preset time period with a preset time period as a detection cycle; the statistical module is used to count the number of sit-ups in the preset time period according to the detected gyroscope signal when the motion state is a sit-up state; when the motion state is a static state, the number of sit-ups in the preset time period is zero; the accumulation module is used to accumulate the number of sit-ups counted in all detection cycles to obtain a final counting result.

[0047] The statistical module is also used to detect the number of peaks in the gyroscope signal when the motion state is a sit-up state, and determine the number of sit-ups in a preset time period according to the number of peaks.

[0048] The statistical module is also used to calculate the sampling time interval between the sampling points corresponding to two adjacent peaks; if the sampling time interval is less than a preset threshold, one of the two adjacent peaks is taken as a false peak; the total number of peaks excluding the false peaks is calculated, and the total number of peaks is taken as the number of sit-ups within a preset time period.

[0049] The counting device also includes: an adjustment module, which is used to adjust the preset threshold according to the number, and use the adjusted preset threshold as the preset threshold for determining false peaks in the next detection cycle.

[0050] The counting device also includes: a filtering module for filtering the gyroscope signal to delete the sampling point data whose fitting curve deviation corresponding to the gyroscope signal is greater than a preset distance, wherein the gyroscope signal includes a plurality of sampling point data.

[0051] The detection module is also used to: collect a number of acceleration signals within a preset time period; calculate the difference value of the collected acceleration signals; and determine the motion state within the preset time period according to the size of the difference value.

[0052] It is not difficult to find that this embodiment is a device embodiment corresponding to the method embodiment, and this embodiment can be implemented in conjunction with the method embodiment. The relevant technical details mentioned in the method embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the method embodiment.

[0053] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in this embodiment.

[0054] The embodiment of the present invention also relates to a wearable device, such as Figure 3 As shown, it includes at least one processor 301; and a memory 302 that is communicatively connected to the at least one processor 301; wherein the memory 302 stores instructions that can be executed by the at least one processor 301, and the instructions are executed by the at least one processor 301 so that the at least one processor 301 can execute the above-mentioned sit-up counting method.

[0055] The memory 302 and the processor 301 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 301 and the memory 302 together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor 301.

[0056] The processor 301 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory 302 can be used to store data used by the processor 301 when performing operations.

[0057] The embodiment of the present invention further relates to a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above method embodiment is implemented.

[0058] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. 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.

[0059] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made in form and detail without departing from the spirit and scope of the present invention.

Claims

1. A method for counting sit-ups, characterized in that: include: Taking a preset time period as a detection cycle, detecting the user's motion state in each of the preset time periods; The detecting the motion state of the user in each of the preset time periods includes: Collecting a plurality of acceleration signals within the preset time period; Calculate the difference value of several collected acceleration signals; Determine the motion state within the preset time period according to the size of the difference value; If the motion state is a sit-up state, counting the number of sit-ups within the preset time period according to the detected gyroscope signal, including detecting the number of peaks in the gyroscope signal and calculating the sampling time interval between sampling points corresponding to two adjacent peaks; If the sampling time interval is less than a preset threshold, one of the two adjacent peaks is taken as a false peak; Calculating the total number of peaks excluding the false peaks, and using the total number of peaks as the number of sit-ups within the preset time period; Adjust the preset threshold according to the number, and use the adjusted preset threshold as the preset threshold for determining false peaks in the next detection cycle; If the motion state is a static state, the number of sit-ups performed in the preset time period is counted as zero; The number of sit-ups counted in all detection cycles is accumulated to obtain a final counting result; While the user is doing sit-ups, the detection period is dynamically adjusted according to changes in the frequency of the user doing sit-ups.

2. The method for counting sit-ups according to claim 1, characterized in that: The adjusting the preset threshold according to the number includes: If the number is less than the preset number, increasing the preset threshold; If the number is greater than the preset number, the preset threshold is reduced.

3. The method for counting sit-ups according to claim 1, characterized in that: Before counting the number of sit-ups within the preset time period according to the detected gyroscope signal, the method further includes: The gyroscope signal is filtered to delete sampling point data whose deviation from the fitting curve corresponding to the gyroscope signal is greater than a preset distance, wherein the gyroscope signal includes a plurality of sampling point data.

4. The method for counting sit-ups according to claim 1, characterized in that: The acceleration signal includes: a fitting signal of three-axis acceleration; The calculating of the difference values ​​of the collected acceleration signals includes: The maximum value and the minimum value in all fitting signals are determined, and the difference between the maximum value and the minimum value is calculated as the difference value.

5. A wearable device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the sit-up counting method according to any one of claims 1 to 4.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for counting sit-ups according to any one of claims 1 to 4 is implemented.