Disclosure of Invention
The application mainly aims to provide a method, a device, a terminal and a storage medium for determining a back swing type, so as to solve the problem of low accuracy in the related art.
In order to achieve the above object, in a first aspect, the present application provides a method for determining a type of backswing, comprising:
Acquiring movement data of a target object in a running process, and extracting an angle characteristic value and a change trend characteristic value in the movement data;
Determining a characteristic value frame number of a backswing point based on the angle characteristic value and the change trend characteristic value;
and determining the type of the backward swing according to the characteristic value frame number of the backward swing point.
In one possible implementation manner, the determining the characteristic value frame number of the backswing point based on the angle characteristic value and the variation trend characteristic value includes:
and if the angle characteristic value is not equal to the change trend characteristic value, taking the last point of the trend stable section as the characteristic value frame number of the backswing point.
In one possible implementation manner, the determining the type of the backswing action according to the characteristic value frame number of the backswing point includes:
acquiring a backswing initiative feature value corresponding to the feature value frame number of the backswing point;
And determining the backswing action type based on the backswing initiative characteristic value, the x-axis acceleration characteristic judgment value and the z-axis acceleration characteristic judgment value.
In one possible implementation manner, the determining the backswing action type based on the backswing initiative feature value, the x-axis acceleration feature determination value, and the z-axis acceleration feature determination value includes:
Determining an extremum of the z-axis acceleration feature judgment value based on the x-axis acceleration feature judgment value and the z-axis acceleration feature judgment value;
and determining the backswing action type based on the extreme value of the z-axis acceleration characteristic judgment value and the backswing initiative characteristic value.
In one possible implementation manner, the determining the extremum of the z-axis acceleration feature judgment value based on the x-axis acceleration feature judgment value and the z-axis acceleration feature judgment value includes:
If the x-axis acceleration characteristic judgment value is larger than a first preset threshold value, reading the z-axis acceleration characteristic judgment value;
And if the number of the z-axis acceleration characteristic judgment values is larger than a second preset threshold value, obtaining an extremum of the z-axis acceleration characteristic judgment values.
In one possible implementation manner, the determining the backswing action type based on the extremum of the z-axis acceleration characteristic judgment value and the backswing initiative characteristic value includes:
If the extreme value of the z-axis acceleration characteristic judgment value is larger than the backswing initiative characteristic value, the backswing serving as an initiative backswing;
And if the extreme value of the z-axis acceleration characteristic judgment value is smaller than or equal to the backswing active characteristic value, the backswing acting type is passive backswing.
In one possible implementation manner, the determining the type of the backswing action according to the characteristic value frame number of the backswing point includes:
if the angle change characteristic value of the characteristic value frame number of the back swing point is larger than the swing characteristic value in the preset range, the back swing is a folding back swing;
And if the angle change characteristic value of the characteristic value frame number of the backswing point is smaller than or equal to the swing characteristic value within the preset range, the backswing is of a non-folding backswing type.
In a second aspect, an embodiment of the present invention provides a device for determining a type of backswing, including:
The characteristic value extraction module is used for acquiring movement data of the target object in the running process and extracting an angle characteristic value and a change trend characteristic value in the movement data;
The frame number determining module is used for determining the characteristic value frame number of the backswing point based on the angle characteristic value and the change trend characteristic value;
And the back swing action type determining module is used for determining the back swing action type according to the characteristic value frame number of the back swing point.
In a third aspect, an embodiment of the present invention provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of any one of the above methods for determining a type of backswing performed by the processor when executing the computer program.
In a fourth aspect, 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 a method of determining a type of backswing as described above.
The embodiment of the invention provides a method, a device, a terminal and a storage medium for determining a backward swing action type, which comprise the steps of obtaining motion data of a target object in a running process, extracting an angle characteristic value and a change trend characteristic value in the motion data, determining a characteristic value frame number of a backward swing point based on the angle characteristic value and the change trend characteristic value, and determining the backward swing action type according to the characteristic value frame number of the backward swing point. According to the invention, the angle characteristic value and the change trend characteristic value of the target object in the running process are extracted, and then the characteristic value frame number of the backswing point is further determined through the angle characteristic value and the change trend characteristic value, so that the backswing type is determined based on the characteristic value frame number of the backswing point, the problem of low efficiency in an image comparison mode is avoided, and the accuracy of the backswing type judgment is improved.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein.
It should be understood that, in various embodiments of the present invention, the sequence number of each process does not mean that the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
It should be understood that in the present invention, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements that are expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present invention, "plurality" means two or more. "and/or" is merely an association relationship describing the association object, and means that three relationships may exist, for example, and/or B, and that three cases of a alone, a and B together, and B alone may exist. The character "/" generally indicates that the context-dependent object is an "or" relationship. "comprising A, B and C", "comprising A, B, C" means that all three of A, B, C are comprised, "comprising A, B or C" means that one of A, B, C is comprised, "comprising A, B and/or C" means that any 1 or any 2 or 3 of A, B, C are comprised.
It should be understood that in the present invention, "B corresponding to a", "a corresponding to B", or "B corresponding to a" means that B is associated with a, from which B can be determined. Determining B from a does not mean determining B from a alone, but may also determine B from a and/or other information. The matching of A and B is that the similarity of A and B is larger than or equal to a preset threshold value.
As used herein, "if" may be interpreted as "at" or "when" depending on the context, "or" in response to a determination "or" in response to a detection.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the following description will be made by way of specific embodiments with reference to the accompanying drawings.
A tested person can contact with the ground or finish actions in the air during running, and the exercise technology, the human body mechanics and the physical mechanics of the tested person are greatly involved. From the moment that the runner touches the ground, the motion state of the runner can be analyzed and studied from the acceleration and the angle of the three axes of X (front and back of the running direction of the person), Y (left and right of the person) and Z (up and down of the person). The acceleration in the front-rear direction, the acceleration in the left-right direction, and the acceleration in the up-down direction are included. The braking force, stability, physical performance characteristics, physical change paths and the like generated when the vehicle falls on the ground can be analyzed, and further conclusion can be drawn according to the actual results and trend analysis.
The running motion is analyzed by adopting an acceleration sensor, and the acceleration and the angle are acquired by the sensor. The subject only needs to place the sensor at the ankle of the wearer, thereby collecting all acceleration and angle data from start to complete stop, and no other measuring equipment is needed.
The running exercise is divided into 3 phases and 6 actions, wherein the 3 phases are specifically a starting phase, an intermediate running phase and a braking phase (a phase of decelerating to a complete stopping), the 6 actions of the intermediate running phase are ground contact (grounding), buffering, back pedaling, back swinging, front swinging and pressing, as shown in fig. 1, the 6 actions form a complete step, and the running is to continuously repeat the 6 actions.
The scheme is to identify the 3 stages according to the collected sensor data, then further identify the 6 actions of each step in the in-transit running stage, and further analyze the type of each action.
In one embodiment, as shown in fig. 2, a method for determining a type of backswing is provided, comprising the steps of:
step S201, obtaining movement data of a target object in the running process, and extracting an angle characteristic value and a change trend characteristic value in the movement data.
The target object may be any living body capable of realizing the running exercise, wherein the running exercise may be divided into 3 phases and 6 actions, the 3 phases are specifically a starting running phase, an intermediate running phase and a braking phase (a phase of decelerating to completely stop), and the 6 actions of the intermediate running phase are ground contact (grounding), buffering, back pedaling, back swinging, front swinging and pressing.
The exercise data refers to data collected by a sensor provided on the object during running exercise of the object, such as starting phase data, intermediate running phase data, braking phase data (phase of decelerating to complete stop) or ground contact (landing) data in 6 actions of the intermediate running phase, buffer data, back-pedaling data, back-swinging data, front-swinging data, pressing data, and the like.
After the motion data is obtained by the sensor, the motion data is analyzed to extract data corresponding to the backswing motion, such as the speed, the acceleration and the like of the backswing motion. In the process of judging the type of the backswing, only the angle characteristic value and the change trend characteristic value are extracted to further judge the type of the backswing action.
Step S202, determining the characteristic value frame number of the backswing point based on the angle characteristic value and the change trend characteristic value.
And determining the characteristic value frame number of the backswing point based on the angle characteristic value and the change trend characteristic value, wherein the angle characteristic value and the change trend characteristic value are required to be judged, and specifically, if the angle characteristic value is not equal to the change trend characteristic value, the last point of the trend stable section is taken as the characteristic value frame number of the backswing point.
And step S203, determining the type of the backward swing according to the characteristic value frame number of the backward swing point.
For the determination of the type of the backswing, the following two main approaches are adopted:
In the first case, the backswing initiative feature value corresponding to the feature value frame number of the backswing point is required to be acquired, and then the backswing action type is determined based on the backswing initiative feature value, the x-axis acceleration feature judgment value and the z-axis acceleration feature judgment value.
Illustratively, the determining the backswing type based on the backswing initiative feature value, the x-axis acceleration feature determination value, and the z-axis acceleration feature determination value requires determining an extremum of the z-axis acceleration feature determination value based on the x-axis acceleration feature determination value and the z-axis acceleration feature determination value, and then determining the backswing type based on the extremum of the z-axis acceleration feature determination value and the backswing initiative feature value.
And judging the extreme value of the z-axis acceleration characteristic judging value through a preset threshold value, specifically, if the x-axis acceleration characteristic judging value is larger than a first preset threshold value, reading the z-axis acceleration characteristic judging value, and if the number of the z-axis acceleration characteristic judging values is larger than a second preset threshold value, obtaining the extreme value of the z-axis acceleration characteristic judging value. After the extreme value of the z-axis acceleration characteristic judgment value is obtained, the extreme value based on the z-axis acceleration characteristic judgment value and the backswing initiative characteristic value are needed, and the backswing action type is determined, namely, if the extreme value of the z-axis acceleration characteristic judgment value is larger than the backswing initiative characteristic value, the backswing action type is active backswing, and if the extreme value of the z-axis acceleration characteristic judgment value is smaller than or equal to the backswing initiative characteristic value, the backswing action type is passive backswing.
In the second case, only the angle change characteristic value within the preset range of the characteristic value frame number of the back swing point is compared with the swing characteristic value, so that the back swing operation type is determined. Specifically, if the angle change characteristic value of the back swing point in the preset range of the characteristic value frame number is larger than the swing characteristic value, the back swing is a folding back swing, and if the angle change characteristic value of the back swing point in the preset range of the characteristic value frame number is smaller than or equal to the swing characteristic value, the back swing is a non-folding back swing.
The embodiment of the invention provides a method for determining a backswing action type, which comprises the steps of obtaining motion data of a target object in a running process, extracting an angle characteristic value and a change trend characteristic value in the motion data, determining a characteristic value frame number of a backswing point based on the angle characteristic value and the change trend characteristic value, and determining the backswing action type according to the characteristic value frame number of the backswing point. According to the invention, the angle characteristic value and the change trend characteristic value of the target object in the running process are extracted, and then the characteristic value frame number of the backswing point is further determined through the angle characteristic value and the change trend characteristic value, so that the backswing type is determined based on the characteristic value frame number of the backswing point, the problem of low efficiency in an image comparison mode is avoided, and the accuracy of the backswing type judgment is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The following are device embodiments of the invention, for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 3 is a schematic structural diagram of a device for determining a type of backward swing according to an embodiment of the present invention, and for convenience of explanation, only a portion related to the embodiment of the present invention is shown, and the device for determining a type of backward swing includes a feature value extraction module 31, a frame number determination module 32, and a type of backward swing determination module 33, which are specifically as follows:
The feature value extraction module 31 is configured to obtain motion data of a target object during running, and extract an angle feature value and a change trend feature value in the motion data;
A frame number determining module 32, configured to determine a characteristic value frame number of the backswing point based on the angle characteristic value and the variation trend characteristic value;
and the back swing action type determining module 33 is configured to determine the back swing action type according to the characteristic value frame number of the back swing point.
In one possible implementation, the frame number determining module 32 is further configured to use the last point of the trend plateau as the characteristic value frame number of the backswing point if the angle characteristic value is not equal to the variation trend characteristic value.
In one possible implementation, the backswing action type determining module 33 is further configured to obtain a backswing initiative feature value corresponding to a feature value frame number of the backswing point, and determine the backswing action type based on the backswing initiative feature value, an x-axis acceleration feature determination value, and a z-axis acceleration feature determination value.
In a possible implementation manner, the backswing type determining module 33 is further configured to determine an extremum of the z-axis acceleration feature determination value based on the x-axis acceleration feature determination value and the z-axis acceleration feature determination value, and determine the backswing type based on the extremum of the z-axis acceleration feature determination value and the backswing activity feature value.
In one possible implementation manner, the post-swing motion type determining module 33 is further configured to read the z-axis acceleration feature determination value if the x-axis acceleration feature determination value is greater than a first preset threshold, and obtain an extremum of the z-axis acceleration feature determination value if the number of the z-axis acceleration feature determination values is greater than a second preset threshold.
In one possible implementation, the backswing type determining module 33 is further configured to determine that the backswing is an active backswing if the extremum of the z-axis acceleration characteristic determination value is greater than the backswing active characteristic value, and determine that the backswing is a passive backswing if the extremum of the z-axis acceleration characteristic determination value is less than or equal to the backswing active characteristic value.
In one possible implementation manner, the post-swing type determining module 33 is further configured to determine that the post-swing type is a folded post-swing if the angle change feature value of the post-swing point in the preset range where the feature value frame number is located is greater than the swing feature value, and determine that the post-swing type is a non-folded post-swing if the angle change feature value of the post-swing point in the preset range where the feature value frame number is located is less than or equal to the swing feature value.
Fig. 4 is a schematic diagram of a terminal according to an embodiment of the present invention. As shown in fig. 4, the terminal 4 of this embodiment comprises a processor 41, a memory 42 and a computer program 43 stored in the memory 42 and executable on the processor 41. The steps in the above-described embodiments of the method for determining the type of the respective back swing actions are implemented when the processor 41 executes the computer program 43, for example, steps 101 to 103 shown in fig. 1. Or the processor 41, when executing the computer program 43, implements the functions of the modules/units of the above-described embodiments of the respective back swing type determining device, such as the functions of the modules 31 to 33 shown in fig. 3.
The present invention also provides a readable storage medium having a computer program stored therein, which when executed by a processor is adapted to carry out the method of determining a type of backswing provided by the above-described various embodiments.
The readable storage medium may be a computer storage medium or a communication medium. Communication media includes any medium that facilitates transfer of a computer program from one place to another. Computer storage media can be any available media that can be accessed by a general purpose or special purpose computer. For example, a readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an Application SPECIFIC INTEGRATED Circuits (ASIC). In addition, the ASIC may reside in a user device. The processor and the readable storage medium may reside as discrete components in a communication device. The readable storage medium may be read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tape, floppy disk, optical data storage device, etc.
The present invention also provides a program product comprising execution instructions stored in a readable storage medium. The at least one processor of the device may read the execution instructions from the readable storage medium, and execution of the execution instructions by the at least one processor causes the device to implement the method of determining a type of backswing provided by the various embodiments described above.
In the above embodiment of the apparatus, it should be understood that the Processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The foregoing embodiments are merely for illustrating the technical solution of the present invention, but not for limiting the same, and although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solution described in the foregoing embodiments may be modified or substituted for some of the technical features thereof, and that these modifications or substitutions should not depart from the spirit and scope of the technical solution of the embodiments of the present invention and should be included in the protection scope of the present invention.