# Development of Interactive Teaching of Physical Dance Based on Dynamic Time Reversion Technique

Authors: Xue Li; Yaqi Yang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In order to cultivate students’ dance expression, in physical dance teaching, emphasis should be placed on cultivating students’ interest in physical dance, strengthening the training of movement skills and musical rhythm, training of cultural cultivation, and training of coordination and cooperation between male and female partners. In this paper, we design a dance teaching aid based on DTW (Dynamic Time Warping) movement similarity evaluation algorithm. The evaluation of movement similarity is difficult because each movement is multidimensional, there is a lot of noise when the movement data are collected, and there is high variability in the performance of different individuals, and the real-time requirement of movement similarity evaluation. In the teaching practice, we should pay attention to the cultivation of students’ dance expression, so that students can match the music and make coordinated sports dance movements, realize the integration of music and dance, and improve the professional standard.


---

## Body

## 1. Introduction

Sports dance is a kind of walking duo dance with male and female partners, which is one of the sports competition items and was introduced to China in the 1990s [1]. In the item group training theory of sports training, sports dance is categorized in the skill-driven category of performance difficulty and aesthetic item group, which indicates that sports dance participants should not only have a high technical level but also need rich artistic expression [2]. Expression in sports dance refers to the ability of dancers to show their thoughts and emotions with body language and facial expressions within the competition rules [3].Sports dance takes human body movements as the main means of expression, while music is the soul of sports dance and is the specific object of expression of dance movements [4]. In the competition, sports dancers must deeply understand the connotation and meaning of the music and then use the special skills learned to express it, in order to show a qualified performance [5]. While teaching, teachers should let students listen and practice more, immerse themselves in the world of music, comprehend the thought and emotion expressed by music or lyrics, and then follow the melody and rhythm of the music to complete sports dance movements, which can effectively improve students’ appreciation of music and expression ability [2].Sports dance is a kind of competitive sport, and the strength of psychological quality will directly affect the performance of the participating athletes on the field [6]. Athletes with poor psychological quality will easily become nervous and anxious during the competition, leading to some movement mistakes or even forgetting the movements during the competition and also affecting their ability to play on the field [7, 8].Sports dance requires two people to work together to complete the highest level of performance, and to become one, the two people should be in tune with each other and cooperate seamlessly as if a person performing [9]. To achieve this state, both men and women in sports dance performances must maintain the same technical level of movement and have a high degree of compatibility in body language, facial expressions, and emotional expressions [2]. There are many sports dance events, and different dances have different requirements for emotional expression. For example, the tango needs to show a high degree of defensiveness and vigilance, the rumba needs to show the lingering love between lovers, and the cowboy dance needs to show a sense of cheerfulness [10].Sports competition is extremely physically demanding for the participants, and the higher the level of competition in sports dance, the higher the physical demands on the participants [11]. Sports dance is categorized as a skill-led performance of difficult aesthetic items, without sufficient physical strength, their speed, strength, endurance, flexibility, and coordination will certainly be affected, the artistic expression will be greatly reduced, and it is difficult to perfectly show the musical content [12].In the process of competition or performance, players need to cooperate with the music, with flexible steps, beautiful dance, and rhythmic movements, to express the connotation and emotion of the music [13]. Back to the dance itself, in addition to a deep understanding of the connotation of the music, players must also have a strong sense of dance, to be able to expressions, eyes, gestures, steps, rotations, and other technical movements, the perfect presentation of the content of the music, to provide the audience with a visual feast [14].


## 2. Key Technology Research

### 2.1. Beat Control

Music is a very important part of the dance game, which plays a very important role in defining the overall style of the game, controlling the rhythm, and dividing the system structure in the game development process [15]. For example, in the menu control part of the game, the players need to switch the current background music in real time so that the player can have a preview of the song. At the beginning of the game, the playback of standard dance moves and the real-time recording and evaluation of the player’s moves, the playback of game effects, and the rhythm control of UI all rely on beat control [16].Since there are several game objects that depend on the music beat for updates, a separate music beat component is needed to send events for other modules at the right time. The module has a “one-to-many” feature, and the “many” end is easy to change, so the “observer pattern” is used for the design, as shown in Figure1. The observer pattern is to separate the observer from the observed object, with the action evaluation module, UI module, cue module, and background control module as the observers, and the music beat as the observed object, and the observer will do the corresponding processing itself according to the data changes of the observed object [17]. In this way, each module can be clearly divided out and the overall reusability and maintainability of the system can be improved. In the design and development process of the game, we set up a special beat control module, using the observer mode, to control the rhythm of the game as a whole [18].Figure 1
Observer model of music beat control.


