# Research on Reconstruction of Basketball Training Action Trajectory Based on Improved K-Means Clustering Algorithm

Authors: Yongwei Peng; Weiyi Gao
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

The automatic capture and analysis of basketball game movements can guide basketball training and provide an effective method for improving the efficiency of basketball training. This paper introduces the research status of clustering methods in the field of trajectory data mining and reconstruction in detail. By analyzing the trajectory data under the constraints of the road network, the spatiotemporal characteristics of the existing trajectory clustering methods, and the deficiencies of the existing trajectory clustering methods, a new trajectory clustering method based on trajectory segmentation and spatiotemporal similarity measurement is implemented. A motion capture and reconstruction method for basketball training based on visual image K-means clustering algorithm is proposed. Multiresolution frame scanning technology is used to collect machine images of basketball training movements, and edge contour processing is performed on the collected high-resolution basketball training movement images. Feature detection uses the three-dimensional model reconstruction method to segment the basketball training action area and combines the irregular triangle network model to realize the machine vision block template matching processing of basketball training actions and capture the basketball training action in the Gaussian fuzzy affine space. In time and feature extraction, wavelet lifting technology is used to identify the ambiguity of basketball training movements, image enhancement technology is used to improve the resolution and adaptability of basketball training movement capture, and machine vision image processing methods are used to achieve basketball training movement capture optimization. The simulation results show that the method has better adaptability and higher feature recognition ability for basketball training motion capture and improves the feature extraction and adaptive capture reconstruction ability of basketball training motion.


---

## Body

## 1. Introduction

