Exercise frequency calculation method and related device

Through the three-axis acceleration sensor and the preset model, combined with the X-axis, Y-axis, and Z-axis motion signals, the motion status is judged and the number of motions is selected, which solves the accuracy problem of calculating the number of motions in the existing technology and improves the reliability of counting. and adaptability.

CN118253080BActive Publication Date: 2024-09-17SHENZHEN FENDA SMART TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410658139.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-17
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

The existing technology has counting errors and misjudgments when calculating the number of movements of periodic sports such as rope skipping, especially when environmental factors and user operations are not standardized, resulting in poor counting accuracy.

Method used

Using a smart device equipped with a three-axis acceleration sensor, it can judge the motion status through the X-axis, Y-axis, and Z-axis motion signals, and use the preset model to select the most accurate number of motions, reducing the risk of misjudgment and adapting to the motion habits of different users.

Benefits of technology

It improves the accuracy of calculation of exercise times, reduces counting errors, adapts to different users' exercise methods, and enhances the reliability of counting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118253080B
    Figure CN118253080B
Patent Text Reader

Abstract

The present application is applicable to the field of data processing technology, and provides a method for calculating the number of movements and a related device to improve the accuracy of calculating the number of movements of periodic movements. When the method for calculating the number of movements of the present application is applied to an intelligent device equipped with a three-axis acceleration sensor, it mainly includes: obtaining a motion signal of a target user wearing the intelligent device performing periodic movements according to the three-axis acceleration sensor of the intelligent device; judging whether the number of movements of the target user performing periodic movements reaches a preset value continuously according to the motion signal; when the number of movements reaches a preset value continuously, it is determined that the target user is currently in a state of movement, and the number of movements is accumulated based on the preset value as the number of movements to obtain the cumulative number of movements of each axis; the cumulative number of movements of each axis is selected using a preset model to obtain a target number of movements; the preset model is a model that can select the number of movements for the cumulative number of movements of each axis according to the motion signal of the periodic movement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method for calculating the number of exercises and a related device. Background Art

[0002] Rope skipping is a short-time, high-intensity aerobic exercise that can effectively reduce obesity, prevent dyslipidemia and hypertension. It is one of the periodic exercises that users can do. Periodic exercises such as rope skipping often require the calculation of the number of exercises to plan and determine the user's own exercise volume.

[0003] Taking rope skipping as an example, the current methods of calculating the number of rope skipping are mainly divided into manual counting or smart device counting. Among them, manual counting requires the counting personnel to concentrate their attention on counting, which is more prone to counting errors. Smart device counting includes counting through camera recognition, counting with rope skipping handles with counters, and counting with smart wearable devices with sensors. Among them, the camera recognition counting method is greatly affected by environmental factors (such as venue space, light brightness, etc.), which is not convenient enough; the rope skipping handle with a counter is easy to generate counts when the user uses it irregularly, and the user operation requirements are high and the counting accuracy is poor; smart wearable devices with sensors (usually three-axis acceleration sensors) mainly rely on the combined acceleration of the acceleration sensor to judge the motion state and count the number of exercises, which is easy to misjudge the motion state of users in outdoor activities, resulting in large errors in the calculation of the number of exercises, and the accuracy of the calculation of the number of exercises for periodic exercises is still relatively poor.

[0004] In order to improve the accuracy of calculating the number of exercises when users perform periodic exercises (such as skipping rope), a new solution for calculating the number of exercises is urgently needed. Summary of the invention

[0005] The purpose of the present application is to provide a method and a related device for calculating the number of exercises, so as to improve the accuracy of calculating the number of exercises for periodic exercises (such as skipping rope), so as to facilitate users to plan and determine their own exercise volume.

[0006] In a first aspect, the present application provides a method for calculating the number of movements, which is applied to a smart device equipped with a three-axis acceleration sensor, comprising:

[0007] Acquire, based on the three-axis acceleration sensor of the smart device, a motion signal of a target user wearing the smart device performing periodic motion, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal;

[0008] Determine whether the first movement number of the target user's periodic movement has continuously reached a first preset value based on the X-axis movement signal; determine whether the second movement number of the target user's periodic movement has continuously reached a second preset value based on the Y-axis movement signal; determine whether the third movement number of the target user's periodic movement has continuously reached a third preset value based on the Z-axis movement signal;

[0009] When the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value, it is determined that the target user is currently in an exercise state;

[0010] When it is determined that the target user is currently in a state of exercise, the number of times of the target user is accumulated based on the first preset value as the number of times of exercise, to obtain the first accumulated number of times of exercise of the target user; the number of times of the target user is accumulated based on the second preset value as the number of times of exercise, to obtain the second accumulated number of times of exercise of the target user; the number of times of the target user is accumulated based on the third preset value as the number of times of exercise, to obtain the third accumulated number of times of exercise of the target user;

[0011] Selecting the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number using a preset model to obtain a target movement number, where the target movement number is one of the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number;

[0012] The preset model is a trained model that can select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number based on the X-axis motion signal, the Y-axis motion signal and the Z-axis motion signal of the target user performing periodic motion.

[0013] In a second aspect, the present application provides a system for calculating the number of movements, which is applied to a smart device equipped with a three-axis acceleration sensor, comprising:

[0014] An acquisition unit, configured to acquire, based on a three-axis acceleration sensor of the smart device, a motion signal of a target user wearing the smart device performing periodic motion, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal;

[0015] a judgment unit, configured to judge whether the first movement number of the target user's periodic movement has continuously reached a first preset value according to the X-axis movement signal; judge whether the second movement number of the target user's periodic movement has continuously reached a second preset value according to the Y-axis movement signal; and judge whether the third movement number of the target user's periodic movement has continuously reached a third preset value according to the Z-axis movement signal;

[0016] a recognition unit, configured to recognize that the target user is currently in a state of exercise when the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value;

[0017] a calculation unit, configured to, when determining that the target user is currently in a state of motion, accumulate the number of times of the target user based on the first preset value as the number of times of motion, to obtain a first accumulated number of times of motion of the target user; accumulate the number of times of the target user based on the second preset value as the number of times of motion, to obtain a second accumulated number of times of motion of the target user; and accumulate the number of times of the target user based on the third preset value as the number of times of motion, to obtain a third accumulated number of times of motion of the target user;

[0018] A selection unit, configured to select the first cumulative movement number, the second cumulative movement number, and the third cumulative movement number using a preset model to obtain a target movement number, wherein the target movement number is one of the first cumulative movement number, the second cumulative movement number, and the third cumulative movement number;

[0019] The preset model is a trained model that can select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number based on the X-axis motion signal, the Y-axis motion signal and the Z-axis motion signal of the target user performing periodic motion.

[0020] In a third aspect, the present application provides a smart device, including:

[0021] Central processing unit, memory, bus, network interface, three-axis acceleration sensor, neural network processor, display screen;

[0022] The central processing unit is connected to the memory, the network interface, the three-axis acceleration sensor, the neural network processor, and the display screen through the bus;

[0023] The memory stores a program;

[0024] When the processor executes the program stored in the memory, it performs any one of the methods for calculating the number of exercises described in the first aspect.

[0025] In a fourth aspect, the present application provides a computer storage medium, wherein the computer storage medium stores instructions, and when the instructions are executed by a computer device, the computer device executes the method for calculating the number of exercises as described in any one of the first aspects above.

[0026] In a fifth aspect, the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method for calculating the number of exercises as described in any one of the first aspects above.

