Method and device for generating demonstration video of sports training, computer device and storage medium

By decomposing users' complex movements and matching them with template libraries, customized sports training videos are generated, solving the problem that existing movement demonstration videos cannot adapt to users' abilities, thus improving user experience and operational efficiency.

CN121437699BActive Publication Date: 2026-03-27SOUTH CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing sports training software, the demonstration videos cannot be customized according to the user's actual ability, causing users to give up training when the difficulty exceeds their ability. In addition, the software is difficult to maintain and has low user stickiness.

Method used

By monitoring and decomposing users' complex actions, and utilizing a decomposed action template library and action parameter calculation, customized demonstration videos that adapt to users' abilities are generated, including action decomposition, parameter calculation, and video generation.

Benefits of technology

It enables the provision of more targeted training content based on the user's actual training status, improving user experience and training effectiveness while reducing maintenance difficulty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121437699B_ABST
    Figure CN121437699B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer-aided sports training equipment, and particularly relates to a method and device for generating a demonstration video for sports training, computer equipment and a storage medium, wherein a demonstration action is constructed based on a composite action of a user and a decomposition action template corresponding to each decomposition action of the composite action, a more targeted decision basis can be provided for the sports training of the user according to the actual training condition of the user, and customization of the training content is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer-aided sports training equipment, and in particular to a method and device for generating a demonstration video for sports training, a computer device and a storage medium. BACKGROUND

[0002] Shaping through sports training, relieving sub-health symptoms, improving body flexibility and coordination, improving immunity, and improving the quality of life are important parts of healthy life. With the popularity of the Internet and mobile terminals, sports training with the help of computer software or mobile phone App has become a well-known exercise mode. A common scenario is that computer software or mobile phone App plays demonstration action videos of coaches, users imitate the videos for sports training, and completes check-in or training feedback after training. Some high-configuration devices also provide cameras and portable sensors to monitor the user's movements to ensure that the user's movements are standardized and safe.

[0003] In sports training software, action demonstration videos are important resources. After a user imitates a demonstration action video for a period of training, or when the user finds that the demonstration action video is not suitable for him or her, the user will usually look for new video resources. Therefore, one of the focuses of sports training software operation and maintenance is to provide new action demonstration videos. These videos can be recorded by real coaches or synthesized through animation. As the number of users grows, the demand for demonstration action videos will increase rapidly, and the difficulty of operation and maintenance will continue to increase. In addition, existing demonstration action videos are pre-recorded and cannot be changed. Some users want to perform certain actions for sports training, but find that the difficulty and intensity of the demonstration action video exceed their ability, so they will give up training of the action. Therefore, in order to maintain long-term user stickiness, sports training software needs to provide customized training action videos that are rich, varied, and suitable for the user's sports ability. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a method and device for generating a demonstration video for sports training, a computer device and a storage medium. Based on the user's compound action and the corresponding decomposition action template of each decomposition action of the compound action, the demonstration action is constructed. The user's actual training condition can be used to provide more targeted decision basis for the user's sports training, and the customization of the training content is realized.

[0005] In a first aspect, the embodiments of the present application provide a city waterlogging prediction method, including the following steps:

[0006] The user's sports training process is monitored to obtain the user's compound action. The action is decomposed to obtain a plurality of decomposition actions and action parameters of each decomposition action.

[0007] obtain the action parameters of the decomposition action templates corresponding to each of the decomposition actions according to the decomposition action templates corresponding to each of the decomposition actions of the complex action and a preset decomposition action template library;

[0008] obtain the completion score of the complex action according to the action parameters of each of the decomposition actions and the action parameters of the corresponding decomposition action templates;

[0009] obtain the number of decomposition action templates corresponding to the complex action; determine the number of decomposition action templates corresponding to the demonstration action according to the number of decomposition action templates corresponding to the complex action and the completion score of the complex action, wherein the demonstration action is used to indicate the next complex action after the user completes the current complex action;

[0010] obtain the action parameters of the demonstration action and a plurality of decomposition actions corresponding to the demonstration action according to the number of decomposition action templates corresponding to the demonstration action, the action parameters of each of the decomposition actions and the decomposition action template library;

[0011] obtain the demonstration video according to the demonstration action and the action parameters of each of the decomposition actions corresponding to the demonstration action; and display the demonstration video in a preset display interface.

[0012] In a second aspect, an embodiment of the present application provides a demonstration video generation device for sports training, comprising:

[0013] an action decomposition module, configured to monitor a sports training process of a user to obtain a complex action of the user; and perform action decomposition on the complex action to obtain a plurality of decomposition actions and action parameters of each of the decomposition actions;

[0014] a parameter acquisition module, configured to obtain the action parameters of the decomposition action templates corresponding to each of the decomposition actions according to the decomposition action templates corresponding to each of the decomposition actions of the complex action and a preset decomposition action template library;

[0015] a completion score calculation module, configured to obtain the completion score of the complex action according to the action parameters of each of the decomposition actions and the action parameters of the corresponding decomposition action templates;

[0016] a template number acquisition module, configured to obtain the number of decomposition action templates corresponding to the complex action; and determine the number of decomposition action templates corresponding to the demonstration action according to the number of decomposition action templates corresponding to the complex action and the completion score of the complex action, wherein the demonstration action is used to indicate the next complex action after the user completes the current complex action;

[0017] An action construction module is configured to construct actions according to the number of decomposed action templates corresponding to the demonstration action, the action parameters of each decomposed action, and the decomposed action template library, to obtain the action parameters of the demonstration action and a plurality of decomposed actions corresponding to the demonstration action.

