Method and device for counting strokes in swimming, smart wearable device and medium

CN117312990BActive Publication Date: 2026-08-07SHENZHEN DO INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN DO INTELLIGENT TECH CO LTD
Filing Date
2023-11-13
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

但是,目前一些智能穿戴设备仅能检测游泳时长,无法统计划水次数

Benefits of technology

[0017]本发明实施例提供的上述游泳划水计次的方法、装置、智能穿戴设备及介质,首先采集目标用户游泳过程中的运动信号;然后基于第一预设窗口(包括第一预设数量的数据点)计算运动信号的X轴信号的第一滑动斜率;最后基于第一滑动斜率的阈值对第一滑动斜率进行标记,并基于标记统计目标用户的划水次数。上述方法利用采集到的游泳过程中的运动信号,通过计算运动信号的斜率并进行标记,实时获取准确的划水次数,使用户能够及时获知自身的运动状态,提升用户的体验。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312990B_ABST
    Figure CN117312990B_ABST
Patent Text Reader

Abstract

The application provides a swimming stroke counting method and device, an intelligent wearable device and a medium, and comprises the following steps: collecting motion signals of a target user during swimming; calculating a first sliding slope of an X-axis signal of the motion signals based on a first preset window; wherein the first preset window comprises a first preset number of data points; marking the first sliding slope based on a threshold value of the first sliding slope, and counting the number of strokes of the target user based on the marking. The application can obtain accurate stroke count in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart wearable device technology, and in particular to a method, apparatus, smart wearable device, and medium for counting swimming strokes. Background Technology

[0002] With the popularity of smart wearable devices (such as smartwatches and smart bracelets), human motion recognition technology based on these devices is playing an increasingly important role in daily life. Swimming, as a traditional sport, can enhance cardiac function, boost immunity, improve physique, and strengthen lung function, making it popular among various groups. Therefore, monitoring swimming activity has gradually become a hot topic for smart wearable devices. However, currently, some smart wearable devices can only detect swimming time and cannot track the number of swims. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, apparatus, smart wearable device and medium for counting swimming strokes, which can obtain accurate stroke counts in real time.