Trajectory data mining is proposed based on the theory of spatiotemporal data mining and combined with the characteristics of mobile data itself. Managed Services (MBS). Compared with the research on the current position of the moving object in LBS, the research on MBS relies more on the continuous change sequence (or trajectory) of the spatial position of the moving object over time and pays attention to the past and current continuous changes of the moving object and changes in position during a time period and the spatial and temporal relationship of the moving object to other moving objects during this time. As one of the traditional data mining methods, clustering is widely used by researchers in different data types and application environments [1, 2, 3]. Using the trajectory clustering method, the motion laws and behavior patterns of moving objects can be found by finding similar motion trajectories, extracting motion feature patterns, and reconstructing trajectories. Therefore, trajectory clustering can be used to analyze user preferences and hot spots and provide auxiliary decision-making information for many fields such as tourism planning, traffic management, and urban planning [4–8].In recent years, scholars at home and abroad have mainly adopted various data mining methods such as clustering, classification, and frequent item mining for the knowledge discovery and research of moving objects, mining the location information and motion patterns of moving objects, and proposed corresponding moving object trajectory models, similarity measurement methods, and clustering methods. The process of dividing a collection of physical or abstract objects into classes of similar objects is called clustering. A cluster generated by clustering is a collection of data objects that are similar to objects in the same cluster and different from objects in other clusters [9, 10]. Therefore, clustering methods are particularly suitable for the extraction and division of spatiotemporal features of moving objects to describe their motion patterns and features. With the needs of location services and motion pattern analysis, new achievements have been made in the research on trajectory data of moving objects in recent years. According to the different research objects of clustering methods, trajectory clustering methods are mainly divided into two categories:Mobile microclustering takes discrete position data of moving objects as clustering objects; all data in each cluster is bounded by a region bounding box and dynamically maintains the bounding box of the clustering according to the changes of spatial information of moving objects. The class result represents a collection of moving objects that are close in their present and future positions. This method can quickly divide moving objects with the same characteristics. However, due to the limited time range of the bounding box, it is especially suitable for applications such as location-based services that seldom analyze the temporal and spatial evolution of moving objects [11–15].Trajectory clustering takes the spatial position information (that is, the trajectory) of the moving object continuously changing with time as the clustering object and maintains the cluster according to the similarity measure between the trajectories. Compared with the mobile microclustering method, the process of extracting spatiotemporal features is more complicated, and the clustering speed is slower, but it can extract the motion features and behavior patterns of moving objects in a period of time, which is useful for analyzing the historical motion patterns of moving objects. Predicting future motion behavior is of great significance, and the clustering results are easy to understand and more closely related to specific applications [16, 17].In recent years, domestic scholars have carried out a lot of research on moving object database and moving object data mining technology, but the research is more focused on LBS-oriented moving object point clustering method, MBS-oriented trajectory modeling method, and indexing method. The research of trajectory data clustering method has gradually attracted the attention of many researchers. At present, domestic research in this area is still in its infancy. The more representative ones are as follows:For Chen Jidong, to avoid unnecessary distance calculation, an edge-based clustering algorithm and a node-based clustering algorithm are proposed to improve the efficiency of clustering while ensuring the clustering effect. This method belongs to the category of moving object point clustering. It does not mine the trajectory change information of moving objects and cannot explain the movement laws and behavior patterns of moving objects well. Zhang Yanling et al. analyzed the problem that clustering motion trajectories as a whole would lose the similarity in subtrajectory segments and proposed a new method for trajectory clustering, first dividing long trajectories into straight subsegments and generating their augmented clusters Finally, according to the reachability map, the trajectory clustering structure is identified to obtain the motion pattern of the subtrajectories. In this method, the selection of feature points has a great influence on the clustering results, but this method does not introduce its feature point selection method in detail; on the other hand, although this method analyzes the temporal and spatial characteristics of the trajectory, the two are independent of each other, and the measurement units are not unified, lacking the analysis and comparison of the spatiotemporal similarity of trajectories [18–25].Jae-Gil Lee analyzed the importance of subtrajectory segments for trajectory clustering analysis and proposed a trajectory clustering method that firstly divides the trajectory into a series of line segments and then gathers the same line segments into a cluster. The first stage of the method is to use the minimum description length theory to divide the trajectory to obtain subtrack segments; in the second stage, the subtrack segments are further used as clustering objects to propose a density-based clustering method. Data experiments show that the method can better find subtrack segments with the same motion pattern in space. Jung-Rae Hwang studied the insufficiency of Euclidean distance applied to road network space, defined the location feature points and temporal feature points in the trajectory, and extracted spatial features for POI and TOI, respectively, and proposed a method under the constraints of the road network [26, 27]. There are three ways to measure the similarity of the trajectory: (1) measure the similarity between trajectories with the space-time distance, (2) measure the trajectory with the temporal similarity first, and then use the spatial distance to refine the similar trajectories, and (3) use the spatial similarity first measure trajectories, and then use time distance to refine similar trajectories.The feasibility and complexity of these three methods are analyzed experimentally, and they are compared and clustered. The experimental results show that the similarity measurement method can be effectively used in the field of trajectory clustering as a data preprocessing stage, but POI different from the selection of TOI will directly affect the results of the trajectory similarity measure.Ahmed Kharrat proposed a density-based trajectory clustering method in the road network space. The method first calculates the busy paths in the road network according to the data of the moving objects passing through the road segments and then compares all the subtrack segments with the busy paths. Metric clusters subtrack segments according to the density clustering parameter set by the user. Experiments show that the method is effective in clustering the trajectories constrained by the road network, but the algorithm execution efficiency is poor due to the step-by-step calculation of the busy path and the clustering method. Jung-Im Won studies the trajectory clustering method under the constraints of road network, proposes a similarity measure method that first calculates the length of overlapping road segments, and then improves FastMap and hierarchical clustering methods based on the similarity measure. Through the simulation data experiments, it can be seen that the clustering results of this method have high accuracy, but because the FastMap method is used to map the trajectory, the algorithm execution efficiency is not high, and the analysis of the time characteristics of the trajectory is lacking [28, 29, 30].In response to the above problems, this paper first determines the concept of technical action through the research of sports literature. By studying the practical application of technical movements in professional competitions and the teaching videos of short video platforms from the media authors, the basic elements of basketball technical movement videos are analyzed. And through the literature research of basketball action data set, the characteristics of the data set are analyzed, and the basketball technical action data set is established based on the collection methods of other sports action data sets. Secondly, on the established basketball technical action data set, combined with the K-means clustering algorithm, the video image is clipped to the human motion area to reduce the size of the image frame, and the basketball technical action data set based on the cropped frame is generated, reducing the number of the amount of network training that improves the efficiency of subsequent action recognition training. Finally, a reconstruction method of basketball action trajectory is proposed, and simulation experiments are carried out. The experimental results show that the algorithm flow designed in this paper is effective in action recognition and reconstruction on the basketball technical action data set established in our work.In general, the paper has the following research innovations:(1)
This paper introduces the research status of clustering methods in the field of trajectory data mining and reconstruction in detail(2)
This paper implements a new trajectory clustering method based on trajectory segmentation and spatiotemporal similarity measurement(3)
This paper proposes a motion capture and reconstruction method for basketball training based on visual image K-means clustering algorithm


## 2. Basketball Technical Action

Basketball technical movements should have distinct characteristics, be recognized by the majority of fans, and should have certain practical value. Basketball technical movements should be different from general basic movements, not limited to the general concepts of shooting, dribbling, and passing that can be recognized by nonfans. Technical movements often require a lot of training and technical polishing before they can be mastered and used by players. Existing studies have conducted in-depth analysis of breakthrough technology and defined breakthrough technical movements as an offensive technique that combines dribbling rhythm and footstep change for players. And there are numerous classifications of breakthrough technologies. However, because its classification is too special, for example, this paper proposes a similar classification of crotch dribbling during the process, and this paper tends to disassemble it into more single elements. The literature points out that there are many dribbling breakthrough techniques. With the development of basketball, the level of detail of many actions makes it difficult to classify. This article divides the technical categories from multiple perspectives. For example, from the perspective of breakthrough position, the dribble breakthrough technology is divided into three types: forward, sideways, and back-to-back dribble breakthrough technologies; the angle can be divided into techniques such as speed, aiming at the basket and fake action.


### 2.1. Action Data Set Production

