A method, apparatus, equipment, and medium for determining the time of a swimming turn.
By dividing the method of turning around and judging the time window and calculating trust, the problem of swimming data deviation in existing technologies has been solved, and more accurate sports data statistics are achieved.
Patent Information
- Application Number
- CN202210821593.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-07-13
AI Technical Summary
In the prior art, when counting the number of swim turn times and time, the output data is biased, resulting in inaccurate motion data.
By obtaining the swimming data, dividing the turn judgment time window, the turn particle set is obtained, and the reliability is determined based on the weight value, sampling moment and turn intensity of the turning particles. When the reliability is greater than the preset value, the turn time node and number of times are output.
It reduces the deviation of the number of output turns and time nodes, obtains accurate motion data, and improves the accuracy of motion data.
Smart Images

Figure CN115155044B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information fusion technology, and in particular to a method, device, equipment and medium for determining a swimming turn time. Background Art
[0002] With the continuous advancement of science and technology, more and more technologies are applied in swimming. Among them, the estimation of the number and time of swimming turns is particularly important. Swimming turns are mainly divided into wall turns and tumbling turns. By judging the turns, the swimming distance, calories and other information that people are more concerned about can be calculated, providing users with more accurate sports data and improving the user experience.
[0003] At present, the statistics of swimming data are to divide the swimming data obtained by the swimming goggles twice to obtain GM particles (the particles are Gaussian particles). For example: after the swimming data is divided for the first time, multiple turning judgment time windows will be obtained. At this time, it is set to divide according to 300 swimming data in each turning judgment time window; each turning judgment time window is divided again to obtain GM particles. At this time, it is set to divide according to 50 swimming data in each GM particle, and 6 GM particles are obtained. At this time, the number of turns and the turning time nodes are output according to the 6 GM particles. Since the 300 swimming data are finally divided into 6 GM particles, there will be a certain deviation in the output number of turns and the turning time nodes, and the obtained motion data is inaccurate.
[0004] In view of the above problems, finding out how to accurately record the motion data during swimming is a problem that those skilled in the art try their best to solve. Summary of the invention
[0005] The purpose of this application is to provide a method, device, equipment and medium for determining the turning time of swimming, so as to reduce the deviation of the output number of turns and the turning time nodes, obtain accurate motion data, and improve the accuracy of the motion data.
[0006] In order to solve the above technical problems, the present application provides a method for determining the time of a swimming turn, comprising:
[0007] Get swimming data;
[0008] The swimming data is divided according to the length of the turning judgment time window to obtain a turning particle set. The turning judgment time window is used to determine whether the user turns and count the number of turns;
[0009] Obtain the weight value, sampling time and turning intensity of each turning particle in the turning particle set;
[0010] The reliability of the turn judgment time window is determined according to the weight value, the sampling time and the turn strength, and the reliability is the reliability of whether the user turns around;
[0011] Determine whether the reliability is greater than the preset reliability;
[0012] If so, output the turn time node and the number of turns.
[0013] Preferably, the swimming data is divided according to the length of the turn judgment time window, and the turn particle set obtained includes:
[0014] Get the swimming data length;
[0015] Divide the swimming data length by the turn judgment time window length to obtain the division value;
[0016] The partition value is rounded, and the swimming data is divided according to the rounded partition value to obtain the turning particle set.
[0017] Preferably, determining the reliability of the turn judgment time window according to the turn particle set includes:
[0018] Initialize each turning particle in the turning particle set;
[0019] According to the initialized turning particles, the weight value, the sampling time and the turning strength are obtained and each turning particle is updated;
[0020] The reliability is determined based on the updated turning particles.
[0021] Preferably, when the reliability is greater than a preset reliability, before outputting the turn time node and the turn number, the method further includes:
[0022] Determine whether the number of turning variables in the turning particle set is 1;
[0023] If yes, then enter the step of outputting the turning time node and the number of turns;
[0024] If not, the turn time nodes corresponding to multiple turn variables are fused.
[0025] Preferably, after outputting the turn time node and the turn number, the method further includes:
[0026] Determine whether the divided value of the turn determination time window outputs all the turn time nodes and the number of turns;
[0027] If so, then end;
[0028] If not, return to the step of obtaining swimming data.
[0029] Preferably, there are multiple turn determination time windows which do not overlap with each other.
[0030] Preferably, after acquiring the swimming data, before dividing the swimming data according to the length of the turn judgment time window to obtain the turn particle set, the method further includes:
[0031] Kalman filter processing was performed on the swimming data.
[0032] In order to solve the above technical problems, the present application also provides a device for determining the time of a swimming turn, comprising:
[0033] A first acquisition module, used for acquiring swimming data;
[0034] A division module is used to divide the swimming data according to the length of the turn judgment time window to obtain a turn particle set. The turn judgment time window is used to determine whether the user turns around and count the number of turns.
[0035] The second acquisition module is used to obtain the weight value, sampling time and turning intensity of each turning particle in the turning particle set;
[0036] A determination module, used to determine the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity, wherein the reliability is the reliability of indicating whether the user turns around;
[0037] A judgment module, used to judge whether the reliability is greater than a preset reliability;
[0038] If so, it enters the output module to output the turn time node and the number of turns.
[0039] In order to solve the above technical problems, the present application also provides a device for determining the time of a swimming turn, comprising:
[0040] Memory for storing computer programs;
[0041] A processor is used to direct the computer program to implement the steps of the method for determining the swimming turn time.
[0042] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, all the steps of the above method for determining the swimming turn time are implemented.
[0043] The present application provides a method for determining the time of a swimming turn, comprising: obtaining swimming data; dividing the swimming data according to the length of a turn judgment time window to obtain a turn particle set, the turn judgment time window is used to determine whether the user turns around, and to count the number of turns; obtaining the weight value, sampling time and turn intensity of each turn particle in the turn particle set; determining the reliability of the turn judgment time window according to the weight value, sampling time and turn intensity, the reliability being the reliability that characterizes whether the user turns around; determining whether the reliability is greater than a preset reliability; if so, outputting the turn time node and the number of turns. Since the swimming data is divided only once, all the swimming data are used to derive the reliability that characterizes the user during the swimming process. At this time, the deviation of the output number of turns and the turn time node is reduced, accurate motion data is obtained, and the accuracy of the motion data is improved.
[0044] The present application also provides a device, equipment and medium for determining the time of swimming turns, with the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 A flow chart of a method for determining a swimming turn time provided in an embodiment of the present application;
[0047] Figure 2 A structural diagram of a device for determining a swimming turn time provided in an embodiment of the present application;
[0048] Figure 3 A structural diagram of a device for determining swimming turn time provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] The core of this application is to provide a method, device, equipment and medium for determining the turning time of swimming, which can reduce the deviation of the output number of turns and the turning time nodes, obtain accurate motion data, and improve the accuracy of the motion data.
[0051] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0052] Figure 1 A flow chart of a method for determining a swimming turn time provided in an embodiment of the present application. Figure 1 As shown, the method for determining the swimming turn time is applied to AR swimming goggles, in which a 6-channel IMU sensor is provided, and the sensor is composed of two three-axis sensors. The method includes:
[0053] S10: Obtain swimming data.
[0054] The swimming data is obtained through the 6-channel IMU sensor, and the length of the swimming data is obtained, where the sampling frequency of the 6-channel IMU sensor is recorded as f, and the unit is Hertz (Hz). The sampling time for obtaining the swimming data is recorded as S, and the unit is second (s). The length of the swimming data can be calculated by the following formula:
[0055] L = f·S;
[0056] Among them, the swimming data obtained by the 6-channel IMU sensor with a length of L can be expressed as
[0057] in, represents the acceleration component in the x-axis direction at the k sampling time, represents the acceleration component in the y-axis direction at the k sampling time, Represents the acceleration component in the z-axis coordinate direction at the k sampling time; represents the angular velocity component in the x-axis direction at the k sampling time, represents the angular velocity component in the y-axis direction at the k sampling time, Represents the angular velocity component in the z-axis coordinate direction at the k sampling moment. Among them, only acceleration can be selected, only angular velocity can be selected, or acceleration and angular velocity can be selected. Considering that some of the data cannot be used well to judge the user's swimming turning action, as an optimal implementation method, angular velocity and acceleration are combined with each other to make up for the data that cannot well judge the user's swimming turning action. Swimming data is data acquired in time series. In this embodiment, the three-axis sensor can be one of a three-axis accelerometer, a three-axis magnetometer, a three-axis gyroscope and a pressure sensor, and the 6-channel IMU sensor can be a combination of one or more of the above-mentioned sensors. It should be noted that swimming data is a time series data that varies with time and the data collected is different at different times of collection.
[0058] S11: Divide the swimming data according to the length of the turn judgment time window to obtain a turn particle set.
[0059] The turn judgment time window is used to judge whether the user turns around and to count the number of turns.
[0060] Among them, the swimming data is divided according to the length of the turning judgment time window, and the turning particle set obtained includes:
[0061] Get the swimming data length;
[0062] Divide the swimming data length by the turn judgment time window length to obtain the division value;
[0063] The partition value is rounded, and the swimming data is divided according to the rounded partition value to obtain the turning particle set.
[0064] Assuming the length of the turn judgment time window is d, the number of turn judgment time windows divided by the swimming data according to the length of the turn judgment time window is calculated by the following formula:
[0065] M = floor (L / d);
[0066] Among them, floor(x) represents a floor function, which is used to obtain an integer calculation result, that is, to take the largest integer not greater than x, and M is the number of turn judgment time windows, which is also the division value. At this time, for the nth turn judgment time window, there is swimming data of length d, which is expressed as:
[0067] Among them C d ∈C L .
[0068] It should be noted that the turning judgment time windows mentioned in this embodiment are multiple and non-overlapping (mutually exclusive). The turning judgment time window is to frame the time series according to the specified unit length for data sampling, so as to calculate the data in the frame. It is equivalent to a slider with a specified length sliding on the scale, and the data in the slider can be fed back every time it slides one unit. The purpose of setting the time window is to use the time window of the set length to segment the time series data, judge in turn, and round down to represent that the redundant time series is not enough to complete a turning action. Among them, multiple particle sets are constructed as random finite sets.
[0069] S12: Obtain the weight value, sampling time and turning intensity of each turning particle in the turning particle set.
[0070] S13: Determine the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity.
[0071] The reliability is the reliability of whether the user turns around. The swimming data in each sampling sliding window has two situations: turning and not turning. The swimming turning variable can be modeled as a random finite set. A time window can be regarded as a particle set, that is, it can be understood that the length of a turning judgment time window is the same as the number of particles in the particle set. For the swimming data in the nth turning judgment time window, the swimming turning variable at the kth sampling point can be expressed as a discrete finite set variable, denoted as: {φ,1} k . Where φ represents an empty set, i.e., non-turn, and 1 represents a turn. Then, the swimming data in the nth turn judgment time window is modeled as:
[0072] G n ={{φ,1}1,{φ,1}2,{φ,1}3,…,{φ,1} k};
[0073] The above data are modeled as discrete finite sets.
[0074] S14: Determine whether the reliability is greater than a preset reliability.
[0075] If yes, proceed to step S15: output the turn time node and the number of turns.
[0076] Since the number of turns has been obtained, the number of turns can be counted and collected, and the turn time node can be determined in the corresponding judgment time window, and finally output. The output can be in the form of "the turn time node is 14:29", "the number of turns is 12 times in total", etc. The above-mentioned output form is only one of many embodiments, and the output method is not limited. The implementation method can be determined according to the specific implementation scenario.
[0077] The present application provides a method for determining the time of a swimming turn, comprising: obtaining swimming data; dividing the swimming data according to the length of the turn judgment time window to obtain a turn particle set, the turn judgment time window is used to determine whether the user turns around, and count the number of turns; determining the reliability of the turn judgment time window according to the turn particle set, the reliability is the reliability that characterizes whether the user turns around; judging whether the reliability is greater than a preset reliability; if so, outputting the turn time node and the number of turns. Since the swimming data is divided only once, all the swimming data are used to derive the reliability that characterizes the user during the swimming process. At this time, the deviation of the output number of turns and the turn time node is reduced, accurate motion data is obtained, and the accuracy of the motion data is improved.
[0078] Based on the above embodiment, as a more preferred embodiment, determining the reliability of the turn judgment time window according to the turn particle set includes:
[0079] Initialize each turning particle in the turning particle set;
[0080] Obtain the weight value, sampling time and turning strength according to the initialized turning particles and update each turning particle;
[0081] The reliability is determined based on the updated turning particles.
[0082] The set of turning particles corresponding to the nth turning judgment time window can be recorded as G according to the above content. n = {par n (1),par n (2),par n (3),…,par n (d)}, then a particle in the turning particle set can be expressed as par n (i), where i∈(1,d), is calculated according to the following formula:
[0083] par n (i)=(w,x t ,h(x t ));
[0084] in, is the weight value, x t is the global sampling time corresponding to the t-th sampling time in the turn judgment time window, h(x t ) is the signal amplitude of the swimming data at the sampling time, then for the nth turn judgment time window x t It can be calculated according to the following formula:
[0085] x t =(n-1)·d+1+t;
[0086] It should be noted that the weight value of each particle is the average value of the weight value of the turn judgment time window. For example, if the weight value of the turn judgment time window is 1, and there are always Q particles in the turn judgment time window, then the weight value of each particle is 1 / Q.
[0087] Among them, the turning particle set in the nth turning judgment time window is initialized and calculated according to the following formula:
[0088]
[0089] m n (i) = x t ;
[0090] h n (i) = h(x t );
[0091] Among them, w n (i) is the weight value of the i-th particle; m n(i) is the sampling time of the ith particle; h n (i) is the turning strength of the i-th particle.
[0092] It should be noted that, in this embodiment, the detection probability P of turning around is calculated according to the following formula: d :
[0093]
[0094] in, is the sigmoid function, h(xt) is x t The signal amplitude of the swimming data at the sampling moment, H is the preset confidence.
[0095] It should be noted that the turning strength v n It can be calculated according to the following formula:
[0096]
[0097] Then, the updated filtered turning confidence of the turning particle is and filter turnaround time Calculated according to the following formula:
[0098]
[0099]
[0100] Where k is h(x t ) is lower than the coefficient of the preset reliability H. Then, the updated reliability is finally obtained by the following formula:
[0101]
[0102] in, is the updated reliability.
[0103] Based on the above embodiment, as a more preferred embodiment, when the reliability is greater than the preset reliability, before outputting the turn time node and the turn number, it also includes:
[0104] Determine whether the number of turning variables in the turning particle set is 1;
[0105] If yes, then enter the step of outputting the turning time node and the number of turns;
[0106] If not, the turn time nodes corresponding to multiple turn variables are fused.
[0107] According to the records of the above embodiment, for the nth turn judgment time window, if there are multiple turn variables, the turn time corresponding to each turn variable is fused according to the following formula:
[0108]
[0109] Among them, s is the number of turning variables, It is the turning time node.
[0110] Based on the above embodiment, as a more preferred embodiment, after outputting the turn time node and the turn number, it also includes:
[0111] Determine whether the divided value of the turn determination time window outputs all the turn time nodes and the number of turns;
[0112] If so, then end;
[0113] If not, return to the step of obtaining swimming data.
[0114] In order to make the data more accurate, it is necessary to traverse all the turn judgment time windows to obtain more accurate data and improve the user experience.
[0115] Based on the above embodiment, as a more preferred embodiment, after obtaining the swimming data, before dividing the swimming data according to the length of the turn judgment time window and obtaining the turn particle set, the method further includes:
[0116] The swimming data is processed by Kalman filtering to remove the interference of clutter waves. In addition, it should be noted that particle filtering can also be used to avoid the interference of clutter waves.
[0117] In the above embodiments, the method for determining the time of a swimming turn is described in detail, and the present application also provides an embodiment corresponding to the device for determining the time of a swimming turn. It should be noted that the present application describes the embodiments of the device part from two perspectives, one is based on the perspective of the functional module, and the other is based on the perspective of the hardware.
[0118] Figure 2 This is a structural diagram of a device for determining the time of a swimming turn provided in an embodiment of the present application. Figure 2 As shown, the present application also provides a device for determining the time of a swimming turn, comprising:
[0119] A first acquisition module 20, used to acquire swimming data;
[0120] A division module 21 is used to divide the swimming data according to the length of the turn judgment time window to obtain a turn particle set. The turn judgment time window is used to determine whether the user turns around and count the number of turns.
[0121] The second acquisition module 22 is used to obtain the weight value, sampling time and turning strength of each turning particle in the turning particle set;
[0122] A determination module 23, used to determine the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity, the reliability being the reliability of whether the user turns around;
[0123] A judging module 24, used to judge whether the reliability is greater than a preset reliability;
[0124] If yes, the process enters the output module 25 for outputting the turning time node and the number of turns.
[0125] The present application provides a method for determining the time of a swimming turn, comprising: obtaining swimming data; dividing the swimming data according to the length of the turn judgment time window to obtain a turn particle set, the turn judgment time window is used to determine whether the user turns around, and count the number of turns; determining the reliability of the turn judgment time window according to the turn particle set, the reliability is the reliability that characterizes whether the user turns around; judging whether the reliability is greater than a preset reliability; if so, outputting the turn time node and the number of turns. Since the swimming data is divided only once, all the swimming data are used to derive the reliability that characterizes the user during the swimming process. At this time, the deviation of the output number of turns and the turn time node is reduced, accurate motion data is obtained, and the accuracy of the motion data is improved.
[0126] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.
[0127] Figure 3 A structural diagram of a device for determining a swimming turn time provided in an embodiment of the present application, such as Figure 3 As shown, a device for determining a swimming turn time comprises:
[0128] A memory 30, for storing computer programs;
[0129] The processor 31 is used to implement the steps of the method for determining the swimming turn time mentioned in the above embodiment when executing the computer program.
[0130] The device for determining the swimming turn time provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0131] Among them, the processor 31 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 31 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 31 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 31 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0132] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 30 is at least used to store the following computer program, wherein, after the computer program is loaded and executed by the processor 31, the relevant steps of the method for determining the swimming turn time disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 30 may also include an operating system and data, etc., and the storage method may be short-term storage or permanent storage. Among them, the operating system may include Windows, Unix, Linux, etc. The data may include but is not limited to a method for determining the swimming turn time, etc.
[0133] In some embodiments, the device for determining the swimming turn time may also include a display screen, an input and output interface, a communication interface, a power supply, and a communication bus.
[0134] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation of the device for determining the swimming turn time, and may include more or fewer components than shown in the figure.
[0135] The device for determining the swimming turn time provided in the embodiment of the present application includes a memory 30 and a processor 31. When the processor 31 executes the program stored in the memory 30, it can implement the method for determining the swimming turn time.
[0136] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0137] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory), ROM, random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0138] The above is a detailed introduction to a method, device, equipment and medium for determining the time of swimming turns provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
[0139] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for determining a swimming turn time, characterized in that: include: Get swimming data; Wherein, obtaining swimming data includes: Obtain the sampling frequency f and sampling time S through the 6-channel IMU sensor; Determine the length L of the swimming data according to the sampling frequency and the sampling time; The formula for determining the length of the swimming data is: L = f·S; acquiring the swimming data based on the length of the swimming data; Wherein, the swimming data is expressed as: in, represents the acceleration component in the x-axis direction at the k sampling time, represents the acceleration component in the y-axis direction at the k sampling moment, represents the acceleration component in the z-axis coordinate direction at the k sampling moment; represents the angular velocity component in the x-axis direction at the k sampling moment, represents the angular velocity component in the y-axis direction at the k sampling moment, Represents the angular velocity component in the z-axis coordinate direction at the k sampling moment; Dividing the swimming data according to the length of the turning judgment time window to obtain a turning particle set, wherein the turning judgment time window is used to determine whether the user turns around and count the number of turns; Obtaining the weight value, sampling time and turning strength of each turning particle in the turning particle set; Determine the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity, wherein the reliability is the reliability representing whether the user turns around; Determining whether the reliability is greater than a preset reliability; If yes, then the turning time node and the turning times are output; the swimming data is divided according to the turning judgment time window length to obtain the turning particle set including: Get the swimming data length; Dividing the swimming data length by the turn judgment time window length to obtain a division value; rounding the division value, and dividing the swimming data according to the rounded division value to obtain the turning particle set; The determining the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity includes: Initializing each of the turning particles in the turning particle set; According to the initialized turning particles, the weight value, the sampling time and the turning strength are obtained and each turning particle is updated; Determining the reliability according to each of the updated turning particles; Initializing each of the turning particles in the turning particle set; obtaining the weight value, the sampling time, and the turning strength according to the initialized turning particles and updating each of the turning particles; and determining the reliability according to each of the updated turning particles, comprises: The turning particle set corresponding to the nth turning judgment time window can be expressed as: G n ={by n (1), by n (2), by n (3),…,by n (d)}; A particle in the turning particle set can be represented as par n (i), where i∈(1,d), d is the length of the turn judgment time window; par n (i) The calculation formula is: by n (i)=(w,x t ,h(x t )); in, is the weight value; x t is the global sampling time corresponding to the t-th sampling time in the turn judgment time window; h(x t ) is the signal amplitude of the swimming data at the sampling time, then for the nth turn judgment time window x t It can be calculated according to the following formula: x t =(n-1)·d+1+t; The weight value of each particle is the average value of the weight value of the turn judgment time window; Initialize the turning particle set in the nth turning judgment time window, and the calculation formula is: m n (i)=x t ; h n (i)=h(x t ); Among them, w n (i) is the weight value of the i-th particle; m n (i) is the sampling time of the i-th particle; h n (i) is the turning strength of the i-th particle; Turn Strength v n The calculation formula is: Updated filter turning confidence of turning particles and filter turnaround time The calculation formulas are: k is h(x t ) is lower than the coefficient of the preset reliability H; Finally, the updated reliability is obtained The calculation formula is:
2. The method for determining the swimming turn time according to claim 1, characterized in that: When the reliability is greater than the preset reliability, before outputting the turn time node and the turn number, the method further includes: Determine whether the number of turning variables in the turning particle set is 1; If yes, then enter the step of outputting the turning time node and the turning number; If not, the turning time nodes corresponding to the multiple turning variables are merged.
3. The method for determining the swimming turn time according to claim 1, characterized in that: After outputting the turning time node and the turning number, the method further includes: Determine whether all of the division value and the turn determination time windows output the turn time nodes and the turn times; If so, then end; If not, return to the step of obtaining swimming data.
4. The method for determining the swimming turn time according to claim 1, characterized in that: The turning judgment time windows are multiple and do not overlap each other.
5. The method for determining the time of a swimming turn according to claim 1, characterized in that: After acquiring the swimming data and before dividing the swimming data according to the length of the turn judgment time window to obtain the turn particle set, the method further includes: The swimming data is subjected to Kalman filtering processing.
6. A device for determining the time of a swimming turn, characterized in that: include: A first acquisition module, used for acquiring swimming data; Wherein, obtaining swimming data includes: Obtain the sampling frequency f and sampling time S through the 6-channel IMU sensor; Determine the length L of the swimming data according to the sampling frequency and the sampling time; The formula for determining the length of the swimming data is: L = f·S; acquiring the swimming data based on the length of the swimming data; Wherein, the swimming data is expressed as: in, represents the acceleration component in the x-axis direction at the k sampling time, represents the acceleration component in the y-axis direction at the k sampling moment, represents the acceleration component in the z-axis coordinate direction at the k sampling moment; represents the angular velocity component in the x-axis direction at the k sampling moment, represents the angular velocity component in the y-axis direction at the k sampling moment, Represents the angular velocity component in the z-axis coordinate direction at the k sampling moment; a division module, used for dividing the swimming data according to the length of the turning judgment time window to obtain a turning particle set, wherein the turning judgment time window is used to judge whether the user turns around and count the number of turns; A second acquisition module is used to obtain the weight value, sampling time and turning strength of each turning particle in the turning particle set; A determination module, configured to determine the reliability of the turn judgment time window according to the weight value, the sampling time, and the turn intensity, wherein the reliability is a reliability indicating whether the user turns around; A judging module, used for judging whether the reliability is greater than a preset reliability; If yes, then the output module is entered to output the turning time node and the turning number; Wherein, dividing the swimming data according to the length of the turn judgment time window to obtain the turn particle set includes: Get the swimming data length; Dividing the swimming data length by the turn judgment time window length to obtain a division value; rounding the division value, and dividing the swimming data according to the rounded division value to obtain the turning particle set; The determining the reliability of the turn judgment time window according to the weight value, the sampling time and the turn intensity includes: Initializing each of the turning particles in the turning particle set; According to the initialized turning particles, the weight value, the sampling time and the turning strength are obtained and each turning particle is updated; Determining the reliability according to each of the updated turning particles; Initializing each of the turning particles in the turning particle set; obtaining the weight value, the sampling time, and the turning strength according to the initialized turning particles and updating each of the turning particles; and determining the reliability according to each of the updated turning particles, comprises: The turning particle set corresponding to the nth turning judgment time window can be expressed as: G n ={by n (1), by n (2), by n (3),…,by n (d)}; A particle in the turning particle set can be represented as par n (i), where i∈(1,d), d is the length of the turn judgment time window; par n (i) The calculation formula is: by n (i)=(w,x t ,h(x t )); in, is the weight value; x t is the global sampling time corresponding to the t-th sampling time in the turn judgment time window; h(x t ) is the signal amplitude of the swimming data at the sampling time, then for the nth turn judgment time window x t It can be calculated according to the following formula: x t =(n-1)·d+1+t; The weight value of each particle is the average value of the weight value of the turn judgment time window; Initialize the turning particle set in the nth turning judgment time window, and the calculation formula is: m n (i)=x t ; h n (i)=h(x t ); Among them, w n (i) is the weight value of the i-th particle; m n (i) is the sampling time of the i-th particle; h n (i) is the turning strength of the i-th particle; Turn Strength v n The calculation formula is: Updated filter turning confidence of turning particles and filter turnaround time The calculation formulas are: k is h(x t ) is lower than the coefficient of the preset reliability H; Finally, the updated reliability is obtained The calculation formula is:
7. A device for determining the time of a swimming turn, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for determining a swimming turn time as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for determining the swimming turn time according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Intelligent body building sports doing wrist strap
CN106725381A
Method and device for detecting swimming turning joint and intelligent wearable equipment
CN108854032A