Basketball Training Posture Monitoring Based on Intelligent Wearable Device

Aiming at the problems of low monitoring accuracy, long time, and poor eﬀect in the current basketball training posture monitoring method, a basketball training posture monitoring method based on intelligent wearable devices is proposed. By analyzing the concept and classiﬁcation of intelligent wearable devices, the attitude monitoring technology based on intelligent wearable devices is studied. A two-stage Kalman ﬁlter is used to correct the error caused by the drift of the gyroscope signal in the intelligent wearable device by constructing an adaptive acceleration error covariance matrix. The time sequence of collecting acceleration and angular velocity signals is segmented, and the characteristics of basketball training posture are extracted from the sensor signals of the intelligent wearable device. The SVM classiﬁcation algorithm is used to monitor the basketball training posture and realize the basketball training posture monitoring. The experimental results show that the basketball training posture monitoring eﬀect of the proposed method is better, which can eﬀectively improve the monitoring accuracy and shorten the monitoring time.


Introduction
With the rapid development of microelectronics technology, electronic devices are becoming more and more intelligent and humanized. Various intelligent devices, such as smartphones and smartwatches, can handle a wider range of tasks, bringing great convenience to all aspects of life [1]. e development, processing power, and computing level of smartdevices have been greatly improved, and their functions are becoming more and more powerful. e role it plays in people's lives has long been not limited to communication equipment, but is an indispensable necessity for people's lives. ese increasingly powerful smartmobile devices can be used anytime, anywhere, to check emails, read online news, communicate through social networks, etc. [2]. In the field of basketball, the formulation of the existing training plan mainly depends on the coaches' manual observation and personal experience, which is inevitably subjective [3]. e application of body area network technology to the training of athletes and the monitoring of athletes' posture can help coaches assist in decision-making and greatly improve athletes' competitive ability. erefore, the research on basketball training posture monitoring is of great significance. At present, scholars in related fields have studied attitude monitoring and made great progress. Reference [4] proposed a method for monitoring and controlling the position and attitude of a three degree of freedom flexible manipulator. A flexible manipulator based on three pneumatic muscles is designed and manufactured. Based on the flexible manipulator and its kinematics model, an experimental platform for position and attitude monitoring and control of flexible manipulator is built. e kinematic model designed by this method has certain effectiveness and feasibility. Reference [5] proposed an interframe motion detection method for large-scale dynamic image sequences. By analyzing the fluctuation and periodicity of the interference vector in the dynamic image sequence, the current state of the detection frame is determined and classified into fluctuation interference window, motion window, and background window. Using threshold segmentation and morphological processing, all motion windows are combined to determine the motion frame, and the interframe motion detection is completed. is method can effectively reduce the interference vector in dynamic image sequence and greatly improve the accuracy and robustness of interframe motion detection. However, the above methods still have the problems of low monitoring accuracy, long time, and poor effect.
Aiming at the above problems, a basketball training posture monitoring method based on intelligent wearable devices is proposed. A two-stage Kalman filter is used to correct the error caused by gyro signal drift in intelligent wearable devices. e time series of the collected acceleration and angular velocity signals are segmented, and the basketball training posture characteristics are extracted from the sensor signals of the intelligent wearable device. e SVM classification algorithm is adopted to realize basketball training posture monitoring. e basketball training posture monitoring effect of this method is better, the monitoring accuracy is higher, and the monitoring time is shorter. e rest of the article is organized as follows: Section 2 focuses on the intelligent wearable device, while Section 3 throws light on the basketball training posture monitoring method. Similarly, Section 4 is about experimental simulation and analysis, and Section 5 is the final concluding section of the article.

