A method for calculating the number of rope skipping times and a wearable device
Acceleration data is acquired through a six-axis sensor, and preset characteristics and thresholds are used to determine whether the user is skipping rope. This solves the problem of inaccurate counting caused by non-skipping ropes in the existing technology and achieves accurate detection of the number of rope skipping times.
Patent Information
- Application Number
- CN202110387084.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-09
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-04-09
AI Technical Summary
In the existing skipping rope counting method, the rotation of the rope not caused by the skipping rope will lead to inaccurate counting.
A six-axis sensor is used to obtain the user's acceleration data, and the preset characteristics and thresholds are used to determine whether the user is skipping rope and calculate the number of rope skipping.
Accurately detects the number of user's rope skipping, avoids misjudgment of non-skipping movements, and improves counting accuracy.
Smart Images

Figure CN115193010B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of wearable devices, and in particular to a method for calculating the number of rope skipping times and a wearable device. Background Art
[0002] Rope skipping is a simple and easy-to-learn aerobic exercise that can effectively improve children's cardiopulmonary function. At present, rope skipping counting generally adopts a mechanical counting method. When the rope with counting function rotates one circle, the rope skipping count increases by one. However, if there is a rope rotation that is not caused by rope skipping, the count will be inaccurate. Summary of the invention
[0003] The embodiment of the present invention provides a method for calculating the number of rope skipping and a wearable device, which are used to solve the problem in the prior art that if there is rope rotation that is not caused by rope skipping, the counting will be inaccurate. In order to solve the above technical problems, the embodiment of the present invention is implemented as follows:
[0004] In a first aspect, a method for calculating the number of rope skipping times is provided, the method comprising: obtaining M first accelerations of a user within a first time period through a six-axis sensor;
[0005] If the M first accelerations meet the preset rope skipping characteristics, obtaining N second accelerations of the M first accelerations that are greater than a preset acceleration threshold;
[0006] If there is a target acceleration greater than an adjacent acceleration among the N second accelerations, the number of the target accelerations is determined as the number of rope skipping by the user within the first time period;
[0007] The adjacent accelerations are the previous acceleration and the next acceleration of the target acceleration.
[0008] As an optional implementation, in the first aspect of the embodiment of the present invention, if the M first accelerations meet the preset rope skipping characteristics, before obtaining N second accelerations of the M first accelerations that are greater than a preset acceleration threshold, it also includes:
[0009] Determining an acceleration curve according to the M first accelerations;
[0010] Obtaining P acceleration peak values located at the crest and Q acceleration valley values located at the valley in the acceleration curve, where P and Q are both integers less than M;
[0011] If the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, it is determined that the M first accelerations satisfy the preset rope skipping characteristics.
[0012] As an optional implementation, in a first aspect of the embodiment of the present invention, if the P acceleration peak values are all within a first preset interval, and the Q acceleration valley values are all within a second preset interval, determining that the M first accelerations satisfy the preset rope skipping characteristics includes:
[0013] If the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, determining a difference between each acceleration peak value and an adjacent acceleration valley value;
[0014] If the difference is within a preset difference interval, it is determined that the M first accelerations satisfy the preset rope skipping characteristics.
[0015] As an optional implementation, in the first aspect of the embodiment of the present invention, after obtaining P acceleration peak values located at the crest and Q acceleration valley values located at the valley in the acceleration curve, the method further includes:
[0016] Obtaining a first average value of the P acceleration peak values and a second average value of the Q acceleration valley values;
[0017] If the first average value is within the first preset interval and the second average value is within the second preset interval, it is determined that the M first accelerations meet the preset rope skipping characteristics.
[0018] As an optional implementation manner, in a first aspect of the embodiment of the present invention, acquiring M first accelerations of the user within a first time period by using a six-axis sensor includes:
[0019] Continuously acquiring K target accelerations and K target gyroscope data at K moments through the six-axis sensor;
[0020] Calculating the target arm posture angles at the K moments according to the K target accelerations and the K target gyroscope data;
[0021] If the target arm posture angles at the K moments are all within the preset rope skipping posture interval, and the K target accelerations are all within the third preset interval, then obtaining the M first accelerations of the user within the first time period through the six-axis sensor;
[0022] The preset rope skipping posture interval is a pre-stored arm posture angle interval corresponding to the rope skipping movement.
[0023] As an optional implementation manner, in a first aspect of the embodiment of the present invention, acquiring M first accelerations of the user within a first time period by using a six-axis sensor includes:
[0024] Acquire, by means of the six-axis sensor, K third accelerations of the user within the first duration, where K is an integer greater than or equal to M;
[0025] The third acceleration whose difference with the adjacent acceleration is greater than or equal to the preset difference threshold is deleted to obtain the processed M first accelerations.
[0026] As an optional implementation, in the first aspect of the embodiment of the present invention, after determining the number of the target accelerations as the number of rope skipping by the user within the first time period, the method further includes:
[0027] Calculating the movement amplitude of the user according to the M first accelerations and the target formula;
[0028] If the user's movement amplitude is greater than a preset amplitude threshold, a first prompt message is output, where the first prompt message is used to prompt the user to take a rest;
[0029] Wherein, the target formula is: S is the movement amplitude, A i is the i-th first acceleration among the M first accelerations, is the average value of the M first accelerations.
[0030] In a second aspect, a wearable device is provided, the wearable device comprising: an acquisition module, configured to acquire M first accelerations of a user within a first time period through a six-axis sensor;
[0031] The acquisition module is further configured to acquire N second accelerations greater than a preset acceleration threshold value among the M first accelerations if the M first accelerations meet the preset rope skipping characteristics;
[0032] a processing module, configured to determine the number of the target accelerations as the number of rope skipping performed by the user within the first time period if there is a target acceleration greater than an adjacent acceleration among the N second accelerations;
[0033] The adjacent accelerations are the previous acceleration and the next acceleration of the target acceleration.
[0034] In a third aspect, a wearable device is provided, comprising:
[0035] A memory storing executable program code;
[0036] a processor coupled to the memory;
[0037] The processor calls the executable program code stored in the memory to execute the method for calculating the number of rope skipping in the first aspect of the embodiment of the present invention.
[0038] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, wherein the computer program enables a computer to execute the method for calculating the number of rope skipping in the first aspect of the embodiment of the present invention. The computer-readable storage medium includes a ROM / RAM, a magnetic disk or an optical disk, etc.
[0039] According to a fifth aspect, a computer program product is provided. When the computer program product is run on a computer, the computer is caused to execute part or all of the steps of any one of the methods according to the first aspect.
[0040] According to a sixth aspect, an application publishing platform is provided, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps of any one method of the first aspect.
[0041] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0042] In an embodiment of the present invention, the wearable device can obtain M first accelerations of the user within the first time period through a six-axis sensor; if the M first accelerations meet the preset rope skipping characteristics, it can be said that the wearable device detects that the user is performing effective rope skipping exercise, and then the wearable device can determine the number of target accelerations in the M first accelerations that are greater than the preset acceleration threshold and greater than the adjacent accelerations as the number of rope skipping times of the user within the first time period. Because rope skipping is a cyclical sport, the user can repeat the rope skipping exercise many times within the first time period, and the wearable device can detect the periodicity of the M accelerations and filter out the target accelerations that meet the conditions in each cycle, thereby accurately determining the number of cycles in the first time period according to the number of target accelerations that meet the conditions, that is, the number of rope skipping times of the user within the first time period. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 The present invention provides a method for calculating the number of rope skipping times. Figure 1 ;
[0045] Figure 2 It is a data processing schematic diagram of a method for calculating the number of rope skipping provided by an embodiment of the present invention;
[0046] Figure 3The present invention provides a method for calculating the number of rope skipping times. Figure 2 ;
[0047] Figure 4 A structural diagram of a wearable device provided by an embodiment of the present invention is shown in FIG. Figure 1 ;
[0048] Figure 5 A structural diagram of a wearable device provided by an embodiment of the present invention is shown in FIG. Figure 2 ;
[0049] Figure 6 It is a schematic diagram of the hardware structure of a wearable device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments 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.
[0051] The terms "first" and "second" in the specification and claims of the present invention are used to distinguish different objects rather than to describe a specific order of objects. For example, the first acceleration and the second acceleration are used to distinguish different accelerations rather than to describe a specific order of accelerations.
[0052] The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatus.
[0053] It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0054] In the related art, rope skipping is a simple and easy-to-learn aerobic exercise that can effectively improve children's cardiopulmonary function. At present, rope skipping counting generally adopts a mechanical counting method. When the rope with counting function rotates one circle, the rope skipping count increases by one. However, if there is a rope rotation that is not caused by rope skipping, the count will be inaccurate.
[0055] In order to solve the above problems, an embodiment of the present invention provides a method for calculating the number of rope skipping and a wearable device. The wearable device can obtain M first accelerations of the user within a first time period through a six-axis sensor; if the M first accelerations meet the preset rope skipping characteristics, it can be said that the wearable device detects that the user is performing effective rope skipping exercise, and then the wearable device can determine the number of target accelerations in the M first accelerations that are greater than the preset acceleration threshold and greater than the adjacent accelerations as the number of rope skipping of the user within the first time period. Because rope skipping is a periodic sport, the user can repeat the rope skipping exercise many times within the first time period. The wearable device can detect the periodic law of the M accelerations and filter out the target accelerations that meet the conditions in each cycle, so as to accurately determine the number of cycles in the first time period according to the number of target accelerations that meet the conditions, that is, the number of rope skipping of the user within the first time period.
[0056] The wearable device involved in the embodiment of the present invention may be a smart watch, a smart bracelet, a watch phone, etc., which is not limited in the embodiment of the present invention. The user can wear the wearable device to perform rope skipping exercise, so that the wearable device can detect the number of rope skipping of the user according to the rope skipping number calculation method provided in the embodiment of the present invention.
[0057] The execution subject of the method for calculating the number of rope skipping provided by the embodiment of the present invention can be the above-mentioned wearable device, or it can be a functional module and / or functional entity in the wearable device that can implement the method for calculating the number of rope skipping, which can be determined according to actual use requirements and is not limited by the embodiment of the present invention. The following takes a wearable device as an example to exemplify the method for calculating the number of rope skipping provided by the embodiment of the present invention.
[0058] Embodiment 1
[0059] like Figure 1 As shown, an embodiment of the present invention provides a method for calculating the number of rope skipping times, which may include the following steps:
[0060] 101. Obtain M first accelerations of the user within a first duration.
[0061] In an embodiment of the present invention, the wearable device can obtain M first accelerations of the user within a first time period through a six-axis sensor.
[0062] The M first accelerations correspond to M moments in the first time period.
[0063] Optionally, the six-axis sensor includes a three-axis acceleration sensor and a three-axis gyroscope sensor.
[0064] It should be noted that in a three-dimensional rectangular coordinate system, the three-axis accelerometer detects the acceleration of the X-axis, Y-axis and Z-axis respectively to obtain three acceleration components; the three-axis gyroscope sensor senses the dynamic angle changes of the wearable device rotating around the X-axis, Y-axis and Z-axis respectively to obtain three gyroscope data components.
[0065] Optionally, in an embodiment of the present invention, the M first accelerations acquired by the wearable device through the six-axis sensor may be M first accelerations including three acceleration components, or may be M first accelerations obtained by calculating modulus values according to the three acceleration components.
[0066] The modulus of acceleration can be calculated by the modulus formula, which is: Among them, A x , A y and A z There are three acceleration components respectively.
[0067] For example, assume that the wearable device obtains 5 accelerations through the acceleration sensor. The 5 accelerations can be expressed as acceleration A: (5m / s 2 , 3m / s 2 , 8m / s 2 ), acceleration B: (6m / s 2 , 2m / s 2 , 4m / s 2 ), acceleration C: (3m / s 2 , 3m / s 2 , 3m / s 2 ), acceleration D: (6m / s 2 , 1m / s 2 , 2m / s 2 ), acceleration E: (6m / s 2 , 6m / s 2 , 3m / s 2 ); The five first accelerations can also be expressed as acceleration A: Acceleration B: Acceleration C: Acceleration D: Acceleration E:
[0068] Optionally, obtaining M first accelerations of the user within the first time length may specifically include: obtaining K third accelerations of the user within the first time length through a six-axis sensor, where K is an integer greater than or equal to M; deleting the third acceleration whose difference with the adjacent acceleration is greater than or equal to a preset difference threshold, to obtain the processed M first accelerations.
[0069] In an embodiment of the present invention, the wearable device can first obtain K third accelerations through a three-axis acceleration sensor in a six-axis sensor, and then filter the K third accelerations to filter out accelerations with large errors to obtain M processed first accelerations.
[0070] It should be noted that when the wearable device filters K third accelerations, it can obtain the difference between each third acceleration and the adjacent acceleration; if there is a difference between a third acceleration and the adjacent acceleration that is greater than or equal to the preset difference threshold, it means that an error occurred when the wearable device measured the third acceleration, causing the third acceleration to deviate from the normal value, then the wearable device can delete the third acceleration.
[0071] The adjacent acceleration may be a previous acceleration and / or a subsequent acceleration of the third acceleration.
[0072] For example, assuming that the preset difference threshold is 1m / s 2 , the wearable device obtains 6 third accelerations, which are acceleration A: 5.1m / s 2 , acceleration B: 5.2m / s 2 , acceleration C: 5.5m / s 2 , acceleration D: 9.2m / s 2 , acceleration E: 5.8m / s 2 , acceleration F: 6.0m / s 2 Then the wearable device can calculate the difference between each third acceleration and the adjacent acceleration, and the acceleration D can be obtained after calculation; 9.2m / s 2 Adjacent acceleration C: 5.5m / s 2 And acceleration E: 5.8m / s 2 The difference is 3.7m / s 2 and 3.4m / s 2 , are greater than the preset difference threshold 1m / s 2 , then the wearable device can measure the acceleration D: 9.2m / s 2 Delete and get the remaining five accelerations, that is, the M first accelerations are 5.1 m / s 2 , 5.2m / s 2 , 5.5m / s 2 , 5.8m / s 2 and 6.0m / s 2 .
[0073] 102. Obtain N second accelerations that are greater than a preset acceleration threshold value among the M first accelerations.
[0074] In an embodiment of the present invention, if the M first accelerations meet the preset rope skipping characteristics, the wearable device can obtain N second accelerations, where the N second accelerations are accelerations among the M first accelerations that are greater than a preset acceleration threshold.
[0075] The preset acceleration threshold is set by the wearable device based on accelerations collected multiple times.
[0076] For example, assume that the preset acceleration threshold is 9 m / s 2 , the wearable device obtains 10 first accelerations, which are acceleration A: 4.2m / s 2 , acceleration B: 5.0m / s 2 , acceleration C: 5.3m / s 2 , acceleration D: 6.5m / s 2 , acceleration E: 8.3m / s 2 , acceleration F: 9.1m / s 2 , acceleration G: 10.2m / s 2 , acceleration H: 9.6m / s 2 , acceleration I: 8.4m / s 2 , acceleration J: 7.6m / s 2 Then the wearable device can select the first acceleration of the 10 accelerations greater than 9m / s 2 The first acceleration is determined as the second acceleration, that is, the second acceleration includes: acceleration F: 9.1m / s 2 , acceleration G: 10.2m / s 2 And acceleration H: 9.6m / s 2 .
[0077] Optionally, the M first accelerations satisfy the preset rope skipping characteristics, which may specifically include the following six optional implementation methods:
[0078] Implementation method 1: determine an acceleration curve based on M first accelerations; obtain P acceleration peak values located at the crest of the acceleration curve; if the P acceleration peak values are all in a first preset interval, determine that the M first accelerations meet the preset rope skipping characteristics.
[0079] In this optional implementation, the wearable device can represent M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, where the horizontal coordinate of the rectangular coordinate system is the time and the vertical coordinate is the value of the first acceleration; the wearable device can obtain P acceleration peak values located at the crest of the wave from the acceleration curve, where P is an integer greater than or equal to 1; if the P acceleration peak values are all in the first preset interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0080] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0081] It should be noted that, in the acceleration curve, the peak is the maximum value of the amplitude within a period of acceleration change.
[0082] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2 It can be seen that point A is the peak of the acceleration curve, so the value represented by point A is the peak value of acceleration during the period of 0-45ms. Assume that the first preset interval is 9m / s 2 -11m / s 2 ,from Figure 2 It can be seen that the value represented by point A is 10.5m / s 2 , at 9m / s 2 -11m / s 2 , it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0083] Implementation method 2: determining an acceleration curve based on M first accelerations; obtaining Q acceleration valley values located at the trough of the acceleration curve; if the Q acceleration valley values are all in a second preset interval, determining that the M first accelerations meet the preset rope skipping characteristics.
[0084] In this optional implementation, the wearable device can represent the M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, wherein the horizontal coordinate of the rectangular coordinate system is the time and the vertical coordinate is the value of the first acceleration; the wearable device can obtain Q acceleration valley values located at the trough from the acceleration curve, where Q is an integer greater than or equal to 1; if the Q acceleration valley values are all in the second preset interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0085] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0086] It should be noted that, in the acceleration curve, the trough is the minimum value of the amplitude within a period of acceleration change.
[0087] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2 It can be seen that point B is the trough of the acceleration curve, so the value represented by point B is the acceleration valley value during the period of 0-45ms. Assume that the second preset interval is 0m / s 2 -3m / s 2 ,from Figure 2 It can be seen that the value represented by point B is 1.5m / s 2 , at 0m / s 2 -3m / s 2 , it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0088] Implementation method three: determine the acceleration curve based on M first accelerations; obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough in the acceleration curve; determine the difference between each acceleration peak value and the adjacent acceleration valley value; if the difference is in a preset difference range, determine that the M first accelerations meet the preset rope skipping characteristics.
[0089] In this optional implementation, the wearable device can represent M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, where the horizontal coordinate of the rectangular coordinate system is the time and the vertical coordinate is the value of the first acceleration; the wearable device can obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough from the acceleration curve, where P and Q are both integers greater than or equal to 1; determine the difference between each acceleration peak value and the acceleration valley value adjacent to the acceleration peak value; if the difference is in a preset difference interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0090] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0091] It should be noted that, in the acceleration curve, the peak is the maximum value of the amplitude within a period of acceleration change; the trough is the minimum value of the amplitude within a period of acceleration change.
[0092] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2It can be seen that point A is the peak of the acceleration curve, so the value represented by point A is the peak value of acceleration during the period of 0-45ms; it can also be seen that point B is the trough of the acceleration curve, so the value represented by point B is the trough value of acceleration during the period of 0-45ms. Assume that the preset difference interval is 7m / s 2 -13m / s 2 ,from Figure 2 It can be seen that the value represented by point A is 10.5m / s 2 , the value represented by point B is 1.5m / s 2 , then the difference between point A and point B is 9m / s 2 , at 7m / s 2 -13m / s 2 range, it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0093] Implementation method four: determine the acceleration curve based on M first accelerations; obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough in the acceleration curve; if the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, then determine that the M first accelerations meet the preset rope skipping characteristics.
[0094] In this optional implementation, the wearable device can represent the M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, wherein the horizontal coordinate of the rectangular coordinate system is the time and the vertical coordinate is the value of the first acceleration; the wearable device can obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough from the acceleration curve, where P and Q are both integers greater than or equal to 1; if the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0095] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0096] It should be noted that, in the acceleration curve, the peak is the maximum value of the amplitude within a period of acceleration change; the trough is the minimum value of the amplitude within a period of acceleration change.
[0097] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2It can be seen that point A is the peak of the acceleration curve, so the value represented by point A is the peak value of acceleration during the period of 0-45ms; it can also be seen that point B is the trough of the acceleration curve, so the value represented by point B is the trough value of acceleration during the period of 0-45ms. Assume that the first preset interval is 9m / s 2 -11m / s 2 , the second preset interval is 0m / s 2 -3m / s 2 ,from Figure 2 It can be seen that the value represented by point A is 10.5m / s 2 , at 9m / s 2 -11m / s 2 , we can also see that the value represented by point B is 1.5m / s 2 , at 0m / s 2 -3m / s 2 , it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0098] Implementation method five: determine the acceleration curve based on M first accelerations; obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough in the acceleration curve; obtain a first average value of the P acceleration peak values and a second average value of the Q acceleration valley values; if the first average value is in a first preset interval and the second average value is in a second preset interval, determine that the M first accelerations meet the preset rope skipping characteristics.
[0099] In this optional implementation, in this optional implementation, the wearable device can represent M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, the horizontal coordinate of the rectangular coordinate system is the time, and the vertical coordinate is the value of the first acceleration; the wearable device can obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough from the acceleration curve, and P and Q are both integers greater than or equal to 1; the wearable device can calculate a first average value of the P acceleration peak values based on the P acceleration peak values, and then calculate a second average value of the Q acceleration valley values based on the Q acceleration valley values; if the first average value is in a first preset interval, and the second average value is in a second preset interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0100] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0101] It should be noted that, in the acceleration curve, the peak is the maximum value of the amplitude within a period of acceleration change; the trough is the minimum value of the amplitude within a period of acceleration change.
[0102] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2 It can be seen that point A is the peak of the acceleration curve, so the value represented by point A is the peak value of acceleration during the period of 0-45ms; it can also be seen that point B is the trough of the acceleration curve, so the value represented by point B is the trough value of acceleration during the period of 0-45ms. Assume that the first preset interval is 9m / s 2 -11m / s 2 , the second preset interval is 0m / s 2 -3m / s 2 ,from Figure 2 It can be seen that there is only one point A with a peak acceleration, so the first average value is the value of point A, that is, the first average value is 10.5m / s 2 , at 9m / s 2 -11m / s 2 , we can also see that there is only one point B in the acceleration valley, so the first average value is the value of point B, that is, the first average value is 1.5m / s 2 , at 0m / s 2 -3m / s 2 , it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0103] Implementation method six: determine the acceleration curve based on M first accelerations; obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough in the acceleration curve; if the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, determine the difference between each acceleration peak value and the adjacent acceleration valley value; if the difference is within the preset difference interval, determine that the M first accelerations meet the preset rope skipping characteristics.
[0104] In this optional implementation, the wearable device can represent M first accelerations in a rectangular coordinate system in chronological order to obtain an acceleration curve, wherein the horizontal coordinate of the rectangular coordinate system is the time and the vertical coordinate is the value of the first acceleration; the wearable device can obtain P acceleration peak values located at the crest and Q acceleration valley values located at the trough from the acceleration curve, where P and Q are both integers greater than or equal to 1; if the P acceleration peak values are all within a first preset interval, and the Q acceleration valley values are all within a second preset interval, then the wearable device can determine the difference between each acceleration peak value and the acceleration valley value adjacent to the acceleration peak value; if the difference is within the preset difference interval, then it can be said that the M first accelerations meet the preset rope skipping characteristics.
[0105] Optionally, if the user is doing rope skipping exercise, each rope skipping cycle in the acceleration curve may be a curve that first increases and then decreases, such as Figure 2 As shown, in each cycle, there is a peak, and the wearable device can detect the number of the peaks and determine the number of the peaks as the number of rope skipping.
[0106] It should be noted that, in the acceleration curve, the peak is the maximum value of the amplitude within a period of acceleration change; the trough is the minimum value of the amplitude within a period of acceleration change.
[0107] For example, Figure 2 The first acceleration detected by the wearable device during the period 0-45ms is shown. Figure 2 It can be seen that point A is the peak of the acceleration curve, so the value represented by point A is the peak value of acceleration during the period of 0-45ms; it can also be seen that point B is the trough of the acceleration curve, so the value represented by point B is the trough value of acceleration during the period of 0-45ms. Assume that the first preset interval is 9m / s 2 -11m / s 2 , the second preset interval is 0m / s 2 -3m / s 2 , the preset difference interval is 7m / s 2 -13m / s 2 ,from Figure 2 It can be seen that the value represented by point A is 10.5m / s 2 , at 9m / s 2 -11m / s 2 , we can also see that the value represented by point B is 1.5m / s 2 , at 0m / s 2 -3m / s 2 , then the difference between point A and point B is 9m / s 2 , at 7m / s2 -13m / s 2 range, it can be explained that the first acceleration during 0-45ms meets the preset rope skipping characteristics.
[0108] 103. Determine the number of target accelerations as the number of rope skipping times performed by the user within the first time period.
[0109] In an embodiment of the present invention, if there is a target acceleration greater than an adjacent acceleration among the N second accelerations, the wearable device may determine the number of target accelerations as the number of rope skipping times of the user within the first time period.
[0110] The adjacent accelerations are the acceleration before and after the target acceleration.
[0111] It should be noted that the target acceleration needs to be greater than the two accelerations adjacent to the target acceleration, so that it can be said that the target acceleration is a peak, which can be said to be a number of rope skipping.
[0112] For example, assume that the wearable device obtains 10 second accelerations, which are acceleration A: 9.1 m / s 2 , acceleration B: 10.2m / s 2 , acceleration C: 9.6m / s 2 , acceleration D: 9.6m / s 2 , acceleration E: 9.8m / s 2 , acceleration F: 10.6m / s 2 , acceleration G: 10.2m / s 2 , acceleration H: 10.0m / s 2 , acceleration I: 10.2m / s 2 , acceleration J: 9.6m / s 2 After calculation, the wearable device can obtain acceleration B greater than 9.5m / s 2 , and is greater than the adjacent accelerations A and C, and the acceleration F is greater than 9.5m / s 2 , and is greater than the adjacent acceleration E and acceleration G, and the acceleration I is greater than 9.5m / s 2 , and is greater than the adjacent acceleration H and acceleration J; that is, the target acceleration includes: acceleration B, acceleration F and acceleration I, then the wearable device can determine the number of target accelerations as the number of times the user jumps rope within the first time length, that is, the number of times the user jumps rope within the first time length is 3 times.
[0113] The embodiment of the present invention provides a method for calculating the number of rope skipping. The wearable device can obtain M first accelerations of the user within a first time period through a six-axis sensor; if the M first accelerations meet the preset rope skipping characteristics, it can be said that the wearable device detects that the user is performing effective rope skipping exercise, and then the wearable device can determine the number of target accelerations in the M first accelerations that are greater than the preset acceleration threshold and greater than the adjacent accelerations as the number of rope skipping of the user within the first time period. Because rope skipping is a periodic exercise, the user can repeat the rope skipping exercise many times within the first time period. The wearable device can detect the periodic law of the M accelerations and filter out the target accelerations that meet the conditions in each cycle, so as to accurately determine the number of cycles in the first time period according to the number of target accelerations that meet the conditions, that is, the number of rope skipping of the user within the first time period.
[0114] Embodiment 2
[0115] like Figure 3 As shown, an embodiment of the present invention provides a method for calculating the number of rope skipping times, which may also include the following steps:
[0116] 301. Continuously obtain K target accelerations and K target gyroscope data at K moments.
[0117] In an embodiment of the present invention, the wearable device can continuously obtain K target accelerations and K target gyroscope data at K moments through a six-axis sensor.
[0118] The K moments may be moments other than the first duration.
[0119] 302. Calculate the target arm posture angles at K moments.
[0120] In an embodiment of the present invention, the wearable device can calculate the target arm posture angle of the user at K moments based on K target accelerations and K target gyroscope data.
[0121] Among them, the target arm posture angle can be used to indicate the user's arm posture.
[0122] Optionally, the wearable device can calculate the target arm posture angles at K moments through the Mahony algorithm based on the K target accelerations and the K target gyroscope data.
[0123] Among them, the attitude fusion algorithm can fuse the six-axis data of the acceleration sensor and the gyroscope to solve the body quaternion; among them, the attitude fusion algorithm can be a Mahony algorithm.
[0124] It should be noted that the target arm posture angle can usually be described in three forms: Euler angle, direction cosine matrix and quaternion.
[0125] Optionally, the target arm posture angle can be obtained by performing three Euler angle rotations around the rigid body coordinate system in the order of zxz axis, and the target arm posture angle can also be determined by three basic rotation matrices. The three matrices can be multiplied to obtain the rotation matrix R, which can be expressed as:
[0126]
[0127] In an embodiment of the present invention, the wearable device can obtain three gyroscope data components, namely α, β and γ, through a three-axis gyroscope, and obtain a rotation matrix R formula, that is, the rotation matrix R can be used to represent the target arm posture angle.
[0128] 303. Obtain M first accelerations of the user within a first duration.
[0129] In an embodiment of the present invention, if the target arm posture angles at K moments are all in the preset rope skipping posture interval, and the K target accelerations are all in the third preset interval, it can be said that the user is performing rope skipping exercise, and the wearable device can then obtain the M first accelerations of the user within the first time period.
[0130] It should be noted that the wearable device can set a preset rope skipping posture interval and a third preset interval based on the user's previous rope skipping historical data. In this way, when the target arm posture angles at K moments are all in the preset rope skipping posture interval and the K target accelerations are all in the third preset interval, the wearable device can consider that the user is skipping rope, thereby obtaining the M first accelerations of the user within the first time period.
[0131] Optionally, since the user's arms will be slightly raised when jumping rope, if the wearable device is worn on the user's wrist, the wearable device will generate posture angles in three directions as the user's wrist rotates; if the posture angle is within the preset skipping rope posture range, it can be said that the user is jumping rope.
[0132] For example, assuming that K is 5, the preset rope skipping posture interval is (30°, 40°, 25°)-(60°, 80°, 50°), and the third preset interval is 8 m / s 2 -13m / s 2 The wearable device can obtain 5 target accelerations at 5 moments, which are: 9.6m / s 2 , 9.3m / s 2 , 9.1m / s 2 、10.7m / s 2 、12.6m / s 2, and 5 gyroscope data, the 5 target arm posture angles of the user are obtained through 5 target accelerations and 5 gyroscope data, which are (47.2°, 61.0°, 29.8°), (58.0°, 49.6°, 29.8°), (47.2°, 53.1°, 44.7°), (39.6°, 49.1°, 39.6°), (58.7°, 78.3°, 45.0°). It can be seen that the 5 target arm posture angles are all in the range of (30°, 40°, 25°)-(60°, 80°, 50°), and 9.6m / s 2 , 9.3m / s 2 , 9.1m / s 2 、10.7m / s 2 、12.6m / s 2 Both at 8m / s 2 -13m / s 2 interval, the wearable device can deem that the user is skipping rope, thereby obtaining the M first accelerations of the user within the first time period.
[0133] 304. Obtain N second accelerations that are greater than a preset acceleration threshold among the M first accelerations.
[0134] 305. Determine the number of target accelerations as the number of rope skipping times performed by the user within the first time period.
[0135] 306. Calculate the user's movement amplitude according to the M first accelerations and the target formula.
[0136] In an embodiment of the present invention, the wearable device can calculate the user's movement amplitude according to the M first accelerations through a target formula.
[0137] Optionally, the target formula can be
[0138] Among them, S is the movement amplitude, A i is the i-th first acceleration among the M first accelerations, is the average value of the M first accelerations.
[0139] For example, assume that the wearable device obtains 10 first accelerations, which are acceleration A: 4.2 m / s 2 , acceleration B: 5.0m / s 2 , acceleration C: 5.3m / s 2 , acceleration D: 6.5m / s 2 , acceleration E: 8.3m / s 2 , acceleration F: 9.1m / s 2 , acceleration G: 10.2m / s 2, acceleration H: 9.6m / s 2 , acceleration I: 8.4m / s 2 , acceleration J: 7.6m / s 2 Then the wearable device can first average the 10 first accelerations to obtain Then the square of the difference between each first acceleration and the average value is calculated, which is 10.364 (m / s 2 ) 2 , 5.8564(m / s 2 ) 2 4.4944(m / s 2 ) 2 、0.8464(m / s 2 ) 2 、0.7744(m / s 2 ) 2 , 2.8224(m / s 2 ) 2 、7.7284(m / s 2 ) 2 4.7524(m / s 2 ) 2 , 0.9604(m / s 2 ) 2 、0.0324(m / s 2 ) 2 ; Then the wearable device sums up the 10 values, calculates the average value, and divides them again to get the user's movement range S = 1.96m / s 2 .
[0140] Optionally, the wearable device may also average the M first accelerations, and use the average value to represent the user's movement amplitude.
[0141] 307. Output a first prompt message.
[0142] In an embodiment of the present invention, if the user's movement amplitude is greater than a preset amplitude threshold, it can be said that the user's current movement amplitude is large, and the wearable device can output a first prompt message, which is used to remind the user to pay attention to rest.
[0143] It should be noted that the preset amplitude threshold may be determined by the user according to his / her own state, or may be determined by the wearable device according to the user's historical motion data, and the embodiment of the present invention does not limit this.
[0144] An embodiment of the present invention provides a method for calculating the number of rope skipping times. The wearable device can obtain the acceleration and gyroscope data of the user at the first moment through a six-axis sensor, calculate the arm posture angle of the user according to the acceleration and gyroscope data, thereby determining that the user is performing rope skipping exercise, and then obtain M first accelerations of the user within a first time period. This can avoid the situation where the wearable device also performs detection when the user is not skipping rope, thereby effectively reducing the power consumption of the wearable device.
[0145] Furthermore, if the M first accelerations meet the preset rope skipping characteristics, it can be said that the wearable device detects that the user is performing effective rope skipping exercise, and then the wearable device can determine the number of target accelerations in the M first accelerations that are greater than the preset acceleration threshold and greater than the adjacent accelerations as the number of rope skipping times of the user in the first time length. Because rope skipping is a cyclical sport, the user can repeat rope skipping many times in the first time length. The wearable device can detect the periodicity of the M accelerations and filter out the target accelerations that meet the conditions in each cycle, thereby accurately determining the number of cycles in the first time length according to the number of target accelerations that meet the conditions, that is, the number of rope skipping times of the user in the first time length.
[0146] As an optional implementation method, after the wearable device determines the number of target accelerations as the number of times the user jumps rope within a first time period, it may also include: the wearable device calculates the average number of times the user jumps rope per minute based on the number of times the user jumps rope within the first time period; the wearable device determines the skipping rope score corresponding to the average number of times the user jumps rope based on a pre-stored correspondence between the number of skipping ropes and the score; the wearable device displays the skipping rope score on the display screen of the wearable device, and sends the skipping rope score to other devices associated with the wearable device.
[0147] For example, assume that the correspondence between the number of rope skipping and the score pre-stored in the wearable device is: 100 points for more than 110 times per minute, 90 points for 90-109 times per minute, 80 points for 70-89 times per minute, 70 points for 50-69 times per minute, and 60 points for less than 50 times per minute. The wearable device calculates the average number of rope skipping per minute of the user as 93 times based on the number of rope skipping of the user in the first time period. According to the correspondence, it can be seen that 93 times is in the range of 90-109 times, so the user's current rope skipping score is 90 points; the wearable device can display the 90 points on the display screen of the wearable device, and can also send the 90 points to the parent device associated with the wearable device.
[0148] As an optional implementation method, the wearable device can be configured with a heart rate sensor, through which N heart rate data within a first time period are obtained; the wearable device calculates the user's heart rate increase parameter based on the N heart rate data using a heart rate calculation formula; if the heart rate increase parameter is greater than a preset heart rate threshold, a second prompt message is output, and the second prompt message is used to remind the user to pay attention to rest.
[0149] It should be noted that the preset heart rate threshold may be determined by the user according to his / her own state, or may be determined by the wearable device according to the user's historical exercise data, and this is not limited in the embodiment of the present invention.
[0150] Optionally, the heart rate calculation formula may be:
[0151] Among them, B is the heart rate increase parameter, B r is the median of N heart rate data, B1 is the resting heart rate, B max is the user's maximum heart rate.
[0152] It should be noted that the resting heart rate is the heart rate detected by the wearable device when the user is at rest; the user's maximum heart rate can be calculated based on the user's age.
[0153] Optionally, the maximum heart rate can be: B max =220-Age; Maximum heart rate can also be: B max =206.3-0.711*Age; where Age is the user's age.
[0154] Furthermore, the maximum heart rate may also be related to the user's age and gender. When the user is a male, the maximum heart rate may be: B max =202-0.55*Age; When the user is a female, the maximum heart rate can be: B max =216-1.09*Age; where Age is the user's age.
[0155] For example, assume that the wearable device obtains 9 heart rate data of the user in the first time period, which are 91, 93, 102, 88, 110, 79, 96, 100, and 83, respectively, the resting heart rate is 60, and the user is 48 years old. After calculation, the wearable device can obtain that the median of the 9 heart rate data is 93, and the maximum heart rate can be 220-48=172, then according to the heart rate calculation formula, B=29%.
[0156] Through this optional implementation method, the wearable device can determine the user's current heart rate increase based on the user's heart rate data, and when the heart rate increase is greater than a preset heart rate threshold, remind the user to avoid the user feeling unwell due to excessive heart rate increase.
[0157] Embodiment 3
[0158] like Figure 4 As shown, an embodiment of the present invention provides a wearable device, the wearable device comprising:
[0159] An acquisition module 401 is used to control an acceleration sensor in a six-axis sensor to acquire M first accelerations of a user within a first time period;
[0160] The acquisition module 401 is further configured to acquire N second accelerations greater than a preset acceleration threshold value among the M first accelerations if the M first accelerations meet the preset rope skipping characteristics;
[0161] The processing module 402 is used to determine the number of target accelerations as the number of rope skipping by the user within the first time period if there is a target acceleration greater than the adjacent accelerations among the N second accelerations;
[0162] The adjacent accelerations are the acceleration before and after the target acceleration.
[0163] Optionally, the processing module 402 is further configured to determine an acceleration curve according to the M first accelerations;
[0164] The acquisition module 401 is further used to acquire P acceleration peak values located at the crest and Q acceleration valley values located at the valley in the acceleration curve, where P and Q are both integers less than M;
[0165] The processing module 402 is further configured to determine that the M first accelerations satisfy the preset rope skipping characteristics if the P acceleration peak values are all within the first preset interval and the Q acceleration valley values are all within the second preset interval.
[0166] Optionally, the processing module 402 is specifically configured to determine the difference between each acceleration peak value and an adjacent acceleration valley value if the P acceleration peak values are all within the first preset interval and the Q acceleration valley values are all within the second preset interval;
[0167] The processing module 402 is specifically configured to determine whether the M first accelerations satisfy a preset rope skipping characteristic if the difference is within a preset difference interval.
[0168] Optionally, the acquisition module 401 is further configured to acquire a first average value of P acceleration peak values and a second average value of Q acceleration valley values;
[0169] The processing module 402 is further configured to determine that the M first accelerations satisfy a preset rope skipping characteristic if the first average value is within a first preset interval and the second average value is within a second preset interval.
[0170] Optionally, an acquisition module 401 is specifically used to control an acceleration sensor and a gyroscope sensor in the six-axis sensor to continuously acquire K target accelerations and K target gyroscope data at K moments;
[0171] The processing module 402 is specifically configured to calculate the target arm posture angles at the K moments according to the K target accelerations and the K target gyroscope data;
[0172] The acquisition module 401 is specifically configured to acquire the M first accelerations of the user within the first time period through the six-axis sensor if the target arm posture angles at the K moments are all within a preset rope skipping posture interval and the K target accelerations are all within a third preset interval;
[0173] Among them, the preset rope skipping posture interval is the arm posture angle interval corresponding to the pre-stored rope skipping movement.
[0174] Optionally, the acquisition module 401 is specifically configured to control an acceleration sensor in the six-axis sensor to acquire K third accelerations of the user within a first time period, where K is an integer greater than or equal to M;
[0175] The processing module 402 is specifically configured to delete a third acceleration whose difference with an adjacent acceleration is greater than or equal to a preset difference threshold, and obtain M processed first accelerations.
[0176] Optionally, the processing module 402 is further configured to calculate the user's movement amplitude according to the M first accelerations and the target formula;
[0177] The processing module 402 is further configured to output a first prompt message if the user's movement amplitude is greater than a preset amplitude threshold, wherein the first prompt message is used to prompt the user to take a rest;
[0178] The target formula is: S is the range of motion, A i is the i-th first acceleration among the M first accelerations, is the average value of the M first accelerations.
[0179] In the embodiment of the present invention, each module can implement the method for calculating the number of rope skipping times provided in the above method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0180] like Figure 5 As shown, an embodiment of the present invention further provides a wearable device, which may include:
[0181] A memory 501 storing executable program codes;
[0182] a processor 502 coupled to the memory 501;
[0183] The processor 502 calls the executable program code stored in the memory 501 to execute the rope skipping times calculation method executed by the wearable device in the above-mentioned method embodiments.
[0184] like Figure 6 As shown, the embodiment of the present invention further provides a wearable device, which includes but is not limited to: a radio frequency (RF) circuit 601, a memory 602, an input unit 603, a display unit 604, a sensor 605, an audio circuit 606, a WiFi (wireless fidelity) module 607, a processor 608, a power supply 609, and a camera 610. Among them, the RF circuit 601 includes a receiver 6011 and a transmitter 6012. Those skilled in the art can understand that Figure 6 The wearable device structure shown in the figure does not constitute a limitation on the wearable device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0185] The RF circuit 601 can be used for receiving and sending signals during information transmission or calls, and in particular, after receiving the downlink information of the base station, it is sent to the processor 608 for processing. The RF circuit 601 can also communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), email, short messaging service (SMS), etc.
[0186] The memory 602 can be used to store software programs and modules, and the processor 608 executes various functional applications and data processing of the wearable device by running the software programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the wearable device (such as audio data, a phone book, etc.), etc.
[0187] The input unit 603 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the wearable device. Specifically, the input unit 603 may include a touch panel 6031 and other input devices 6032. The touch panel 6031, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using a finger, stylus, or any other suitable object or accessory on or near the touch panel 6031), and drive the corresponding connection device according to a pre-set program.
[0188] The display unit 604 may be used to display information input by the user or information provided to the user and various menus of the wearable device. The display unit 604 may include a display panel 6041, and the display panel 6041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
[0189] The wearable device may further include at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. In an embodiment of the present invention, the wearable device may include an acceleration sensor 6051 and a gyroscope sensor 6052, wherein the acceleration sensor may be used to detect the current acceleration value of the wearable device, and the gyroscope sensor may be used to detect the current rotation angle value of the wearable device.
[0190] The audio circuit 606, the speaker 6061, and the microphone 6062 can provide an audio interface between the user and the wearable device. The audio circuit 606 can transmit the electrical signal converted from the received audio data to the speaker 6061, which is converted into a sound signal for output; on the other hand, the microphone 6062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 606 and converted into audio data, and then the audio data is output to the processor 608 for processing, and then sent to another wearable device through the RF circuit 601, or the audio data is output to the memory 602 for further processing.
[0191] WiFi is a short-range wireless transmission technology. The wearable device can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 607, which provides users with wireless broadband Internet access.
[0192] The processor 608 is the control center of the wearable device. It uses various interfaces and lines to connect the various parts of the entire wearable device. It executes various functions of the wearable device and processes data by running or executing software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, thereby monitoring the wearable device as a whole.
[0193] The wearable device also includes a power supply 609 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 608 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. Although not shown, the wearable device can also include a Bluetooth module, etc., which will not be repeated here.
[0194] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute part or all of the steps of the method in the above method embodiments.
[0195] An embodiment of the present invention further provides a computer program product, wherein when the computer program product runs on a computer, the computer is enabled to execute part or all of the steps of the methods in the above method embodiments.
[0196] An embodiment of the present invention further provides an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps of the method in the above method embodiments.
[0197] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0198] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the above-mentioned processes does not mean the necessary order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0199] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0201] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above methods of various embodiments of the present invention.
[0202] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
Claims
1. A method for calculating the number of rope skipping, characterized in that: Applied to a wearable device, the method comprises: Obtaining, by means of a six-axis sensor, M first accelerations of the user within a first time period; If the M first accelerations meet the preset rope skipping characteristics, obtaining N second accelerations of the M first accelerations that are greater than a preset acceleration threshold; If there is a target acceleration greater than an adjacent acceleration among the N second accelerations, the number of the target accelerations is determined as the number of rope skipping by the user within the first time period; Wherein, the adjacent accelerations are the previous acceleration and the next acceleration of the target acceleration; The acquiring, by means of a six-axis sensor, M first accelerations of the user within a first time period includes: Continuously acquiring K target accelerations and K target gyroscope data at K moments through the six-axis sensor; Calculating the target arm posture angles at the K moments according to the K target accelerations and the K target gyroscope data; If the target arm posture angles at the K moments are all within the preset rope skipping posture interval, and the K target accelerations are all within the third preset interval, then obtaining the M first accelerations of the user within the first time period through the six-axis sensor; The preset rope skipping posture interval is a pre-stored arm posture angle interval corresponding to the rope skipping movement.
2. The method according to claim 1, characterized in that If the M first accelerations meet the preset rope skipping characteristics, before obtaining N second accelerations of the M first accelerations that are greater than a preset acceleration threshold, the method further includes: Determining an acceleration curve according to the M first accelerations; Obtaining P acceleration peak values located at the crest and Q acceleration valley values located at the valley in the acceleration curve, where P and Q are both integers less than M; If the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, it is determined that the M first accelerations satisfy the preset rope skipping characteristics.
3. The method according to claim 2, characterized in that If the P acceleration peak values are all within a first preset interval, and the Q acceleration valley values are all within a second preset interval, determining that the M first accelerations meet the preset rope skipping characteristics includes: If the P acceleration peak values are all within the first preset interval, and the Q acceleration valley values are all within the second preset interval, determining a difference between each acceleration peak value and an adjacent acceleration valley value; If the difference is within a preset difference interval, it is determined that the M first accelerations satisfy the preset rope skipping characteristics.
4. The method according to claim 2, characterized in that: After obtaining P acceleration peak values located at the crest and Q acceleration valley values located at the trough in the acceleration curve, the method further includes: Obtaining a first average value of the P acceleration peak values and a second average value of the Q acceleration valley values; If the first average value is within the first preset interval and the second average value is within the second preset interval, it is determined that the M first accelerations meet the preset rope skipping characteristics.
5. The method according to claim 1, characterized in that The acquiring, by means of the six-axis sensor, M first accelerations of the user within a first time period includes: Acquire, by means of the six-axis sensor, K third accelerations of the user within the first duration, where K is an integer greater than or equal to M; The third acceleration whose difference with the adjacent acceleration is greater than or equal to the preset difference threshold is deleted to obtain the processed M first accelerations.
6. The method according to claim 1, characterized in that After determining the number of the target accelerations as the number of rope skipping times of the user within the first time period, the method further includes: Calculating the movement amplitude of the user according to the M first accelerations and the target formula; If the user's movement amplitude is greater than a preset amplitude threshold, a first prompt message is output, where the first prompt message is used to prompt the user to take a rest; Wherein, the target formula is: S is the movement amplitude, A i is the i-th first acceleration among the M first accelerations, is the average value of the M first accelerations.
7. A wearable device, characterized in that: include: An acquisition module, used for acquiring M first accelerations of the user within a first time period through a six-axis sensor; The acquisition module is further configured to acquire N second accelerations greater than a preset acceleration threshold value among the M first accelerations if the M first accelerations meet the preset rope skipping characteristics; a processing module, configured to determine the number of the target accelerations as the number of rope skipping performed by the user within the first time period if there is a target acceleration greater than an adjacent acceleration among the N second accelerations; Wherein, the adjacent accelerations are the previous acceleration and the next acceleration of the target acceleration; The acquisition module is specifically used to control the acceleration sensor and the gyroscope sensor in the six-axis sensor to continuously acquire K target accelerations and K target gyroscope data at K moments; The processing module is specifically used to calculate the target arm posture angles at the K moments according to the K target accelerations and the K target gyroscope data; The acquisition module is specifically configured to acquire the M first accelerations of the user within the first time period through the six-axis sensor if the target arm posture angles at the K moments are all within a preset rope skipping posture interval and the K target accelerations are all within a third preset interval; The preset rope skipping posture interval is a pre-stored arm posture angle interval corresponding to the rope skipping movement.
8. A wearable device, characterized in that: include: A memory storing executable program code; and a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the method for calculating the number of rope skipping as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, the method for calculating the number of rope skipping as described in any one of claims 1 to 6 is implemented.