Generally speaking, in order to achieve unexpected results, most basketball technical movements have certain requirements for speed. Due to the high speed of basketball technical movements, the duration of an action is about 0.51.2 seconds. In order to ensure the quality of the data set, it is necessary to edit each video to extract clips containing technical movements. The editing standard is that there is less interference in the shot, to ensure that there is no obvious occlusion of the human body, and the entire video clip must have a complete technical action. Edit the video with FormatFactory. There is often a platform watermark in the short video, and some video authors will also add relevant text in various places in the video to explain the action. These elements are meaningless for technical action recognition and cause some interference to recognition. In order to reduce interference and improve data quality, it is necessary to exclude irrelevant elements, which can be described as(1)Rtainimage=0,object_range<box_threshold1,object_range≥box_threshold.After the above video preprocessing, the total number of frames of the action video is between 2080 frames. Due to the different speed of technical actions and different types of actions, this will lead to a large difference in the number of frames between videos. In order to ensure that a set of image sequences can cover a complete technical action, it is necessary to set the number of frames at regular intervals according to a certain algorithm logic. OpenCV generates consecutive frame images. Because basketball technology action recognition focuses on human movements and does not require color information of pictures, in order to reduce the interference of irrelevant information and improve the training efficiency of the network, each frame of image is grayscaled while generating consecutive frames. The logic here is that, assuming that there are 50 frames in a video clip of an action, if 16 frames need to be extracted, the frame selection is performed by taking the modulo operation such as formula (2) and taking 3 as the frame number step. Starting from the first frame and picking every 3 frames, this ensures that 16 frames of images can cover the complete technical action.
(2)Mod50,16=3.


### 2.2. Technical Action Category

Next, taking the six technical movements of the data set as examples, the action characteristics and application scenarios of direction change, Dunbai, Sam Gold, pull-up jump shot, European step, and turning are described in detail.For the change of direction visuals, the attacker tricks the defender into dislocating the defender in the opposite direction of the attacker. When the attacker breaks through the defender, this action creates and defends a shoulder width of 0.5~0.75 by spreading the ball for a long time and then pushes the right foot to the left and drives the left leg to the left through the knee pointing and the explosion of body force. Left is used to achieve the purpose of breaking through the defender. The selection criteria for the direction-changing action in this video set is to try to use a frontal perspective to ensure a complete set of continuous actions without interference from other actions before and after the action.The characteristic of Dunbai’s action is that the offensive player takes advantage of the pause and hesitation in the process of breaking through the dribble, holding the basketball to the lower side with the dominant hand, and pretending to close the ball with the other hand, so that the opposing defensive player mistakenly thinks a deceptive action in which the offensive player will make a jumper or pass the ball. The essence is to use a fake action to destroy the defender’s center of gravity and rhythm to make it out of position and then find the time difference to make a breakthrough. The selection criteria for the Dunbai action in this video collection are also the frontal perspective, to ensure that the action at the moment of closing the ball can be captured. It is not appropriate to include too many video frames to avoid confusion with other actions.The visual effect of Sam Gold’s action is to send the ball on the left with the left hand and pull it back with the right hand. Shamgod is similar to the direction change, in that it induces the defender to make a wrong judgment by deceiving and induces a false move, which leads to the shift of the defensive center of gravity, so that it loses the defensive position and then attacks the weak side to achieve a breakthrough. In this video set, the selection criteria for Sam Gold’s actions should be as frontal as possible to ensure that the action feature of pulling the ball back can be captured.A pull-up jump shot is a sudden stop of the offensive player’s legs and knees during the march. At this time, the defensive player is out of position due to inertia in the process of hurriedly returning to defense, and the offensive player will shoot again at this time. The main point of the action is to adjust the hands to the shooting position during the dribble, and the position of the player’s hands will also change significantly when the basketball is turned. Players who are skilled in this are good at using this technique to adjust their hands at the moment of closing the ball, so that the position of the touch on the basketball is as close as possible to make it easier to shoot. The best time to close the ball is to break through the last dribble before the emergency stop to collect the ball. When the offensive player completes the last dribble to collect the ball, he takes the first step and drives the second step to move. To form a step, the step is small and the moving distance is short, which plays the role of adjusting the center of gravity and feel, so that the faster moving speed also makes the defender too late to respond. At the same time, with the rise of basketball, the offensive players usually use one hand to touch the basketball and quickly adjust the shooting position of the best hand type through experience and familiarity with the ball. Many guards will use such a step-by-step emergency stop method, not only because of this flexible movement, but also because the moment of the emergency stop and collection of the ball can also play a role in bending the knee and accumulating force for the next shot. In this video set, the selection criteria for the emergency stop jumper action is as much as possible from the side view to ensure that the action feature of “emergency stop” can be captured.The basic visual feature of the Euro step is the large left and right stride of the human body. Due to the large left and right shaking, the defender is misled, which affects his judgment on the attacking player. The foot action often slaps the basketball on the last dribble before closing the ball, cleverly using the definition of the zeroth step in the basketball walking rules; this technique can also make the defensive player misjudgment. The first step after the ball is combined is smaller than the second step, and then the second step is a larger step that rushes from one side of the defender to the other side to achieve the purpose of breakthrough. The key to this action is to form a confusing movement along the turn when striding, swinging the ball with both arms, and at the same time, the inertial impact of striding can legally use the shoulders to form a certain confrontation with the defender creating room for hands.Taking the right-hand direction as the attacking direction as an example, when the attacking player faces the defending player, he observes the defending player with his eyes, pushes on the ground with his right foot, steps to the right with his left foot, and hugs the ball halfway with his right wrist at a parallel angle. But avoid combining the ball so as not to cause a second fortune, for example. After that, use the centripetal force in the half-turn state of the body, and use the explosive force to kick off the left foot. Switch to the left hand after a shot, pull the ball to the left side of the body, and accelerate to overtake the defense from the left. The selection criteria for the turning action in this video set are the back perspective of the character, to ensure that the action feature of turning can be captured.


