Abstract

Virtual reality technology has many characteristics, such as high immersion, dynamic interactive response, and multidimensional information digitization. These characteristics are needed by the combination of modern sports development and scientific and technological progress. The introduction of virtual reality technology into the field of sports will be conducive to the scientific training of sports competition and the digital research of technical theory and to the rapid development of modern sports. This paper constructs the framework of sports training based on virtual reality technology and designs a motion capture data algorithm based on behavior string, which successfully improves the advantages of virtual reality technology. In addition, the training experiment method is used to verify the effectiveness and superiority of the system, focusing on the high-school students learning tennis for the first time as the experimental object to study the differences in training effects between the traditional training method and the training method using virtual reality technology. The training effect of tennis is better than the traditional training method, and the difference is significant; the internal motivation of training psychology is better than the traditional training method, and the difference is significant. Compared with the traditional training method, this training method can stimulate students’ interest in training, improve students’ training effect, and promote students’ psychological internal motivation to continue training. This study provides useful enlightenment for the further application of virtual reality technology and in the modern sports training for various sports events.

1. Introduction

Since the twentieth century, human society has entered the information age. Modern science and technology has a trend of high differentiation and high concentration and has also entered a new stage of multidisciplinary comprehensive utilization [1, 2]. A large number of modern research methods and technologies have been transplanted to sports training and scientific research. Many achievements of modern high technology have also begun to penetrate into the field of competitive sports and have had a series of profound effects on modern competitive sports training [3]. In particular, the rapid development of virtual reality technology provides a broader space for the application of high technology in the field of competitive sports [4]. Summarizing the successful experience of Beijing Olympic Games, it is found that using virtual reality technology for simulation training can realize the human motion measurement method from traditional human eye observation to high-precision motion capture and analysis [5]; The two changes from the experience-based method to the human motion analysis method of human motion simulation and simulation will be faster and more effectively improve China’s training level and competitive level in these projects and realize the magic weapon of the Olympic glory plan. In order to ensure China’s dominant position in the total number of gold medals and medals in the Olympic Summer Olympic Games, it is particularly important to timely track the development of virtual reality technology and deeply study the practical significance of virtual reality technology to the development of competitive sports [6].

Some researchers are committed to the application of virtual reality in physical training [7]. Akbas et al. [8] hold that “the application of virtual reality technology in physical education includes five aspects: knowledge learning, virtual sports experiment, skill training, physical education network distance teaching, and academic exchange. Wei et al. [9] and others proposed that the use of virtual reality technology can make physical education courseware and carry out physical training. Lohre et al. [10] hold that the application of virtual reality technology in physical education includes five aspects: physical education teaching and training, making physical education network distance teaching, accident prevention, and academic exchange. Arrighi et al. [11] hold that “the application of virtual reality technology in college teaching includes virtual campus, virtual classroom, virtual experiment, and FGH courseware design. Wu and Zhou [12] put forward that “there are four points in the application of virtual reality technology in Physical Education Teaching: one is to simulate sports scenes and break through the limitation of time and space; second, innovate the educational model to improve students’ interest in learning and teaching effect; third, digital learning, tracking learning data, and effectively monitoring learning behavior; fourth, it has strong functional development and broad application prospects in college physical education [13].” Synovec et al. [14] hold that the application of computer-based “virtual reality” technology in college sports training has the following four points: first, the comparison between sports technical action and reality is completed through “virtual reality” technology; the second is to use “virtual reality” technology to realize the comparison between virtual action and virtual reality; third, build different training environments through “virtual reality” technology; fourth, the use of computer “virtual reality” technology can realize remote interactive training [15].

The application of virtual reality technology in college physical education teaching and training is the main trend of college physical education development. It can effectively stimulate students’ sensory cognition and thinking mode and plays an important role in strengthening the effect of students’ physical education learning and training. Therefore, the contributions of this paper are as follows: (1) design the motion training framework based on virtual reality technology; (2) design the motion data capture algorithm based on behavior string to capture the motion trajectory of the target; (3) the control group was designed and compared with the traditional training methods to verify the advantages of the modern training system based on VR. Through the research and understanding of virtual reality technology, find out the advantages of virtual reality technology and make it flexibly applied to high-school tennis training, which cannot only enrich the training content and training means but also improve the training efficiency and training effect of tennis class and create a good learning atmosphere and learning environment, so as to improve the training quality. Therefore, this paper constructs the framework of sports training based on virtual reality technology and designs a motion capture data algorithm based on behavior string, which successfully improves the advantages of virtual reality technology. With the improvement of students’ interest in learning, the mastery of tennis skills is also improving, which is conducive to the further research of tennis training theory.