[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:

[0005] In a first aspect, embodiments of the present invention provide a method for counting the number of strokes in swimming, comprising: acquiring motion signals of a target user during swimming; calculating a first sliding slope of the X-axis signal of the motion signal based on a first preset window; wherein the first preset window includes a first preset number of data points; marking the first sliding slope based on a threshold of the first sliding slope, and counting the number of strokes of the target user based on the marking.

[0006] In one embodiment, marking the first sliding slope based on a threshold of the first sliding slope includes: calculating the maximum and minimum values ​​of the first sliding slope, and determining an upper threshold and a lower threshold of the first sliding slope based on the maximum and minimum values; wherein the maximum and minimum values ​​of the first sliding slope are updated every second preset number of data points; the first sliding slope is marked based on the upper threshold and the lower threshold; wherein if the first sliding slope is greater than or equal to the upper threshold, it is marked as a first value; if the first sliding slope is less than or equal to the lower threshold, it is marked as a second value; and if the first sliding slope is greater than the lower threshold and less than the upper threshold, it is marked as the same as the previous mark.

[0007] In one implementation, determining the upper and lower thresholds of the first sliding slope based on the maximum and minimum values ​​includes: if a start count flag for the number of strokes is obtained, updating the upper and lower thresholds of the first sliding slope every third preset number of data points; if no start count flag for the number of strokes is obtained, determining the upper and lower thresholds of the first sliding slope based on the maximum and minimum values.

[0008] In one implementation, the number of strokes by a target user is counted based on a marker, including: determining the inflection point of the first swipe slope based on the marker; wherein the marker of the inflection point is (first value, second value, first value); if the interval between the current inflection point and the previous inflection point is within a preset range, the number of strokes is incremented by one; if the cumulative number of strokes is greater than the counting threshold, a counting flag is determined.

[0009] In one implementation, after counting the number of strokes by the target user based on the markers, the method further includes: determining the stroke count characteristics and adjacent stroke characteristics based on the motion signal, and correcting the stroke count based on the stroke count characteristics and adjacent stroke characteristics.

[0010] In one embodiment, determining stroke count characteristics and adjacent stroke characteristics based on motion signals includes: calculating a second sliding slope of the X-axis signal of the motion signal based on a second preset window, and calculating a third sliding slope of the Y-axis signal of the motion signal and a fourth sliding slope of the Z-axis signal of the motion signal based on a third preset window; calculating the ratios of the first sliding slope to the second, third, and fourth sliding slopes respectively, and determining the ratios as stroke count characteristics; when the number of strokes changes, obtaining the stroke duration of a single stroke, and determining the ratio of the stroke durations of two adjacent strokes as adjacent stroke characteristics.

[0011] In one implementation, the number of strokes is corrected based on the stroke count feature and the adjacent stroke feature, including: if the stroke count feature is greater than a first preset value, then the number of strokes with a value greater than the first preset value is corrected; if the adjacent stroke feature is less than a second preset value, then the current number of strokes is determined to be an incorrect count, and the incorrect count is corrected.

[0012] In one embodiment, the method further includes: marking the second sliding slope, the third sliding slope, and the fourth sliding slope respectively, and determining the number of strokes on the X-axis, the number of strokes on the Y-axis, and the number of strokes on the Z-axis based on the markings; calculating the ratio of the number of strokes on the X-axis to the number of strokes on the Y-axis and the number of strokes on the Z-axis respectively, and correcting the number of strokes based on the ratio.

[0013] Secondly, embodiments of the present invention provide a swimming stroke counting device, comprising: a signal acquisition module for acquiring motion signals of a target user during swimming; a slope calculation module for calculating a first sliding slope of the X-axis signal of the motion signal based on a first preset window; wherein the first preset window includes a first preset number of data points; and a stroke counting module for marking the first sliding slope based on a threshold value of the first sliding slope, and counting the number of strokes of the target user based on the marking.

[0014] Thirdly, embodiments of the present invention provide a smart wearable device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of any of the methods provided in the first aspect above.

[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method provided in any of the first aspects above.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] The swimming stroke counting method, apparatus, smart wearable device, and medium provided in this invention first collect motion signals from a target user during swimming; then, based on a first preset window (including a first preset number of data points), calculate a first sliding slope of the X-axis signal of the motion signal; finally, mark the first sliding slope based on a threshold value, and count the number of strokes by the target user based on the mark. This method utilizes the collected motion signals during swimming, calculates the slope of the motion signal, and marks it to obtain accurate stroke counts in real time, enabling users to promptly understand their own movement status and improving the user experience.

[0018] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0019] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 A flowchart illustrating a method for counting swimming strokes according to an embodiment of the present invention;

[0022] Figure 2 A flowchart for dynamically updating a threshold is provided in an embodiment of the present invention;

[0023] Figure 3 A flowchart for N-wave counting is provided as an embodiment of the present invention;

[0024] Figure 4 A flowchart for obtaining count features is provided as an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of a swimming stroke counting device provided in an embodiment of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of a smart wearable device provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] Currently, some smart wearable devices can only detect swimming duration and cannot count the number of strokes. Therefore, this invention provides a method, apparatus, smart wearable device, and medium for counting swimming strokes, which can obtain accurate stroke counts in real time.

[0029] To facilitate understanding of this embodiment, a method for counting swimming strokes disclosed in this invention will first be described in detail. This method can be executed by a smart wearable device, such as a smartwatch, smart bracelet, etc. See also Figure 1 The flowchart shown illustrates a method for counting swimming strokes, indicating that the method mainly includes the following steps S101 to S103:

[0030] Step S101: Collect motion signals from the target user during swimming.

[0031] In one implementation, smart wearable devices such as smartwatches and smart bracelets can be used to collect motion signals from the target user during swimming using devices such as ACC sensors. These motion signals include X-axis signals, Y-axis signals, and Z-axis signals.

[0032] Step S102: Calculate the first sliding slope of the X-axis signal of the motion signal based on the first preset window.

[0033] The first preset window includes a first preset number of data points, which can be 45. In one embodiment, the first sliding slope of the X-axis signal is calculated using 45 data points as the sliding window, and the sliding window is slid backward to calculate the first sliding slope of the X-axis signal.

[0034] Step S103: Mark the first sliding slope based on the threshold of the first sliding slope, and count the number of times the target user swipes based on the mark.

[0035] In one implementation, a threshold for the first sliding slope can be determined based on the maximum and minimum values ​​of the first sliding slope. Then, the first sliding slope can be marked according to the relationship between the first sliding slope and the threshold. Finally, the number of strokes by the target user can be determined based on the marking.