[0018] A video generation module is configured to generate a demonstration video according to the demonstration action and the action parameters of each decomposed action corresponding to the demonstration action, to obtain the demonstration video, and to display the demonstration video on a preset display interface.

[0019] In a third aspect, an embodiment of the present application provides a computer device, including a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the method for generating a demonstration video of sports training are implemented.

[0020] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a demonstration video of sports training are implemented.

[0021] In the embodiment of the present application, a method, device, computer device, and storage medium for generating a demonstration video of sports training are provided, demonstration action construction is performed based on a composite action of a user and decomposed action templates corresponding to each decomposed action of the composite action, more targeted decision basis can be provided for sports training of the user according to actual training conditions of the user, and customized training content is achieved.

[0022] In order to better understand and implement, the present application is described in detail below with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 A flowchart of a method for generating a demonstration video of sports training provided by an embodiment of the present application is shown in the figure.

[0024] Figure 2 A flowchart of S3 in the method for generating a demonstration video of sports training provided by an embodiment of the present application is shown in the figure.

[0025] Figure 3 A flowchart of S5 in the method for generating a demonstration video of sports training provided by an embodiment of the present application is shown in the figure.

[0026] Figure 4 A flowchart of S52 in the method for generating a demonstration video of sports training provided by an embodiment of the present application is shown in the figure.

[0027] Figure 5A flowchart of S6 in a method for generating a demonstration video of sports training according to an embodiment of the present application is shown in FIG. 6;

[0028] Figure 6 A flowchart of S61 in a method for generating a demonstration video of sports training according to an embodiment of the present application is shown in FIG. 6A;

[0029] Figure 7 A flowchart of S61 in a method for generating a demonstration video of sports training according to another embodiment of the present application is shown in FIG. 6B;

[0030] Figure 8 A structural diagram of a device for generating a demonstration video of sports training according to an embodiment of the present application is shown in FIG. 7;

[0031] Figure 9 A structural diagram of a computer device according to an embodiment of the present application is shown in FIG. 8. DETAILED DESCRIPTION

[0032] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same or similar components are designated by the same or similar reference numerals, and a repeated description thereof will be omitted. The following exemplary embodiments described in the detailed description section do not represent all aspects of the present application. Instead, they are merely examples of apparatus and methods in accordance with aspects of the present application as detailed in the appended claims.

[0033] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0034] It is to be understood that the singular forms "a", "an", and "the" include plural referents unless the context clearly dictates otherwise. It is to be understood that the term "comprising" as used herein is to be taken as meaning "including, but not limited to". It is to be understood that the term "consisting of" as used herein is to be taken as meaning "including, and limited to". It is to be understood that the term "consisting essentially of" as used herein is to be taken as meaning "including at least the recited entities and those that do not materially affect the character and composition as a whole of the closed system." It is to be understood that the phrase "consisting of" excludes any element not specified in the claim.

[0035] Reference will now be made to Figure 1 , Figure 1 A flowchart of a method for generating a demonstration video of sports training according to an embodiment of the present application is shown in FIG. 6. The method includes the following steps:

[0036] S1: monitoring a user's movement training process to obtain a compound movement of the user; performing movement decomposition on the compound movement to obtain a plurality of decomposed movements and movement parameters of each decomposed movement.

[0037] The execution subject of the method for generating the demonstration video of the movement training is a generation device (hereinafter referred to as a generation device) of the method for generating the demonstration video of the movement training. In an optional embodiment, the generation device can be a computer device, can be a server, or a server cluster formed by a plurality of computer devices.

[0038] In the embodiment, the generation device monitors a user's movement training process to obtain a compound movement of the user. The generation device performs movement decomposition on the compound movement to obtain a plurality of decomposed movements and movement parameters of each decomposed movement, wherein the movement parameters include a starting position flexion angle, a terminal position flexion angle, and a completion time.

[0039] Specifically, in the embodiment, monitoring a user's movement training process includes capturing a movement state and processing movement data. The capturing of the movement state can be achieved by using a wearable motion sensor connected to the client or an optical motion capture device. The connection mode can be wireless or wired. The wearable motion sensor uses existing hardware devices, and can optionally use multiple XSens DOT sensors of the XSens company in the Netherlands or YD122 model sensors of the Century Xiangkang Medical Instrument Co., Ltd. The optical motion capture device can also use existing hardware devices, including a Kinect device of the Microsoft company or a Vero camera of the VICON company. This is prior art and will not be described again.

[0040] In an optional embodiment, if the wearable motion sensor scheme is adopted, the implementation method is to fix the wearable motion sensor on both sides of each major joint of the user, the waist, the chest, and the head. When the user imitates the compound movement demonstration video for training, the wearable motion sensor measures the magnetic field intensity, angular velocity, and acceleration value of the wearing part in real time, and converts them into heading angle, pitch angle, and roll angle parameters describing the spatial position. The above parameter sequence is output to the subsequent movement data processing flow.

[0041] In another optional embodiment, if the optical motion capture scheme is adopted, the implementation method is to place the optical motion capture device in an environment that can be directly viewed by the user and has no obstruction. When the user imitates the compound movement demonstration video for training, the optical motion capture device records a video, extracts the heading angle, pitch angle, and roll angle parameters of each segment of the limbs and spine, and outputs the above parameter sequence to the subsequent movement data processing flow.

[0042] The processing of the motion data first generates a device to convert the heading angle, pitch angle, roll angle parameters of each segment of the limbs and spine into a sequence of flexion and extension angles of each joint / spine in different degrees of freedom. Then, according to the decomposition action template of the composite action, a hidden Markov model is constructed, and the Viterbi algorithm is used to segment the flexion and extension angle sequence into independent segments, each of which corresponds to the actual completion process of a decomposition action template.

