Design and Application of Yoga Intelligent Teaching Platform Based on Internet of Things

With the rapid development of economy, science, and technology, people’s pursuit of quality of life continues to improve, leisure sports have gradually become a trend, and yoga, as a traditional and fashionable way of tness, is favored by more and more people. However, the traditional training class yoga teaching time is xed, which will have many inconveniences for professionals. However, learning according to the teaching video cannot guarantee the accuracy of the movement and may not achieve the training eect. erefore, in this situation, intelligent e-yoga teaching is of great signicance to improve the training level. is system is based on Internet of things technology, selects Kinect as the sensing carrier of human motion information, and designs an electronic yoga teaching system.e system integrates the functions of motion information acquisition andmotion evaluation. First, standard yoga movements are collected through Kinect as a comparison template for yoga training. Second, the system collects the trainers’ action data, uses Hausdor distance algorithm to evaluate the similarity of action ow, and identies the action name based on the threshold. ird, through the motion evaluation algorithm based on joint point angle measurement, it points out the joint points whose actions are not in place. Based on the completion time of the action, the action speed is evaluated. Finally, the system outputs the evaluation results in the form of text and voice through text conversion technology.e system can carry out ecient posture recognition and can achieve the purpose of evaluating the training quality and giving guiding suggestions. It can meet the basic training needs of users and has great application value.


Introduction
At present, the world is in a period of rapid economic development. When people enjoy the convenience brought by social development, they are also under increasing pressure. In the highly competitive labor market, people put a lot of time and energy into their work. e high-intensity work makes many professionals have no time to exercise, which also leads to the continuous decline of their physical quality. Professionals are in a subhealth state, with a surge of people su ering from headache, insomnia, endocrine disorders, depression, and other diseases. At the same time, the harm caused by subhealth problems cannot be ignored. As we all know, physical exercise can e ectively relieve and release pressure and has a positive role in promoting physical and mental health. Among many tness methods, yoga, as a fashionable exercise method that is both healthy and healthy, is gradually favored by many professionals and school students. Yoga is a combination of body posture and psychological awareness to achieve the purpose of selfcultivation. Unlike physical exercise, yoga is mainly used to strengthen the body. e investigation of yoga practitioners for many years shows that yoga exercise can make the mental state of practitioners become peaceful, alleviate the anxiety caused by work competition, and reduce the frustration in life. It is of great signi cance to adjust the psychological state and physiological balance. At the same time, yoga has the power of curing diseases; long-term practice of yoga can prevent chronic diseases such as hypertension, varicose veins, and arteriosclerosis and can enhance human immunity. e medical profession has confirmed that yoga can effectively regulate the endocrine system and nervous system of the human body, thus helping to promote the physical and mental health of the human body.
In contemporary society, people tend to participate in yoga training institutions as the main way of learning. Although this is an effective way, the learning environment and learning progress are generally controlled by teachers, and the time is fixed, so it brings a lot of inconvenience [1]. At the same time, there are few professional formal yoga education institutions. Many socalled professional yoga coaches can obtain the qualification certificate after short-term training in some training institutions. It is difficult to guarantee the professionalism of these yoga coaches. Many people also choose to download teaching videos from the resourcerich network to learn by themselves. Although this approach is convenient and easy to operate, it cannot guarantee the accuracy of action and achieve the expected effect without guidance. Second, improper yoga practice will cause great damage to people's body. According to the statistics of sports injury cases in the hospital, the proportion of lumbar disc protrusion and spinal joint dislocation caused by improper exercise has increased significantly, and in these cases, the injury caused by yoga practice accounts for a large proportion. erefore, blind practice without professional guidance will not only fail to achieve the effect of fitness but will bring damage and disease to the body in all aspects. e significance of this research is to apply Kinect to yoga teaching in combination with Internet of things technology. As a new computer software development carrier, Kinect not only has a high-resolution camera but also can collect user action information in real time and support voice input.
is system uses this device to capture the action data flow of students and professionals. After matching and comparison, the system can give the matching degree of user actions and standard actions in real time and remind users to make targeted improvements. is computer-aided instruction system can make yoga lovers who have a strong demand for self-study adjustment in time according to the system prompts to ensure the accuracy of their movements. At the same time, this teaching platform is cheap and universally applicable, which solves the problems of time and space in yoga learning.
is study uses the mainstream Internet of things technology to design a yoga teaching system based on Kinect, which mainly includes the following research contents: building an electronic yoga teaching system based on Kinect. e system can automatically capture the yoga movements of trainers and can use Hausdorff algorithm to give the similarity of movements by comparing them with the standard movements in the template database. Motion evaluation is based on joint point angle. By measuring the angle between skeletons in real time and comparing it with the angle between skeletons of template action, we can more intuitively see the unqualified joint points.