## 2.1. Action Data Set Production

Generally speaking, in order to achieve unexpected results, most basketball technical movements have certain requirements for speed. Due to the high speed of basketball technical movements, the duration of an action is about 0.51.2 seconds. In order to ensure the quality of the data set, it is necessary to edit each video to extract clips containing technical movements. The editing standard is that there is less interference in the shot, to ensure that there is no obvious occlusion of the human body, and the entire video clip must have a complete technical action. Edit the video with FormatFactory. There is often a platform watermark in the short video, and some video authors will also add relevant text in various places in the video to explain the action. These elements are meaningless for technical action recognition and cause some interference to recognition. In order to reduce interference and improve data quality, it is necessary to exclude irrelevant elements, which can be described as(1)Rtainimage=0,object_range<box_threshold1,object_range≥box_threshold.After the above video preprocessing, the total number of frames of the action video is between 2080 frames. Due to the different speed of technical actions and different types of actions, this will lead to a large difference in the number of frames between videos. In order to ensure that a set of image sequences can cover a complete technical action, it is necessary to set the number of frames at regular intervals according to a certain algorithm logic. OpenCV generates consecutive frame images. Because basketball technology action recognition focuses on human movements and does not require color information of pictures, in order to reduce the interference of irrelevant information and improve the training efficiency of the network, each frame of image is grayscaled while generating consecutive frames. The logic here is that, assuming that there are 50 frames in a video clip of an action, if 16 frames need to be extracted, the frame selection is performed by taking the modulo operation such as formula (2) and taking 3 as the frame number step. Starting from the first frame and picking every 3 frames, this ensures that 16 frames of images can cover the complete technical action.
(2)Mod50,16=3.


## 2.2. Technical Action Category

Next, taking the six technical movements of the data set as examples, the action characteristics and application scenarios of direction change, Dunbai, Sam Gold, pull-up jump shot, European step, and turning are described in detail.For the change of direction visuals, the attacker tricks the defender into dislocating the defender in the opposite direction of the attacker. When the attacker breaks through the defender, this action creates and defends a shoulder width of 0.5~0.75 by spreading the ball for a long time and then pushes the right foot to the left and drives the left leg to the left through the knee pointing and the explosion of body force. Left is used to achieve the purpose of breaking through the defender. The selection criteria for the direction-changing action in this video set is to try to use a frontal perspective to ensure a complete set of continuous actions without interference from other actions before and after the action.The characteristic of Dunbai’s action is that the offensive player takes advantage of the pause and hesitation in the process of breaking through the dribble, holding the basketball to the lower side with the dominant hand, and pretending to close the ball with the other hand, so that the opposing defensive player mistakenly thinks a deceptive action in which the offensive player will make a jumper or pass the ball. The essence is to use a fake action to destroy the defender’s center of gravity and rhythm to make it out of position and then find the time difference to make a breakthrough. The selection criteria for the Dunbai action in this video collection are also the frontal perspective, to ensure that the action at the moment of closing the ball can be captured. It is not appropriate to include too many video frames to avoid confusion with other actions.The visual effect of Sam Gold’s action is to send the ball on the left with the left hand and pull it back with the right hand. Shamgod is similar to the direction change, in that it induces the defender to make a wrong judgment by deceiving and induces a false move, which leads to the shift of the defensive center of gravity, so that it loses the defensive position and then attacks the weak side to achieve a breakthrough. In this video set, the selection criteria for Sam Gold’s actions should be as frontal as possible to ensure that the action feature of pulling the ball back can be captured.A pull-up jump shot is a sudden stop of the offensive player’s legs and knees during the march. At this time, the defensive player is out of position due to inertia in the process of hurriedly returning to defense, and the offensive player will shoot again at this time. The main point of the action is to adjust the hands to the shooting position during the dribble, and the position of the player’s hands will also change significantly when the basketball is turned. Players who are skilled in this are good at using this technique to adjust their hands at the moment of closing the ball, so that the position of the touch on the basketball is as close as possible to make it easier to shoot. The best time to close the ball is to break through the last dribble before the emergency stop to collect the ball. When the offensive player completes the last dribble to collect the ball, he takes the first step and drives the second step to move. To form a step, the step is small and the moving distance is short, which plays the role of adjusting the center of gravity and feel, so that the faster moving speed also makes the defender too late to respond. At the same time, with the rise of basketball, the offensive players usually use one hand to touch the basketball and quickly adjust the shooting position of the best hand type through experience and familiarity with the ball. Many guards will use such a step-by-step emergency stop method, not only because of this flexible movement, but also because the moment of the emergency stop and collection of the ball can also play a role in bending the knee and accumulating force for the next shot. In this video set, the selection criteria for the emergency stop jumper action is as much as possible from the side view to ensure that the action feature of “emergency stop” can be captured.The basic visual feature of the Euro step is the large left and right stride of the human body. Due to the large left and right shaking, the defender is misled, which affects his judgment on the attacking player. The foot action often slaps the basketball on the last dribble before closing the ball, cleverly using the definition of the zeroth step in the basketball walking rules; this technique can also make the defensive player misjudgment. The first step after the ball is combined is smaller than the second step, and then the second step is a larger step that rushes from one side of the defender to the other side to achieve the purpose of breakthrough. The key to this action is to form a confusing movement along the turn when striding, swinging the ball with both arms, and at the same time, the inertial impact of striding can legally use the shoulders to form a certain confrontation with the defender creating room for hands.Taking the right-hand direction as the attacking direction as an example, when the attacking player faces the defending player, he observes the defending player with his eyes, pushes on the ground with his right foot, steps to the right with his left foot, and hugs the ball halfway with his right wrist at a parallel angle. But avoid combining the ball so as not to cause a second fortune, for example. After that, use the centripetal force in the half-turn state of the body, and use the explosive force to kick off the left foot. Switch to the left hand after a shot, pull the ball to the left side of the body, and accelerate to overtake the defense from the left. The selection criteria for the turning action in this video set are the back perspective of the character, to ensure that the action feature of turning can be captured.