[0043] S2: According to each of the decomposition actions corresponding to the composite action and the preset decomposition action template library, the action parameters of each of the decomposition action templates corresponding to the decomposition actions are obtained.

[0044] The decomposition action template is regarded as the smallest unit of human action, and all movements of the limbs are realized by the flexion and extension of the joints or the spine. The flexion and extension movement pattern of a single joint or spine can be single degree of freedom, such as knee joint, finger joint, or double degree of freedom, such as elbow joint, wrist joint, or three degrees of freedom, such as cervical vertebra, hip joint. Among them, the double degree of freedom and three degrees of freedom can be decomposed into two or three single degree of freedom combined movements. A target flexion angle is set for the single degree of freedom movement, the direction that causes the target flexion angle to increase is defined as the extension direction, the direction that causes the target flexion angle to decrease is defined as the flexion direction, and the target flexion angle remains unchanged.

[0045] The spine is subdivided into cervical vertebra, thoracic vertebra, and lumbar vertebra, and the flexion and extension movement of a single joint or a part of the spine in one degree of freedom in one direction is a basic movement unit. Three target parameters are set for the basic movement unit, which are the initial position flexion angle, the terminal position flexion angle, and the completion time, representing the target values that the user should strive to achieve when completing this decomposition action template. The same target joint / spine in the same degree of freedom in the same direction can be set with different action parameters to form multiple decomposition action templates.

[0046] In this embodiment, the generating device extracts a plurality of decomposition action templates from the decomposition action template library according to each of the decomposition actions corresponding to the composite action and the preset decomposition action template library, confirms the decomposition action template corresponding to each of the decomposition actions, and obtains the action parameters of the decomposition action template corresponding to each of the decomposition actions, wherein the decomposition action template library includes a plurality of decomposition action templates and the action parameters corresponding to each of the decomposition action templates.

[0047] S3: According to the action parameters of each of the decomposition actions and the action parameters of the corresponding decomposition action templates, the completion score of the composite action is calculated to obtain the completion score of the composite action.

[0048] In the embodiment, the generation device calculates completion scores of the compound action according to the action parameters of each of the decomposed actions and the action parameters of the corresponding decomposed action templates, and obtains the completion score of the compound action.

[0049] Referring to Figure 2 , Figure 2 The flowchart of S3 in the method for generating a demonstration video of sports training provided in an embodiment of the present application includes the following step S31:

[0050] S31: Calculate completion scores of each of the decomposed actions according to the initial position flexion angle, the terminal position flexion angle and the completion time in the action parameters of each of the decomposed actions and the action parameters of the corresponding decomposed action templates, and obtain the completion scores of each of the decomposed actions; and average process the completion scores of each of the decomposed actions to obtain the completion score of the compound action.

[0051] In the embodiment, the generation device calculates completion scores of the compound action according to the action parameters of each of the decomposed actions and the action parameters of the corresponding decomposed action templates, and obtains the completion score of the compound action.

[0052] S4: Obtain the number of decomposed action templates corresponding to the compound action; and determine the number of decomposed action templates corresponding to the demonstration action according to the number of decomposed action templates corresponding to the compound action and the completion score of the compound action, wherein the demonstration action indicates the next compound action after the user completes the current compound action.

[0053] In the embodiment, the generation device obtains the number of decomposed action templates corresponding to the compound action. The generation device determines the number of decomposed action templates corresponding to the demonstration action according to the number of decomposed action templates corresponding to the compound action and the completion score of the compound action, wherein the demonstration action indicates the next compound action after the user completes the current compound action.

[0054] Specifically, the generation device determines the number of decomposed action templates corresponding to the demonstration action according to the number of decomposed action templates corresponding to the compound action, the completion score of the compound action, a preset first template number threshold, a second template number threshold, a first score threshold and a second score threshold. If the number of decomposed action templates is greater than or equal to the first template number threshold and the completion score is less than the first score threshold, the generation device reduces the number of decomposed action templates by 1 to obtain the number of decomposed action templates corresponding to the demonstration action.

[0055] If the number of the decomposed action templates is less than the template number threshold and the completion score is less than the first score threshold, the generating device sets the number of the decomposed action templates corresponding to the demonstration action as a preset first number of the decomposed action templates.

[0056] If the number of the decomposed action templates is less than the second template number threshold and the completion score is greater than the second score threshold, the generating device adds 1 to the number of the decomposed action templates as the number of the decomposed action templates corresponding to the demonstration action.

[0057] If the number of the decomposed action templates is equal to the template number threshold and the completion score is greater than or equal to the second score threshold, the generating device sets the number of the decomposed action templates corresponding to the demonstration action as a preset second number of the decomposed action templates.

[0058] S5: Action construction is performed according to the number of the decomposed action templates corresponding to the demonstration action, the action parameters of each of the decomposed actions and the decomposed action template library, to obtain the action parameters of the demonstration action and a plurality of decomposed actions corresponding to the demonstration action.

[0059] In this embodiment, action construction is performed according to the number of the decomposed action templates corresponding to the demonstration action, the action parameters of each of the decomposed actions and the decomposed action template library, to obtain the action parameters of the demonstration action and a plurality of decomposed actions corresponding to the demonstration action.

[0060] The decomposed action template library further includes description information of each of the decomposed action templates, wherein the description information includes a target joint name, a direction and a plurality of subsequent joint names. According to the correlation of human body actions, the subsequent joint / spine name of a certain decomposed action template is set to represent the movement of the next joint / spine that is usually performed during or after the decomposed action template, and one decomposed action template has one or more subsequent joint / spine names. For example, the subsequent joint / spine names of the decomposed action template representing the dorsiflexion of the ankle joint include the ankle joint, the knee joint and the hip joint.