[0027] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0028] The method for calculating the number of exercises of the present embodiment is applied to a smart device equipped with a three-axis acceleration sensor. The motion signal of a target user wearing the smart device performing periodic exercise (such as rope skipping) is obtained based on the three-axis acceleration sensor of the smart device. Then, the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal. Then, the X-axis motion signal is used to determine whether the first number of exercises of the target user performing periodic exercise has continuously reached a first preset value; the Y-axis motion signal is used to determine whether the second number of exercises of the target user performing periodic exercise has continuously reached a second preset value; the Z-axis motion signal is used to determine whether the third number of exercises of the target user performing periodic exercise has continuously reached a third preset value, so as to comprehensively determine whether the target user enters the exercise state based on the motion signals of all axes; when the first number of exercises continuously reaches the first preset value, the second number of exercises continuously reaches the second preset value, and the third number of exercises continuously reaches the third preset value, it is determined that the target user is currently in the exercise state. At this time, counting the exercises can reduce the risk of misjudgment and improve the accuracy of calculating the number of exercises for periodic exercise; when it is determined that the target user is currently in the exercise state, the first preset value is used as the number of exercises. Based on the number of times of the target user, the target user is accumulated to obtain the first cumulative number of movements of the target user; based on the second preset value as the number of movements, the target user is accumulated to obtain the second cumulative number of movements of the target user; based on the third preset value as the number of movements, the target user is accumulated to obtain the third cumulative number of movements of the target user, that is, a cumulative number of movements is calculated separately according to the movement signal of each axis to reduce the influence of other axes; and the preset model is used to select the first cumulative number of movements, the second cumulative number of movements and the third cumulative number of movements to obtain the target number of movements, which can adapt to the movement habits of different users and reduce the movement number calculation gap caused by the movement differences of different users by the algorithm, so that the target number of movements finally selected is more accurate, wherein the target number of movements is one of the first cumulative number of movements, the second cumulative number of movements and the third cumulative number of movements; the preset model is a trained model that can select the first cumulative number of movements, the second cumulative number of movements and the third cumulative number of movements according to the X-axis movement signal, the Y-axis movement signal and the Z-axis movement signal of the target user performing periodic movement. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for calculating the number of exercises of the present application;

[0030] Figure 2 This is a flow chart of another embodiment of the method for calculating the number of exercises of the present application;

[0031] Figure 3This is a flow chart of another embodiment of the method for calculating the number of exercises of the present application;

[0032] Figure 4 This is a flow chart of another embodiment of the method for calculating the number of exercises of the present application;

[0033] Figure 5 This is a flow chart of another embodiment of the method for calculating the number of exercises of the present application;

[0034] Figure 6 This is a schematic diagram of the structure of an embodiment of the exercise frequency calculation system of the present application;

[0035] Figure 7 This is a schematic diagram of another embodiment of the system for calculating the number of exercises of the present application;

[0036] Figure 8 This is a schematic diagram of the structure of an embodiment of the smart device of the present application;

[0037] Fig. 9 This is a schematic diagram of an embodiment of the method for calculating the number of exercises of the present application for recording the changes in the X-axis acceleration value, the Y-axis acceleration value and the Z-axis acceleration value of rope skipping exercise. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] It should be noted that the exercise count calculation method of this embodiment is applied to smart devices equipped with a three-axis acceleration sensor, which can be smart wearable devices such as smart bracelets, smart watches, professional sports equipment (skipping rope handles, running pedometers, sports headphones, sports chest straps, etc.), or smart mobile terminal devices such as mobile phones and tablets; wherein these smart devices should be configured with a three-axis acceleration sensor (accelerometer, ACC), a power supply, a central processing unit, a memory, a neural network processor, a display screen, a network interface module, etc., wherein the power supply is usually composed of a rechargeable battery module, and the power supply is mainly used to provide a suitable working voltage for the three-axis acceleration sensor, the central processing unit, the memory, the neural network processor, the display screen, the network interface module, etc.; the three-axis acceleration sensor is mainly used to monitor the motion signals (such as acceleration values) of the target user wearing the smart device in various directions (mainly the X-axis, the Y-axis and the Z-axis) in three-dimensional space, and the motion signals in various directions are calculated according to the same time. The sequence is stored in the memory; the central processing unit is mainly used to process the motion signal stored in the memory to generate data such as the number of movements, motion signal curves, etc., and transmit the relevant data to the display screen for display as needed; the memory is mainly used to store the motion signals in various directions recorded by the three-axis acceleration sensor in chronological order, store the preset trained algorithm model (such as a neural network model), etc.; and the neural network processor is mainly used to load and run the neural network model pre-stored in the above-mentioned memory, and select one according to the first motion cumulative number, the second motion cumulative number and the third motion cumulative number transferred by the central processing unit, and obtain the target motion number for the central processing unit; the display screen is used to display the motion-related data that needs to be displayed uploaded by the central processing unit; the network interface module can be a wired network interface or a wireless network interface, which is mainly used to share data with external smart devices or download the data of external smart devices (such as preset models, preset data, etc.) to the memory, and play the function of communicating with the outside world. At present, three-axis accelerometers (ACC) can be widely used in smart wearable devices or sports equipment to record and identify people's motion patterns, motion states, motion times and other motion data. The three-axis accelerometer can monitor the motion of the object carrying it in three mutually perpendicular directions in space, that is, the three-axis accelerometer can monitor the motion data of the object carrying it in the three directions of X-axis, Y-axis and Z-axis in the spatial Cartesian coordinate system, which will not be repeated here. In order to improve the accuracy of calculating the number of movements of periodic motion, this embodiment takes rope skipping as an example of periodic motion. In actual applications, periodic motion can also be walking, running, pull-ups, sit-ups, etc., and the corresponding results can be obtained through a data processing process similar to the following embodiments, which will not be repeated here.The so-called periodic motion refers to the acceleration value in one axis (X-axis, Y-axis or Z-axis) or multiple axes corresponding to the user's exercise measured by a three-axis acceleration sensor, which shows a periodic change.

[0040] See also Figure 1 The method for calculating the number of movements of the present application is applied to an embodiment of a smart device equipped with a three-axis acceleration sensor, comprising:

[0041] 101. Receive a start instruction for starting periodic motion and enter a motion frequency recording mode for periodic motion.

[0042] The execution of this step can be selectively set in actual applications as needed, so that the smart device will officially execute the exercise count calculation method of this embodiment only when it is turned on and enters the exercise count recording mode. This can save the power of the smart device and avoid the smart device from mistakenly starting and starting the periodic exercise counting. After receiving the target user's clear start instruction to start periodic exercise (such as a physical button or a virtual button's start confirmation), the smart device can officially enter the exercise count recording mode of the periodic exercise (such as skipping rope) and start recording the exercise duration.

[0043] 102. Obtain motion signals of a target user wearing the smart device performing periodic motion based on a three-axis acceleration sensor of the smart device, wherein the motion signals include: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal.

[0044] When the target user wears the smart device to perform periodic exercise (such as skipping rope), the three-axis acceleration sensor in the smart device will obtain the motion signal of the target user's periodic exercise, and the motion signal includes: X-axis motion signal, Y-axis motion signal and Z-axis motion signal. For example, the X-axis motion signal is the acceleration value of the X-axis direction changing with time, the Y-axis motion signal is the acceleration value of the Y-axis direction changing with time, and the Z-axis motion signal is the acceleration value of the Z-axis direction changing with time.