[0036] The swimming stroke counting method provided in this embodiment of the invention utilizes the collected motion signals during the swimming process, calculates the slope of the motion signals and marks them, and obtains accurate stroke counts in real time, enabling users to know their own movement status in a timely manner and improving the user experience.

[0037] In one implementation, for the aforementioned step S103, i.e., when marking the first sliding slope based on a threshold of the first sliding slope, the following methods may be used, including but not limited to:

[0038] First, the maximum and minimum values ​​of the first sliding slope are calculated, and the upper and lower threshold values ​​of the first sliding slope are determined based on the maximum and minimum values; wherein, the maximum and minimum values ​​of the first sliding slope are updated every second preset number of data points.

[0039] In practice, after calculating the first sliding slope, the maximum and minimum values ​​of the first sliding slope are recorded, and the maximum and minimum values ​​of the first sliding slope are updated once every second preset number of data points (such as 110 points).

[0040] Specifically, when determining the upper and lower thresholds of the first sliding slope based on the maximum and minimum values, the following methods may be used, including but not limited to: if the starting count flag of the number of strokes is obtained, the upper and lower thresholds of the first sliding slope are updated every third preset number of data points; if the starting count flag of the number of strokes is not obtained, the upper and lower thresholds of the first sliding slope are determined based on the maximum and minimum values.

[0041] In practice, when updating the upper and lower thresholds of the first sliding slope, the system first determines whether stroke counting has started, i.e., whether a start count flag can be obtained (i.e., whether strokes are greater than 4). If so, the upper and lower thresholds of the first sliding slope are updated every third preset number of data points (e.g., 100 points). If not, the upper and lower thresholds of the first sliding slope are updated once for each point. Specifically, the upper threshold = maximum value / 1.8, and the lower threshold = minimum value / 1.8.

[0042] Then, the first sliding slope is marked based on the upper and lower thresholds of the first sliding slope; wherein, if the first sliding slope is greater than or equal to the upper threshold, it is marked as the first value; if the first sliding slope is less than or equal to the lower threshold, it is marked as the second value; if the first sliding slope is greater than the lower threshold and less than the upper threshold, it is marked as the same as the previous mark.

[0043] In practical implementation, the waveform of the first sliding slope calculated based on the acquired motion signal is similar to a sine wave. When the first sliding slope rises to a value greater than or equal to the upper limit threshold, it is marked as the first value, i.e., 1. When the first sliding slope falls to a value less than or equal to the lower limit threshold, it is marked as the second value, i.e., -1. When the first sliding slope is between the upper limit threshold and the lower limit threshold, the mark of this point is the same as the mark of the previous point. For example, if the first sliding slope decreases from greater than the upper limit threshold to less than the upper limit threshold and greater than the lower limit threshold, the mark of this point is the same as the mark of the previous point, which is the first value.

[0044] In one implementation, since swimming involves regular, cyclical arm movements, each stroke can be approximated as a process of rising and falling slopes, similar to an N-wave. Based on this, this application can count the number of strokes using an N-wave pattern (one N-wave corresponds to one stroke) based on a marker of the first sliding slope. Specifically, the inflection point of the first sliding slope is first determined based on the marker; where the inflection point is marked as (first value, second value, first value); if the interval between the current inflection point and the previous inflection point is within a preset range, the stroke count is incremented by one; if the cumulative stroke count exceeds a counting threshold, a counting flag is set.

[0045] In specific implementation, the turning point can be marked as (1, -1, 1). Considering that the user's strokes have a certain frequency when swimming, the time interval between two strokes that is too large or too small may not be a normal swimming stroke. In order to improve the accuracy of stroke counting, after obtaining the turning point, this embodiment also needs to determine whether the time interval between the current turning point and the previous turning point meets the requirements. If the interval between the current turning point and the previous turning point is within the preset range (i.e., between 30 and 450), it is considered a normal swimming stroke, and the stroke count is incremented by one; otherwise, it is not counted.

[0046] Furthermore, when the cumulative number of strokes exceeds a threshold (such as 4 strokes), a count start flag is generated, which sets the count start flag to true and is used to adjust the threshold of the first sliding slope.