## 3. Action Trajectory Prediction Principles and Methods

### 3.1. Prediction Principle

In the process of extracting the action features of the lower and upper limbs of the basketball game, the video of the basketball game is divided into different lengths, the upper limb action bounding box under the athlete’s action is obtained, and the athlete’s action in each vigorous spiking image frame is obtained. The lower upper limb action bounding box is divided into 16 motion blocks with different weights, and the optical flow characteristics of each motion block are calculated, and based on this, the lower and upper limb motion features of vigorous spiking in basketball games are extracted. Use equation (3) to divide the basketball game video into different lengths:
(3)epi=Gmx,y,θ×jjlx,ysER×sfg±upoi+sES.Use equation (4) to obtain the upper limb action bounding box under the athlete’s action:
(4)opoi=ggoi⊗ruioσopu⊕θpoi⊕ggoi,and use equation (5) to segment the upper limb action bounding box under the athlete’s action in each vigorous spiking image frame into different.
(5)wyu=τwet×xyuyyu⊗opoi⊕jjuk.For the 16 motion blocks of the weights, the optical flow characteristics of each motion block are calculated by formula (6), and the action characteristics of the lower and upper limbs of vigorous spiking are extracted by formula (7).
(6)e′′opk=upl⊗bpoidpoi⊕bpkl±nljknlp,(7)ujjk=ωplk⊕eopkwyhu⊕opoi±epi.To sum up, it can be explained that the principle of action feature extraction of the lower and upper limbs of the basketball game vigorously spiking is used to complete the prediction of the lower and upper limbs movement trajectory of the vigorously spiking in the basketball game.


### 3.2. Method of Prediction

In order to predict the movement trajectory of the upper limbs of the basketball smash, it is necessary to optimize the extraction of the lower and upper limb movement features of the basketball game. First, the upper limb movement area is described in the initial frame, and the color features of each pixel in the area are counted. The possible regions of the upper limb movements in the subsequent continuous take-off images are given, the local texture features of the upper limb movements are described, and the Gaussian mixture model is used to quickly extract the lower and upper limb movement contours of the vigorous spiking. Equation (8) can be used to count the color feature space to which each pixel in the upper limb action area belongs:
(8)Ety=x0+xiewermc×sghj,and use equation (9) to give the possible regions of the upper limb action in the subsequent continuous take-off images.
(9)Sewe=ϖuy⊕lwerEty×yoi⊕hpoigxy.Assuming the attributes of the spatial distribution of pixel gray levels in the upper limb action region in the continuous action image, the gray value of the center pixel of the upper limb action region and the center of the initial candidate upper limb action region of the current action frame are known, then formula (10) can describe the upper limb action local texture feature, and equation (11) can obtain the motion amplitude of the upper limb action contour in the connected neighborhood of the continuous action image frame.
(10)Sjxc=ηerp∂up⊗ξplk∂up×Sewe,(11)xuip=Hpoi⊗SjxcSewe∓eiop∓Ety.To sum up, it can be shown that in the process of optimizing and extracting the action features of the lower and upper limbs of the lower and upper limbs of the basketball game, the upper limb action area is first described in the initial frame, and the color feature space to which each pixel in this area belongs is counted. The possible regions of the upper limb movements in the continuous take-off image are described, and the local texture features of the upper limb movements are described, and the Gaussian mixture model is used to quickly extract the action contours of the lower and upper limbs of the vigorous spiking, which lays the foundation for the optimal extraction of the lower and upper limbs movement features of the vigorous spiking in basketball games.