[0045] It should be noted that the X-axis motion signal, Y-axis motion signal and Z-axis motion signal directly obtained by using the three-axis acceleration sensor will contain more noise, and need to be filtered before use. The following is an example of periodic motion as rope skipping: the frequency range of the rope skipping motion signal is generally between 0.1HZ and 6.5HZ, and the number of rope skipping exercises for ordinary people in 1 minute is less than 300 times. Under normal circumstances, it is difficult for ordinary people to reach 300 times / minute, so the designed filter used should decay rapidly at 6.5HZ; combined with the characteristics that the Chebyshev filter decays faster in the transition band and the Butterworth filter passband is relatively flat, for rope skipping, this embodiment can adopt a combination of a Butterworth high-pass filter with a cutoff frequency of 0.1HZ and a Chebyshev I-type low-pass filter with a cutoff frequency of 6.5Hz, and this filtering method can better filter out noise and retain rope skipping motion signals. For other periodic motions, similar processing methods can also be used to filter in combination with actual conditions, which will not be described in detail here.

[0046] 103. Determine whether the first movement number of the target user's periodic movement has continuously reached a first preset value based on the X-axis movement signal; determine whether the second movement number of the target user's periodic movement has continuously reached a second preset value based on the Y-axis movement signal; determine whether the third movement number of the target user's periodic movement has continuously reached a third preset value based on the Z-axis movement signal.

[0047] It is worth noting that the motion signal cycles of each person performing the same periodic exercise (such as skipping rope) in the X-axis, Y-axis and Z-axis directions are different. That is to say, the X-axis, Y-axis and Z-axis can each be considered as a target user performing a periodic exercise with one motion signal cycle. However, when the target user performs periodic exercise within the same duration, the number of cycles calculated by the motion signals collected by the X-axis, Y-axis and Z-axis of the three-axis acceleration sensor are often different. That is to say, within a certain duration, the number of cycles calculated by the motion signals collected by the X-axis, Y-axis and Z-axis of the three-axis acceleration sensor cannot truly reflect the target user's actual exercise number. There may be an axis (X-axis, Y-axis or Z-axis) with a cycle number calculated that is closer to the actual exercise number, and the number of cycles calculated by the other axes is relatively far from the actual exercise number. Even so, there is at least one axis that reflects an exercise number that is not much different from the actual exercise number and is within an acceptable range. For example, some users show periodic acceleration value changes that are obviously consistent with the accurate calculation of the number of movements in the X-axis direction over time, while the periodic changes in the Y-axis and Z-axis directions over time may not be accurate enough to calculate the number of movements; of course, some users may show periodicity more obviously on the Y-axis, while some users may show periodicity obviously on the Z-axis, which depends on the exercise habits of different users and different types of periodic movements; and when the target user enters the exercise number recording mode of periodic movement and does not start the target's periodic movement (such as skipping rope), if the target user performs large-scale movements in space at this time, such as stretching, swinging, jumping, etc., it may also be included in the calculation of the number of periodic movements. To avoid misjudgment, this embodiment needs to further judge that the preset values ​​are continuously reached on the X-axis, Y-axis and Z-axis to determine that the target user is currently in a state of movement for periodic movement. Among them, the first preset value, the second preset value and the third preset value of this step can be the same or different values, such as 5 times, 10 times, etc.

[0048] 104. When the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value, it is determined that the target user is currently in an exercise state.

[0049] When it is determined in step 103 that the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value, this step determines that the target user is currently in an exercise state (adding the previous step 103, the user begins to enter the exercise state when the periodic exercise number is first recorded), and records the duration of the exercise. The so-called exercise duration is the duration in the exercise state.

[0050] 105. When it is determined that the target user is currently in motion, the number of exercises of the target user is accumulated based on the first preset value to obtain the first cumulative number of exercises of the target user; the number of exercises of the target user is accumulated based on the second preset value to obtain the second cumulative number of exercises of the target user; the number of exercises of the target user is accumulated based on the third preset value to obtain the third cumulative number of exercises of the target user.

[0051] In this step, the three axes X-axis, Y-axis and Z-axis of the three-axis acceleration sensor in the smart device are used to count the periodic movements of the target user. When it is determined in step 104 that the target user is currently in motion, the number of movements of the target user is accumulated based on the first preset value accumulated on the X-axis as the number of movements, to obtain the first cumulative number of movements of the target user; the number of movements of the target user is accumulated based on the second preset value accumulated on the Y-axis as the number of movements, to obtain the second cumulative number of movements of the target user; the number of movements of the target user is accumulated based on the third preset value accumulated on the Z-axis as the number of movements, to obtain the third cumulative number of movements of the target user, that is, three cumulative numbers of movements of the target user performing the same periodic movement are obtained, and the above three cumulative numbers of movements of the target user performing the same periodic movement may be the same or different.

[0052] 106. Select the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number using a preset model to obtain a target movement number, where the target movement number is one of the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number.

[0053] It should be noted that different users have different habits in performing the same periodic exercise. For example, when the periodic exercise is rope skipping and the smart device is the handle, different users hold the handle, swing the handle, and skip rope in very different ways, which makes the three-axis acceleration signal , , If the combined acceleration is used or the sum of accelerations All of these will weaken the effective rope skipping signal, causing a large error in the counting. If only a single-axis acceleration signal is used, it cannot adapt to different rope skipping movements. For example, when the user uses the "stepping jump" movement, Fig. 9 As shown, the horizontal axis represents the order of time T (time) from left to right, and the vertical axis represents the magnitude of the acceleration value (positive and negative numbers represent opposite directions. In this embodiment, one gravitational acceleration G is divided into 4096 parts, that is, the acceleration value of 4096 is equal to one gravitational acceleration G). Fig. 9 It can be seen that the X-axis acceleration signal value As time changes, the Y-axis acceleration signal value As time changes, the Z-axis acceleration signal value As time changes, the dotted lines are the X-axis acceleration value signal, Y-axis acceleration value signal, and Z-axis acceleration value signal obtained by the three-axis acceleration sensor, and the dots are zero points, peak points, or trough points. From the acceleration value signal, the effective rope skipping signal axes are the Y-axis and the Z-axis, but the number of rope skipping calculated by the Y-axis is almost twice that of the Z-axis, and the validity of the Y-axis and the Z-axis cannot be judged, resulting in a large error in the rope skipping count. In order to adapt to different user habits with higher accuracy, this embodiment uses the three axes of the three-axis acceleration sensor to calculate the number of movement results respectively, and combines the characteristics of each axis to select the optimal result using the preset model. The preset model is a trained model that can select the number of movements for the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number based on the X-axis motion signal, the Y-axis motion signal, and the Z-axis motion signal of the target user performing periodic motion. For example, the preset model of the present embodiment can be a neural network model, such as a deep neural network model (Deep Neural Networks, DNN). The training samples of the deep neural network model can use the X-axis motion signal, Y-axis motion signal, Z-axis motion signal (for example, acceleration values ​​that change over time) recorded by sports volunteers such as senior athletes, sports enthusiasts, and ordinary users wearing smart devices, and the first motion cumulative number, the second motion cumulative number, and the second motion cumulative number obtained by the X-axis motion signal recorded when the sports volunteers perform periodic motion as input features, and the real number of motions corresponding to sports volunteers such as senior athletes, sports enthusiasts, and ordinary users are used as output features for training. After training, a model is obtained that can select the target number of motions that is closest to the real number of motions for the first motion cumulative number, the second motion cumulative number, and the third motion cumulative number based on the X-axis motion signal, Y-axis motion signal, and Z-axis motion signal of the target user performing periodic motion. The training of the corresponding neural network model is a relatively mature existing technology and will not be repeated here. It should be noted that in order to make the preset model more accurate, the input features in the training process of the preset model may also include: the ratio of the number of movements of the periodic motion to the number of movements of the other two axes, the average period of the periodic motion, the average period difference of the periodic motion, the ratio of the average peak value to the average peak value of the other two axes, the ratio of the average trough value to the average peak value of the other two axes, etc.