### 2.2. Movement Evaluation Algorithm

Traditional dance learning methods include video teaching methods and live demonstration teaching. For people with no or only a small amount of dancing experience, the video teaching method has low learning effect and large deviation of movements because of the lack of control object and no evaluation of whether the movements are standard or not. On the other hand, the real-person teaching can achieve a better learning effect, but it consumes a lot of manpower and cannot be studied at any time. Therefore, this paper considers an action evaluation algorithm in designing a square dance game to provide real-time feedback to players’ actions and achieve a good learning effect.The main task of action similarity evaluation is to enable the computer to automatically sense “where” a person is in a scene and determine “what” a person is doing. The first step of action similarity evaluation is to perform pose estimation. Pose evaluation is the process of identifying the pose parameters of each human body part in each frame based on a specific input image sequence. For example, the position and orientation of each body part in the whole 3D space is a set of pose parameters, which is usually done by the motion capture devices. The motion similarity evaluation is based on pose estimation, extracting features from motion frames and obtaining the similarity between 2 motion sequences by calculating the distance between the feature vectors of the reference motion sequence and the comparison motion sequence. Since the motion similarity evaluation algorithm relies heavily on the results of pose estimation, the accuracy of pose estimation will have some influence on the accuracy of motion similarity evaluation, so some preprocessing work, such as data noise reduction, needs to be performed on the motion data before the motion similarity evaluation.The specific implementation process of the action evaluation algorithm with adaptive joint weights and interpolation wavelets is expressed as follows:(1)
Data noise reductionFirstly, a combination of Faber–Schauder interpolation wavelet and mean filtering is used to reduce the noise of the acquired motion data. In the background with little noise, some motion details in the strenuous movements are easily treated as noise, which is suitable for using interpolation wavelet; in the background with more noise, the combination of mean filtering can obtain better noise reduction effect.(2)
The evaluation method of adaptive joint weightsStarting from the motion characteristics, the action sequence is divided into multiple subsegments, and the cascaded joint direction data are used as features to calculate and compare the joint weights of the action, which can be calculated to get the distance between any 2 frames.To accommodate users of different body sizes, time-series data of joint directions are used to describe the human skeleton posture and the action sequence can be expressed asP=P1,P2,...Pi,...,PT, where Pi is the time series data of the i-th joint direction and T is the number of joints. Using the action fragment division method with fixed time length, normalization can be achieved for different length action sequences when using the dynamic time regularization method for action sequence matching.The adaptive joint weights are calculated as follows. Cascaded joint orientation data are used as features.The action sequence P consists of several frames of skeleton data, and each frame can be regarded as static human skeleton structure data. The similarity of the cascaded quaternion of joint direction data, i.e., the static human skeleton structure, is measured by using a measure of 2 quaternion distances as defined in the literature.Adaptive joint weights are calculated.The adaptive joint weights are calculated as follows:(1)
The length of the time segment is selected, and the action sequenceP is divided into N segments.(2)
Calculate the relative motion energy sizefPni of the action segments Pni. All joints of Pni are arranged in descending order of motion energy to obtain Tn. Take the first H joints with large energy of Tn to obtain TnH. Repeat this step for N segments of P to obtain TH=T1H,T2H,...,TnH,...,TNH. The relative motion energy in this step is measured by the definition of entropy in information theory. Assuming that each joint motion Pni of each action segment obeys Gaussian distribution, the information entropy of Pni can be calculated and used to represent the relative value of motion energy. The variance of joint motion is used to represent the function fPni.(3)
Counting the number of occurrences of each jointIDi=1,...,T in vector TH, the proportion of segments with higher energy of joint i to all segments can be found Si.(4)
Calculate the joint weights. Them largest elements in S′ are taken until the sum of these elements is greater than α. The proportion α can be regarded as the overall weight of the more vigorous joints, and the evaluation result of movement similarity will be affected by the value of α. The weights ωi of these joints are calculated as shown in(1)ωi=Si·α∑j=1mSj′,i∈C,T−m1−α,i∉C.The remaining joints share the remaining weights equally, and equation (2) is the formula for calculating the weights.(2)ωi=Si·α∑j=1mSj′,i∈C,T−m/1−α,i∉C,where i=1,...,T. Let pri,qr′i be the quaternion representation of the i-th joint direction data of P and Q, respectively. The joint weights ωi′ of Qare calculated according to equation (2), and the distance of any 2 frames pr,qr can be obtained with the metric equation.(3)distpr,qr′=∑i=1Tωi+ωi′2·dpri,qr′i.After the experiments on the test set,H = 6 and α = 0.7, and the segmentation time fragment is 0.8 s. The optimal solution can be obtained at this time.Next, we determine the action sequence mapping relationship.The DTW action sequence matching algorithm is used to determine the unique mapping relationship between the reference action sequenceP and the comparison action sequence Q. Record the set of matching relations between them.The DTW-based action sequence matching algorithm is described as follows:(1)
Starting from the first node, the path distance is calculated cyclically. Based on the interframe distance measure and the three conditions of DTW, the smallest one is selected and the current distance is added to obtain the minimum distance of the path.(2)
Repeat the previous step until the complete regularized path is obtained.(3)
Create an array MapFrame to record the unique mapping relationship of all frames in the reference action sequenceP to the comparison action sequence Q. Iterate through the regularized paths and store their mapping relationships in MapFrame.Finally, we extract multidimensional action sequence keyframes.The key frame extraction method based on multiscale Faber–Schauder interpolation wavelet and interval interpolation wavelet based on central affine transform performs wavelet decomposition on the joint with the largest motion energy of each segment, calculates the wavelet coefficients, extracts the key frames ofP, and obtains the set of key frames KPr=r=1,...,R, where R is the number of key frames of the action sequence, and then, combined with the set of matching relations obtained in step 3, the keyframes of Q are obtained Kqr=r=1,...,R, where r is the number of keyframes of the action sequence.