## 3.1. Prediction Principle

In the process of extracting the action features of the lower and upper limbs of the basketball game, the video of the basketball game is divided into different lengths, the upper limb action bounding box under the athlete’s action is obtained, and the athlete’s action in each vigorous spiking image frame is obtained. The lower upper limb action bounding box is divided into 16 motion blocks with different weights, and the optical flow characteristics of each motion block are calculated, and based on this, the lower and upper limb motion features of vigorous spiking in basketball games are extracted. Use equation (3) to divide the basketball game video into different lengths:
(3)epi=Gmx,y,θ×jjlx,ysER×sfg±upoi+sES.Use equation (4) to obtain the upper limb action bounding box under the athlete’s action:
(4)opoi=ggoi⊗ruioσopu⊕θpoi⊕ggoi,and use equation (5) to segment the upper limb action bounding box under the athlete’s action in each vigorous spiking image frame into different.
(5)wyu=τwet×xyuyyu⊗opoi⊕jjuk.For the 16 motion blocks of the weights, the optical flow characteristics of each motion block are calculated by formula (6), and the action characteristics of the lower and upper limbs of vigorous spiking are extracted by formula (7).
(6)e′′opk=upl⊗bpoidpoi⊕bpkl±nljknlp,(7)ujjk=ωplk⊕eopkwyhu⊕opoi±epi.To sum up, it can be explained that the principle of action feature extraction of the lower and upper limbs of the basketball game vigorously spiking is used to complete the prediction of the lower and upper limbs movement trajectory of the vigorously spiking in the basketball game.


## 3.2. Method of Prediction

In order to predict the movement trajectory of the upper limbs of the basketball smash, it is necessary to optimize the extraction of the lower and upper limb movement features of the basketball game. First, the upper limb movement area is described in the initial frame, and the color features of each pixel in the area are counted. The possible regions of the upper limb movements in the subsequent continuous take-off images are given, the local texture features of the upper limb movements are described, and the Gaussian mixture model is used to quickly extract the lower and upper limb movement contours of the vigorous spiking. Equation (8) can be used to count the color feature space to which each pixel in the upper limb action area belongs:
(8)Ety=x0+xiewermc×sghj,and use equation (9) to give the possible regions of the upper limb action in the subsequent continuous take-off images.
(9)Sewe=ϖuy⊕lwerEty×yoi⊕hpoigxy.Assuming the attributes of the spatial distribution of pixel gray levels in the upper limb action region in the continuous action image, the gray value of the center pixel of the upper limb action region and the center of the initial candidate upper limb action region of the current action frame are known, then formula (10) can describe the upper limb action local texture feature, and equation (11) can obtain the motion amplitude of the upper limb action contour in the connected neighborhood of the continuous action image frame.
(10)Sjxc=ηerp∂up⊗ξplk∂up×Sewe,(11)xuip=Hpoi⊗SjxcSewe∓eiop∓Ety.To sum up, it can be shown that in the process of optimizing and extracting the action features of the lower and upper limbs of the lower and upper limbs of the basketball game, the upper limb action area is first described in the initial frame, and the color feature space to which each pixel in this area belongs is counted. The possible regions of the upper limb movements in the continuous take-off image are described, and the local texture features of the upper limb movements are described, and the Gaussian mixture model is used to quickly extract the action contours of the lower and upper limbs of the vigorous spiking, which lays the foundation for the optimal extraction of the lower and upper limbs movement features of the vigorous spiking in basketball games.


## 4. Simulation Proof

In order to prove the effectiveness of the K-means clustering method proposed in this paper in the extraction and reconstruction of upper limb motion features in basketball games, experiments are needed. Under the environment of matlab7.0, a simulation platform for the extraction of lower and upper limb movement features in vigorous spiking basketball game is built. The experimental data comes from image frames from international basketball games. In the experiment, in order to prove the feasibility of the method in this paper to extract the action features of the lower and upper limbs in basketball games, the experiment is divided into two parts. In the first part of the experiment, the extraction efficiency of upper limb action features is used as an evaluation index to verify the performance of the lower limb action feature extraction method proposed in this paper for vigorous spiking in ball sports. In the second stage of the experiment, in order to prove the comprehensiveness and fairness, the effect of spiking lower limb motion feature extraction in basketball games was measured, and the comprehensive quality of lower limb and upper limb motion feature extraction by different methods was measured.


### 4.1. Test of Feature Extraction Efficiency