Concept and Classification of Intelligent Wearable Devices.
Intelligent wearable device refers to a portable device that can be directly integrated into the user's personal belongings (such as clothes and shoes) or directly used as accessories (watches, glasses, etc.) [6]. It is a high-tech technology that explores the way of interaction between people and the environment. It can realize the exclusive way of interaction between each person and the environment, or extract data from the way of interaction, so as to provide exclusive personalized services. Most of the calculation methods of intelligent wearable devices are mainly based on localized technology. However, the main reason for its rapid development in recent years is that it cannot only deal with local business, but also support the data interaction between the background and the cloud through software, which is more perfect in function. Finally, it can provide various specific targeted services for individuals through the information exchange with the central computing.
Intelligent wearable devices can be divided into three categories: life and health, information consultation, and somatosensory control. e classification of intelligent wearable devices is shown in Figure 1: (1) Life health category: mainly includes sports wristbands and smartbracelets that provide users' physical health data (2) Information: mainly includes smartwatches and smartglasses that can provide information (3) Somatosensory control: mainly refers to the somatosensory controller that can enhance the game experience In terms of wearing methods, intelligent wearable devices can be divided into headwear, wristband, wearing, and portable. As an important application of the Internet of things, intelligent wearable devices have broad application prospects in medical care, youth growth, and elderly health care, which also means that they can bring very considerable economic benefits. It is a very meaningful work to study this field [7]. Intelligent wearable devices also collect a variety of data, such as the earliest wireless microphone and headset, and forward the collected data to background devices such as mobile phones through wireless devices such as Bluetooth. Among the intelligent wearable devices that have been put into use, the commonly used sensors include microphone, camera, GPS, accelerometer, gyroscope, optical sensor, and fingerprint sensor. With the help of this series of sensors, the background can collect a large number of user data, analyze and calculate these data, and finally complete various complex tasks such as voice monitoring, navigation, fingerprint monitoring, and step counting. e built-in sensor in the intelligent wearable device is shown in Figure 2.

Attitude Monitoring Based on Intelligent Wearable
Devices. Attitude monitoring is a new research field that combines pervasive computing, context awareness, and multimedia. Monitoring activities of daily living is becoming a challenging application in pervasive computing. ere are many interesting developments in the field of health care, human behavior model, and human-computer interaction [8]. Behavior analysis can be understood as automatically analyzing the obtained data by comprehensively using the knowledge and technology of computer vision, pattern monitoring, image processing, artificial intelligence, and other aspects without human intervention, so as to realize human body positioning, tracking, and monitoring in dynamic scenes. On this basis, analyze and judge human behavior, and its ultimate goal is to obtain the semantic description and understanding of behavior through the analysis of behavior characteristic data. In the past, these data mainly came from the image signals taken by the camera, but now the range and form of data are more diversified. In terms of behavior depth, attitude monitoring can be roughly divided into simple attitude monitoring and advanced attitude monitoring. Further subdivision can divide the behavior into four levels: attitude, action, interaction, and group behavior. e monitoring of attitude and action is simple attitude monitoring, and interaction and group attitude monitoring belong to advanced attitude monitoring. Simple posture monitoring has a great research value in the field of health and medical treatment, and advanced behavior plays a more obvious role in security.
Generally speaking, human posture monitoring can be carried out in two different ways: computer vision-based and sensor-based activity monitoring. Vision-based activity monitoring is carried out using visual sensors such as cameras. In this method, the collected visual data (video, pictures, etc.) are transformed into digital sequence data, and then, different video processing technologies are used for feature extraction. Finally, the machine learning algorithm is used for pattern monitoring. e second type is sensor-based attitude monitoring, in which the time series data generated by the sensors monitoring activities can be classified and calculated by different machine learning methods. Such sensors include infrared sensors, accelerometers, gyroscopes, and other sensors that can reflect the relevant information of objects. Sensor-based attitude monitoring and computer vision-based attitude monitoring basically achieve the purpose of monitoring human activities in two different ways.
Posture monitoring based on the intelligent wearable device is to wear the device at the relevant positions of the human body (such as legs, waist, and arms), read the data of sensors in the device, and identify different human postures through feature extraction. e human posture monitoring system realizes the interaction between wearable devices and server system, and adds other additional functions such as real-time display of recognition results on the basis of posture monitoring. e overall framework of the human posture monitoring system is shown in Figure 3.
e system is mainly composed of hardware and software: (1) Hardware part: wearable equipment for human body information collection (2) Software part: mobile app for data visualization and cloud service providing attitude monitoring function Since the wearable device itself cannot be directly connected to the cloud, and the data in the device are transmitted to the mobile phone through Bluetooth, the mobile app is used to receive the data and upload it to the cloud through the network, so as to realize more complex attitude monitoring in the cloud and return the results to the mobile phone for display. In addition, the cloud service collects posture characteristics and physiological characteristics from different users, which can provide support for big data processing and statistics, and can also better correct the trained posture monitoring model.