[0047] To improve the accuracy of stroke counting, this embodiment of the invention also requires correction of the obtained stroke count. Specifically, the stroke count features and adjacent stroke features are determined based on the motion signal, and the stroke count is corrected based on the stroke count features and adjacent stroke features.

[0048] In one implementation, when determining the stroke count characteristics and adjacent stroke characteristics based on motion signals, the following methods may be used, including but not limited to:

[0049] First, the second sliding slope of the X-axis signal of the motion signal is calculated based on the second preset window, and the third sliding slope of the Y-axis signal of the motion signal and the fourth sliding slope of the Z-axis signal of the motion signal are calculated based on the third preset window.

[0050] In practice, the second preset window can be 23 points, and the third preset window can be 40 points. The second sliding slope of the 23 points of the X-axis signal, the third sliding slope of the 40 points of the Y-axis signal, and the fourth sliding slope of the 40 points of the Z-axis signal are calculated respectively.

[0051] Then, the ratios of the first sliding slope to the second, third, and fourth sliding slopes are calculated respectively, and these ratios are determined as the counting characteristics.

[0052] Finally, when the number of strokes changes, the stroke duration of a single stroke is obtained, and the ratio of the stroke durations of two adjacent strokes is used to determine the adjacent stroke characteristic. Specifically, when the number of strokes changes, the stroke duration of a single stroke is recorded. Every two intervals between changes in the number of strokes, the ratio of the stroke durations of two adjacent strokes is calculated, and this ratio is determined as the adjacent stroke characteristic.

[0053] In one implementation, when correcting the number of strokes based on stroke count characteristics and adjacent stroke characteristics, the following methods may be used, including but not limited to:

[0054] (1) If the number of strokes is greater than the first preset value, the number of strokes with the comparison value greater than the first preset value is corrected.

[0055] In practice, if the ratio of the first sliding slope to the second, third, and fourth sliding slopes is greater than the first preset value, then the current stroke count can be considered an error and corrected.

[0056] (2) If the adjacent stroke characteristics are less than the second preset value, the current stroke count is determined to be an incorrect count and the incorrect count is corrected.

[0057] In practice, if the ratio of the stroke duration of two consecutive strokes is less than a second preset value (such as 0.65), the stroke can be considered an incorrect count and corrected.

[0058] Furthermore, the correction of the stroke count also includes: marking the second, third, and fourth sliding slopes respectively, and determining the X-axis stroke count, Y-axis stroke count, and Z-axis stroke count based on the markings; calculating the ratio of the X-axis stroke count to the Y-axis stroke count and the Z-axis stroke count respectively, and correcting the stroke count based on the ratio.

[0059] In specific implementation, the second, third, and fourth sliding slopes are first marked, and the X-axis stroke count, Y-axis stroke count, and Z-axis stroke count are determined based on these marks. See the aforementioned embodiment for details, which will not be repeated here. Then, the ratios of the X-axis stroke count to the Y-axis stroke count and the Z-axis stroke count are calculated, and the stroke count is corrected based on these ratios. Specifically, when counting strokes, there may be some deviation in the stroke count obtained based on the X-axis, Y-axis, and Z-axis signals. In this embodiment, the reasonableness of the deviation can be judged based on the ratios of the X-axis stroke count to the Y-axis stroke count and the Z-axis stroke count, and corresponding corrections are made according to different ratios.

[0060] To facilitate understanding of this invention, an embodiment provides a specific method for counting swimming strokes. This method uses a smart wearable device such as a smartwatch, utilizing its ACC sensor and other devices to collect signals from each axis, and then analyzes these signals to determine the number of strokes. The main steps include steps 1 to 8:

[0061] Step 1: Calculate the slope.

[0062] Step 2: Dynamically update the threshold.

[0063] For details, see Figure 2 The flowchart shown illustrates a dynamic threshold update process. First, the sliding slope of 45 points on the X-axis signal is calculated. Then, the maximum and minimum values ​​of the sliding slope are calculated, and the maximum and minimum values ​​of the slope are reset every 110 points. Next, the upper and lower threshold values ​​of the slope are calculated based on whether the count has started. If the count has started (i.e., strokes > 4), the upper and lower threshold values ​​are updated every 100 points. If the count has not started, the upper and lower threshold values ​​are updated for each point, with the upper threshold = maximum value / 1.8 and the lower threshold = minimum value / 1.8. Finally, the range of the thresholds is limited. When the upper and lower threshold values ​​exceed the preset range, the upper threshold is reset to the maximum value - 5, and the lower threshold is reset to the minimum value - 5.