The method proposed in this paper is used to perform an experiment of extracting the action feature of the lower and upper limbs of the basketball game vigorously spiking the ball. Test the efficiency of the method in this paper to extract the action features of the lower and upper limbs in basketball games. The test results are shown in Figure1.Figure 1
Feature extraction efficiency of our method.From the simulation results in Figure1, it can be seen that with the increase of the number of high-spike image frames, using this method to extract the action features of the lower and upper limbs in basketball games can quickly detect the effectiveness of the action, thus effectively guaranteeing the effectiveness of the action in basketball games.The method proposed in this paper is used to perform an experiment of extracting the action feature of the lower and upper limbs of the basketball game vigorously spiking the ball. Comparing the effects of different methods for the extraction of lower and upper limb movements in basketball games, the comparison results are shown in Figure2. From the simulation results in Figure 2, it can be shown that the use of this method to extract the lower and upper limb action features and reconstruct the movement of the upper limbs in basketball games has a good effect of upper limb movement trajectory prediction and reconstruction, which fully satisfies the basketball competition.Figure 2
Upper limb trajectory prediction effect.Table1 shows the comparison of the recognition rate of K-means clustering model with different input frame numbers in this data set. It can be seen from the experimental results that when 32 consecutive video image frames are input, the recognition efficiency of the algorithm is the highest, reaching 95%.Table 1
Comparison of recognition accuracy of different frame inputs in basketball technical action data set.
FrameAccuracyFrameAccuracyFrameAccuracy1481.3%1681.9%1882.1%2086.2%2286.2%2486.2%2688.5%2886.3%3090.1%3295.1%————When the input video frame image size is the same, the setting of the number of frames has a certain impact on the recognition performance. As shown in the figure, if the number of frames is too small, it will degenerate into action recognition based on a single frame image, so that the action recognition based on only one frame image has no timing information and the performance of continuous action recognition is not ideal; if the frames are too many, you need to consider whether the number of frames of each video is enough. When data is insufficient, data augmentation needs to be considered to generate more training data. At the same time, the higher the number of frames, the larger the training volume of the network model, and the longer the time required.Figure3 shows the result of identification and reconstruction of different fake actions, which are kinds of actions that are widely used in basketball technical movements. The definition of fake action is clarified by analyzing the fake action of the attacking player. In order to hide their true offensive goals, the offensive players use a series of misleading methods to make the defensive players misjudgment, create a situation of defensive dislocation in the transition of offense and defense, and use this rare opportunity to score and assist. The successful use of fake moves can not only score points, but also reflect the confidence of the players and improve our morale. For a detailed analysis of the breakthrough technology, covering most of the technical actions that appear on the court, this paper makes a comparative analysis of these actions, in which each technical action can extract the basic action elements, so as to be divided into more detailed actions; for example, the action of changing the direction of the dribble during the movement is equivalent to the combination of dribbling under the crotch and changing the direction, so that it can be divided into dribbling under the crotch and changing direction; half-turning and then receiving the dribble and changing direction is equivalent to turning and changing direction. The above actions all involve a common action element at the moment of breaking through the defender, changing direction. According to the logic of splitting technical movements into simpler basic technical movement elements, we proposes the following six technical movements and finds matching technical movements in the NBA game of the highest basketball league to prove the practicability of these movements.Figure 3
Action identification and reconstruction results.In a broad sense, the change of direction is that the fake action of the attacker conceals the real intention and turns from one side of the fake attack to the other side. This technique occurs in many scenes, so the basketball technique action data set treats it as a classified action. The basketball rules stipulate that a player can only dribble the ball once after receiving the ball. In the shot fake action, Dunbai is a typical representative action under this rule. Using the rules flexibly, the offense pretends to bring the ball closer and misleads the defense. Turning as a technique to get rid of defenders in a limited space occurs more frequently in various scenarios, such as turning while walking and half-turning to create space for shots. The European step is a technique that European players are good at. They are good at it, and they were used in the senior professional leagues before, so it is called the Euro step. In the fast break counterattack and the ball power conversion counterattack, when the defense has not fully established a favorable defensive position, the defender of the attacking side utilizes his excellent speed and flexibly uses the Euro step to break through to defend and achieve fast break in this situation. Since the goal is the only way to score in basketball, how to find the opportunity to score in the process of dribbling is a key ability to measure whether the player is excellent, so the pull-up jumper technology is particularly important.


## 4.1. Test of Feature Extraction Efficiency