## 2.1. Beat Control

Music is a very important part of the dance game, which plays a very important role in defining the overall style of the game, controlling the rhythm, and dividing the system structure in the game development process [15]. For example, in the menu control part of the game, the players need to switch the current background music in real time so that the player can have a preview of the song. At the beginning of the game, the playback of standard dance moves and the real-time recording and evaluation of the player’s moves, the playback of game effects, and the rhythm control of UI all rely on beat control [16].Since there are several game objects that depend on the music beat for updates, a separate music beat component is needed to send events for other modules at the right time. The module has a “one-to-many” feature, and the “many” end is easy to change, so the “observer pattern” is used for the design, as shown in Figure1. The observer pattern is to separate the observer from the observed object, with the action evaluation module, UI module, cue module, and background control module as the observers, and the music beat as the observed object, and the observer will do the corresponding processing itself according to the data changes of the observed object [17]. In this way, each module can be clearly divided out and the overall reusability and maintainability of the system can be improved. In the design and development process of the game, we set up a special beat control module, using the observer mode, to control the rhythm of the game as a whole [18].Figure 1
Observer model of music beat control.


## 2.2. Movement Evaluation Algorithm

Traditional dance learning methods include video teaching methods and live demonstration teaching. For people with no or only a small amount of dancing experience, the video teaching method has low learning effect and large deviation of movements because of the lack of control object and no evaluation of whether the movements are standard or not. On the other hand, the real-person teaching can achieve a better learning effect, but it consumes a lot of manpower and cannot be studied at any time. Therefore, this paper considers an action evaluation algorithm in designing a square dance game to provide real-time feedback to players’ actions and achieve a good learning effect.The main task of action similarity evaluation is to enable the computer to automatically sense “where” a person is in a scene and determine “what” a person is doing. The first step of action similarity evaluation is to perform pose estimation. Pose evaluation is the process of identifying the pose parameters of each human body part in each frame based on a specific input image sequence. For example, the position and orientation of each body part in the whole 3D space is a set of pose parameters, which is usually done by the motion capture devices. The motion similarity evaluation is based on pose estimation, extracting features from motion frames and obtaining the similarity between 2 motion sequences by calculating the distance between the feature vectors of the reference motion sequence and the comparison motion sequence. Since the motion similarity evaluation algorithm relies heavily on the results of pose estimation, the accuracy of pose estimation will have some influence on the accuracy of motion similarity evaluation, so some preprocessing work, such as data noise reduction, needs to be performed on the motion data before the motion similarity evaluation.The specific implementation process of the action evaluation algorithm with adaptive joint weights and interpolation wavelets is expressed as follows:(1)
Data noise reductionFirstly, a combination of Faber–Schauder interpolation wavelet and mean filtering is used to reduce the noise of the acquired motion data. In the background with little noise, some motion details in the strenuous movements are easily treated as noise, which is suitable for using interpolation wavelet; in the background with more noise, the combination of mean filtering can obtain better noise reduction effect.(2)
The evaluation method of adaptive joint weightsStarting from the motion characteristics, the action sequence is divided into multiple subsegments, and the cascaded joint direction data are used as features to calculate and compare the joint weights of the action, which can be calculated to get the distance between any 2 frames.To accommodate users of different body sizes, time-series data of joint directions are used to describe the human skeleton posture and the action sequence can be expressed asP=P1,P2,...Pi,...,PT, where Pi is the time series data of the i-th joint direction and T is the number of joints. Using the action fragment division method with fixed time length, normalization can be achieved for different length action sequences when using the dynamic time regularization method for action sequence matching.The adaptive joint weights are calculated as follows. Cascaded joint orientation data are used as features.The action sequence P consists of several frames of skeleton data, and each frame can be regarded as static human skeleton structure data. The similarity of the cascaded quaternion of joint direction data, i.e., the static human skeleton structure, is measured by using a measure of 2 quaternion distances as defined in the literature.Adaptive joint weights are calculated.The adaptive joint weights are calculated as follows:(1)
The length of the time segment is selected, and the action sequenceP is divided into N segments.(2)
Calculate the relative motion energy sizefPni of the action segments Pni. All joints of Pni are arranged in descending order of motion energy to obtain Tn. Take the first H joints with large energy of Tn to obtain TnH. Repeat this step for N segments of P to obtain TH=T1H,T2H,...,TnH,...,TNH. The relative motion energy in this step is measured by the definition of entropy in information theory. Assuming that each joint motion Pni of each action segment obeys Gaussian distribution, the information entropy of Pni can be calculated and used to represent the relative value of motion energy. The variance of joint motion is used to represent the function fPni.(3)
Counting the number of occurrences of each jointIDi=1,...,T in vector TH, the proportion of segments with higher energy of joint i to all segments can be found Si.(4)
Calculate the joint weights. Them largest elements in S′ are taken until the sum of these elements is greater than α. The proportion α can be regarded as the overall weight of the more vigorous joints, and the evaluation result of movement similarity will be affected by the value of α. The weights ωi of these joints are calculated as shown in(1)ωi=Si·α∑j=1mSj′,i∈C,T−m1−α,i∉C.The remaining joints share the remaining weights equally, and equation (2) is the formula for calculating the weights.(2)ωi=Si·α∑j=1mSj′,i∈C,T−m/1−α,i∉C,where i=1,...,T. Let pri,qr′i be the quaternion representation of the i-th joint direction data of P and Q, respectively. The joint weights ωi′ of Qare calculated according to equation (2), and the distance of any 2 frames pr,qr can be obtained with the metric equation.(3)distpr,qr′=∑i=1Tωi+ωi′2·dpri,qr′i.After the experiments on the test set,H = 6 and α = 0.7, and the segmentation time fragment is 0.8 s. The optimal solution can be obtained at this time.Next, we determine the action sequence mapping relationship.The DTW action sequence matching algorithm is used to determine the unique mapping relationship between the reference action sequenceP and the comparison action sequence Q. Record the set of matching relations between them.The DTW-based action sequence matching algorithm is described as follows:(1)
Starting from the first node, the path distance is calculated cyclically. Based on the interframe distance measure and the three conditions of DTW, the smallest one is selected and the current distance is added to obtain the minimum distance of the path.(2)
Repeat the previous step until the complete regularized path is obtained.(3)
Create an array MapFrame to record the unique mapping relationship of all frames in the reference action sequenceP to the comparison action sequence Q. Iterate through the regularized paths and store their mapping relationships in MapFrame.Finally, we extract multidimensional action sequence keyframes.The key frame extraction method based on multiscale Faber–Schauder interpolation wavelet and interval interpolation wavelet based on central affine transform performs wavelet decomposition on the joint with the largest motion energy of each segment, calculates the wavelet coefficients, extracts the key frames ofP, and obtains the set of key frames KPr=r=1,...,R, where R is the number of key frames of the action sequence, and then, combined with the set of matching relations obtained in step 3, the keyframes of Q are obtained Kqr=r=1,...,R, where r is the number of keyframes of the action sequence.