2. Structure and Design of Sport Training Based on Virtual Reality

2.1. Architecture Design of Cloud Platform

According to the problems existing in the current sports training system based on virtual reality, the motion capture technology is introduced into the human motion posture simulation and analysis system [16]. The data of the files obtained by motion capture are analysed by the least square method, and the results are applied to the simulation system, which will help to solve many problems and deficiencies in the human motion posture simulation system [17, 18]. For the research work of using motion capture technology to obtain data and extract human motion posture parameters, the development of this system is completed with the support of Bessel curve theory. The physical training system based on virtual reality is mainly composed of three functional modules: data acquisition module, motion posture capture module, interface management module, and system kernel module. The overall framework of the sports training system based on virtual reality is shown in Figure 1.

The physical training system based on virtual reality adopts a hierarchical architecture, which is divided into user visualization layer, signal processing layer, and signal acquisition layer from top to bottom. The user visualization layer is responsible for providing a “container” for all functional modules, receiving various messages provided by users, and transmitting the received information to the lower layer, that is, the signal processing layer, so as to complete the interaction between users. The user interface module is a portable module of the presentation layer, which is mainly used to present the user interface with certain personality and style. Although the user interface module is relatively single and the personality is not very distinctive, it has very good interaction and powerful function and can complete the basic functions required by the system. The three modules of model, Coleman filter, and human motion posture simulation in the signal processing layer belong to the system core. The data collected by 3D suit motion capture equipment are applied to human motion posture simulation, and combined with Bezier curve and numerical data to complete realistic human motion posture simulation, the realistic simulation of the whole human motion posture is completed in these three modules; the Bezier curve module is an extension module of the logic layer. It is responsible for freely editing curves to achieve the purpose of intuitive and realistic simulation of human motion. The motion data acquisition module is combined with the motion data acquisition module of the human body model to achieve the purpose of reading the motion data of the human body model.

Practice has proved that, with the hierarchical architecture, the system has clearer hierarchy, lower coupling, and stronger scalability. Therefore, the system is easy to maintain, improve, and expand. The independence of modules makes it easy to modify, replace, or reuse modules in each layer. As long as the interface between modules remains unchanged, a layer can also provide a variety of interchangeable specific implementations. The design supported by the hierarchical system reflects the increasing level of abstraction, simplifies complex problems into a series of simple incremental steps, and makes the system highly scalable and flexible.

2.2. Overall Design of Whole Body Motion Capture System

In order to improve the accuracy of human motion capture data, the system integrates the data of two Kinect devices [18, 19] and adopts the client-server mode, and each device is connected with the corresponding client PC. Two client computers use SDK to obtain skeleton data and send it to server-side PC through local Ethernet. All bone data are processed in the server, and then, the fused bone data is transmitted to the Unity3d scene for visualization [20]. Because Kinect has the disadvantage of self-occlusion, it cannot obtain the full picture of human posture. In this paper, two Kinect devices are taken as an example to form a dual Kinect human motion capture system, which can obtain more accurate human motion data through data fusion and expand the range of human activities. When placing Kinect, try to obtain the whole picture of the human body. The total viewing angle of the two Kinect to obtain data is as large as possible, so the orthogonal layout scheme is adopted. At this time, the mutual interference of infrared rays is also the smallest. According to the height of the human body and the best capture range of Kinect, the two Kinect are placed at a vertical height of 70 cm from the ground and 2 m away from the fusion centre. The system scheme design is shown in Figure 2.

In addition, in order to realize the data transmission between the client and server, it needs to be completed through data transmission protocol [21]. The commonly used communication transmission protocols of the two hardware devices include TCP protocol and UDP protocol. The client converts the bone and joint data obtained from Kinect sensor into OSC information format for transmission and sends it through UDP protocol. The server takes Unity3d engine as the main body to realize data fusion and visualization and adds 0sc component to Unity to receive the data sent from the client. Set the IP address and the ports for sending and receiving information, establish a connection between the client and the server, connect the client and the server PC to the same LAN at the same time, and complete the data transmission through the UDP protocol.

3. Motion Data Capture Research Based on Behavior String

3.1. The Process Design for Behavior String Capture