Basketball Training Posture
Monitoring Method

Intelligent Wearable Device Data Preprocessing
e original sensor signals of intelligent wearable devices are usually mixed with random noise, instrument noise, and electromagnetic noise, and it is not conducive to the extraction of basketball training posture features. erefore, it is necessary to filter the original acceleration signal of the intelligent wearable device. On the one hand, it is necessary to remove the noise of the original signal, and on the other hand, it is necessary to keep the data characteristics of the original signal from distortion.
e Kalman filter only uses the previous data to estimate the current state, which has good real-time performance and short delay [9]. erefore, the Kalman filter is widely used in the data filtering stage of basketball training posture monitoring. In addition, the gyroscope in intelligent wearable devices is affected by the superposition of gravity acceleration and carrier linear acceleration and signal drift. In view of this situation, a two-stage Kalman filter can be used to better correct the error caused by gyro signal drift in intelligent wearable devices by constructing an adaptive acceleration error covariance matrix. e algorithm of the twostage Kalman filter is described as follows.
e angular position is represented by a quaternion x � (x 0 , x 1 , x 2 , x 3 ) T . e quaternion is composed of a real number and a vector. x 0 represents a real number, and z � (x 1 , x 2 , x 3 ) T represents a vector. First, perform a priori system estimation, read the angular velocity data α x , α y , α z in the three-axis gyroscope sensor in the intelligent wearable device, and calculate the discrete-time state transition matrix: Here, W represents the time step of each execution of the algorithm. e prior noise covariance matrix can be expressed as Here, Z a−1 is the posterior error covariance matrix in the previous filter iteration. en, perform the first-stage Kalman filter correction and read the accelerometer data. Since the acceleration measured by the accelerometer in the intelligent wearable device is affected by gravity, it must be weighted with Kalman gain. In order to calculate the Kalman gain, it is necessary to calculate the Jacobian matrix of the partial derivative of the quaternion noise: From this, the Kalman gain X a1 that has been corrected by one level can be obtained: Here, E a1 is the noise covariance matrix of the accelerometer, and since the noise generated by the accelerometer has nothing to do with the current angular position, the Jacobian matrix S a1 is an identity matrix [10]. After that, the posterior error covariance matrix can be calculated as follows: e correction of the second-stage Kalman filter is similar to that of the first stage, but different noise covariance matrices are used to obtain Kalman gain, read the magnetic field data in the electronic compass, and calculate the corresponding Jacobian matrix: Similarly, the two-level modified Kalman gain X a2 and the posterior error covariance matrix A a2 can be obtained as follows: e two-stage Kalman filter model is shown in Figure 4. is method has lower requirements for hardware computing power and is more robust to abnormal magnetic fields.

Time Series Segmentation.
e collected acceleration and angular velocity signals are a typical time series. It is necessary to segment the sensor signals in intelligent wearable devices to facilitate the effective extraction of basketball training posture features. e first step of time series data segmentation in this study is to extract the features that can distinguish different categories from the labeled dataset and label the time series of unknown classes. If the dataset P � (p 1 , p 2 , . . . , p n ), p i in P has m sample values and a category label l i , it can be expressed as A shapelet is a tuple (k, o) composed of a subsequence k of a certain time series in the dataset P and a split threshold o, where δ is the distance threshold. It divides P into two subsets, where P l � χ: χ ∈ P, subdist(k, o) ≤ δ , In order to obtain the most recognizable shapelet, the quality of the shapelet needs to be evaluated. is study uses the information gain method to test [11]. Let L 1 � |P l |, L 2 � |P r |, and its information gain be Here, E(P) is information entropy, ε is the number of classes, and L is the number of time series in P.

Feature Extraction.
e quality of feature extraction is very important for correctly distinguishing data. e quality of feature selection will directly affect the basketball training posture monitoring. Different applications need to use different metrics, and the metrics used depends on the characteristics and characteristic domain of the data itself. Because features have different functions in different feature domains, different information can be extracted from sensor signals in intelligent wearable devices.