## 3. Instructional Design

The instructional design process consists of analysis, design, development, and evaluation. The analysis step analyzes the instructional needs, students, content, and data. The design step follows the results of the first phase of analysis in terms of instructional strategy, curriculum, user interface, and interaction. The development step focuses on the development and production of instruction, and the evaluation part invites experts and users to evaluate instruction. The development step focuses on the development and production of the instruction; the evaluation part invites experts and users to evaluate the instruction. In summary, the instructional design model of this study is shown in Figure2.Figure 2
Instructional design model for this study.


### 3.1. Analysis Phase

The purpose of the demand analysis is to understand the demand of the relevant courses according to the literature, domestic and international online physical dance courses, and the discussion of the research subjects of this study before the design and development of this study. According to the results of the questionnaire and analysis, most of the students have some knowledge about the content of physical dance. The main purpose of the pedagogical analysis was to review the focus of the course content and to determine the course objectives and content of this study. Based on the demand analysis, student analysis, and pedagogical analysis, an appropriate media presentation was selected [19–23].


### 3.2. Design Phase

The instructional design and materials design, according to the themes and course content summarized by the pedagogical analysis, was designed using task problem-solving teaching strategies, allowing students to apply the problem-solving model with the physical interaction of physical dance and Kinect somatic technology to enhance students’ interest in learning, allowing students to learn and apply mathematical concepts that were not easily understood in the process of designing and verifying physical dance. The course content topics are organized by literature exploration and references to relevant books and web-related resources.