The purpose of motion data behavior segmentation is to automatically separate human motion capture data containing different motion types to form motion fragments with independent semantic information, which is convenient for storage and reuse in the database and lay a foundation for motion analysis and synthesis. A motion training framework based on virtual reality technology is constructed, and a motion capture data algorithm based on behavior string is designed. The motion capture data algorithm based on behavior string can encode and reconstruct the motion trajectory according to the previous motion frames to form a behavior string and then capture the target motion data indirectly according to the historical behavior string, which can significantly improve the accuracy of motion capture.

This paper proposes a new string representation method based on human motion capture data, which represents the high-dimensional human motion capture data sequence in the form of string. In this method, the human motion capture data is regarded as a high-dimensional data point set, the density-based clustering method is used for clustering, and the obtained categories are represented by characters. Through time sequence recovery processing, the off-dimensional data point set represented by characters is reordered according to the time sequence of the original motion sequence to obtain the string corresponding to the original motion capture sequence, and this string is called behavior string (BS). Finally, by analysing the behavior string, the behavior segmentation of the human motion capture data sequence is realized and the motion cycle corresponding to various behaviors is extracted.

In this paper, the distance between the human body model and the local motion points of the human body model is regarded as the similarity between the two motion points of the human body model, and the distance between the two motion points and the virtual human body model is calculated, respectively, and according to the product of local density and distance, the cluster centers are determined, and the data points in the noncluster are clustered based on density. The nest dimension data point set represented by the clustered characters is reordered according to the timing of the original motion sequence to obtain the behavior string corresponding to the original motion capture sequence, so as to realize the string representation of human motion capture data sequence, which is shown in Figure 3.

3.2. Motion Behavior Cluster Based on Improved Mean-Shift Algorithm

In this paper, the quotient dimension data points representing the original motion sequence are clustered by clustering. There are many clustering methods. The real K-means and cure clustering methods need to manually specify the number of cluster centers, and the method in this paper can automatically find the number of clusters. The BIRCH clustering algorithm has good clustering performance for spherical clusters, but it cannot work well for irregular clusters. The method in this paper can calculate the local density by using the Gaussian kernel function, and it can also cluster nonspherical clusters.

Density estimation is to estimate the probability density distribution from a set of observations of unknown probability density distribution. There are usually two methods: parametric method and nonparametric method. Given data points in d-dimensional Euclidean space, the kernel density is estimated with K, and the width of the window is ; therefore,

The mean-shift algorithm actually uses the gradient method to iteratively calculate the extreme points of the probability density function. According to the probability density function of the data, the gradient iswhere the range and (z) is a hypersphere with radius h and volume , and its center is x and contains data points.

The mean-shift vector is defined as

Therefore, formula (3) can be rewritten as

Therefore, the mean-shift vector is the difference between the local mean and the center of the window and the direction points to the peak or valley of the probability density function. The improved mean-shift algorithm is shown in Figure 4. The implementation of the mean-shift algorithm is shown: (a) calculate the probability distribution and similarity coefficient of the candidate target at y0 according to the initial position y0; (b) calculate the weight according to the formula; (c) calculate the new position y1 according to the formula; (d) calculate the probability distribution and similarity coefficient of the candidate target at y1; (e) if |y1-y0 | < C, the iteration ends; otherwise, y0 = y1, skip to Step 1, and continue. The mean-shift algorithm rises (falls) at the fastest speed with variable step size and finally converges to the peak (Valley) point of the probability density function, see Figure 4.

4. Simulation and Results Analysis

4.1. Experimental Environment, Test Method, and Equipment

In order to verify the effectiveness of the physical training system based on virtual reality technology in this paper, the verification environment is designed as follows: run the algorithm in the software environment of MATLAB 2011, the running platform is Intel Core 2 Duo, the CPU is 3.00 GHz, and the memory is 2 GB. This paper verifies the superiority and reliability of the algorithm and system from three angles: (1) capture motion data in VR system and verify the accuracy of motion data capture evaluation based on behavior string; (2) compared with the traditional motion capture algorithm, the superiority of motion data capture evaluation based on behavior string is verified; (3) the control group was set up and compared with the traditional control group to verify the superiority of the system.

In addition, the two technicians need to make a normative judgment on the forehand and backhand strokes of the two groups of students under the same and relatively simple circumstances. The final grade is the average of the scores given by the two teachers. The scoring standard is 100, which is the full score, in which the action integrity and action coordination account for 50 points, respectively. The evaluation of action integrity is divided into preparation posture, backswing lead, swing, and follow-up, corresponding to the full score of 10, 15, 15, and 10, respectively; the scores of movement coordination are normative coherence, force coordination, natural pace movement, and stable centre of gravity, with full scores of 15, 15, 10, and 10, respectively.