[0054] In addition, in addition to the above-mentioned neural network model, this embodiment can also be other commonly used machine learning classification algorithms, such as: logistic regression, support vector machine, decision tree, k nearest neighbor classification algorithm, naive Bayes, random forest, XGBoost, etc., wherein the decision tree has the advantages of being easy to understand and explain, and can also have a good effect when the training data is small, and the model parameters are relatively small, so the decision tree can also be used to select the first movement cumulative number of periodic movements, the second movement cumulative number of movements, and the third movement cumulative number of movements. In addition, the selection result using the decision tree may have problems under special circumstances, so this embodiment can introduce an optimization mechanism: when only one axis has a periodic movement number, the movement number may be caused by the shaking of the target user by the smart device, and the movement number calculation of this periodic movement is determined to be invalid, and no accumulation is made; when the target movement number selected in the last step is greater than 5 times the movement cumulative number of other axes, the movement number may be caused by shaking, and the calculation result of the number of periodic movements is invalid, and no accumulation is made.

[0055] It can be seen that this embodiment uses the three-axis acceleration sensor of the smart device to calculate the cumulative number of exercises of the target user separately for each axis, and then uses the preset model to select the cumulative number of exercises of the target user to be calculated separately for each axis. This can adapt to the exercise habits of different users and reduce the algorithm's exercise number calculation gap caused by the exercise differences of different users, so that the final selected target exercise number is more accurate, so that the target user can plan and determine his or her own exercise volume.

[0056] 107. When the first exercise number does not continuously reach the first preset value, and / or the second exercise number does not continuously reach the second preset value, and / or the third exercise number does not continuously reach the third preset value, it is determined that the target user is not in an exercise state, and the non-exercise time of the target user is recorded.

[0057] When step 103 determines that the first movement number has not continuously reached the first preset value, and\or the second movement number has not continuously reached the second preset value, and\or the third movement number has not continuously reached the third preset value, this step determines that the target user is not currently in motion. Even if the smart device enters the periodic movement number recording mode, the target user's movement number of each axis of the three-axis acceleration sensor is not accumulated, and it should be reset to zero, and the non-movement time of the target user in motion is recorded. The non-movement time is equal to the time from entering the periodic movement number recording mode to the current time minus the above-mentioned movement duration. After this step, continue to trigger step 102.

[0058] Based on the above Figure 1Based on the embodiment, after step 102 and before step 103, please refer to Figure 2 The present application is applied to an embodiment of a method for calculating the number of movements of a smart device equipped with a three-axis acceleration sensor, including:

[0059] 201. Connecting single-axis motion signals to form a single-axis acceleration signal curve, the single-axis motion signal being one of an X-axis motion signal, a Y-axis motion signal or a Z-axis motion signal.

[0060] In this embodiment, the data processing process for the X-axis motion signal, Y-axis motion signal or Z-axis motion signal monitored by the three-axis acceleration sensor in the smart device is similar, collectively referred to as the processing of a single-axis motion signal. It can be understood that the three-axis acceleration sensor samples and records the acceleration value of a single axis in the memory at a certain frequency, and each of these sampled acceleration values ​​is separated by the same time interval. After the acceleration value is expressed on the coordinate with time as the horizontal axis and acceleration value as the vertical axis, the single-axis acceleration value (motion signal) is connected with a smooth line to form a single-axis acceleration signal curve.

[0061] 202. Obtain a first-order differential signal curve of a single-axis acceleration signal curve.

[0062] A first-order difference calculation is performed on the single-axis acceleration signal curve in step 201 to obtain a first-order difference signal curve of the single-axis acceleration signal curve.

[0063] 203. Analyze the single-axis acceleration signal curve and the first-order differential signal curve. When the differential value of the previous moment in the first-order differential signal curve is greater than or equal to 0, the differential value at the current moment is less than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is greater than the first preset signal value, it is determined that the current point on the single-axis acceleration signal curve corresponding to the current moment is a peak, and the first preset signal value is a positive number greater than 0.

[0064] This step is mainly used to determine the peak point on the single-axis acceleration signal curve. It can be easily judged from its corresponding first-order differential signal curve, that is, the single-axis acceleration signal curve and the first-order differential signal curve are analyzed in chronological order on the same time axis. When the differential value of the previous moment in the first-order differential signal curve is Greater than or equal to 0, the difference value at the current time is less than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is greater than the first preset signal value (for example, the first preset signal value is set to correspond to 0.5 gravity acceleration value G. If one gravity acceleration value G is divided into 4096 parts, then the first preset signal value can be set to 2000 or 2048 here for easy calculation), the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a peak, where the first preset signal value is a positive number greater than 0.

[0065] 204. Analyze the single-axis acceleration signal curve and the first-order differential signal curve. When the differential value of the previous moment in the first-order differential signal curve is less than or equal to 0, the differential value at the current moment is greater than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is less than the second preset signal value, it is determined that the current point on the single-axis acceleration signal curve corresponding to the current moment is a trough, and the second preset signal value is a negative number less than 0.

[0066] This step is mainly used to determine the trough point on the single-axis acceleration signal curve. It can be easily judged from the corresponding first-order differential signal curve, that is, the single-axis acceleration signal curve and the first-order differential signal curve are analyzed in chronological order on a time axis. When the differential value of the previous moment in the first-order differential signal curve is Less than or equal to 0, the difference value at the current time If the value of the acceleration signal corresponding to the single-axis acceleration signal curve at the current moment is greater than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is less than the second preset signal value (for example, the second preset signal value is set to correspond to negative 0.5 gravity acceleration value G, if one gravity acceleration value G is divided into 4096 parts, then the second preset signal value can be set to -2000 or -2048 here for easy calculation), the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a trough, where the second preset signal value is a negative number less than 0.

[0067] 205. Determine whether there are multiple continuous peak points\trough points on the single-axis acceleration signal curve. If there are multiple continuous peak points\trough points on the single-axis acceleration signal curve, execute step 206; if there are no multiple continuous peak points\trough points on the single-axis acceleration signal curve, execute step 207.

[0068] After step 203 and step 204, the peak points and trough points on the single-axis acceleration signal curve that can be used to determine the cycle can be found. However, there may be some interference. This step further determines whether there are multiple continuous peak points\trough points on the single-axis acceleration signal curve. If there are multiple continuous peak points\trough points on the single-axis acceleration signal curve, it indicates that the acceleration value has a large fluctuation in this time period, and it should be avoided to be mistaken for the peak points\trough points of multiple cycles; if there are no multiple continuous peak points\trough points on the single-axis acceleration signal curve, it indicates that the acceleration value fluctuates relatively smoothly in this cycle, which does not affect the recognition of the cycle from the curve.

[0069] 206. Among multiple consecutive peak points, only the peak point with the largest acceleration signal value is selected as the peak. Among multiple consecutive trough points, only the trough point with the smallest acceleration signal value is selected as the trough.

[0070] When it is determined in step 205 that there are multiple consecutive peak points and trough points on the single-axis acceleration signal curve, in order to avoid identifying each combination of peak points and trough points as a cycle, this step selects only the peak point with the largest acceleration signal value as the peak among the multiple consecutive peak points, and selects only the trough point with the smallest acceleration signal value as the trough among the multiple consecutive trough points.

[0071] 207. Determine whether the time interval between the peak and the trough is within the preset time interval range. If so, execute step 208; if not, execute step 212.

