Abstract
Aiming at the problems of low monitoring accuracy, long time, and poor effect 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 classification of intelligent wearable devices, the attitude monitoring technology based on intelligent wearable devices is studied. A two-stage Kalman filter 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 classification 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 effect of the proposed method is better, which can effectively improve the monitoring accuracy and shorten the monitoring time.
1. 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]. The development, processing power, and computing level of smartdevices have been greatly improved, and their functions are becoming more and more powerful. The role it plays in people’s lives has long been not limited to communication equipment, but is an indispensable necessity for people’s lives. These 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]. The 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. Therefore, 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. The 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. This 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. The 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. The SVM classification algorithm is adopted to realize basketball training posture monitoring. The basketball training posture monitoring effect of this method is better, the monitoring accuracy is higher, and the monitoring time is shorter.
The 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.
2. Intelligent Wearable Device
2.1. 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. The 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. The built-in sensor in the intelligent wearable device is shown in Figure 2.

2.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. There 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. The 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. The 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. The 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. The overall framework of the human posture monitoring system is shown in Figure 3.

The 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.
3. Basketball Training Posture Monitoring Method
3.1. Intelligent Wearable Device Data Preprocessing
3.1.1. Signal Noise Reduction
The 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. Therefore, 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.
The Kalman filter only uses the previous data to estimate the current state, which has good real-time performance and short delay [9]. Therefore, 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. The algorithm of the two-stage Kalman filter is described as follows.
The angular position is represented by a quaternion . The quaternion is composed of a real number and a vector. represents a real number, and represents a vector. First, perform a priori system estimation, read the angular velocity data in the three-axis gyroscope sensor in the intelligent wearable device, and calculate the discrete-time state transition matrix:
Here, represents the time step of each execution of the algorithm. The prior noise covariance matrix can be expressed as
Here, is the posterior error covariance matrix in the previous filter iteration. Then, 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 that has been corrected by one level can be obtained:
Here, 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 is an identity matrix [10]. After that, the posterior error covariance matrix can be calculated as follows:
The 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 and the posterior error covariance matrix can be obtained as follows:
The two-stage Kalman filter model is shown in Figure 4.

This method has lower requirements for hardware computing power and is more robust to abnormal magnetic fields.
3.1.2. Time Series Segmentation
The 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. The 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 , in has sample values and a category label , it can be expressed as
A shapelet is a tuple composed of a subsequence of a certain time series in the dataset and a split threshold , where is the distance threshold. It divides into two subsets, where
In order to obtain the most recognizable shapelet, the quality of the shapelet needs to be evaluated. This study uses the information gain method to test [11]. Let , and its information gain be
Here, is information entropy, is the number of classes, and is the number of time series in .
3.1.3. Feature Extraction
The quality of feature extraction is very important for correctly distinguishing data. The 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. The time domain characteristics of data also become statistical characteristics, which are calculated by the method of probability statistics [12]. The mean describes the average value of acceleration signal in a data segment, and its calculation formula is as follows:
The root mean square describes the trend of the overall value, and its calculation method is as follows:
The standard deviation reflects the dispersion of data. The standard deviation is the square of variance, and its calculation method is as follows:
The 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. The 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. The 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. The 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. The discrete Fourier transform formula is as follows:
Here, is a sample point of a complex point sequence corresponding to it after FFT transformation. The DC component of the signal corresponds to the first value of . The residual value corresponds to the amplitude of the component of the signal in the frequency band. The amplitude of the signal component is calculated as follows:
The energy of the signal is the square sum of the amplitudes of each low-frequency component, and its calculation formula is as follows:
3.2. 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. The intelligent wearable basketball training posture monitoring model is shown in Figure 5.

Let the sample set be , and is the category symbol. The median linear discriminant function of the dimensional space is , and the classification surface equation is . Normalize the discriminant function so that all samples satisfy , that is, to ensure the of the closest point to the classification surface, so that the classification interval is equal to , 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:
The classification plane with the minimum value of is the optimal classification plane. The training samples passing through the nearest point from the classification plane and parallel to the hyperplane of the optimal classification plane in the two types of samples are support vectors. The constraints are as follows:
Solve for the maximum value of the following function for :
If is the optimal solution, then
That is, the weight coefficient vector of the optimal classification surface is a linear combination of training samples.
This is the extreme value problem of the quadratic function, and it has a unique solution. Generally, a small number of is not zero, and the samples corresponding to the nonzero solution are called support vectors. The optimal classification function obtained after solving is
Here, corresponding to the non-support vectors are all zero, so the summation of the above formula is only performed on the support vectors. 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 :
For a particularly small , 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, is a certain constant, which plays a role in controlling the degree of punishment for subsamples. The 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:
The training of original data samples is mainly composed of the following three steps. The corresponding SVM basketball training posture monitoring steps are as follows: Step 1. Collect data on the training posture 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 feature values, then intelligent wearable basketball training postures have feature vectors. Step 3. Establish a multiclassification model for the existing data samples.
After the training, monitor the data collected in real time. The 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. Through the above steps, basketball training posture monitoring is realized.
4. Experimental Simulation and Analysis
4.1. 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. These 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. The SVM classification algorithm is used to monitor the test data.
4.2. 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. The basketball training postures are monitored by the proposed method. The 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.
4.3. 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 evaluation index. The greater the monitoring accuracy, the greater the monitoring accuracy of the method. The calculation formula is as follows:
Here, is the number of samples that are monitored correctly, and is the total number of samples. The 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.
4.4. 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 that the basketball training posture monitoring time of different methods increases with the increase in the overall number of basketball training posture samples. When the total number of basketball training posture samples is 320, the basketball training posture monitoring time of the method in reference [4] is 22.5 s, the basketball training posture monitoring time of the method in reference [5] is 16.8 s, while the basketball training posture monitoring time of the proposed method is only 7.2 s. Therefore, the basketball training posture monitoring time of the proposed method is short.
5. Conclusion
The 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
The 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
The authors declare that they have no conflicts of interest.