Test method: the instructor stands two meters in front of the right of the tested students and throws the tennis ball to the tested students. The student stands at the centre line of the field with a racket and tests 10 balls in total. When the tested student tests the forehand, the forehand swings and hits the ball diagonally opposite the field, and the backhand needs to swing and hit the ball diagonally opposite the field. The two tennis technicians scored strictly according to the standard.

The experimental equipment mainly includes a tape measure, a whistle, a stopwatch, a height tester, several markers, a weight tester, a vital capacity tester, 80 blowers, 40 tennis rackets, 200 tennis balls, 2 tennis courts, 1 laptop, 5 VR equipment, zero basic tennis introduction video, and highlights of tennis stars.

4.2. The Motion Data Capture Evaluation Based on Behavior String

The efficiency of the big data platform is not verified. This paper selects the common Hadoop framework platform for comparison; the frameworks of Hadoop are shown in Figure 5.

According to the components of elbow joints in x, y, and z directions, their motion is periodic. The law of human movement is not obvious, but it can be seen that the elbow joint is doing curve movement, and there are still some unsmooth and folding phenomena in the process of movement.

The arbitrary parameters of human motion mainly include joint displacement, linear velocity/acceleration, joint angle, and angular velocity/acceleration. From the human joint point sampling data, the parameters of each joint can be obtained through calculation and analysis. The position information of each joint can be obtained directly through the action capture equipment. The displacement of the joint can be obtained through calculation. The change of displacement can be obtained through the subtraction operation of the data of the first and second frames. The linear velocity = displacement ÷ time can be obtained by using the motion trajectory of the joint. Acceleration reflects a change in the motion speed of human joints, which can also be obtained by using the change track of human motion speed. The kinematics of the human upper limb elbow joint is analysed, and its motion parameters are obtained. The motion trajectory of the elbow joint is fitted with its regular curve by the least square method. According to the principle of forward kinematics, because the wrist joint is the child node of the elbow joint, the motion of the elbow joint drives the motion of the elbow joint. Accordingly, when the wrist joint does not move, the motion parameters of wrist and elbow are consistent. However, in the process of data acquisition, it cannot ensure that the wrist joint completely follows the movement of the elbow joint. In the actual processing process, it needs to be processed by matrix operation.

4.3. The Motion Data Capture Evaluation Based on Behavior String

In order to verify the superiority of the algorithm, we mainly verify it from the perspective of average error and average time. The results are shown in Figures 6(a) and 6(b).

The algorithm in this paper is compared with the traditional particle filter algorithm (PF), literature algorithm (VLMM), and literature algorithm (single GPDM) for 15 times. The comparison diagrams of average tracking accuracy and average time consumption are shown in Figures 6(a) and 6(b). As shown in Figure 6(a), under the same conditions, the algorithm proposed in this paper has higher tracking accuracy than other comparison algorithms and can well meet the accuracy requirements in 3D hand tracking. The precision of the traditional PF algorithm is the same as that of the VLMM algorithm. The single GPDM algorithm reduces the effect of real-time human hand parameters because it depends too much on the model. It has low accuracy and can only be used in the three-dimensional tracking process with low accuracy requirements. As can be seen from Figure 6(b), the traditional PF algorithm and VLMM algorithm consume a lot of time, which is a great bottleneck for the real-time tracking. The method in this paper has been greatly improved in time consumption. In the particle sampling stage, it effectively avoids blind sampling, realizes the purpose of reducing dimension, and can fully meet the needs of interaction in terms of real time. However, compared with the single GPDM algorithm and data glove algorithm, there is still a certain gap, which is also where the method in this paper needs to be further improved.

4.4. The Training System Evaluation Based on Virtual Reality Technology

Before tennis training, the physical function of the students participating in the experiment was evaluated according to the standards of height, weight, 50 m sprint, vital capacity, and standing long jump in the national student physical health standard. In the tennis skill test stage, the test content includes two items: forehand and backhand oblique stroke and forehand and backhand accuracy stroke.

The main research content of this paper is to test whether there is a significant difference in teaching effect between the new tennis training method and the traditional training mode using virtual reality technology. In order to eliminate the influence of other factors on the experiment, we should first test the five basic functions of the students in the experimental group and the control group before the experiment because the experimental samples are from students aged 15–17, and the students are in the period of growth and development, and it is very necessary to carry out statistical test and analysis. This experiment is divided into two groups, 20 people in each group, 10 male students and 10 female students. The comparison of the data in Table 1 shows that there is no significant difference in the physical state between the two groups before tennis class (), which can be used as the sample of this experiment.