(1) Time Domain Characteristics.
e time domain characteristics of data also become statistical characteristics, which are calculated by the method of probability statistics  [12]. e mean describes the average value of acceleration signal in a data segment, and its calculation formula is as follows: e root mean square describes the trend of the overall value, and its calculation method is as follows: e standard deviation reflects the dispersion of data. e standard deviation is the square of variance, and its calculation method is as follows: e standard deviation also reflects the dispersion of data, and its calculation method is as follows: Interquartile spacing can describe the degree of variation of data. First, sort the data segments. e difference between the upper quartile and the lower quartile is the interquartile spacing. Skewness can describe the degree of symmetry of data with respect to the mean, and its calculation method is as follows: Kurtosis can describe the central aggregation degree of data, and its calculation method is as follows: In linear space, in addition to the data features described above, there are extreme value, maximum value, minimum value, and other data features. e main time domain features used in this study are mean and variance.
(2) Frequency Domain Characteristics. Frequency domain is a coordinate system used to describe the frequency characteristics of signals [13]. Frequency domain features include signal amplitude and energy. e signal transformation from time domain to frequency domain is mainly realized by fast Fourier transform (FFT) [14]. FFT is based on the optimization of Fourier transform. e discrete Fourier transform formula is as follows: Here, x(n) is a sample point of a complex point sequence corresponding to it after FFT transformation. e DC component of the signal corresponds to the first value of Y. e residual value corresponds to the amplitude of the component of the signal in the frequency band. e amplitude of the signal component is calculated as follows: e energy of the signal is the square sum of the amplitudes of each low-frequency component, and its calculation formula is as follows:

Basketball Training Posture
Monitoring. Based on a statistical theory, support vector machine (SVM) seeks the best compromise between the complexity of a limited sample information model and learning ability to obtain the best generalization ability [15]. SVM is mainly used to solve a small number of samples and has great advantages in pattern monitoring. It can be extended to other machine learning problems such as function fitting. Based on the basketball training posture monitoring based on intelligent wearable devices, this study uses the SVM classification algorithm to monitor the basketball training posture. Its concrete realization needs two stages: training stage and monitoring stage. In the training stage, different classification models are mainly established for the acceleration values of several different dimensions of the acceleration sensor. In the monitoring stage, online monitoring is carried out for different test samples. e intelligent wearable basketball training posture monitoring model is shown in Figure 5.
Let the sample set be (Q i , W i ), i � 1, 2, . . . , n, and x ∈ R d , y ∈ +1, −1 { } is the category symbol. e median linear discriminant function of the d dimensional space is b(x) � yη + h, and the classification surface equation is yη + h � 0. Normalize the discriminant function so that all samples satisfy |b(x)| � 1, that is, to ensure the |b(x)| � 1 of the closest point to the classification surface, so that the classification interval is equal to 2/‖ω‖, so maximizing the interval is equivalent to minimizing ‖ω‖. If the classification line is used to correctly classify the sample, the following formula needs to be satisfied: e classification plane with the minimum value of ‖ω‖ is the optimal classification plane. e training samples passing through the nearest point from the classification plane and parallel to the hyperplane G 1 , G 2 of the optimal classification plane in the two types of samples are support vectors. e constraints are as follows: Solve for the maximum value of the following function for ψ i : If ψ * is the optimal solution, then at is, the weight coefficient vector of the optimal classification surface is a linear combination of training samples.
is is the extreme value problem of the quadratic function, and it has a unique solution. Generally, a small number of ψ i is not zero, and the samples corresponding to the nonzero solution are called support vectors. e optimal classification function obtained after solving is Here, ψ i corresponding to the non-support vectors are all zero, so the summation of the above formula is only performed on the support vectors. h * is the classification threshold, which can be calculated from any support vector by formula (21) (only the support vector satisfies the equal sign condition) or calculated by taking the median of any of the support vectors of the two types.
From the above analysis, the optimal classification surface is obtained under the premise of linear separability. In the case of inseparability, it means that some training samples cannot satisfy the condition of formula (21), so a relaxation term parameter is added to the condition μ i ≥ 0: For a particularly small σ > 0, as long as it satisfies the following: Minimum can minimize the number of wrong classification samples and maximize the classification interval in the case of linear separability. In the case of nonseparability of linearity, the following constraints can be introduced: For simplification, the minimum value can be obtained under the constraint of conditional formula (26): Here, K is a certain constant, which plays a role in controlling the degree of punishment for subsamples. e method of solving this problem is similar to the method of solving the optimal classification surface. Both can be transformed into the extreme value problem of the quadratic function, but the constraint formula (22) is as follows: e training of original data samples is mainly composed of the following three steps. e corresponding SVM basketball training posture monitoring steps are as follows: Step 1. Collect data on the training posture d i (i � 1, 2, 3, . . . , n) of known smart wearable basketball as training samples.
Step 2. Extract the same eigen values (three-axis directions and parameter sizes of different postures) for the data to form a feature vector. Suppose that the intelligent wearable basketball training posture υ has S υ feature values, then τ intelligent wearable basketball training postures have n i�1 S υ feature vectors.
Step 3. Establish a multiclassification model for the existing data samples.
After the training, monitor the data collected in real time. e specific steps are as follows: Step 1. Intercept the acceleration value of the real-time intelligent wearable basketball training posture, extract the same eigenvalue as that in the training stage, and obtain the test vector.
Step 2. Generate test samples according to eigenvalues.
Step 3. Input the test samples into the previous multiclass classifier for monitoring to obtain the corresponding monitoring results. rough the above steps, basketball training posture monitoring is realized.