[0064] Step 3: Mark positive and negative.

[0065] Specifically, the slope is marked according to the relationship between the real-time slope and the upper and lower thresholds. When the slope is greater than or equal to the upper threshold, it is marked as 1; when the slope is less than or equal to the lower threshold, it is marked as -1; when the slope is greater than the lower threshold but less than the upper threshold, it is marked as the previous mark value.

[0066] Step 4: N-wave count.

[0067] Specifically, N-wave counting, also known as stroke counting, see [link to relevant documentation]. Figure 3 The flowchart shown illustrates an N-wave stroke counting process. First, three markers and the stroke interval are recorded. Then, it determines whether it's a turning point and whether the stroke interval is greater than 30 and less than 450. Specifically, marker (1, -1, 1) is a turning point. A valid stroke interval between the current turning point and the previous turning point is between 30 and 450, so the stroke count is incremented by 1 (strokes++), and the stroke interval is reset to zero. Finally, when strokes > 4, the starting count flag is determined, i.e., the flag indicating the start of stroke counting is set to true. Additionally, a stroke change flag is set for the current point for use by other modules.

[0068] Step 5: Obtain the count feature.

[0069] For details, see Figure 4 The flowchart shown illustrates a method for obtaining stroke count features. First, the sliding slopes of 23 points on the X-axis, 40 points on the Y-axis, and 40 points on the Z-axis are calculated. Then, N-wave counting is performed on these slopes to obtain the stroke counts (X_count), Y_count, and Z_count for the X-axis, Y-axis, and Z-axis signals, respectively. The threshold for N-wave counting on the X-axis, Y-axis, and Z-axis is set to max*0.75.

[0070] Step 6: Statistical counting characteristics.

[0071] Specifically, the ratios of the sliding slopes of 45 points on the X-axis (i.e., x_slow(45)) to the sliding slopes of 23 points on the X-axis (i.e., x_quick(23)), 40 points on the Y-axis (i.e., y_slow(40)), and 40 points on the Z-axis (i.e., z_slow(40)) are calculated respectively. Based on the magnitude of the ratios, the number of times the ratio is greater than the threshold is accumulated.

[0072] Step 7: Adjacent stroke characteristics.

[0073] Specifically, when the number of strokes changes, the duration of a single stroke is saved. Every two changes, the ratio of adjacent strokes (i.e., the ratio of the durations of two adjacent strokes) is calculated, and strokes with a ratio <0.65 are considered incorrect strokes.

[0074] Step 8: Number of corrections.

[0075] Specifically, when the number of strokes changes, the number of strokes is adjusted based on technical characteristics and adjacent stroke characteristics; or, the ratio of real-time strokes to the number of strokes on the Y-axis and the number of strokes on the Z-axis is calculated, and corresponding adjustments are made based on the different ratios.

[0076] The method provided in this embodiment of the invention uses smart wearable devices such as smartwatches to collect signals from each axis using devices such as ACC sensors, and analyzes them to obtain the number of strokes, enabling users to know their own movement status in a timely manner and improving the user experience.

[0077] In addition to the swimming stroke counting method provided in the foregoing embodiments, this invention also provides a swimming stroke counting device, see [link to device]. Figure 5 The schematic diagram shown illustrates the structure of a swimming stroke counting device, indicating that the device mainly includes the following parts:

[0078] The signal acquisition module 501 is used to acquire motion signals of the target user during swimming.

[0079] The slope calculation module 502 is used to calculate the first sliding slope of the X-axis signal of the motion signal based on a first preset window; wherein the first preset window includes a first preset number of data points.

[0080] The counting module 503 is used to mark the first sliding slope based on a threshold of the first sliding slope, and to count the number of times the target user swipes based on the mark.

[0081] The swimming stroke counting device provided in this embodiment of the invention utilizes the motion signals collected during the swimming process, calculates the slope of the motion signals and marks them, and obtains the accurate number of strokes in real time, enabling users to know their own movement status in a timely manner and improving the user experience.