[0061] Please refer to Figure 3 , Figure 3 The flowchart of S5 in the method for generating a demonstration video of sports training provided by an embodiment of the present application includes steps S51-S52, and the details are as follows:

[0062] S51: randomly extracting two decomposition action templates from the decomposition action template library as a first decomposition action and a candidate decomposition action; judging whether the candidate decomposition action meets a preset decomposition action connection requirement according to description information of the first decomposition action and the candidate decomposition action, and if not, randomly extracting a decomposition action template from the decomposition action template library again as a candidate decomposition action, and repeatedly judging whether the candidate decomposition action meets the preset decomposition action connection requirement.

[0063] In the embodiment, the generation device randomly extracts two decomposition action templates from the decomposition action template library as a first decomposition action and a candidate decomposition action.

[0064] The generation device judges whether the candidate decomposition action meets a preset decomposition action connection requirement according to description information of the first decomposition action and the candidate decomposition action, and if not, the generation device randomly extracts a decomposition action template from the decomposition action template library again as a candidate decomposition action, and repeatedly judges whether the candidate decomposition action meets the preset decomposition action connection requirement, wherein the decomposition action connection requirement includes (1)-(4) as follows:

[0065] (1) the target joint name, degree of freedom and direction of the decomposition action and the candidate decomposition action cannot all be the same.

[0066] (2) if the direction of the decomposition action is static, the direction of the candidate decomposition action is flexion direction or extension direction.

[0067] (3) the target joint name of the candidate decomposition action is one of the subsequent joint names of the decomposition action template.

[0068] (4) according to the target joint name of the decomposition action, the terminal position flexion and extension angle of the target joint reached by the decomposition action is calculated as the reached position flexion and extension angle of the candidate decomposition action; the difference between the initial position flexion and extension angle in the action parameter of the candidate decomposition action and the reached position flexion and extension angle of the candidate decomposition action is within 10°.

[0069] S52: if yes, taking the candidate decomposition action as a next decomposition action, repeatedly extracting a decomposition action template from the decomposition action template library as a candidate decomposition action, repeatedly judging whether the candidate decomposition action meets a preset decomposition action connection requirement, until a plurality of decomposition actions meeting the number of decomposition action templates are obtained, constructing an action according to each decomposition action, obtaining a demonstration action and action parameters of a plurality of decomposition actions corresponding to the demonstration action.

[0070] If yes, in the embodiment, the generation device takes the candidate decomposition action as the next decomposition action, repeatedly extracts a decomposition action template from the decomposition action template library as a candidate decomposition action, repeatedly judges whether the candidate decomposition action meets the preset decomposition action connection requirement, until a plurality of decomposition actions meeting the number of decomposition action templates are obtained, action construction is performed according to each decomposition action, the demonstration action and the action parameters of the plurality of decomposition actions corresponding to the demonstration action are obtained.

[0071] The action parameters of the plurality of decomposition actions corresponding to the demonstration action include a demonstration start position flexion angle, a demonstration start position flexion angle, and a demonstration completion time. Please refer to Figure 4 , Figure 4 The flowchart of S52 in the method for generating a demonstration video of sports training provided by an embodiment of the present application includes steps S521-S524, and the details are as follows.

[0072] S521: Extract the training parameters corresponding to each target decomposition action from the preset decomposition action training parameter library.

[0073] The decomposition action training parameter library stores the action parameters of each decomposition action recently collected by a user as the training parameters corresponding to each target decomposition action. In the embodiment, the generation device extracts the training parameters corresponding to each target decomposition action from the preset decomposition action training parameter library, wherein the training parameters include a training start position flexion angle, a training end position flexion angle, and a training completion time.

[0074] S522: Average the start position flexion angle in the action parameters corresponding to each decomposition action and the training start position flexion angle in the corresponding training parameters to obtain the demonstration start position flexion angle corresponding to each decomposition action.

[0075] In the embodiment, the generation device averages the start position flexion angle in the action parameters corresponding to each decomposition action and the training start position flexion angle in the corresponding training parameters to obtain the demonstration start position flexion angle corresponding to each decomposition action.

[0076] S523: Average the end position flexion angle in the action parameters corresponding to each decomposition action and the training end position flexion angle in the corresponding training parameters to obtain the demonstration end position flexion angle corresponding to each decomposition action.

[0077] In the embodiment, the generation device averages the end position flexion angle in the action parameters corresponding to each decomposition action and the training end position flexion angle in the corresponding training parameters to obtain the demonstration end position flexion angle corresponding to each decomposition action.

[0078] S524: Average the completion time in the action parameter corresponding to each of the decomposed actions with the actual training completion time in the actual training parameter to obtain a demonstration completion time corresponding to each of the decomposed actions.

[0079] In this embodiment, the generating device averages the completion time in the action parameter corresponding to each of the decomposed actions with the actual training completion time in the actual training parameter to obtain a demonstration completion time corresponding to each of the decomposed actions. The action parameter construction of the decomposed action corresponding to the demonstration action is performed in combination with the action parameter and the actual training parameter corresponding to the decomposed action template, which not only conforms to the actual ability of the user but also takes into account the training target.

[0080] In addition, in an optional embodiment, the generating device repeatedly collects the action parameter of each decomposed action of the user, updates the decomposed action actual training parameter library, and realizes dynamic maintenance of the actual training parameter of the decomposed action, so as to generate the action parameter of the subsequent demonstration action. When the movement ability improves, the newly generated action parameter of the demonstration action will also tend to be closer to the standard action, gradually guiding the user to strive for the direction of achieving the standard action.