### 3.3. Development Stage

The development phase is mainly divided into three parts: development progress, teaching production, and exercise production. After studying the relevant teaching platforms at home and abroad, web design software, image processing software, and audio-visual editing software are chosen as the tools for teaching development.


### 3.4. Evaluation Stage

In the process of teaching, production, and development, relevant data must be collected continuously to evaluate whether the teaching content and structure meet the teaching needs. In this study, the evaluation was conducted according to three aspects: teaching content, teaching design, and user interface design. The survey was conducted in two phases: in the first phase, expert evaluations were conducted to modify inappropriate content and instructional planning, and in the second phase, evaluation work was conducted with students and teachers to understand the strengths and weaknesses of instructional design and development as a basis for instructional improvement.


## 3.1. Analysis Phase

The purpose of the demand analysis is to understand the demand of the relevant courses according to the literature, domestic and international online physical dance courses, and the discussion of the research subjects of this study before the design and development of this study. According to the results of the questionnaire and analysis, most of the students have some knowledge about the content of physical dance. The main purpose of the pedagogical analysis was to review the focus of the course content and to determine the course objectives and content of this study. Based on the demand analysis, student analysis, and pedagogical analysis, an appropriate media presentation was selected [19–23].


## 3.2. Design Phase

The instructional design and materials design, according to the themes and course content summarized by the pedagogical analysis, was designed using task problem-solving teaching strategies, allowing students to apply the problem-solving model with the physical interaction of physical dance and Kinect somatic technology to enhance students’ interest in learning, allowing students to learn and apply mathematical concepts that were not easily understood in the process of designing and verifying physical dance. The course content topics are organized by literature exploration and references to relevant books and web-related resources.


## 3.3. Development Stage

The development phase is mainly divided into three parts: development progress, teaching production, and exercise production. After studying the relevant teaching platforms at home and abroad, web design software, image processing software, and audio-visual editing software are chosen as the tools for teaching development.


## 3.4. Evaluation Stage

In the process of teaching, production, and development, relevant data must be collected continuously to evaluate whether the teaching content and structure meet the teaching needs. In this study, the evaluation was conducted according to three aspects: teaching content, teaching design, and user interface design. The survey was conducted in two phases: in the first phase, expert evaluations were conducted to modify inappropriate content and instructional planning, and in the second phase, evaluation work was conducted with students and teachers to understand the strengths and weaknesses of instructional design and development as a basis for instructional improvement.