[0082] In one embodiment, the counting module 503 is further configured to: calculate the maximum and minimum values ​​of the first sliding slope, and determine the upper and lower threshold values ​​of the first sliding slope based on the maximum and minimum values; wherein, the maximum and minimum values ​​of the first sliding slope are updated every second preset number of data points; the first sliding slope is marked based on the upper and lower threshold values ​​of the first sliding slope; wherein, if the first sliding slope is greater than or equal to the upper threshold value, it is marked as a first value; if the first sliding slope is less than or equal to the lower threshold value, it is marked as a second value; if the first sliding slope is greater than the lower threshold value and less than the upper threshold value, it is marked as the same as the previous mark.

[0083] In one embodiment, the counting module 503 is further configured to: if a starting count flag for the number of strokes is obtained, update the upper and lower threshold values ​​of the first sliding slope every third preset number of data points; if no starting count flag for the number of strokes is obtained, determine the upper and lower threshold values ​​of the first sliding slope based on the maximum and minimum values.

[0084] In one embodiment, the counting module 503 is further configured to: determine the turning point of the first sliding slope based on the marker; wherein the marker of the turning point is (first value, second value, first value); if the interval between the current turning point and the previous turning point is within a preset range, then the number of strokes is incremented by one; if the cumulative number of strokes is greater than the counting threshold, then a counting flag is determined.

[0085] In one embodiment, the above-mentioned device further includes: a correction module, configured to: determine the stroke count feature and adjacent stroke features based on the motion signal, and correct the stroke count based on the stroke count feature and adjacent stroke features.

[0086] In one embodiment, the correction module is further configured to: calculate the second sliding slope of the X-axis signal of the motion signal based on the second preset window, and calculate the third sliding slope of the Y-axis signal of the motion signal and the fourth sliding slope of the Z-axis signal of the motion signal based on the third preset window; calculate the ratio of the first sliding slope to the second sliding slope, the third sliding slope, and the fourth sliding slope respectively, and determine the ratio as a stroke count feature; when the number of strokes changes, obtain the stroke duration of a single stroke, and the ratio of the stroke duration of two adjacent strokes, and determine the ratio of the stroke duration as an adjacent stroke feature.

[0087] In one embodiment, the correction module is further configured to: if the stroke count feature is greater than a first preset value, correct the number of strokes with a value greater than the first preset value; if the adjacent stroke count feature is less than a second preset value, determine that the current stroke count is an incorrect count and correct the incorrect count.

[0088] In one embodiment, the correction module is further configured to: mark the second sliding slope, the third sliding slope and the fourth sliding slope respectively, and determine the number of strokes on the X-axis, the number of strokes on the Y-axis and the number of strokes on the Z-axis based on the markings; calculate the ratio of the number of strokes on the X-axis to the number of strokes on the Y-axis and the number of strokes on the Z-axis respectively, and correct the number of strokes based on the ratio.

[0089] It should be noted that the device provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment. The specific numerical values ​​provided in this embodiment are merely exemplary and are not intended to limit the scope of the invention.

[0090] This invention also provides a smart wearable device, specifically, the smart wearable device includes a processor and a storage device; the storage device stores a computer program, and the computer program executes the method described in any of the above embodiments when run by the processor.

[0091] Figure 6 This is a schematic diagram of the structure of a smart wearable device provided in an embodiment of the present invention. The smart wearable device 100 includes: a processor 60, a memory 61, a bus 62, and a communication interface 63. The processor 60, the communication interface 63, and the memory 61 are connected through the bus 62. The processor 60 is used to execute executable modules, such as computer programs, stored in the memory 61.

[0092] The memory 61 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 63 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0093] Bus 62 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0094] The memory 61 is used to store programs. After receiving an execution instruction, the processor 60 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0095] Processor 60 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 60 or by instructions in software form. Processor 60 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 61. Processor 60 reads the information in memory 61 and, in conjunction with its hardware, completes the steps of the above method.

[0096] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.

[0097] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for counting swimming strokes, characterized in that, include: Collect motion signals from the target user during swimming; The first sliding slope of the X-axis signal of the motion signal is calculated based on a first preset window; wherein, the first preset window includes a first preset number of data points; The first sliding slope is marked based on a threshold of the first sliding slope, and the number of strokes of the target user is counted based on the marked slope. The first sliding slope is marked based on a threshold of the first sliding slope, including: calculating the maximum and minimum values ​​of the first sliding slope, and determining an upper threshold and a lower threshold of the first sliding slope based on the maximum and minimum values; wherein, the maximum and minimum values ​​of the first sliding slope are updated every second preset number of data points; and when the upper threshold and the lower threshold exceed a preset range, they are reset. The first sliding slope is marked based on the upper and lower thresholds of the first sliding slope; wherein, if the first sliding slope is greater than or equal to the upper threshold, it is marked as a first value; if the first sliding slope is less than or equal to the lower threshold, it is marked as a second value; and if the first sliding slope is greater than the lower threshold and less than the upper threshold, it is marked as the same as the previous mark.