Setting Up the Experimental Environment.
In order to verify the effectiveness of the basketball training posture monitoring method based on intelligent wearable devices, the Windows system is used as the operating platform and the MATLAB simulation software is used as the experimental platform. Select 80 sets of existing basketball training postures and 320 feature vectors for training extraction. Among them are 160 shots, 40 defenses, 40 offenses, 40 slips, and 40 starts. ese original feature vectors are correlated, and every four vectors are used as a monitoring group. In the training process, the self-monitoring classification algorithm is used for evaluation, the training dataset is used to train the classification model, and the monitoring model is used to classify the tested data. e SVM classification algorithm is used to monitor the test data.

Analysis of Basketball Training Posture Monitoring Effect.
In order to verify the basketball training posture monitoring effect of the proposed method, the confusion matrix is used to represent the basketball training posture monitoring effect. Five kinds of basketball training postures are selected: shooting, defense, attack, sliding, and starting. e basketball training postures are monitored by the proposed method. e comparison results of the monitoring effects of the proposed method are shown in Figure 6.
It can be seen from Figure 6 that shooting, sliding, and starting have good monitoring effects, and their confusion matrices reach 1.00, 0.96, and 0.95, respectively, while defense and attack have less error monitoring, and their confusion matrices reach 0.88 and 0.85, respectively. However, based on the above analysis, the proposed method can effectively realize five kinds of basketball training posture monitoring, and its basketball training posture monitoring effect is better.

Analysis of the Accuracy of Basketball Training Posture
Monitoring. On this basis, in order to further verify the basketball training posture monitoring accuracy of the proposed method, the monitoring accuracy is used as the  Mobile Information Systems evaluation index. e greater the monitoring accuracy, the greater the monitoring accuracy of the method. e calculation formula is as follows: Here, λ is the number of samples that are monitored correctly, and ϑ is the total number of samples. e proposed method, the method in reference [4], and the method in reference [5] are used to monitor the basketball training posture, and the comparison results of the basketball training posture monitoring accuracy of different methods are shown in Figure 7.
It can be seen from Figure 7 that when the total number of basketball training posture samples is 320, the average monitoring accuracy of basketball training posture of the method in reference [4] is 88.1%, the average monitoring accuracy of basketball training posture of the method in reference [5] is 83.2%, and the average monitoring accuracy of basketball training posture of the proposed method is as high as 95.4%. It can be seen that the proposed method has a high accuracy of basketball training posture monitoring and can effectively improve the accuracy of basketball training posture monitoring.

Analysis of Basketball Training Posture Monitoring Time.
To further verify the basketball training posture monitoring time of the proposed method, compare and analyze the proposed method, the method in reference [4], and the method in reference [5], and get the comparison results of basketball training posture monitoring time of different methods, as shown in Figure 8.
It can be seen from Figure 8

Conclusion
e basketball training posture monitoring method based on intelligent wearable devices proposed in this study can effectively improve the basketball training posture monitoring accuracy, shorten the basketball training posture monitoring time, and ensure the basketball training posture monitoring effect. However, this study ignores the physiological characteristics of different height, weight, age, and gender.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Additional Points
Furthermore, in the next research, we should consider the impact of these factors and provide different posture monitoring methods for people with different physiological characteristics.

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