Human-Computer Interaction.
Human-computer interaction (HCI) is a science used to study the interaction between computer systems and users. It has a close relationship with artificial intelligence, virtual reality, ergonomics, and other technical fields [2][3][4][5][6][7]. e design of human-computer interaction system is required to be simple and easy to operate with intuitive visualization function. Now, human-computer interaction technology has been one of the key research contents in the computer field, and it is also the focus of competition in the field of science and technology.
As an important part of the computer field, humancomputer interaction technology has developed from the initial human to adapt to the computer to the current computer to adapt to people. is process has gone through more than half a century and has also reaped great progress and achievements. Natural, efficient, and ubiquitous humancomputer interaction technology is the intersection of research directions in many fields, such as intelligent science and technology, computer, mathematics, psychology, and even physiology [8][9][10][11][12][13]. It is one of the focuses of computer research at present and in the future, and it is also the development trend of information field in the future. e human-computer interaction mainly goes through the following five stages: (1) Manual Operation Stage. e characteristic of the embryonic period of human-computer interaction is that the computer designers debug and use very clumsy large-scale computers through manual manipulation and binary code. (2) Language Command Interaction Phase. At this stage, programmers began to use interactive command language to manipulate the operation of the computer. ere are many commands to remember at this stage. At that time, compared with the manual operation stage, the operation of the debugging program has been greatly simplified. ( e main achievements of this stage are the personification of computer system and the miniaturization of computer, for example, virtual reality technology, smartphones, and laptops. Multichannel interaction allows imprecise input, such as using human language, gestures, and actions to interact with the computer, which breaks away from the shackles of traditional human-computer interaction and makes human-computer interaction efficient and natural.
e multichannel interaction technology has developed rapidly in recent years. It not only meets the "people-centered" interaction criteria but also promotes the development of the information industry. e channels in multichannel interaction mainly include user action, expression intention, and perceptual information feedback, such as language, expression, human posture, smell, touch, and taste. At present, this technology has been successfully used in speech recognition, gesture recognition, pen interaction, digital ink, and so on.
With the development of human-computer interaction, the mode of human-computer interaction is constantly updated from the initial keyboard and mouse to touch technology, the emerging somatosensory devices, and virtual reality technology in recent years. e mode of human-computer interaction is more and more close to people's ideas. e development trend of human-computer interaction is as follows: (1) e Operation is More Free. It gets rid of the shackles of contact equipment, and the input and output methods are gradually dominated by voice, camera, and projection contactless input equipment, and human-computer interaction can be realized in any scene, which is no longer limited to indoor. (2) More Intelligent Interaction.
e traditional human-computer interaction system requires users to transfer interaction information through contact sensors. Now, humancomputer interaction can be realized through gesture recognition, speech recognition, and other technologies, realizing the naturalness of human-computer interaction. (3) e Operation is More Humanized. e traditional human-computer interaction technology requires people to adapt to the computer, while the current humancomputer interaction technology is based on people's ideas, making full use of people's actions, language, and vision, and combining the characteristics of the computer to achieve a natural, efficient, and multichannel humancomputer interaction.
At present, with the advent of Microsoft Kinect, somatosensory interaction technology has become one of the most popular research directions in the field of humancomputer interaction. Kinect gets rid of the traditional handheld remote control. It can achieve the purpose of human-computer interaction by capturing the user's actions, facial expressions, and voice sequences in real time.
e emergence of Kinect has played an important role in promoting the development of contactless human-computer interaction. e research on its application in the field of human-computer interaction is also one of the key research topics in the future. To sum up, the development direction of human-computer interaction technology is to focus on natural and contactless interaction and realize real-time and natural interaction through user's actions, expressions, languages, etc.

Research Status of Posture Recognition.
Human posture recognition is accomplished by many technical fields such as machine learning, sensor technology, artificial intelligence, and computer vision. According to the different ways of obtaining human posture information, the human posture recognition system is divided into wearable sensor-based and vision-based recognition systems.
Pose recognition system based on wearable sensors generally refers to embedding microsensors in some carryon items or close-fitting clothes.
is type of sensor can collect human motion data in real time, and the system can analyze and process the motion data in real time. e data can also be sent to the host through wireless network transmission, and the host can set a specific algorithm to analyze the motion data and identify the human posture.
ere are two kinds of embedded sensors: three-axis gyroscope and acceleration sensor. e gyroscope can detect the angular motion state. is kind of sensor mainly relies on the precession and axial orientation of gyroscope to measure the pose angle formed during human motion. Tapia and Haskell [14] proposed a method for real-time automatic recognition of human posture using wireless acceleration sensors and wireless heart rate monitors. e implementation process of this method is to fix the wireless acceleration sensor at the joints of limbs and hips respectively and then obtain the standard deviation, FFT kurtosis, and other features as processing signals. e collected actions are divided into three groups by dynamic Bayesian classification method, and the recognition rate of the three groups is 94.6%. Zhang et al. [15] used wearable acceleration sensors to capture human motion data and carried out fall detection based on support vector machine algorithm. After testing, the success rate of fall detection reached 96.7%. Bourke and Lyons [16] proposed a fall detection algorithm based on the threshold value of the dual-axis gyroscope sensor. e gyroscope sensor is installed on the experimenter's body to measure the angular velocity information during the action. After many times of experimental data statistics, the threshold value for distinguishing falls from other daily activities is obtained. e success rate of judging falls based on the threshold value is as high as 100%.
e working principle of wearable sensor is to capture the data of human motion with the help of sensors placed at the joints of human body and process the data through analysis. e change rules of human body data in different postures are summarized, and then a specific algorithm is used to achieve the purpose of pose recognition. Although this kind of posture recognition system has high data analysis and recognition ability, this kind of contact sensor can only be placed on the body to collect human motion parameters, which brings great inconvenience to people. Compared with the contact pose recognition system based on wearable sensors, it is obvious that the noncontact recognition system has more universal applicability. is kind of recognition system is mainly based on computer vision technology to obtain human motion information from video sequences for pose recognition. Computer vision technology is actually the simulation of human visual function. With the rapid development of this technology, vision-based pose recognition will become the mainstream direction. e researchers use the pose recognition method of hidden Markov model. First, the cascaded hidden Markov model is used to model the human motion. Its special feature is that the expectation maximization algorithm is used to ensure the reliability and accuracy of the Mathematical Problems in Engineering 3 model. At the same time, the Rao blackwelled particle filter approximate reasoning algorithm with high computational efficiency is also used to analyze human motion, which can effectively recognize human posture. By using the method of inductive reasoning, Granum and Moeslund [17] summarized human motion recognition into four processes: system initialization, bone tracking, pose estimation, and pose recognition. Moselund et al. summarized the research progress of recognition technology based on computer vision based on the four processes of pose recognition.
As the most representative product in the field of computer vision, Kinect has made outstanding contributions to the field of computer vision. In particular, Kinect's function of acquiring 3D depth images of human body in real time makes it a popular direction for researchers to analyze human posture based on depth information. At the same time, the advent of Kinect has also promoted the development of human posture recognition technology. Its accuracy and real-time performance are beyond the traditional recognition methods. At present, researchers have begun to apply Kinect to the research of gesture and human posture recognition.

Gesture Recognition.
Kinect is used to obtain the depth image information of the hand, and the depth vector segmentation technology is used to detect the fingertip and palm center. e sign language recognition of deaf mutes based on Kinect was proposed [18]. e human hand movement information was obtained through Kinect and analyzed and compared with the movement data in the standard library, and the recognition results were displayed in the evaluation interface. In the research of hand gesture recognition based on depth image information, the region of hand gesture is extracted from the depth image by using the difference of gray value, and the classification decision tree is established by combining the contour characteristics to realize hand gesture recognition.

Gesture Recognition.
A vision-based tracking system [19], which obtains the patient's lower limb movement information by installing Kinect on the wheelchair, analyzes the patient's condition by using the obtained movement data and customizes the training plan for the patient. Shotton et al. obtained the depth image information of the human body through Kinect [20,21], classified various parts of the human body using the random forest algorithm, and then calculated various joint points of the human body. Schwarz et al. [22] used Kinect to obtain the depth data of human motion for pose estimation and used geodesic distance and depth data of optical flow to track each joint point of human body. In recent years, Kinect has also been widely used in the field of medical rehabilitation to assist patients with limb disorders in rehabilitation training. Da Gama et al. [23] developed a natural interaction system based on Kinect for sports rehabilitation training, developed a scoring mechanism to measure patient performance, set different training parameters for different patients, and prevented patients from secondary injury during rehabilitation training.
Bonnechère [24] developed different game systems based on Kinect to assist patients in rehabilitation training and improve their enthusiasm for training. Experiments show that the Kinect-based rehabilitation training system can not only reduce patients' negative emotions during training but also exercise patients' psychological quality.
At present, there is relatively little research on Kinect in yoga teaching. Only reference [25] evaluated the accuracy of dance movements based on Kinect's bone gap tracking technology. From the above analysis, it can be seen that Kinect can be used not only for local research such as human part recognition and gesture recognition but also for overall research such as human posture recognition. In terms of research methods, different recognition tasks are based on different data types. Gesture recognition mainly relies on depth image data to segment human hand parts from the depth image obtained by Kinect and recognize gesture names. Gesture recognition is more inclined to use the human bone node data provided by Kinect for comparison and analysis with template data.

Action Flow Evaluation Algorithm
In order to analyze and evaluate the action of trainers when the system is offline, the system needs to be able to record the coordinate information of bone nodes captured by Kinect in real time. Kinect, a somatosensory device, can capture up to 30 frames of data per second. Assuming that the time of an action is 3 seconds, the system will record up to 90 frames of data, and each frame is a collection of three-dimensional coordinate values of 25 joint points. Taking the 90-frame 3D coordinate point set thus formed as a set of sample data, after matching it with the actions in the standard library, the distance between the two sets of point sets can be calculated. e size of this distance is used as the evaluation standard of training. In this study, the Hausdorff distance measurement algorithm is used to evaluate the matching between the sample data point set and the template data point set.

Data Preprocessing.
e yoga teaching system designed in this study mainly realizes the function of collecting and evaluating the exercise information of trainers. After experimental tests, Kinect will capture some data information with little correlation, namely, interference points, at the beginning of each motion capture, which will reduce the accuracy of the evaluation results. erefore, it is necessary to regularize the training data before evaluation and intercept the middle data segment of the action data stream as a new action point set to participate in the final matching process. In addition, after the motion capture starts, the captured data points are continuous.
e motion comparison of this system is based on the three-dimensional coordinate information of 25 joint points of the human skeleton model obtained in the process of motion capture. However, differences in body shape or distance from Kinect among different practitioners will lead to great differences in bone data information obtained each time. erefore, the data obtained in the process of motion capture cannot be directly used for motion matching, and the obtained bone data model must be normalized first.

Hausdorff Distance Algorithm.
Hausdorff distance is a similarity measure of two given data point sets. is algorithm does not need to establish point-to-point correspondence. It only needs to calculate the maximum distance between two point sets, which can effectively deal with the matching problem between point sets with more feature points.
e traditional mathematical description of Hausdorff distance is as follows: two point sets a and B are given. en, the Hausdorff distance between a and B is calculated as follows: (h(A, B), h(B, A)), In the formula ‖ · ‖ represents the distance norm. e calculation process of H (a, b) H (a, b) and H (B, a); that is, it represents the distance between two sets. According to the size of H (a, b), the matching degree of two-point sets can be determined. e smaller the Hausdorff distance of two-point sets, the higher the similarity between the two sets of point sets. erefore, this algorithm can be used to measure the similarity between the template action and the trainer action.
Although the traditional Hausdorff distance algorithm simplifies the process of calculating the matching degree between point sets, the motion matching problem involved in this system is based on the three-dimensional coordinate points captured by Kinect. It is inevitable that frame skipping occurs in the process of motion data acquisition by body sensors, and the collected point sets may be mixed with noise points. If the traditional Hausdorff distance algorithm is used, it may cause large errors, so the improved Hausdorff distance algorithm is explored and verified in this design.
Mean Hausdorff distance (MHD) can further improve the matching accuracy. Similar to the traditional Hausdorff distance and partial Hausdorff distance calculation methods, the mean Hausdorff distance will still calculate the larger one-way Hausdorff distance between two point sets as the final Hausdorff distance, but the calculation form of one-way Hausdorff distance will be different: To sum up, the one-way Hausdorff distance between two point sets is calculated by the average distance from all points in one point set to another point set. is calculation form fully considers the negative impact of interference points, makes all feature points in the set participate in the calculation of the final result, has a certain average effect, and ensures the anti-interference performance of the system. e mean Hausdorff distance algorithm solves the problem of mixing noise points in the process of action acquisition to some extent. erefore, this algorithm is selected as one of the algorithms to evaluate the matching degree between the template point set and the training point set in this design.

Intelligent Yoga Teaching System Based on
Internet of Things e designed yoga teaching system aims to provide a simple, easy to operate, and reliable family teaching service without time and space constraints for the majority of yoga lovers.
e system can make an objective evaluation of the training effect, give users more intuitive guidance in the form of voice, and make it more suitable for the training process in the natural environment.

System Design Principles
4.1.1. Reliability. As the system is a real-time humancomputer interaction system, it is the primary condition to maintain stable and reliable operation. Reliability here mainly includes two meanings: first, the system can identify the user's posture as accurately as possible and give a timely and correct response. Because when different users complete the same action, there will be differences in duration and action amplitude. Moreover, even if the same user performs the same action in different time periods, the action data flow is different. erefore, a good recognition system can recognize the correct name of the action when the difference between the duration and the action amplitude is small. Second, the system can correctly understand the user's intention as much as possible and avoid identifying some unconscious operations of the user.

Ease of Use.
e teaching system designed in this study is for yoga practitioners in various fields and ages.
erefore, the teaching platform should have a simple and easy-to-use interface and conform to the operating habits of general users, so that users can adapt independently. At the same time, each action in the template library should be well distinguished from other actions to reduce the false Mathematical Problems in Engineering recognition rate, and the platform has an action evaluation module so that users can timely understand their own training.

Scalability.
When designing an interactive system, it is necessary to consider the subsequent scalability of the system, so as to expand the template library and provide more complex functions to cope with changes in requirements.

Overall System Architecture.
e hardware of the system is composed of a Kinect and a windows8.1 computer. Kinect connects to the computer through USB3.0. Kinect is responsible for collecting human motion data stream, and then the computer is responsible for data analysis and processing. e software of this system is developed based on MFC architecture under the integrated development environment of visual studio 2013. e system uses kinect2.0 sensor to monitor the surrounding h environment and converts the collected depth image into bone data. After the PC control end starts to work, it receives the bone data transmitted by kinect2.0 sensor through USB3.0 by means of "pulling" and draws it to the picture control of the dialog interface based on MFC architecture through the two-dimensional graphic API-direct2d for display. e system first normalizes the collected s-dimensional bone data of coaches and students' actions and then compares and analyzes them using the Hausdorff algorithm to obtain the similarity of the two groups of action sequences. At the same time, the system will calculate the angle of some joint points in real time. According to the similarity and the angle difference of joint points, students can further improve their actions. e overall scheme design of the system is shown in Figure 1.

System Function.
e designed system contains several functions, as listed in Table 1.

Software Interface Design.
is article uses SQL server 2013 database engine to store the login information of management trainers. Trainers need to create new personal information when using the system for the first time. During registration, the user name and password entered by the user are written into the created database table through ADO function. When the user logs in, the sales interest entered by the user is compared with the information in the database table. If there is no error, the user logs in successfully and enters the module selection interface. e module selection interface of the system includes the basic classification of yoga postures, as well as the operations of entering the system, exiting, and logging in. Because there are many yoga postures, yoga can be further divided into standing posture, sitting posture, kneeling posture, lying posture, and hand support according to different postures. When users train, they only need to select the category according to the training posture, enter the system, and only compare it with the posture library. After classification, they can improve the overall recognition rate and work efficiency of the T system and reduce the pressure of system action analysis. Users need to click to enter the system, and the main interface window will pop up. e main interface is realized by MFC nonmodal dialog box, which controls the startup of the system and realizes the function of humancomputer interaction. In the test interface, the largest control displays the human bone image detected by Kinect.

Data Acquisition Module.
e system obtains bone data, color data, and depth data through the relevant APIs in the Kinect SDK. eir acquisition is encapsulated into classes for the convenience of calling. All data acquisition is completed by the same Kinect. During encapsulation, the Kinect sensor class will provide some interfaces to manage the acquisition of three types of Kinect data and the switch of the FT body, because if a class object releases resources when the dump is over, the use of other classes will be invalid.   e system draws the joint point information collected by Kinect into the picture control through the two-dimensional graphics API-direct2d. Because Kinect collects h-dimensional coordinate information, it needs to use a coordinate mapper to convert 3D coordinates into 2D coordinates. Direct2d enriches the visual effect of Windows applications and enables 2D graphics to be presented with high quality and performance.

Module Library Creation
When using direct2d to draw bone data into the dialog box, the first task is to create an id2dlfactory interface object. e interface is the root object of direct2d and the root of all other resources. After the interface is successfully created, direct2d resources can be created. Basically, all D2D resources are created by the id2dlfactory interface. Second, the system needs a render site rendertarge. Here, id2dlhwndrendertarget is created and then used to create renderer targets and perform rendering operations.

Action Recognition Module.
Motion recognition first extracts the bone data stream of the trainer's action through Kinect and then calculates the matching distance between the trainer's action sequence and the action sequence in the standard library. e distance value is saved in the array until the matching distance with all actions in the standard library is calculated, and then all matching distances are compared with the preset threshold. erefore, in the process of matching two groups of action sequences, there must be a strict threshold as the evaluation standard. For the setting of this threshold, we collect multiple groups of instructor actions as templates and then collect the actions of multiple professional yoga personnel as templates to be identified. ey are compared with the standard template to obtain multiple groups of matching distances and averaged as the threshold. e threshold value obtained from the statistics of multiple groups of experiments takes into account the behavioral differences between different people. e threshold value of each action is different and needs to be set by multiple groups of experiments. According to the experimental verification, the set threshold can make the system get a better recognition rate and better recognition speed.

Voice Prompt Module.
In the yoga teaching system designed in this study, the purpose of the voice module is to more intuitively transmit the evaluation results to users, that is, to output the test results in the form of text in the form of voice. is technology mainly solves the problem of converting text information to voice information and makes the machine speak. e language function of the system is realized by installing the Microsoft Speech SDK Kaiai toolkit. e Microsoft Speech SDK contains the speech application program interface (SAPI) and TTS engine compatible with Windows system. e Speech SDK voice development kit in the VC environment is called to develop a text conversion program to realize the fast conversion function from text to voice.

Conclusion
e traditional yoga learning can only be completed under the guidance of a fixed time, environment, and coach, which cannot meet the requirements of some professionals. Under this background, this study develops an electronic yoga teaching system based on Kinect, which can capture the movement information of trainers through Kinect. en, a series of algorithms are used to comprehensively evaluate the trainers' actions, so that the trainers can timely understand the standard degree of their actions.
In this study, first, the principle of motion flow capture using Kinect is described. e somatosensory device has the advantages of noninvasive, not restricting human movement, and the capture accuracy can meet the basic requirements. In the analysis and evaluation of motion flow information, this study uses Hausdorff measure algorithm. e system also evaluates the movement with the help of the joint point angle. is method can more intuitively find the joint points where the movement is not in place. At the same time, this design realizes the voice prompt function of the system through the text-to-voice conversion technology. e biggest advantage of this system is that it will neither be affected by time and space, nor will it involve the privacy of users. It can work for a long time. In the future, the recognition effect of the algorithm can be further improved to further enhance the classification performance.
Data Availability e dataset can be obtained from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.