2. The method according to claim 1, characterized in that, Determining the upper and lower threshold values ​​of the first sliding slope based on the maximum and minimum values ​​includes: If the starting count flag of the number of strokes is obtained, the upper and lower threshold values ​​of the first sliding slope are updated every third preset number of data points. If no starting count flag for the number of strokes is obtained, then the upper and lower threshold values ​​of the first sliding slope are determined based on the maximum and minimum values.

3. The method according to claim 1, characterized in that, Based on the markers, the number of times the target user swipes is counted, including: The inflection point of the first sliding slope is determined based on the marker; wherein the marker of the inflection point is (first value, second value, first value); If the interval between the current turning point and the previous turning point is within the preset range, the number of strokes will be incremented by one. If the cumulative number of strokes exceeds the counting threshold, then a counting flag is determined.

4. The method according to claim 1, characterized in that, After counting the number of times the target user swipes based on the markers, the method further includes: The stroke count and adjacent stroke characteristics are determined based on the motion signal, and the stroke count is corrected based on the stroke count and adjacent stroke characteristics.

5. The method according to claim 4, characterized in that, Determining stroke count characteristics and adjacent stroke characteristics based on the motion signal includes: The second sliding slope of the X-axis signal of the motion signal is calculated based on the second preset window, and the third sliding slope of the Y-axis signal and the fourth sliding slope of the Z-axis signal of the motion signal are calculated based on the third preset window. Calculate the ratios of the first sliding slope to the second sliding slope, the third sliding slope, and the fourth sliding slope, and determine the ratios as the counting characteristics; When the number of strokes changes, the stroke duration of a single stroke is obtained, and the ratio of the stroke duration of two adjacent strokes is determined as the adjacent stroke characteristic.

6. The method according to claim 5, characterized in that, The number of strokes is corrected based on the counting features and the adjacent stroke features, including: If the count feature is greater than a first preset value, then the number of strokes with a ratio greater than the first preset value is corrected; If the adjacent stroke count is less than the second preset value, the current stroke count is determined to be an incorrect count, and the incorrect count is corrected.

7. The method according to claim 5, characterized in that, The method further includes: The second sliding slope, the third sliding slope, and the fourth sliding slope are marked respectively, and the number of strokes on the X-axis, the number of strokes on the Y-axis, and the number of strokes on the Z-axis are determined based on the markings. Calculate the ratio of the number of strokes along the X-axis to the number of strokes along the Y-axis and the number of strokes along the Z-axis, and correct the number of strokes based on the ratio.

8. A device for counting swimming strokes, characterized in that, include: The signal acquisition module is used to acquire motion signals from the target user during swimming. The slope calculation module is used to calculate the first sliding slope of the X-axis signal of the motion signal based on a first preset window; wherein, the first preset window includes a first preset number of data points; The counting module is used to mark the first sliding slope based on a threshold of the first sliding slope, and to count the number of times the target user paddles based on the mark; The counting module is specifically used to: calculate the maximum and minimum values ​​of the first sliding slope, and determine the upper and lower threshold values ​​of the first sliding slope based on the maximum and minimum values; wherein, the maximum and minimum values ​​of the first sliding slope are updated every second preset number of data points; and when the upper and lower threshold values ​​exceed a preset range, they are reset. The first sliding slope is marked based on the upper and lower thresholds of the first sliding slope; wherein, if the first sliding slope is greater than or equal to the upper threshold, it is marked as a first value; if the first sliding slope is less than or equal to the lower threshold, it is marked as a second value; and if the first sliding slope is greater than the lower threshold and less than the upper threshold, it is marked as the same as the previous mark.

9. A smart wearable device, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program thereon, characterized in that, The computer program is executed by the processor to perform the steps of the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for identifying user

    CN106445101A

  • Method and device for detecting swimming strokes, and smart wearable equipment

    CN108837477A

  • Rope skipping counting method, device and equipment and medium

    CN116212354A