[0081] S6: Generate a demonstration video according to the demonstration action and the action parameter of each decomposed action corresponding to the demonstration action, and obtain the demonstration video; and display the demonstration video in a preset display interface.

[0082] In this embodiment, the generating device generates a demonstration video according to the demonstration action and the action parameter of each decomposed action corresponding to the demonstration action, and obtains the demonstration video; and displays the demonstration video in a preset display interface.

[0083] Please refer to Figure 5 , Figure 5 The flowchart of S6 in the method for generating a demonstration video of a movement training provided by an embodiment of the present application includes steps S61-S62, and specifically as follows:

[0084] S61: Obtain a demonstration body position of each decomposed action corresponding to the demonstration action, set a start time, and set an end time.

[0085] In this embodiment, the generating device obtains a demonstration body position of each decomposed action corresponding to the demonstration action, sets a start time, and sets an end time.

[0086] The description information of the decomposed action template further includes a plurality of optional body positions, including multiple body positions in five body positions of a standing position, a sitting position, a supine position, a prone position, and a lateral position. For the demonstration body position, please refer to Figure 6 , Figure 6The flowchart of step S61 in the method for generating a demonstration video of a sports training provided by an embodiment of the present application comprises steps S611-S612, and the details are as follows:

[0087] S611: randomly selecting an optional body position from a plurality of optional body positions of each decomposed action as a demonstration body position of a first decomposed action corresponding to the demonstration action.

[0088] In the embodiment, the generating device randomly selects an optional body position from a plurality of optional body positions of each decomposed action as a demonstration body position of a first decomposed action corresponding to the demonstration action according to the description information of the decomposed action template.

[0089] S612: if there is a demonstration body position of a current decomposed action in optional body positions of a next decomposed action, taking the demonstration body position of the current decomposed action as a demonstration body position of the next decomposed action, and if not, randomly selecting an optional body position from a plurality of optional body positions of the next decomposed action as a demonstration body position of the next decomposed action; repeatedly performing the body position selection until a demonstration body position of a last decomposed action corresponding to the demonstration action is obtained, and demonstration body positions of each decomposed action corresponding to the demonstration action are obtained.

[0090] If there is a demonstration body position of a current decomposed action in optional body positions of a next decomposed action, the generating device takes the demonstration body position of the current decomposed action as a demonstration body position of the next decomposed action in the embodiment, and if not, the generating device randomly selects an optional body position from a plurality of optional body positions of the next decomposed action as a demonstration body position of the next decomposed action.

[0091] The generating device repeatedly performs the body position selection until a demonstration body position of a last decomposed action corresponding to the demonstration action is obtained, and demonstration body positions of each decomposed action corresponding to the demonstration action are obtained. On the basis of random selection, the body position change is reduced as much as possible, so that the user can complete a demonstration action in one body position or change the body position in the middle of the training.

[0092] For the set start time, refer to Figure 7 , Figure 7 The flowchart of step S61 in the method for generating a demonstration video of a sports training provided by another embodiment of the present application comprises steps S613-S616, and the details are as follows:

[0093] S613: obtaining directions of each decomposed action corresponding to the demonstration action; setting a set start time of a first decomposed action corresponding to the demonstration action as 0; and adding the set start time and a demonstration completion time to obtain a set end time of the first decomposed action.

[0094] In the embodiment, the generating device obtains the direction of each decomposed action corresponding to the demonstration action.

[0095] The generating device sets the set start time of the first decomposed action corresponding to the demonstration action as 0; and adds the set start time and the demonstration completion time to obtain the set end time of the first decomposed action.

[0096] S614: If the direction of any one of the current decomposed action and the next decomposed action is static, the generating device sets the set end time of the current decomposed action as the set start time of the next decomposed action; and adds the set start time and the demonstration completion time to obtain the set end time of the next decomposed action.

[0097] In the embodiment, the generating device obtains the direction of each decomposed action corresponding to the demonstration action.

[0098] If the direction of any one of the current decomposed action and the next decomposed action is static, the generating device sets the set end time of the current decomposed action as the set start time of the next decomposed action; and adds the set start time and the demonstration completion time to obtain the set end time of the next decomposed action.

[0099] S615: If the demonstration body position of the current decomposed action is different from the demonstration body position of the next decomposed action, the generating device sets the set end time of the current decomposed action as the set start time of the next decomposed action; and adds the set start time and the demonstration completion time to obtain the set end time of the next decomposed action.

[0100] If the demonstration body position of the current decomposed action is different from the demonstration body position of the next decomposed action, in the embodiment, the generating device sets the set end time of the current decomposed action as the set start time of the next decomposed action; and adds the set start time and the demonstration completion time to obtain the set end time of the next decomposed action.

[0101] S616: If the direction of the current decomposed action and the direction of the next decomposed action are not static, and the demonstration body position of the current decomposed action is the same as the demonstration body position of the next decomposed action, the generating device sets the set start time and the set end time of the next decomposed action according to a preset strategy.

[0102] If the direction of the current decomposition action and the direction of the next decomposition action are not static, and the demonstration body position of the current decomposition action and the demonstration body position of the next decomposition action are the same, in the embodiment, the generation device sets the set start time and the set end time of the next decomposition action according to a preset strategy. Specifically, the generation device randomly adopts one of the three strategies to set the set start time and the set end time of the next decomposition action, as follows:

[0103] Strategy one: the generation device sets the set end time of the current decomposition action as the set start time of the next decomposition action; the generation device adds the set start time and the demonstration completion time to obtain the set end time of the next decomposition action.