[0072] In order to further accurately identify each cycle of the single-axis acceleration signal curve, after determining in step 205 that there are no consecutive multiple peak points / trough points on the single-axis acceleration signal curve, or after selecting the peak point and the trough point in step 206, this step further determines whether the time interval between the peak and the trough is within a preset time interval range (for example, the preset time interval is between 0.2 seconds and 3 seconds, and the preset time interval can be set according to the shortest time period and the longest time period between the exercise times of the exercise volunteers, which is not limited here). If the time interval between the peak and the trough is within the preset time interval range, it is preliminarily determined that it meets the recognition criteria for an exercise number cycle; if the time interval between the peak and the trough is not within the preset time interval range, it is considered that one exercise number within this period does not meet the recognition criteria.

[0073] 208. Compare the time interval between the peak and the trough with the average time interval between the corresponding single axis peak and the trough in the preset historical time period.

[0074] In order to further accurately identify each cycle of the single-axis acceleration signal curve, after determining in step 207 that the time interval between the peak and the trough is within the preset time interval range, this step can further compare the time interval between the peak and the trough with the average time interval between the corresponding single-axis peak and the trough in the preset historical time segment. For example, the historical time segment is the duration of one or more previously identified cycles. When there are multiple cycles, the average value can be calculated for comparison, which is not limited here.

[0075] 209. When the peak-to-peak value between the peak and the trough is greater than 0.7 times the peak-to-peak value average between the corresponding single-axis peak and trough within the preset historical time period, record one movement number, and then accumulate the X-axis acceleration signal curve formed by the X-axis acceleration signal to reflect the first movement number of the target user performing periodic movement, the Y-axis acceleration signal curve formed by the Y-axis acceleration signal to reflect the second movement number of the target user performing periodic movement, and the Z-axis acceleration signal curve formed by the Z-axis acceleration signal to reflect the third movement number of the target user performing periodic movement.

[0076] Specifically, after the comparison in step 208, this step can select the peak-to-peak value of the acceleration value to further determine whether the number of exercises corresponding to each cycle of the target user is valid, because the amplitude of the target user's periodic exercise will not change greatly in adjacent cycles. The so-called peak-to-peak value is the difference between the highest value and the lowest value of the acceleration signal in the cycle, that is, the absolute value of the range between the maximum and the minimum, that is, the highest value (positive number) of the acceleration signal in the cycle minus the lowest value (negative number) of the acceleration signal, and the result is a positive number. The preset historical duration in this step can be an adjacent cycle (in this case, the peak-to-peak value average between the peak and trough of a single axis in the preset historical duration is the peak-to-peak value of its own cycle), and the preset historical duration can also be multiple adjacent and continuous cycles (in this case, the peak-to-peak value average between the peak and trough of a single axis in the preset historical duration is the peak-to-peak value average of multiple adjacent and continuous cycles).

[0077] 210. When the peak-to-peak value between the peak and the trough is less than or equal to 0.7 times the average peak-to-peak value between the peak and the trough of the corresponding single axis within the preset historical time period, the number of exercises will not be recorded.

[0078] 211. Don’t keep track of the number of times you exercise.

[0079] After it is determined in step 207 that the time interval between the peak and the trough is not within the preset time interval range, this step will not identify the time period on the single-axis acceleration signal curve as one movement.

[0080] Based on the above Figure 2The understanding basis of the embodiment, specifically, after the comparison in step 208, the embodiment can also select the length of the adjacent cycles to further determine whether the number of exercises corresponding to the current cycle of the target user is valid, see Figure 3 Another embodiment of the method for calculating the number of exercises of the present application includes:

[0081] 301. Determine a time period of the periodic motion at the current moment.

[0082] Specifically, the time period of this step Equal to the time interval between the current peak and the previous peak of the periodic motion, or the time period It is equal to the time interval between the trough at the current moment and the trough of the previous periodic motion.

[0083] 302. Compare the time period with the time period of the previous periodic motion.

[0084] Specifically, the time period of step 301 is The time period of the previous periodic motion For comparison, the time period of the previous periodic motion The calculation method similar to step 301 can be referred to for obtaining.

[0085] 303. When the time period is greater than or equal to 0.1 times of the time period, the step of recording the number of movements is triggered.

[0086] Specifically, when the time period Greater than or equal to the time period When the value is 0.1 times of the value, one exercise is recorded.

[0087] 304. When the time period is less than 0.1 times of the time period, the number of movements is not recorded, and step 102 is triggered to obtain a movement signal of a target user wearing the smart device performing periodic movement based on the three-axis acceleration sensor of the smart device.

[0088] See also Figure 4 Another embodiment of the method for calculating the number of exercises of the present application includes:

[0089] 401. When a peak or a trough appears on the single-axis acceleration signal curve and no trough or a peak appears after a preset time, it is determined that the target user is in a resting state, and the resting time of the target user in the resting state is recorded.

[0090] It is understandable that after the target user enters the exercise frequency recording mode of periodic exercise in step 101, the target user may also take a rest in the middle of the periodic exercise. This embodiment can distinguish the exercise duration from the rest duration. Specifically, when a peak\trough appears on the single-axis acceleration signal curve and no trough\peak appears after a preset time (for example, the preset time is 3 seconds or 5 seconds), it can be determined that the target user is in a resting state at this time, and the rest duration of the target user in the resting state is recorded.

[0091] See also Figure 5 Another embodiment of the method for calculating the number of exercises of the present application includes:

[0092] 501. When receiving an end instruction for ending the periodic motion, exit the exercise frequency recording mode of the periodic motion.

[0093] After entering the exercise frequency recording mode for periodic exercise in step 101, you can receive an explicit end instruction from the target user to end the periodic exercise at any time (such as an end confirmation of a physical button or a virtual button), and then exit the exercise frequency recording mode for periodic exercise (such as skipping rope) and end recording the exercise duration.

[0094] 502. Calculate the maximum number of continuous movements.

[0095] When step 501 determines to exit the exercise frequency recording mode of the periodic exercise (such as skipping rope) and ends recording the exercise duration, this step can further calculate the maximum continuous exercise frequency within the exercise duration of the periodic exercise. The so-called maximum continuous exercise frequency is the maximum number of exercises when the target user is in the exercise state.

[0096] 503. Calculate the maximum movement frequency.

[0097] When step 501 determines to exit the exercise frequency recording mode of the periodic exercise (such as rope skipping) and finishes recording the exercise duration, this step can further calculate the maximum exercise frequency within the exercise duration of the periodic exercise. The so-called maximum exercise frequency is the maximum quotient obtained by dividing the exercise frequency of the target user in the exercise state by the exercise duration from the time when the target user enters the exercise frequency recording mode of the periodic exercise to the time when the target user exits the exercise frequency recording mode of the periodic exercise by the rest duration.

[0098] 504. Calculate the average exercise frequency.

[0099] When step 501 determines to exit the exercise frequency recording mode of the periodic exercise (such as rope skipping) and ends recording the exercise duration, this step can further calculate the average exercise frequency within the exercise duration of the periodic exercise. The so-called average exercise frequency is the average value of the quotient obtained by dividing the exercise frequency of the target user in the exercise state by the exercise duration from the time the target user enters the exercise frequency recording mode of the periodic exercise to the time the target user exits the exercise frequency recording mode of the periodic exercise by the rest duration.

[0100] It is worth noting that the present embodiment can also calculate the total number of exercises, total exercise duration and other data of the target user from the time the target user enters the periodic exercise number recording mode to the time the target user exits the periodic exercise number recording mode, excluding the rest time in the rest state, and transmit the relevant data to the display screen for display or playback, so as to provide the target user with reference and provide data reference for their decision to perform periodic exercise. The data displayed on the above-mentioned display screen is usually one-time and will not be saved after being displayed for a certain preset time or confirmed by the target user, so as to free up memory space and save power.