The method proposed in this paper is used to perform an experiment of extracting the action feature of the lower and upper limbs of the basketball game vigorously spiking the ball. Test the efficiency of the method in this paper to extract the action features of the lower and upper limbs in basketball games. The test results are shown in Figure1.Figure 1
Feature extraction efficiency of our method.From the simulation results in Figure1, it can be seen that with the increase of the number of high-spike image frames, using this method to extract the action features of the lower and upper limbs in basketball games can quickly detect the effectiveness of the action, thus effectively guaranteeing the effectiveness of the action in basketball games.The method proposed in this paper is used to perform an experiment of extracting the action feature of the lower and upper limbs of the basketball game vigorously spiking the ball. Comparing the effects of different methods for the extraction of lower and upper limb movements in basketball games, the comparison results are shown in Figure2. From the simulation results in Figure 2, it can be shown that the use of this method to extract the lower and upper limb action features and reconstruct the movement of the upper limbs in basketball games has a good effect of upper limb movement trajectory prediction and reconstruction, which fully satisfies the basketball competition.Figure 2
Upper limb trajectory prediction effect.Table1 shows the comparison of the recognition rate of K-means clustering model with different input frame numbers in this data set. It can be seen from the experimental results that when 32 consecutive video image frames are input, the recognition efficiency of the algorithm is the highest, reaching 95%.Table 1
Comparison of recognition accuracy of different frame inputs in basketball technical action data set.
FrameAccuracyFrameAccuracyFrameAccuracy1481.3%1681.9%1882.1%2086.2%2286.2%2486.2%2688.5%2886.3%3090.1%3295.1%————When the input video frame image size is the same, the setting of the number of frames has a certain impact on the recognition performance. As shown in the figure, if the number of frames is too small, it will degenerate into action recognition based on a single frame image, so that the action recognition based on only one frame image has no timing information and the performance of continuous action recognition is not ideal; if the frames are too many, you need to consider whether the number of frames of each video is enough. When data is insufficient, data augmentation needs to be considered to generate more training data. At the same time, the higher the number of frames, the larger the training volume of the network model, and the longer the time required.Figure3 shows the result of identification and reconstruction of different fake actions, which are kinds of actions that are widely used in basketball technical movements. The definition of fake action is clarified by analyzing the fake action of the attacking player. In order to hide their true offensive goals, the offensive players use a series of misleading methods to make the defensive players misjudgment, create a situation of defensive dislocation in the transition of offense and defense, and use this rare opportunity to score and assist. The successful use of fake moves can not only score points, but also reflect the confidence of the players and improve our morale. For a detailed analysis of the breakthrough technology, covering most of the technical actions that appear on the court, this paper makes a comparative analysis of these actions, in which each technical action can extract the basic action elements, so as to be divided into more detailed actions; for example, the action of changing the direction of the dribble during the movement is equivalent to the combination of dribbling under the crotch and changing the direction, so that it can be divided into dribbling under the crotch and changing direction; half-turning and then receiving the dribble and changing direction is equivalent to turning and changing direction. The above actions all involve a common action element at the moment of breaking through the defender, changing direction. According to the logic of splitting technical movements into simpler basic technical movement elements, we proposes the following six technical movements and finds matching technical movements in the NBA game of the highest basketball league to prove the practicability of these movements.Figure 3
Action identification and reconstruction results.In a broad sense, the change of direction is that the fake action of the attacker conceals the real intention and turns from one side of the fake attack to the other side. This technique occurs in many scenes, so the basketball technique action data set treats it as a classified action. The basketball rules stipulate that a player can only dribble the ball once after receiving the ball. In the shot fake action, Dunbai is a typical representative action under this rule. Using the rules flexibly, the offense pretends to bring the ball closer and misleads the defense. Turning as a technique to get rid of defenders in a limited space occurs more frequently in various scenarios, such as turning while walking and half-turning to create space for shots. The European step is a technique that European players are good at. They are good at it, and they were used in the senior professional leagues before, so it is called the Euro step. In the fast break counterattack and the ball power conversion counterattack, when the defense has not fully established a favorable defensive position, the defender of the attacking side utilizes his excellent speed and flexibly uses the Euro step to break through to defend and achieve fast break in this situation. Since the goal is the only way to score in basketball, how to find the opportunity to score in the process of dribbling is a key ability to measure whether the player is excellent, so the pull-up jumper technology is particularly important.


## 5. Conclusion

Trajectory data mining and reconstruction is an emerging direction in the field of spatiotemporal data mining, among which the clustering technology with trajectory as the research object has become a research hotspot in recent years. The behavior of moving objects in real life is closely related to time and space. It is of great practical significance to use the trajectory clustering method to mine the movement laws and behavior patterns of moving objects. This paper mainly does some research in the following aspects: on the basis of studying the mobile data model, the trajectory data model is extended from the spatiotemporal and semantic characteristics, and the significance of subtrajectory division to the research of trajectory clustering is analyzed. A new subtrajectory division method under the constraints of the road network reduces the need for storage space for the trajectory. In terms of trajectory similarity measurement, the dependence of similarity measurement method on road network and spatiotemporal features is analyzed, and a method of multiplying temporal similarity and spatial similarity is proposed, which improves the execution efficiency of trajectory spatiotemporal similarity search and makes trajectories similar. Sexuality measures and clustering results are more realistic. The characteristics of trajectory data are studied, and the existing distance-based clustering method is improved, so that it can be applied in trajectory clustering with better execution efficiency, and the movement law and behavior pattern mining of moving objects based on trajectory clustering are realized.Although we have made some progress in the research work on the self-made basketball technical action data set, there is still a certain gap from practical application, and there are many practical problems to be solved. In the future, we will focus on action recognition based on target detection. If the action of a character involves certain occlusion and interference, or if multiple targets of nearly the same size appear in the same shot, how to better identify the technical action?



---

*Source: 9531266-2022-04-14.xml*