40 students without tennis training foundation were randomly selected as the research objects. They were divided into two groups: experimental group and control group, with 10 male and 10 female students in each group. At the end of the two courses, the differences between the two groups were analysed.

Experiment 1. Ball feeling test.
The ball feeling test, as the name suggests, is the feeling of the ball. To be exact, it refers to the ability to predict the ball at the moment of hitting the ball as well as the physical coordination ability and feeling of the ball when hitting the ball. Before the experiment, all students participating in the experiment should be tested for the ball feeling. It should be emphasized that the ball feeling test in the static state is done in this experiment. The ball feeling test mainly includes two aspects: the first is to test the students’ perception of the ball in motion, and the second is to test the students’ sensitivity to the ball. In the process of learning tennis, the ball feeling and ball nature are very important. The better the students’ sense of the ball, the stronger their control over the ball. At the same time, the better the sense of the ball, the stronger their belief in tennis and interest will increase, Therefore, cultivating students’ ball sense is very important for tennis teaching. Therefore, in the teaching process, teachers should pay attention to cultivating students’ ball sense and further enhance students’ interest in learning tennis. The quality of ball sense will also affect the progress of teaching. Therefore, before doing the experiment, students should have a professional ball sense test. The results are shown in Table 2 and Figure 7:
As shown in Figure 7, 35% of the people in the virtual training experimental group have achieved excellence, while only 10% of the people in the control group (90–100) have achieved excellence, and only one third of the people in the virtual training group have achieved excellence. In the good range (80–89), the number of students from both sides is basically the same, 40% in the virtual training group, 35% in the control group, and 40% in the general grade range (70–79), while only 20% in the virtual training experimental group. Therefore, in general, most of the students in the control group will get medium grades and those in the pass range, and the virtual training group accounted for 5%, while the control group accounted for 10%.

Experiment 2. Accuracy test of forehand and backhand stroke.
After the forehand and backhand oblique stroke test, further judge the accuracy of students’ stroke, so as to better explore students’ mastery of tennis skills. The experimental results are shown in Table 3. According to Table 3, it can be judged that the scores of the accuracy of forehand oblique stroke of the experimental group and the students of traditional mode are 11.28 and 10.03, respectively, and the difference between the two is 1.25 points only; the average score of the backhand oblique shot was 9.32 in the experimental group, 8.18 in the traditional model control group, and 1.14 in the difference. Only the experimental results show that there are significant differences between the two teaching methods (). The accuracy of the students’ forward and back hand oblique stroke is higher than that of the traditional teaching mode. The reason may be that when students carry out virtual teaching learning, the classroom content teaching is lively and interesting and has professional skills. Students not only pay attention to the training of skills but also cultivate the interest in learning tennis. The lively and interesting teaching mode makes students more focused and conscientious, which greatly mobilizes the enthusiasm and initiative of students’ learning. Students in virtual tennis technology learning have greatly improved the ball processing and can adjust the body and ball distance and the degree of centre of gravity deviation according to their own situation. With the gradual improvement of proficiency in the technology, it is better and better to control themselves and the ball.

5. Conclusion

This paper constructs the framework of sports training based on virtual reality technology and designs a motion capture data algorithm based on behavior string, which successfully improves the advantages of virtual reality technology. In addition, the training experiment method is used to verify the effectiveness and superiority of the system, focusing on the high-school students learning tennis for the first time as the experimental object to study the differences in training effects between the traditional training method and the training method using virtual reality technology. The test results showed that, in terms of technical skill evaluation, the virtual reality experimental group achieved excellent results, which was significantly different from the traditional training group (). The average scores of forehand and backhand oblique stroke in the experimental group were 16.28 and 13.32, respectively, while the average scores of the traditional mode training group were 14.32 and 12.04, respectively (); in terms of the accuracy of forehand and backhand stroke, the average scores of the virtual reality experimental group were 11.28 and 9.32 and those of the traditional mode training group were 10.03 and 8.18, respectively (). In terms of the score of forehand and backhand hitting skills, the average scores of the subjects in the experimental group are 82.67 and 78.16, and the average scores of the students in the control group are 75.11 and 71.35 (). All these show that the training method of the experimental group is more suitable for students’ tennis training. To process virtual reality, the video based on the existing framework can be compressed and optimized. In order to better match the processing characteristics of the virtual reality video, improve more coding efficiency and reduce more coding time, and reducing code stream output is the focus of future research.

Data Availability

The data used to support the findings of the study are included within the paper.

Conflicts of Interest

The authors declare that they have no conflicts of interest.