[0101] The above embodiment describes the application of the method for calculating the number of movements of the present application to a smart device equipped with a three-axis acceleration sensor. The following describes an embodiment of the application of the system for calculating the number of movements of the present application to a smart device equipped with a three-axis acceleration sensor. Figure 6 ,include:

[0102] An acquisition unit 601 is used to acquire a motion signal of a target user wearing the smart device performing periodic motion according to a three-axis acceleration sensor of the smart device, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal;

[0103] The judging unit 602 is used to judge whether the first movement number of the target user's periodic movement has continuously reached a first preset value according to the X-axis movement signal; judge whether the second movement number of the target user's periodic movement has continuously reached a second preset value according to the Y-axis movement signal; and judge whether the third movement number of the target user's periodic movement has continuously reached a third preset value according to the Z-axis movement signal;

[0104] The identification unit 603 is used to identify that the target user is currently in an exercise state when the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value;

[0105] The calculation unit 604 is used for, when it is determined that the target user is currently in a motion state, accumulating the number of times of the target user based on the first preset value as the number of times of motion, to obtain a first cumulative number of times of motion of the target user; accumulating the number of times of the target user based on the second preset value as the number of times of motion, to obtain a second cumulative number of times of motion of the target user; accumulating the number of times of the target user based on the third preset value as the number of times of motion, to obtain a third cumulative number of times of motion of the target user;

[0106] A selection unit 605 is used to select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number by using a preset model to obtain a target movement number, where the target movement number is one of the first movement cumulative number, the second movement cumulative number and the third movement cumulative number;

[0107] The preset model is a trained model that can select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number based on the X-axis motion signal, the Y-axis motion signal and the Z-axis motion signal of the target user performing periodic motion.

[0108] The operation performed by the exercise frequency calculation system of this embodiment is similar to the above Figure 1 The operations that must be performed in the embodiment are similar, and the repeated parts will not be repeated here.

[0109] See also Figure 6 Another embodiment of the present application of the exercise frequency calculation system applied to a smart device equipped with a three-axis acceleration sensor includes:

[0110] An acquisition unit 701 is used to acquire a motion signal of a target user wearing the smart device performing periodic motion according to a three-axis acceleration sensor of the smart device, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal;

[0111] The judging unit 702 is used to judge whether the first movement number of the target user's periodic movement has continuously reached a first preset value according to the X-axis movement signal; judge whether the second movement number of the target user's periodic movement has continuously reached a second preset value according to the Y-axis movement signal; and judge whether the third movement number of the target user's periodic movement has continuously reached a third preset value according to the Z-axis movement signal;

[0112] The identification unit 703 is used to identify that the target user is currently in an exercise state when the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value;

[0113] The calculation unit 704 is used for, when it is determined that the target user is currently in a motion state, accumulating the number of times of the target user based on the first preset value as the number of times of motion, to obtain a first cumulative number of times of motion of the target user; accumulating the number of times of the target user based on the second preset value as the number of times of motion, to obtain a second cumulative number of times of motion of the target user; accumulating the number of times of the target user based on the third preset value as the number of times of motion, to obtain a third cumulative number of times of motion of the target user;

[0114] A selection unit 705 is used to select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number by using a preset model to obtain a target movement number, where the target movement number is one of the first movement cumulative number, the second movement cumulative number and the third movement cumulative number;

[0115] The preset model is a trained model that can select the first movement cumulative number, the second movement cumulative number and the third movement cumulative number based on the X-axis motion signal, the Y-axis motion signal and the Z-axis motion signal of the target user performing periodic motion.

[0116] Optionally, the identification unit 703 is also used to determine that the target user is not currently in motion when the first exercise number does not continuously reach the first preset value, and / or the second exercise number does not continuously reach the second preset value, and / or the third exercise number does not continuously reach the third preset value, record the non-exercise time of the target user in the non-exercise state, and trigger the step of obtaining a motion signal of the target user wearing the smart device performing periodic exercise based on the three-axis acceleration sensor of the smart device.

[0117] Optionally, the system further includes:

[0118] A connection unit 706, used to connect the single-axis motion signal to form a single-axis acceleration signal curve, wherein the single-axis motion signal is one of an X-axis motion signal, a Y-axis motion signal or a Z-axis motion signal;

[0119] The acquisition unit 701 is further used to acquire a first-order differential signal curve of the single-axis acceleration signal curve;

[0120] The identification unit 703 is further used to analyze the single-axis acceleration signal curve and the first-order differential signal curve, when the difference value of the first-order differential signal curve at the previous moment Greater than or equal to 0, the difference value at the current time is less than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is greater than a first preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a peak, and the first preset signal value is a positive number greater than 0;

[0121] The identification unit 703 is further used to analyze the single-axis acceleration signal curve and the first-order differential signal curve, when the difference value of the first-order differential signal curve at the previous moment Less than or equal to 0, the difference value at the current time is greater than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is less than a second preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a trough, and the second preset signal value is a negative number less than 0;

[0122] The judging unit 702 is further configured to judge whether the time interval between the peak and the trough is within a preset time interval range;

[0123] The calculation unit 704 is further used to record the number of movements once if the time interval between the peak and the trough is within the preset time interval range, and then accumulate to obtain: the X-axis acceleration signal curve formed by the X-axis acceleration signal reflects the first number of movements of the target user performing periodic movements, the Y-axis acceleration signal curve formed by the Y-axis acceleration signal reflects the second number of movements of the target user performing periodic movements, and the Z-axis acceleration signal curve formed by the Z-axis acceleration signal reflects the third number of movements of the target user performing periodic movements.

[0124] Optionally, the system further includes:

[0125] The judging unit 702 is further configured to judge whether there are a plurality of continuous peak points / trough points on the single-axis acceleration signal curve;

[0126] The identification unit 703 is also used to select only the peak point with the largest acceleration signal value as the peak among the multiple consecutive peak points / trough points / if there are multiple consecutive peak points / trough points on the single-axis acceleration signal curve, / select only the trough point with the smallest acceleration signal value as the trough among the multiple consecutive trough points.

[0127] Optionally, the system further includes:

[0128] A comparison unit 707, configured to compare the peak-to-peak interval between the peak and the trough with the peak-to-peak average between the corresponding single-axis peak and trough within a preset historical time period;

[0129] A trigger unit 708, configured to trigger the step of recording a movement count when the peak-to-peak value between the peak and the trough is greater than 0.7 times the peak-to-peak value average between the peak and the trough of the corresponding single axis within a preset historical time period;

[0130] The trigger unit 708 is also used to trigger the step of obtaining a motion signal of a target user wearing the smart device performing periodic motion based on the three-axis acceleration sensor of the smart device, without recording the number of movements when the peak-to-peak value between the peak and the trough is less than or equal to 0.7 times the average peak-to-peak value between the corresponding single-axis peak and trough within a preset historical time period.

[0131] Optionally, the system further includes:

[0132] Determining unit 709, used to determine the time period of the periodic motion at the current moment , time period Equal to the time interval between the peak of the current moment and the peak of the previous periodic motion, or the time period is equal to the time interval between the trough at the current moment and the trough of the previous periodic motion;

[0133] The comparison unit 707 is further configured to compare the time period The time period of the previous periodic motion Compare;

[0134] The trigger unit 708 is also used for when the time period Greater than or equal to the time period When the value is 0.1 times of the value, the step of recording the number of movements is triggered;

[0135] The trigger unit 708 is also used for when the time period Less than the time period When the number of movements is 0.1 times of that of the target user wearing the smart device, the number of movements is not recorded, and the step of obtaining a movement signal of a target user performing periodic movement according to the three-axis acceleration sensor of the smart device is triggered.