[0104] Strategy two: the generation device selects the set start time of the next decomposition action according to the set start time and the set end time of the current decomposition action, and the demonstration completion time of the next decomposition action; specifically, the generation device randomly selects a time point between the set start time and the set end time of the current decomposition action as the set start time of the next decomposition action, and the generation device adds the set start time and the demonstration completion time to obtain the set end time of the next decomposition action. If the set end time of the next decomposition action is earlier than the set end time of the current decomposition action, the generation device repeats the random selection of a time point between the set start time and the set end time of the current decomposition action as the set start time of the next decomposition action until the set end time of the next decomposition action is not earlier than the set end time of the current decomposition action.

[0105] Strategy three: if the demonstration completion time of the current decomposition action is less than or equal to the demonstration completion time of the next decomposition action, the set start time of the current decomposition action is set as the set start time of the next decomposition action; the set start time and the demonstration completion time are added to obtain the set end time of the next decomposition action; if the demonstration completion time of the current decomposition action is greater than the demonstration completion time of the next decomposition action, strategy one or strategy two is randomly adopted.

[0106] S62: generate a demonstration video according to the demonstration action and the action parameters, demonstration body position, set start time and set end time of each decomposition action corresponding to the demonstration action, to obtain a demonstration video.

[0107] In the embodiment, the generating device generates a demonstration video according to the demonstration action and the action parameters, demonstration body position, set start time and set end time of each decomposed action corresponding to the demonstration action, and obtains the demonstration video. The demonstration action is constructed based on the composite action of the user and the decomposed action template corresponding to each decomposed action of the composite action, so that more targeted decision basis can be provided for the sports training of the user according to the actual training condition of the user, and the customization of the training content is realized.

[0108] Specifically, the generating device uses a human body animation model driven by parameters of each joint and spine, sequentially imports the action parameters, demonstration body position, set start time and set end time of the demonstration action and each decomposed action corresponding to the demonstration action, forms a continuous action according to the corresponding parameter-driven human body animation model. When the demonstration value of the terminal position flexion angle of the (n-1) th (1<n≤N) decomposed action template is different from the demonstration value of the flexion angle of the starting position of the n th decomposed action template, the flexion angle is smoothly interpolated, and a transition animation is generated according to the interpolation; when the demonstration body position of the (n-1) th decomposed action template is different from the demonstration body position of the n th decomposed action template, a transition animation of body position change is generated. After the animation synthesis is completed, the demonstration video is obtained, wherein the human body animation model and its driving, and the interpolation algorithm are prior art and will not be described in detail.

[0109] Please refer to Figure 8 , Figure 8 The structure diagram of the demonstration video generation device for sports training provided by an embodiment of the present application, the device can realize all or part of the demonstration video generation device for sports training through software, hardware or a combination of the two, the device 8 comprises:

[0110] The action decomposition module 81 is configured to monitor the sports training process of the user, obtain the composite action of the user, and decompose the composite action to obtain a plurality of decomposed actions and the action parameters of each decomposed action.

[0111] The parameter acquisition module 82 is configured to obtain the action parameters of the decomposed action template corresponding to each decomposed action according to the composite action and the preset decomposed action template library.

[0112] The completion calculation module 83 is configured to perform completion calculation of the composite action according to the action parameters of each decomposed action and the action parameters of the corresponding decomposed action template, and obtain the completion score of the composite action.

[0113] The template number obtaining module 84 is configured to obtain a number of decomposition action templates corresponding to the compound action; and determine a number of decomposition action templates corresponding to a demonstration action according to the number of decomposition action templates corresponding to the compound action and a completion score of the compound action, wherein the demonstration action is used to indicate a next compound action after the user completes the current compound action.

[0114] The action construction module 85 is configured to perform action construction according to the number of decomposition action templates corresponding to the demonstration action, action parameters of each of the decomposition actions and the decomposition action template library, to obtain the demonstration action and action parameters of a plurality of decomposition actions corresponding to the demonstration action.

[0115] The video generation module 86 is configured to generate a demonstration video according to the demonstration action and the action parameters of each of the decomposition actions corresponding to the demonstration action, to obtain the demonstration video; and display the demonstration video on a preset display interface.

[0116] In the embodiments of the present application, the action decomposition module is used to monitor the movement training process of the user, to obtain a compound action of the user; perform action decomposition on the compound action, to obtain a plurality of decomposition actions and action parameters of each of the decomposition actions; the parameter obtaining module is used to obtain action parameters of a decomposition action template corresponding to each of the decomposition actions according to each of the decomposition actions corresponding to the compound action and a preset decomposition action template library; the completion score calculation module is used to calculate a completion score of the compound action according to the action parameters of each of the decomposition actions and the action parameters of the corresponding decomposition action template; the template number obtaining module is used to obtain a number of decomposition action templates corresponding to the compound action; the number of decomposition action templates corresponding to a demonstration action is determined according to the number of decomposition action templates corresponding to the compound action and the completion score of the compound action, wherein the demonstration action is used to indicate a next compound action after the user completes the current compound action; the action construction module is used to perform action construction according to the number of decomposition action templates corresponding to the demonstration action, the action parameters of each of the decomposition actions and the decomposition action template library, to obtain the demonstration action and the action parameters of a plurality of decomposition actions corresponding to the demonstration action; the video generation module is used to generate a demonstration video according to the demonstration action and the action parameters of each of the decomposition actions corresponding to the demonstration action, to obtain the demonstration video; and display the demonstration video on a preset display interface. The demonstration action is constructed based on the compound action of the user and the decomposition action template corresponding to each of the decomposition actions of the compound action, which can provide more targeted decision basis for the movement training of the user according to the actual training condition of the user, to realize customization of the training content.