## 4. Testing Effectiveness

The development of intelligent Agent applications can use a variety of distributed object building block technologies such as CORBA, DCOM, and Java RMI. The interface definition language IDL in CORBA also provides mapping to Java, C++, Smalltalk, and other languages, allowing easy interaction between objects from different platforms on the web. Therefore, the best solution for implementing an Agent-based web-based teaching system is to use a combination of CORBA and Java technology. The B/A/S model is used, i.e., Browser/Agent/Central Server. Windows XP is used, and NT is used as the server.In 2020, we used traditional computer-based teaching methods, and in 2021, we piloted the implementation of networked teaching for vocal courses using intelligent Agent technology and are now conducting a comparison experiment between the two years of the vocal course (see Table1).Table 1
Comparison of 2007 computer class results.
Fundamentals of computer (average)Software engineering (average)Assembly language (average)Java language (average)Visual basic language (average)Network technology (average)Network technique82.371.277.477.575.278.2Software technology79.173.979.478.176.279.4Computer application79.272.479.978.475.278.4Animation technology79.572.877.477.574.375.277.1The results of the comparison and interviews with some students show that students’ motivation to learn is significantly improved, their hands-on skills are significantly enhanced, and the difficulty of the course is intelligently adjusted according to the level of the students, so that the potential of each individual can be maximized and students can be effectively guided to learn better. It provides an effective platform for teachers to innovate in the curriculum, reduces duplication of effort, accurately grasps students’ mastery of knowledge, provides targeted instruction and improves teaching efficiency, and is welcomed by teachers [24].As shown in Figure3, digital technology full media bring certain facilities for vocal teaching and provide modern resources for the improvement of vocal teaching techniques. There are two sides to everything, and the same is true for modern media technology. If used accurately, it can quickly improve singing skills and enhance the knowledge and techniques we learn. The Gaussian distribution of vocal learning results across students shows that the use of full media technology in vocal performance teaching methods and the promotion and dissemination of vocal performance teaching methods through digital technology makes it easier to improve teaching efficiency and enable students to acquire the latest knowledge [25].Figure 3
Distribution of online learning outcomes for vocal students by year.As shown in Figure4 for the vocal effect application, our students’ video and audio were recorded at the beginning of their enrolment to create a record of their initial learning status. Through the intervention of digital teaching methods, students can realize their shortcomings and identify ways and means to solve their problems. At special times when parents cannot be present to watch their students’ examinations, the digital network technology allows parents to see their students’ learning status at school without having to leave home, greatly facilitating communication between school and parents.Figure 4
Assessment of vocal effects.In the process of learning vocal lessons in colleges and universities, vocal practice and singing songs remain an unavoidable process in vocal lessons and vocal skills are basically addressed in vocal practice pieces and songs. Due to the instability of the signal transmission or the sensitivity of the receiving equipment, the transmission of information in online courses is more or less delayed. As shown in Figure5 for the correlation of vocal characteristics in this paper program, the network reception delay can be as much as five or six seconds in some cases if the student is in a different area. Vocal lessons require student singing and teacher accompaniment at the same time, in order to reduce the delay caused by teacher accompaniment of student singing.Figure 5
Correlation of vocal characteristics.


## 5. Conclusion

The goal of information technology-assisted education should be to enable students to learn knowledge and skills within the limited content of the instructional curriculum, which in turn will enable students to actively use information technology to improve learning. Based on the results of the user satisfaction assessment, it was found that 89% of the students indicated that the system was helpful in mastering the details of physical dance and comprehending the connotations of the dance and thus enjoyed the physical dance, course, and more. The visual operation of the system can reduce the difficulty of learning, and the combination of DTW interactive physical and problem-oriented teaching can increase students’ interest in learning and help them in learning physical dance with a more rigorous attitude. In the future, the system will also try to combine with other disciplines to implement integrated learning and enhance the learning effect. This will not only achieve the learning goals of each learning area but also develop creative thinking and problem-solving skills, achieving a win-win effect, which is also the future trend of information education.



---

*Source: 5697041-2022-07-06.xml*