[0136] Optionally, the system further includes:

[0137] The receiving unit 710 is used to receive a start instruction for starting a periodic movement and enter a movement frequency recording mode of the periodic movement;

[0138] The determining unit 709 is further configured to determine that the target user is in a resting state when a peak / trough appears on the single-axis acceleration signal curve and no trough / peak appears after a preset time period.

[0139] The recording unit 711 is used to record the rest time of the target user in the rest state;

[0140] The trigger unit is used to trigger the step of obtaining a motion signal of a target user wearing the smart device performing periodic motion based on the three-axis acceleration sensor of the smart device;

[0141] The exit unit 712 is used to exit the exercise frequency recording mode of the periodic exercise when receiving an end instruction to end the periodic exercise.

[0142] Optionally, the periodic exercise includes: one of rope skipping, walking, running, pull-ups, and sit-ups;

[0143] The system further comprises:

[0144] The calculation unit 704 is further configured to calculate a maximum number of consecutive movements, where the maximum number of consecutive movements is the maximum number of movements of the target user when the target user is in a moving state;

[0145] The calculation unit 704 is further configured to calculate a maximum exercise frequency, wherein the maximum exercise frequency is the maximum quotient obtained by dividing the number of exercises of the target user in the exercise state by the exercise duration during the period from when the target user enters the exercise number recording mode of periodic exercise to when the target user exits the exercise number recording mode of periodic exercise;

[0146] The calculation unit 704 is also used to calculate the average exercise frequency, which is the average value of the quotient obtained by dividing the number of exercises of the target user when he is in exercise state by the exercise duration from the time the target user enters the exercise number recording mode of periodic exercise to the time the target user exits the exercise number recording mode of periodic exercise.

[0147] The operation performed by the exercise frequency calculation system of this embodiment is similar to the above Figures 1 to 5 The operations that must be performed in the embodiment are similar, and the repeated parts will not be repeated here.

[0148] The following describes the smart device in the embodiment of the present application. Figure 8 , an embodiment of the smart device in the embodiments of the present application includes:

[0149] The smart device 800 may include one or more central processing units (CPU) 801 and a memory 802, in which one or more applications or data are stored. The memory 802 is a volatile storage or a persistent storage. The program stored in the memory 802 may include one or more modules, and each module may include a series of instruction operations in the smart device. Furthermore, the central processing unit 801 may be configured to communicate with the memory 802 to execute a series of instruction operations in the memory 802 on the smart device 800. The smart device 800 may also include: one or more network interfaces 803, one or more three-axis acceleration sensors 804, one or more display screens 805, one or more neural network processors 806, one or more power supplies 807, and / or one or more operating systems, such as Harmony OS, Windows Server, MacOS, Unix, Linux, FreeBSD, etc. The central processing unit 801 may execute the aforementioned Figures 1 to 5 The operations performed in any of the illustrated embodiments will not be described in detail here.

[0150] In several embodiments provided in the embodiments of the present application, those skilled in the art should understand that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0151] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. If the 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-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution 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, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

[0152] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for calculating the number of exercises, characterized in that: Applicable to smart devices equipped with three-axis acceleration sensors, including: Acquire, based on the three-axis acceleration sensor of the smart device, a motion signal of a target user wearing the smart device performing periodic motion, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal; Determine whether the first movement number of the target user's periodic movement has continuously reached a first preset value based on the X-axis movement signal; determine whether the second movement number of the target user's periodic movement has continuously reached a second preset value based on the Y-axis movement signal; determine whether the third movement number of the target user's periodic movement has continuously reached a third preset value based on the Z-axis movement signal; When the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value, it is determined that the target user is currently in an exercise state; When it is determined that the target user is currently in a state of exercise, the number of times of the target user is accumulated based on the first preset value as the number of times of exercise, to obtain the first accumulated number of times of exercise of the target user; the number of times of the target user is accumulated based on the second preset value as the number of times of exercise, to obtain the second accumulated number of times of exercise of the target user; the number of times of the target user is accumulated based on the third preset value as the number of times of exercise, to obtain the third accumulated number of times of exercise of the target user; Selecting the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number using a preset model to obtain a target movement number, where the target movement number is one of the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number; The preset model is a trained model capable of selecting the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number according to the X-axis movement signal, the Y-axis movement signal, and the Z-axis movement signal of the target user performing periodic movement; When the first exercise number does not continuously reach the first preset value, and / or the second exercise number does not continuously reach the second preset value, and / or the third exercise number does not continuously reach the third preset value, it is determined that the target user is not currently in a state of exercise, and the non-exercise time of the target user in a state of non-exercise is recorded, triggering the step of obtaining, based on the three-axis acceleration sensor of the smart device, a motion signal of the target user wearing the smart device performing periodic exercise; Before determining, according to the X-axis motion signal, whether the first movement number of the target user performing the periodic motion continuously reaches a first preset value, the method further includes: Connecting the single-axis motion signals to form a single-axis acceleration signal curve, wherein the single-axis motion signal is one of an X-axis motion signal, a Y-axis motion signal or a Z-axis motion signal; Obtaining a first-order differential signal curve of the single-axis acceleration signal curve; Analyze the single-axis acceleration signal curve and the first-order differential signal curve. When the differential value of the first-order differential signal curve at the previous moment is Greater than or equal to 0, the difference value at the current time is less than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is greater than a first preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a peak, and the first preset signal value is a positive number greater than 0; Analyze the single-axis acceleration signal curve and the first-order differential signal curve. When the differential value of the first-order differential signal curve at the previous moment is Less than or equal to 0, the difference value at the current time is greater than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is less than a second preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a trough, and the second preset signal value is a negative number less than 0; Determining whether the time interval between the peak and the trough is within a preset time interval range; If the time interval between the wave peak and the wave trough is within the preset time interval range, the number of movements is recorded once, and then accumulated to obtain: the X-axis motion signal curve formed by the X-axis motion signal reflects the first number of movements of the target user performing periodic movements, the Y-axis motion signal curve formed by the Y-axis motion signal reflects the second number of movements of the target user performing periodic movements, and the Z-axis motion signal curve formed by the Z-axis motion signal reflects the third number of movements of the target user performing periodic movements; Before determining whether the time interval between the peak and the trough is within a preset time interval range, the method further includes: Determine whether there are multiple continuous peak points / trough points on the single-axis acceleration signal curve; If there are multiple continuous peak points / trough points on the single-axis acceleration signal curve, only the peak point with the largest acceleration signal value is selected as the peak among the multiple continuous peak points / only the trough point with the smallest acceleration signal value is selected as the trough among the multiple continuous trough points; After the time interval between the wave crest and the wave trough is within the preset time interval range and before recording the number of movements, the method further includes: Compare the peak-to-peak value between the peak and the trough with the average peak-to-peak value between the corresponding single-axis peak and trough within a preset historical time period; When the peak-to-peak value between the peak and the trough is greater than 0.7 times the peak-to-peak value average between the peak and the trough of the corresponding single axis within the preset historical time period, triggering the step of recording the number of movements once; When the peak-to-peak value between the peak and the trough is less than or equal to 0.7 times the peak-to-peak value average between the corresponding single-axis peak and trough within the preset historical time period, the number of exercises is not recorded, and the step of obtaining the motion signal of the target user wearing the smart device performing periodic exercise based on the three-axis acceleration sensor of the smart device is triggered.