[0117] Please refer to Figure 9 , Figure 9A structural schematic diagram of a computer device provided for an embodiment of the present application is shown in FIG. 9. The computer device 9 includes a processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on the processor 91. The computer device can store a plurality of instructions, which are suitable for being loaded by the processor 91 and executing the above-mentioned method steps of the embodiments shown in FIGS. 1-8. The computer device can also store a plurality of instructions, which are suitable for being loaded by the processor 91 and executing the above-mentioned method steps of the embodiments shown in FIGS. 1-8. Figures 1 to 7 The specific execution process of the method steps of the embodiments shown in FIGS. 1-8 can be seen from the specific description of the embodiments shown in FIGS. 1-8, which will not be repeated here. Figures 1 to 7 The specific description of the embodiments shown in FIGS. 1-8 will not be repeated here.

[0118] The processor 91 can include one or more processing cores. The processor 91 connects various parts within the server through various interfaces and lines, executes various functions and processes data of the demonstration video generation apparatus 8 of the motion training by running or executing instructions, programs, code sets or instruction sets stored in the memory 92, and calling data in the memory 92. Optionally, the processor 91 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programble logic array (PLA). The processor 91 can be integrated with a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU is mainly used to process the operating system, user interface, and application programs; the GPU is used to render and draw the content to be displayed on the touch display screen; and the modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 91, but can be realized by a separate chip.

[0119] The memory 92 can include a random access memory (RAM) and a read-only memory (ROM). Optionally, the memory 92 includes a non-transitory computer-readable storage medium. The memory 92 can be configured to store instructions, programs, codes, code sets, or instruction sets. The memory 92 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above various method embodiments, etc., and the data storage area can store data involved in the above various method embodiments, etc. The memory 92 can also be at least one storage device located away from the processor 91.

[0120] The embodiments of the present application also provide a storage medium, which can store a plurality of instructions. The instructions are suitable for being loaded and executed by a processor to implement the method steps of the embodiments of the present application. Figures 1 to 7 The specific implementation process of the method steps of the embodiments shown can be referred to the specific description of the embodiments shown, which will not be repeated here. Figures 1 to 7 The specific implementation process of the method steps of the embodiments shown can be referred to the specific description of the embodiments shown, which will not be repeated here.

[0121] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example for illustration, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the above method embodiments, which will not be repeated here.

[0122] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.

[0123] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0124] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / terminal device and method can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are only schematic. The division of the modules or units is only a logical function division, and there can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0125] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0126] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0127] The integrated module / unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by computer programs instructing related hardware, and the computer programs can be stored in a computer readable storage medium. The computer program, when executed by a processor, can implement the steps of each method embodiment described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms.

[0128] The present application is not limited to the above-described embodiments, and various modifications or alterations can be made to the present application without departing from the spirit and scope of the present application, and it is intended that such modifications and alterations be included within the scope of the present application recited in the following claims and their equivalents.

Claims

1. A method for generating a demonstration video of sports training, characterized in that, Includes the following steps: The user's exercise training process is monitored to obtain the user's compound movements; the compound movements are decomposed to obtain several decomposed movements and the movement parameters of each decomposed movement. Based on the decomposed actions corresponding to the composite action and the preset decomposed action template library, the action parameters of the decomposed action template corresponding to each decomposed action are obtained; wherein, the decomposed action template library includes the description information of each decomposed action template, and the description information includes the target joint name, direction and several subsequent joint names. The completion score of the composite action is calculated based on the action parameters of each decomposed action and the action parameters of the corresponding decomposed action template. Obtain the number of decomposed action templates corresponding to the composite action; determine the number of decomposed action templates corresponding to the demonstration action based on the number of decomposed action templates corresponding to the composite action and the completion score of the composite action, wherein the demonstration action is used to indicate the next composite action after the user completes the current composite action. Two decomposition action templates are randomly extracted from the decomposition action template library as the first decomposition action and the candidate decomposition action, respectively. Based on the description information of the first decomposition action and the candidate decomposition action, it is determined whether the candidate decomposition action meets the preset decomposition action connection requirements. If not, a decomposition action template is randomly extracted from the decomposition action template library again as the candidate decomposition action, and the determination of whether the candidate decomposition action meets the preset decomposition action connection requirements is repeated. If satisfied, the candidate decomposition action is used as the next decomposition action. The decomposition action template is randomly extracted from the decomposition action template library as a candidate decomposition action. The candidate decomposition action is repeatedly judged to meet the preset decomposition action connection requirements until several decomposition actions that meet the number of decomposition action templates are obtained. Actions are constructed according to each decomposition action to obtain the demonstration action and the action parameters of several decomposition actions corresponding to the demonstration action. A demonstration video is generated based on the demonstration action and the action parameters of each decomposed action corresponding to the demonstration action; the demonstration video is then displayed on a preset display interface.

2. The method for generating a demonstration video of sports training according to claim 1, characterized in that: The decomposed motion template library also includes several decomposed motion templates and motion parameters corresponding to each decomposed motion template; the motion parameters include the starting position flexion-extension angle, the ending position flexion-extension angle, and the completion time. The step of calculating the completion score of the composite action based on the action parameters of each of the decomposed actions and the action parameters of the corresponding decomposed action template, and obtaining the completion score of the composite action, includes the following steps: The completion score is calculated based on the motion parameters of each decomposed action and the motion parameters of the corresponding decomposed action template, including the initial position flexion-extension angle, the final position flexion-extension angle, and the completion time, to obtain the completion score of each decomposed action; the completion scores of each decomposed action are averaged to obtain the completion score of the composite action.

