A skipping rope counting method, device and medium thereof
By screening effective waveform data and using preset conditions to determine the number of rope skipping, the problem of inaccurate rope skipping counting in the existing technology is solved and higher accuracy and cost-effectiveness are achieved.
Patent Information
- Application Number
- CN202111391770.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-11-19
AI Technical Summary
The existing rope skipping counting method counts the number of wave peaks whose amplitude is greater than the threshold in the waveform data collected by three-axis acceleration, resulting in inaccurate counting because not all wave peaks whose amplitude is greater than the threshold correspond to a rope skipping action.
By obtaining the waveform data collected by three-axis acceleration, valid waveform data is filtered out according to preset conditions, including the amplitude of peaks and troughs, the amplitudes of adjacent peaks and troughs, time intervals, etc., the number of rope skipping is determined, and invalid waveforms are filtered out. data to improve counting accuracy.
Through more precise filtering conditions, the accuracy of skipping rope counting is improved, errors caused by simple threshold judgments are avoided, cost and space are saved, and there is no need to add new data sources or sensors.
Smart Images

Figure CN114139669B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of portable devices, and in particular to a rope skipping counting method, device and medium thereof. Background Art
[0002] With the development of portable devices, devices such as sports bracelets can realize more and more functions. While recording the number of steps taken by the user and the calories consumed, they also support other sports modes, such as skipping, cycling or swimming. Regardless of the sports mode, the data is collected by sensors and then processed in a certain way to count the user's exercise volume.
[0003] At present, the skipping rope algorithm usually obtains the number of skipping ropes by counting the number of peaks with amplitudes greater than a threshold in the waveform data graph of the combined acceleration obtained by processing the acceleration of the three axes of x, y, and z. However, this counting method is not accurate because not all peaks with amplitudes greater than the threshold correspond to a skipping rope action.
[0004] Therefore, technicians in this field are in urgent need of a rope skipping counting method to solve the problem that the currently commonly used method of counting peaks greater than a threshold to obtain the number of rope skipping times is not accurate. Summary of the invention
[0005] The purpose of the present application is to provide a rope skipping counting method, device and medium thereof, so as to solve the problem that the currently commonly used method of counting peaks greater than a threshold value to obtain the number of rope skipping times is not accurate.
[0006] In order to solve the above technical problems, the present application provides a rope skipping counting method, comprising:
[0007] Acquire the three-axis acceleration collected by the three-axis accelerometer, and obtain waveform data corresponding to the combined acceleration based on the three-axis acceleration, wherein the waveform data includes a peak and a trough, and the trough is the trough before the peak; judge whether the obtained waveform data except the first and the last waveform data are invalid waveform data according to preset conditions, wherein the preset conditions are determined according to at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peak of the peak and the corresponding trough, and the time interval; determine the number of rope skipping according to the first waveform data and the last waveform data and the number of valid waveform data, wherein the valid waveform data is the waveform data excluding the invalid waveform data.
[0008] Preferably, the preset conditions are determined based on the amplitude of the peak and the amplitude of the trough corresponding to the peak; the preset conditions include: the amplitude of the peak in the waveform data is less than a first threshold or the difference between the amplitude of the peak and the trough corresponding to the peak is less than a second threshold; wherein, the waveform data that meets the preset conditions is invalid waveform data.
[0009] Preferably, the preset conditions also include: the amplitude of the trough in the waveform data is greater than the third threshold, the amplitude of the peak is greater than the fourth threshold, or the difference between the amplitudes of the peak and its corresponding trough is greater than the fifth threshold; wherein, the waveform data that meets the preset conditions is invalid waveform data.
[0010] Preferably, the preset condition is also determined according to the time interval; the preset condition also includes: randomly selecting a waveform of a preset time length containing a peak in the obtained waveform data, the range of the amplitude of the waveform is less than a sixth threshold value; wherein, the waveform data that meets the preset condition is invalid waveform data.
[0011] Preferably, the preset condition is determined based on the amplitude and time interval of the peaks; the preset condition includes: in the obtained waveform data, the time interval between the peaks in two waveform data is less than the seventh threshold; wherein, among the two peaks that meet the preset condition, the waveform data corresponding to the peak with a smaller amplitude is invalid waveform data.
[0012] Preferably, the preset condition is determined by the amplitude of the peak, the amplitude of the trough corresponding to the peak, and the amplitude of the adjacent peak of the peak and its corresponding trough; the preset condition includes: the difference in amplitude between the middle peak and the middle trough is less than the eighth threshold, and the difference in amplitude between the left peak and the middle peak and the difference in amplitude between the right peak and the middle peak are both greater than the ninth threshold; or the difference in amplitude between the middle peak and the middle trough is less than the eighth threshold, and the difference in amplitude between the middle trough and the left trough and the difference in amplitude between the right trough and the middle trough are both less than the tenth threshold, and the amplitude of the left trough is less than the eleventh threshold; wherein, every three consecutive waveform data form a group, and according to the order of the waveform data on the time axis, the corresponding peaks are the left peak, the middle peak and the right peak, and the corresponding troughs are the left trough, the middle trough and the right trough; wherein, the waveform data in the middle of a group of waveform data that meets the preset conditions is invalid waveform data.
[0013] Preferably, after acquiring the three-axis acceleration collected by the three-axis accelerometer and obtaining the waveform data corresponding to the combined acceleration according to the three-axis acceleration, the method further includes: performing weighted filtering on the waveform data.
[0014] Preferably, the rope skipping counting starts when a rope skipping counting instruction is received and the number of rope skipping times is not less than a preset number.
[0015] Preferably, the method further comprises: when the time interval between the peaks in two consecutive valid waveform data is greater than a twelfth threshold value, clearing the number of rope skipping times.
[0016] In order to solve the above technical problems, the present application also provides a rope skipping counting device, comprising: a memory for storing a computer program; a processor for implementing the steps of a rope skipping counting method as described above when executing the computer program.
[0017] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a rope skipping counting method as described above are implemented.
[0018] The present application provides a rope skipping counting method, which uses preset conditions to filter out invalid waveform data in waveform data, and the remaining waveform data is valid waveform data. The number of rope skipping is obtained through the first waveform data, the last waveform data, and the number of valid waveform data. Since the preset conditions are determined based on at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peak of the peak and the corresponding trough, and the time interval, the screening conditions are more numerous and more precise than simply judging by the relationship between the peak amplitude and the threshold, so the number of rope skipping obtained is also more accurate, further improving the accuracy of rope skipping counting.
[0019] The present application provides a rope skipping counting device and a computer-readable storage medium, which correspond to the above method and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. 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 any creative work.
[0021] Figure 1 A schematic diagram of a waveform diagram of a combined acceleration provided by the present invention;
[0022] Figure 2 A flowchart of a rope skipping counting method provided by the present invention;
[0023] Figure 3 The present invention provides a structural diagram of a rope skipping counting device. DETAILED DESCRIPTION
[0024] 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.
[0025] The core of this application is to provide a rope skipping counting method, device and medium thereof.
[0026] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0027] With the development of portable devices, devices such as sports bracelets continue to emerge. As for sports bracelets, they are mainly used by users to grasp their own exercise volume and health status information, such as walking steps, number of skipping ropes, running mileage, heart rate, blood pressure, etc. Data such as heart rate and blood pressure are relatively easy to measure. They can be directly measured on the human body through specific sensors. For example, sports bracelets can measure the heart rate by measuring the pulse, but the amount of exercise such as the number of skipping ropes cannot be directly measured using sensors. Currently, the only way to obtain the acceleration of the sports bracelet worn on the user's wrist on the x-axis, y-axis and z-axis is through a three-axis accelerometer. After processing, the combined acceleration is obtained, and then a waveform with time on the horizontal axis and amplitude on the vertical axis is obtained from the combined acceleration data, such as Figure 1 As shown. How to get the total acceleration is as follows:
[0028]
[0029] Wherein, norm is the amplitude of the combined acceleration, x is the amplitude of the x-axis acceleration, y is the amplitude of the y-axis acceleration, and z is the amplitude of the z-axis acceleration. At the same time, the present application does not limit the sampling frequency of the three-axis accelerometer, but provides an implementation mode in which the sampling frequency is 50 Hz.
[0030] At present, the number of peaks with amplitude greater than the threshold in the waveform data of the combined acceleration is usually used as a way to count the number of rope skipping. However, since not every peak with amplitude greater than the threshold corresponds to a rope skipping action, this counting method is too simple and the number of rope skipping obtained is not accurate. Figure 2 As shown, the present application provides a rope skipping counting method, comprising:
[0031] S101: Acquire the three-axis acceleration collected by the three-axis accelerometer, and obtain waveform data corresponding to the combined acceleration according to the three-axis acceleration.
[0032] The waveform data includes a peak and a trough, and the trough is the trough before the peak.
[0033] S102: judging whether the waveform data except the first and the last waveform data in the obtained waveform data are invalid waveform data according to a preset condition.
[0034] The preset condition is determined according to at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peak of the peak and the corresponding trough, and the time interval.
[0035] S103: Determine the number of rope skipping according to the first waveform data, the last waveform data and the number of valid waveform data.
[0036] The valid waveform data is the waveform data excluding the invalid waveform data.
[0037] Although the first waveform data and the last waveform data cannot be judged according to the amplitude of the adjacent peaks of the peaks and the corresponding troughs because their adjacent peaks are incomplete, the judgment of the first waveform data and the last waveform data in this application is not applicable to the preset conditions determined according to at least two of the amplitude of the peaks, the amplitude of the troughs corresponding to the peaks, the amplitude of the adjacent peaks of the peaks and the corresponding troughs, and the time interval. However, it should be noted that the first waveform data and the last waveform data can be judged according to other judgment conditions determined according to at least two of the amplitude of the peaks, the amplitude of the troughs corresponding to the peaks, and the time interval.
[0038] Regarding the actual judgment method of invalid waveform data: Since in the actual rope skipping counting, the combined acceleration data appears in the form of alternating troughs and peaks, the waveform data used as the judgment unit in this application stipulates that each combination of adjacent peaks and troughs is a group of waveform data, and the troughs should appear before the peaks in time sequence, that is, in the waveform diagram with the time axis as the horizontal axis, the troughs of a group of waveform data are on the left side of the peaks of the same group. However, it should be noted that the positional relationship between the peaks and troughs of the same group does not affect the actual judgment. This application stipulates that the troughs of a group of waveform data appear before the peaks, which is only an implementation plan for unified judgment. In actual implementation, the peak and the next trough can also be used as a group of waveform data for judgment. At this time, the following preset conditions for judgment can be adaptively changed. Since this change is easy to know for those in the field of technology based on the specific implementation methods of the preset conditions provided in the subsequent application, this application will not repeat it.
[0039] At the same time, rope skipping counting is a real-time process. Every time a set of waveform data is obtained, it is necessary to judge the current waveform data. If the waveform of the peak or trough of the waveform data meets the preset conditions, then this set of waveform data is invalid waveform data and is not counted in the number of rope skipping; if the waveform of the peak or trough of the waveform data does not meet the preset conditions, it is valid waveform data and is counted in the number of rope skipping; in addition, if there is more than one preset condition or more than one judgment step as described below, the waveform data that does not meet the previous condition can be subsequently judged until all conditions or all steps are not met to be valid waveform data and counted in the rope skipping count.
[0040] Specifically, for example, a rope skipping process includes three waveform data, which are respectively recorded as waveform data 1, waveform data 2 and waveform data 3; the preset condition includes two judgment steps, which are respectively recorded as step A and step B; waveform data 1 first enters step A for judgment, and the result that waveform data 1 meets the condition of step A is obtained, so waveform data 1 is invalid waveform data and is not counted in the number of rope skipping, and there is no need to perform subsequent step B judgment; waveform data 2 also first enters step A, and it is judged that waveform data 2 does not meet the condition of step A, then enters step B, and it is judged that waveform data 2 meets the condition of step B, then waveform data 2 is also invalid waveform data, and is not counted in the number of rope skipping; waveform data 3 enters step A, and it is judged that waveform data 2 does not meet the condition of step A, and then enters step B, and it is judged that waveform data 2 does not meet the condition of step B, then waveform data 2 is valid waveform data, and is counted in the number of rope skipping. As for more specific preset conditions, more waveform data, and more judgment steps, etc., it can be deduced by analogy with this example, and will not be repeated later.
[0041] It is worth noting that the thresholds mentioned in this application, including the first threshold and the second threshold mentioned below, should be a reliable value obtained through a certain number of experimental calculations, so that the validity of the waveform data can be determined through the logical relationship between the threshold and the waveform data. Since the determination process of the threshold is greatly affected by actual factors and can be determined according to actual conditions, this application does not impose any restrictions on this.
[0042] It should be noted that, since rope skipping counting is a real-time process, when a waveform data is input, there are usually two implementation plans, one is to judge first and then count, and the other is to count first and then judge. When the current waveform data is judged to be invalid waveform data, the current count is subtracted or the next valid count is not counted. This embodiment does not limit the specific counting method, but generally speaking, in order to ensure the real-time counting, the method of counting first and then judging is usually adopted. At the same time, in order to avoid frequent subtraction operations and waste of computing power, when the current waveform data is judged to be invalid waveform data, the next valid count is not counted.
[0043] This embodiment screens out invalid waveform data caused by non-rope skipping actions by judging the waveform data according to preset conditions. Since the preset conditions are determined based on at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peaks of the peak and the corresponding trough, and the time interval, compared with the current method of screening out invalid data by simply judging the relationship between the amplitude of the peak and the threshold, this method screens out invalid waveform data more accurately from multiple angles, thereby making the rope skipping counting result more accurate. At the same time, the data used as the judgment standard by the preset conditions of this application are all data in the waveform diagram obtained by existing processing and acceleration. There is no need to add new data sources or sensors, saving cost and space.
[0044] It can be seen from the above that the above embodiment only explains the method for determining the preset condition, but does not limit the specific implementation method of the preset condition. To further illustrate the present method, the present embodiment provides a preferred implementation method of a preset condition: the preset condition is determined according to the amplitude of the peak and the amplitude of the trough corresponding to the peak; the preset condition includes: the amplitude of the peak in the waveform data is less than the first threshold or the difference between the amplitude of the peak and the trough corresponding to the peak is less than the second threshold; wherein, the waveform data that meets the preset condition is invalid waveform data.
[0045] It should be noted that in the implementation scheme of a preset condition proposed in this embodiment, since the preset condition is not determined based on the amplitude of the adjacent peaks and the corresponding troughs of the peaks, but based on the amplitude of the peaks and the amplitude of the troughs corresponding to the peaks, it is also applicable to determining whether the first waveform data and the last waveform data are invalid waveform data.
[0046] The preset conditions of this embodiment judge the waveform data from two angles: the amplitude of the peak and the amplitude of the trough corresponding to the peak. Waveform data whose peak amplitude is less than a first threshold, or whose difference between the amplitude of the peak and the corresponding trough is less than a second threshold, are screened out as invalid waveform data, thereby further improving the accuracy of rope skipping counting.
[0047] To further illustrate the method, based on the above embodiment, this embodiment also provides another specific implementation scheme of the preset conditions, and the preset conditions also include: the amplitude of the trough in the waveform data is greater than the third threshold, or the amplitude of the peak is greater than the fourth threshold, or the difference between the amplitude of the peak and the corresponding trough is greater than the fifth threshold; wherein, the waveform data that meets the preset conditions is invalid waveform data.
[0048] That is, the above preset conditions include three sub-conditions, namely: the amplitude of the trough is greater than the third threshold; the amplitude of the peak is greater than the fourth threshold; the difference between the amplitude of the peak and its corresponding trough is greater than the fifth threshold; the above three sub-conditions are in an or relationship, and the waveform data that meets any one of the above three sub-conditions is invalid waveform data.
[0049] It should be noted that in the implementation scheme of a preset condition proposed in this embodiment, since the preset condition is not determined based on the amplitude of the adjacent peaks and the corresponding troughs of the peaks, but based on the amplitude of the peaks and the amplitude of the troughs corresponding to the peaks, it is also applicable to determining whether the first waveform data and the last waveform data are invalid waveform data.
[0050] In addition, it should be noted that the preset condition proposed in this embodiment satisfies the preset condition based on at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peaks of the peak and their corresponding troughs, and the time interval. Therefore, it can be implemented separately from the preset conditions proposed in the above embodiments. This embodiment is only a preferred solution.
[0051] The preset conditions of this embodiment judge the waveform data from two angles: the amplitude of the peak and the amplitude of the trough corresponding to the peak. Waveform data whose trough amplitude is greater than the third threshold, whose peak amplitude is greater than the fourth threshold, or whose difference between the amplitude of the peak and its corresponding trough is greater than the fifth threshold are screened out as invalid waveform data, thereby further improving the accuracy of rope skipping counting.
[0052] To further illustrate the method, this embodiment also provides another specific implementation scheme of the preset condition. On the basis of the above embodiment, the preset condition is also determined according to the time interval, and also includes: randomly selecting a waveform of a preset time length containing a peak in the obtained waveform data, and the range of the amplitude of the waveform is less than a sixth threshold value; wherein, the waveform data that meets the preset condition is invalid waveform data.
[0053] It is worth noting that the specific value of the preset time length is not limited in this embodiment, and a suitable value should be selected according to the actual situation. However, a possible implementation scheme is provided: the preset time length is 0.5s.
[0054] In addition, it should be noted that since the preset condition provided in this embodiment is determined according to the time interval, it is necessary to implement this solution on the basis of any one of the implementation schemes of the preset conditions given in the above embodiments, but it is not limited to only on the basis of one preset condition provided in the above embodiments. A preferred solution is: this embodiment is implemented together with the specific implementation schemes of the two preset conditions provided in the above embodiments.
[0055] The preset conditions of this embodiment judge the waveform data from three angles: the amplitude of the peak, the amplitude of the trough corresponding to the peak, and the time interval. In addition to the judgment conditions of the above embodiment, a waveform with a preset time length containing the peak is arbitrarily selected from the obtained waveform data, and the waveform data that satisfies the range of the waveform amplitude less than the sixth threshold is screened out as invalid waveform data, thereby further improving the accuracy of rope skipping counting.
[0056] To further illustrate the method, this embodiment also provides another specific implementation scheme of the preset condition, where the preset condition is determined based on the amplitude and time interval of the wave peak;
[0057] The preset conditions include: in the obtained waveform data, the time interval between the peaks in two waveform data is less than the seventh threshold; wherein, among the two peaks that meet the preset conditions, the waveform data corresponding to the peak with a smaller amplitude is invalid waveform data.
[0058] As can be seen from the above, the rope skipping counting process is a real-time process. At the same time, in order to ensure the real-time nature of the counting, the method of counting first and then judging is usually adopted. If the current waveform data is judged as invalid waveform data, the next valid count will not be counted. Therefore, in this embodiment, if the time interval between the peaks of two waveform data is less than the seventh threshold, even if the waveform data corresponding to the peak with a small amplitude is in front, the latter waveform data should not be counted. That is, in actual applications, if the time interval between the peaks of two waveform data is less than the seventh threshold, although the waveform data judged as invalid waveform data is still the waveform data with a small peak amplitude, the latter waveform data is always not counted in the number of rope skipping. At the same time, it is easy to understand that the above is only an implementation scheme of this embodiment when the method of counting first and then judging is adopted, and it is not limited to only this one. If the method of judging first and then counting is adopted, there should be changes in applicability, for example: after invalid waveform data is judged, the waveform data is not counted in the number of rope skipping.
[0059] The preset conditions of this embodiment judge the waveform data from two angles: the amplitude of the peak and the time interval. In the obtained waveform data, it is judged whether the time interval between the peaks of two waveform data is less than the seventh threshold. If so, the waveform data corresponding to the peak with the smaller amplitude in the two waveform data that meet the preset conditions is invalid waveform data, which further improves the accuracy of rope skipping counting.
[0060] To further illustrate the method, this embodiment also provides another specific implementation scheme of the preset condition, where the preset condition is determined according to the amplitude of the peak, the amplitude of the trough corresponding to the peak, and the amplitude of the adjacent peak of the peak and the corresponding trough;
[0061] The preset conditions include: the difference in amplitude between the medium peak and the medium trough is less than the eighth threshold, and the difference in amplitude between the left peak and the medium peak and the difference in amplitude between the right peak and the medium peak are both greater than the ninth threshold; or the difference in amplitude between the medium peak and the medium trough is less than the eighth threshold, and the difference in amplitude between the medium trough and the left trough and the difference in amplitude between the right trough and the medium trough are both less than the tenth threshold, and the amplitude of the left trough is less than the eleventh threshold; wherein, every three consecutive waveform data form a group, and according to the order of the waveform data on the time axis, the corresponding peaks are the left peak, the medium peak and the right peak, and the corresponding troughs are the left trough, the medium trough and the right trough; wherein, the waveform data in the middle of a group of waveform data that meets the preset conditions is invalid waveform data.
[0062] It should be noted that dividing the obtained waveform data into every three consecutive ones means that every three waveform data consecutive in time sequence are recorded as a group. The same waveform data can be divided into different groups with different tasks. For example: a total of 5 waveform data are obtained, recorded as No. 1 to 5, then No. 1, No. 2, No. 3 are the first group, No. 2, No. 3, No. 4 are the second group, and No. 3, No. 4, No. 5 are the third group. Then the peak and trough of the waveform data No. 3 in the first group are the right peak and right trough; in the second group, they are the middle peak and middle trough; in the third group, they are the left peak and left trough.
[0063] The preset conditions of this embodiment judge the waveform data from three angles: the amplitude of the peak, the amplitude of the trough corresponding to the peak, and the amplitude of the adjacent peak of the peak and its corresponding trough. Every three consecutive waveform data obtained are divided into a group, and it is judged whether the middle waveform data meets the preset conditions, so as to judge the middle peak, filter out invalid waveform data, and further improve the accuracy of rope skipping counting.
[0064] It can be seen from the above embodiments that whether the waveform data is invalid waveform data or valid waveform data is determined by judging and processing the waveform diagram of the combined acceleration, so the waveform diagram of the combined acceleration plays a vital role in the accuracy of rope skipping counting. Therefore, based on the above embodiments, this embodiment also provides a preferred implementation scheme, which includes: after obtaining the three-axis acceleration collected by the three-axis accelerometer and obtaining the waveform data corresponding to the combined acceleration according to the three-axis acceleration, it also includes:
[0065] S104: Perform weighted filtering on the waveform data.
[0066] The weighted filtering algorithm is as follows:
[0067]
[0068] Where n is the number of sampling times, Mag(n) is the amplitude of the combined acceleration after filtering, and norm(n) is the amplitude of the combined acceleration of the nth sampling before filtering.
[0069] The advantage of this embodiment over the above-mentioned embodiments is that after weighted filtering of the obtained waveform data, the peaks and troughs in the waveform data can be made more obvious, and because the preset conditions at least include the judgment of the amplitude of the peaks or troughs, it is more accurate to judge whether the waveform data is valid according to the preset conditions, thereby further improving the accuracy of rope skipping counting.
[0070] As can be seen from the above, the above embodiment provides a specific implementation scheme for processing and judging the waveform data. Therefore, in order to further improve the accuracy of rope skipping counting, this embodiment provides a preferred implementation scheme from another perspective. The start time of rope skipping counting is:
[0071] S105: When the rope skipping counting start instruction is received and the number of rope skipping is not less than the preset number, counting is performed.
[0072] Furthermore, based on the above embodiment, a preferred solution is provided, wherein the method further comprises:
[0073] S106: When the time interval between the peaks of two consecutive valid waveform data is greater than the twelfth threshold, the number of rope skipping times is reset to zero.
[0074] Since the above-mentioned embodiments mostly judge invalid waveform data from the perspective of amplitude and time, that is, the waveform of the combined acceleration generated by a rope skipping action is judged, there may be other actions whose corresponding waveforms are highly similar to the rope skipping action, which may lead to misjudgment. However, it is easy to understand that the probability of such actions occurring is low, and the probability of their continuous occurrence in a short period of time is even lower. Therefore, when 4 or more corresponding waveforms of other actions that are highly similar to the rope skipping action appear continuously in a short period of time, they can be ignored from a probability perspective.
[0075] It should be noted that this embodiment does not limit the specific value of the preset number, and a suitable value can be freely selected according to actual needs. However, generally speaking, a preset number of 4 is sufficient to achieve the technical effect brought by this embodiment, so for ease of understanding, the preset number is 4 in the subsequent description.
[0076] In addition, although the skipping count is not less than 4, because there is a count corresponding to the actual skipping action, when counting is performed, the previous count needs to be added, that is, the counting starts from 4 after the counting.
[0077] It is worth noting that this embodiment does not limit the specific value of the twelfth threshold value, but it can be seen from the above that the value of the twelfth threshold value should have a range. Experiments or tests should be conducted according to actual conditions to determine a time range that can be considered as unlikely for two other actions that are likely to cause misjudgment to occur continuously, and its limit value is recorded as the first limit value. At the same time, experiments or tests should be conducted according to actual conditions to determine the possible range of the time interval between two rope skipping actions, and its limit value is recorded as the second limit value. The twelfth threshold value should be between the first limit value and the second limit value.
[0078] The implementation scheme provided in this embodiment also has the following implementation mode in practical application: the rope skipping counting function of the sports bracelet is divided into a buffer mode and a statistical mode, wherein, after receiving the rope skipping counting instruction from the user, the buffer mode is first entered, at which time the rope skipping times are counted, but not displayed. When the rope skipping times are not less than 4, the statistical mode is entered, at which the rope skipping times are displayed in real time, so that the user can know the specific information. When the time interval between two valid counts exceeds the twelfth threshold, the rope skipping times are reset to zero regardless of whether it is in the buffer mode or the statistical mode. If it is in the statistical mode, the statistical mode is exited. If it is in the buffer mode, the rope skipping times are reset to zero and then counted again. When it is greater than or equal to 4, the statistical mode is entered again.
[0079] The advantage of this embodiment over the above-mentioned embodiments is that: since 4 or more corresponding waveforms of other actions highly similar to the rope skipping action appear continuously in a short period of time, they can be ignored from a probability perspective, and rope skipping is a relatively stable continuous process, and the time interval between two rope skipping actions is within a smaller range. When the time interval between two valid actions is greater than the twelfth threshold, it can be considered that rope skipping has stopped. Therefore, this embodiment only counts when a rope skipping counting instruction sent by the user is received and the rope skipping count is not less than 4. At the same time, when the time interval between two valid counts is greater than the twelfth threshold, the rope skipping count is cleared, thereby ensuring to the greatest extent that during normal counting, the recorded number of rope skipping actions are all caused by real rope skipping actions, further enhancing the accuracy of rope skipping counting.
[0080] To further illustrate a rope skipping counting method provided by the present application, this embodiment provides a preferred implementation scheme in actual situations based on the implementation scheme provided by the above embodiments:
[0081] S201: Acquire the three-axis acceleration collected by the three-axis accelerometer to obtain a combined acceleration.
[0082] S202: Perform weighted filtering on the combined acceleration data to obtain waveform data of the combined acceleration.
[0083] S203: Determine whether the obtained waveform data satisfies the condition that the amplitude of the peak is less than the first threshold or the difference between the amplitude of the peak and its corresponding trough is less than the second threshold. If so, the waveform data is invalid waveform data. If not, the waveform data proceeds to the next step of determination.
[0084] S204: Determine whether the waveform data satisfies the condition that the amplitude of the trough is greater than the third threshold, the amplitude of the peak is greater than the fourth threshold, or the difference between the amplitude of the peak and its corresponding trough is greater than the fifth threshold. If so, the waveform data is invalid waveform data. If not, the waveform data proceeds to the next step of determination.
[0085] S205: Determine whether the waveform data contains a waveform of a preset time length containing a peak, and the range of the amplitude of the waveform is less than the sixth threshold. If so, the waveform data corresponding to the peak contained in the waveform is invalid waveform data, and the remaining waveform data proceed to the next step of determination.
[0086] S206: Determine whether there are any waveform data in which the time interval between the peaks of two waveform data is less than the seventh threshold value. If so, the waveform data corresponding to the two peaks with smaller amplitudes are invalid waveform data, and the remaining waveform data proceed to the next step of determination.
[0087] S207: Record every three consecutive waveform data as a group. According to the order of the waveform data on the time axis, the corresponding peaks are the left peak, the middle peak and the right peak, and the corresponding troughs are the left trough, the middle trough and the right trough; determine whether the difference between the amplitude of the middle peak and the middle trough is less than the eighth threshold, and the difference between the amplitude of the left peak and the middle peak and the difference between the amplitude of the right peak and the middle peak are both greater than the ninth threshold; or the difference between the amplitude of the middle peak and the middle trough is less than the eighth threshold, and the difference between the amplitude of the middle trough and the left trough and the difference between the amplitude of the right trough and the middle trough are both less than the tenth threshold, and the amplitude of the left trough is less than the eleventh threshold; if satisfied, the waveform data in the middle is invalid waveform data.
[0088] S208: Counting the number of valid waveform data as the number of rope skipping times, wherein the valid waveform data is the remaining waveform data after removing the invalid waveform data determined above from all the waveform data.
[0089] S209: After receiving the rope skipping counting start instruction, if the number of rope skipping is not less than 4, counting is performed.
[0090] S210: If the time interval between the peaks corresponding to two consecutive valid waveform data is greater than the twelfth threshold, the number of rope skipping times is reset to zero.
[0091] This embodiment provides an application solution in an actual environment. Based on the above embodiments, the order of judging invalid waveform data is sorted from the perspective of saving computing power, with simple judgments placed in front and complex judgments placed in the back. This can further save computing power while maximizing the accuracy of rope skipping counting.
[0092] In the above embodiment, a skipping rope counting method is described in detail, and the present application also provides a corresponding embodiment of a skipping rope counting device. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
[0093] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0094] Figure 3 A structural diagram of a rope skipping counting device provided in another embodiment of the present application is shown in FIG. Figure 3 As shown, a skipping rope counting device comprises: a memory 30 for storing a computer program;
[0095] The processor 31 is used to implement the steps of a rope skipping counting method in the above embodiment when executing a computer program.
[0096] The skipping rope counting device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0097] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 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 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0098] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program 301, wherein, after the computer program is loaded and executed by the processor 31, it can implement the relevant steps of a rope skipping counting method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 302 may include Windows, Unix, Linux, etc. Data 303 may include, but is not limited to, a rope skipping counting method, etc.
[0099] In some embodiments, a skipping rope counting device may further include a display screen 32 , an input / output interface 33 , a communication interface 34 , a power supply 35 , and a communication bus 36 .
[0100] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation of a rope skipping counting device, and may include more or less components than those shown in the figure.
[0101] A rope skipping counting device provided in an embodiment of the present application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a rope skipping counting method.
[0102] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0103] It is understandable that if the method in the above embodiment 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-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium 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), random access memory (RAM), disk or optical disk and other media that can store program code.
[0104] The above is a detailed introduction to a rope skipping counting method, device and medium provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0105] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for counting rope skipping, It is characterized in that include: Acquire the three-axis acceleration collected by the three-axis accelerometer, and obtain waveform data corresponding to the combined acceleration according to the three-axis acceleration, wherein the waveform data includes a peak and a trough, and the trough is the trough before the peak; Determine whether the waveform data except the first and the last waveform data obtained are invalid waveform data according to a preset condition, wherein the preset condition is determined according to at least two of the amplitude of the peak, the amplitude of the trough corresponding to the peak, the amplitude of the adjacent peak of the peak and the corresponding trough, and a time interval; Determine the number of rope skipping according to the first waveform data, the last waveform data and the number of valid waveform data, wherein the valid waveform data is the waveform data excluding the invalid waveform data; Wherein, the preset condition is determined according to the amplitude of the wave peak, the amplitude of the wave trough corresponding to the wave peak, and the amplitude of the wave peak adjacent to the wave peak and the wave trough corresponding to the wave peak; The preset conditions include: the difference between the amplitude of the medium wave peak and the medium wave trough is less than the eighth threshold, and the difference between the amplitude of the left wave peak and the medium wave peak and the difference between the amplitude of the right wave peak and the medium wave peak are both greater than the ninth threshold; or the difference between the amplitude of the medium wave peak and the medium wave trough is less than the eighth threshold, and the difference between the amplitude of the medium wave trough and the left wave trough and the difference between the amplitude of the right wave trough and the medium wave trough are both less than the tenth threshold, and the amplitude of the left wave trough is less than the eleventh threshold; Wherein, every three consecutive waveform data form a group, and according to the order of the waveform data on the time axis, the corresponding peaks are the left peak, the middle peak and the right peak, and the corresponding troughs are the left trough, the middle trough and the right trough; The waveform data in the middle of a group of the waveform data that meets the preset condition is the invalid waveform data.
2. A rope skipping counting method according to claim 1, It is characterized in that After acquiring the three-axis acceleration collected by the three-axis accelerometer and obtaining waveform data corresponding to the combined acceleration according to the three-axis acceleration, the method further includes: A weighted filtering process is performed on the waveform data.
3. A rope skipping counting method according to claim 2, It is characterized in that The start time of skipping rope counting is: When the rope skipping counting instruction is received and the rope skipping times are not less than the preset number, counting is performed.
4. A rope skipping counting method according to claim 3, It is characterized in that Also includes: When the time interval between the wave peaks in two consecutive valid waveform data is greater than a twelfth threshold, the number of rope skipping times is reset to zero.
5. A skipping rope counting device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of a rope skipping counting method as described in any one of claims 1 to 4 when executing the computer program.
6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a rope skipping counting method as described in any one of claims 1 to 4 are implemented.