2. The method for calculating the number of exercises according to claim 1, characterized in that: The method further comprises: Determine the time period of the periodic motion at the current moment , time period Equal to the time interval between the peak of the current moment and the peak of the previous periodic motion, or the time period is equal to the time interval between the trough at the current moment and the trough of the previous periodic motion; The time period The time period of the previous periodic motion Compare; When the time period Greater than or equal to the time period When the value is 0.1 times of the value, the step of recording the number of movements is triggered; When the time period Less than the time period When the number of movements is 0.1 times of that of the target user wearing the smart device, the number of movements is not recorded, and the step of obtaining a movement signal of a target user performing periodic movement according to the three-axis acceleration sensor of the smart device is triggered.

3. The method for calculating the number of exercises according to claim 1, characterized in that: Before obtaining the motion signal of the target user wearing the smart device performing periodic motion according to the three-axis acceleration sensor of the smart device, the method further includes: Receiving a start instruction for starting a periodic motion, and entering a motion frequency recording mode of the periodic motion; After determining that the current point on the single-axis acceleration signal curve corresponding to the current moment is a peak / trough, the method further includes: When a peak / trough appears on the single-axis acceleration signal curve and no trough / peak appears after a preset time, it is determined that the target user is in a resting state, the resting time of the target user in the resting state is recorded, and the step of obtaining a motion signal of the target user wearing the smart device performing periodic motion based on the three-axis acceleration sensor of the smart device is triggered; When an end instruction for ending the periodic motion is received, the exercise number recording mode of the periodic motion is exited.

4. The method for calculating the number of exercises according to claim 3, characterized in that: The periodic exercise includes: one of rope skipping, walking, running, pull-ups, and sit-ups; After exiting the exercise frequency recording mode of the periodic exercise, the method further includes: Calculating a maximum number of continuous movements, where the maximum number of continuous movements is the maximum number of movements of the target user when the target user is in a moving state; Calculating a maximum exercise frequency, wherein the maximum exercise frequency is the maximum quotient obtained by dividing the number of exercises of the target user in an exercise state by the exercise duration during the period from when the target user enters a periodic exercise number recording mode to when the target user exits the periodic exercise number recording mode; The average exercise frequency is calculated, where the average exercise frequency is the average value of the quotient obtained by dividing the number of exercises of the target user when in exercise state by the exercise duration from the time the target user enters the exercise number recording mode of periodic exercise to the time the target user exits the exercise number recording mode of periodic exercise.

5. A system for calculating the number of exercises, characterized in that: Applicable to smart devices equipped with three-axis acceleration sensors, including: An acquisition unit, configured to acquire, based on a three-axis acceleration sensor of the smart device, a motion signal of a target user wearing the smart device performing periodic motion, wherein the motion signal includes: an X-axis motion signal, a Y-axis motion signal, and a Z-axis motion signal; a judgment unit, configured to judge whether the first movement number of the target user's periodic movement has continuously reached a first preset value according to the X-axis movement signal; judge whether the second movement number of the target user's periodic movement has continuously reached a second preset value according to the Y-axis movement signal; and judge whether the third movement number of the target user's periodic movement has continuously reached a third preset value according to the Z-axis movement signal; a recognition unit, configured to recognize that the target user is currently in a state of exercise when the first exercise number continuously reaches the first preset value, the second exercise number continuously reaches the second preset value, and the third exercise number continuously reaches the third preset value; a calculation unit, configured to, when determining that the target user is currently in a state of motion, accumulate the number of times of the target user based on the first preset value as the number of times of motion, to obtain a first accumulated number of times of motion of the target user; accumulate the number of times of the target user based on the second preset value as the number of times of motion, to obtain a second accumulated number of times of motion of the target user; and accumulate the number of times of the target user based on the third preset value as the number of times of motion, to obtain a third accumulated number of times of motion of the target user; A selection unit, configured to select the first cumulative movement number, the second cumulative movement number, and the third cumulative movement number using a preset model to obtain a target movement number, wherein the target movement number is one of the first cumulative movement number, the second cumulative movement number, and the third cumulative movement number; The preset model is a trained model capable of selecting the first movement cumulative number, the second movement cumulative number, and the third movement cumulative number according to the X-axis movement signal, the Y-axis movement signal, and the Z-axis movement signal of the target user performing periodic movement; The identification unit is further configured to, when the first exercise number does not continuously reach the first preset value, and / or the second exercise number does not continuously reach the second preset value, and / or the third exercise number does not continuously reach the third preset value, identify that the target user is not currently in a state of exercise, record the length of time that the target user is not in a state of exercise, and trigger the step of obtaining, based on the three-axis acceleration sensor of the smart device, a motion signal of the target user wearing the smart device performing periodic exercise; The system further comprises: A connection unit, used for connecting single-axis motion signals to form a single-axis acceleration signal curve, wherein the single-axis motion signal is one of an X-axis motion signal, a Y-axis motion signal or a Z-axis motion signal; The acquisition unit is further used to acquire a first-order differential signal curve of the single-axis acceleration signal curve; The identification unit is further used to analyze the single-axis acceleration signal curve and the first-order differential signal curve, when the differential value of the first-order differential signal curve at the previous moment Greater than or equal to 0, the difference value at the current time is less than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is greater than a first preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a peak, and the first preset signal value is a positive number greater than 0; The identification unit is further used to analyze the single-axis acceleration signal curve and the first-order differential signal curve, when the differential value of the first-order differential signal curve at the previous moment Less than or equal to 0, the difference value at the current time is greater than 0, and the acceleration signal value corresponding to the single-axis acceleration signal curve at the current moment is less than a second preset signal value, the current point on the single-axis acceleration signal curve corresponding to the current moment is determined to be a trough, and the second preset signal value is a negative number less than 0; The judging unit is further configured to judge whether the time interval between the wave peak and the wave trough is within a preset time interval range; The calculation unit is further configured to record a movement number if the time interval between the wave peak and the wave trough is within the preset time interval range, and then accumulate to obtain: an X-axis motion signal curve formed by the X-axis motion signal reflects the first movement number of the target user performing periodic motion, a Y-axis motion signal curve formed by the Y-axis motion signal reflects the second movement number of the target user performing periodic motion, and a Z-axis motion signal curve formed by the Z-axis motion signal reflects the third movement number of the target user performing periodic motion; The system further comprises: The judging unit is further used to judge whether there are a plurality of continuous peak points / trough points on the single-axis acceleration signal curve; The identification unit is further configured to select only the peak point with the largest acceleration signal value as the peak among the plurality of continuous peak points / trough points if there are a plurality of continuous peak points / trough points on the single-axis acceleration signal curve / select only the trough point with the smallest acceleration signal value as the trough among the plurality of continuous trough points; The system further comprises: A comparison unit, for comparing the peak-to-peak interval between the peak and the trough with the peak-to-peak average between the corresponding single-axis peak and trough within a preset historical time period; A trigger unit, configured to trigger the step of recording a movement count when the peak-to-peak value between the peak and the trough is greater than 0.7 times the peak-to-peak value average between the peak and the trough of the corresponding single axis within a preset historical time period; The trigger unit is also used to trigger the step of obtaining a motion signal of a target user wearing the smart device performing periodic motion based on the three-axis acceleration sensor of the smart device, without recording the number of movements when the peak-to-peak value between the peak and the trough is less than or equal to 0.7 times the average peak-to-peak value between the corresponding single-axis peak and trough within a preset historical time period.

6. A smart device, characterized in that: include: Central processing unit, memory, bus, network interface, three-axis acceleration sensor, neural network processor, display screen; The central processing unit is connected to the memory, the network interface, the three-axis acceleration sensor, the neural network processor, and the display screen through the bus; The memory stores a program; When the processor executes the program stored in the memory, the method for calculating the number of exercises described in any one of claims 1 to 4 is performed.