3. The method for generating a demonstration video of sports training according to claim 2, characterized in that: The motion parameters of the several decomposed motions corresponding to the demonstration motion include the flexion-extension angle at the demonstration start position, the flexion-extension angle at the demonstration end position, and the demonstration completion time. The step of constructing actions based on each of the decomposed actions to obtain a demonstration action and action parameters for several decomposed actions corresponding to the demonstration action includes the following steps: The training parameters corresponding to each decomposed action are extracted from the preset decomposed action training parameter library. The training parameters include the flexion-extension angle at the training start position, the flexion-extension angle at the training end position, and the training completion time. The starting position flexion-extension angle in the action parameters corresponding to each of the decomposed actions is averaged with the training starting position flexion-extension angle in the corresponding training parameters to obtain the demonstration starting position flexion-extension angle corresponding to each of the decomposed actions. The terminal flexion-extension angle in the action parameters corresponding to each decomposed action is averaged with the training terminal flexion-extension angle in the corresponding training parameters to obtain the demonstration terminal flexion-extension angle corresponding to each decomposed action. The average of the completion time in the action parameters corresponding to each of the decomposed actions and the training completion time in the corresponding training parameters is used to obtain the demonstration completion time corresponding to each of the decomposed actions.

4. The method for generating a demonstration video of sports training according to claim 3, characterized in that, The step of generating a demonstration video based on the demonstration action and the action parameters of each decomposed action corresponding to the demonstration action, and obtaining the demonstration video, includes the following steps: Obtain the demonstration posture, set the start time, and set the end time for each decomposed action corresponding to the demonstration action; A demonstration video is generated based on the demonstration action and the action parameters, demonstration posture, set start time, and set end time of each decomposed action corresponding to the demonstration action.

5. The method for generating a demonstration video of sports training according to claim 4, characterized in that: The description information of the decomposed action template also includes several optional body positions; Obtaining the demonstration postures for each decomposed movement corresponding to the demonstration movement includes the following steps: Randomly select one of the several optional body positions from the first decomposed action as the demonstration body position for the first decomposed action corresponding to the demonstration action; If the demonstration posture of the current decomposition action exists among the optional postures of the next decomposition action, the demonstration posture of the current decomposition action is used as the demonstration posture of the next decomposition action; otherwise, one optional posture is randomly selected from several optional postures of the next decomposition action as the demonstration posture of the next decomposition action. Repeat the position selection process until the demonstration position of the last decomposed action corresponding to the demonstration action is obtained, and then obtain the demonstration positions of each decomposed action corresponding to the demonstration action.

6. The method for generating a demonstration video of sports training according to claim 4, characterized in that, Obtaining the set start time of each decomposed action corresponding to the demonstration action includes the following steps: Obtain the direction of each decomposed action corresponding to the demonstration action; set the set start time of the first decomposed action corresponding to the demonstration action to 0; add the set start time to the demonstration completion time to obtain the set end time of the first decomposed action; If either the current decomposition action or the next decomposition action is stationary, the set end time of the current decomposition action is used as the set start time of the next decomposition action; the set start time is added to the demonstration completion time to obtain the set end time of the next decomposition action. If the demonstration posture of the current decomposed action is different from that of the next decomposed action, the set end time of the current decomposed action is used as the set start time of the next decomposed action; the set start time is added to the demonstration completion time to obtain the set end time of the next decomposed action. If neither the direction of the current decomposed action nor the direction of the next decomposed action is stationary, and the demonstration posture of the current decomposed action is the same as that of the next decomposed action, the start time and end time of the next decomposed action are set according to the preset strategy.

7. A device for generating demonstration videos of sports training, characterized in that, include: The motion decomposition module is used to monitor the user's exercise training process and obtain the user's compound movements; The composite action is decomposed to obtain several decomposed actions and the action parameters of each decomposed action; The parameter acquisition module is used to obtain the action parameters of the decomposed action template corresponding to each decomposed action according to each decomposed action corresponding to the composite action and the preset decomposed action template library. The decomposed action template library includes the description information of each decomposed action template, and the description information includes the target joint name, direction and several subsequent joint names. The completion score calculation module is used to calculate the completion score of the composite action based on the action parameters of each of the decomposed actions and the action parameters of the corresponding decomposed action template, so as to obtain the completion score of the composite action. The template number acquisition module is used to obtain the number of decomposed action templates corresponding to the composite action; based on the number of decomposed action templates corresponding to the composite action and the completion score of the composite action, the number of decomposed action templates corresponding to the demonstration action is determined, wherein the demonstration action is used to indicate the next composite action after the user completes the current composite action. The action construction module is used to randomly extract two decomposed action templates from the decomposed action template library as the first decomposed action and the candidate decomposed action, respectively; based on the description information of the first decomposed action and the candidate decomposed action, it is determined whether the candidate decomposed action meets the preset decomposed action connection requirements; if not, it randomly extracts another decomposed action template from the decomposed action template library as the candidate decomposed action, and repeats the determination of whether the candidate decomposed action meets the preset decomposed action connection requirements. If satisfied, the candidate decomposition action is used as the next decomposition action. The decomposition action template is randomly extracted from the decomposition action template library as a candidate decomposition action. The candidate decomposition action is repeatedly judged to meet the preset decomposition action connection requirements until several decomposition actions that meet the number of decomposition action templates are obtained. Actions are constructed according to each decomposition action to obtain the demonstration action and the action parameters of several decomposition actions corresponding to the demonstration action. The video generation module is used to generate a demonstration video based on the demonstration action and the action parameters of each decomposed action corresponding to the demonstration action, and to display the demonstration video in a preset display interface.

8. A computer device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for generating a demonstration video of exercise training as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a computer program that, when executed by a processor, implements the steps of the method for generating a demonstration video of exercise training as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Motion scoring method and device, computer equipment and storage medium

    CN117078976A

  • Dance teaching video generation method and system, terminal and storage medium

    CN117612051A