Application of Artificial Intelligence and Big Data Technology in Basketball Sports Training

Basketball is a sport with a wide range of complicated human movements, and the ability to accurately identify these movements is critical in both competition and training. Training athletes is largely based on the subjective observations and experiences of the coaches. Arti ﬁ cial intelligence and big data technologies can be used to monitor athlete training. It can also assist coaches in making decisions which signi ﬁ cantly increase the athletic ability by detecting their movements. This research work proposed a mechanism called BSTARNet which is an action recognition method for basketball sports training. The method is based on arti ﬁ cial neural network (ANN), and network is trained through basketball sports big data. First, this work uses the Convolution Long Short-Term Memory (ConvLSTM) unit to extract the spatiotemporal information features of basketball sports training from videos. Second, this work establishes the Attention Long Short-Term Memory (AttLSTM) unit that combines the attention mechanism with the LSTM. The unit selectively scans each location, giving more attention to the area where the action takes place. Finally, the network framework is built by improving the ordinary encoder-decoder model. After that, the spatiotemporal information contained in the video is encoded based on the Darknet network model. In the decoding stage, the AttLSTM structure is used to replace the ordinary LSTM. These units are combined to form the BSTARNet architecture. Experiments are conducted to verify the e ﬀ ectiveness of the proposed method applied on action recognition in basketball sports training and achieved 89.5% mAP and 95.4% accuracy.


Introduction
In today's relatively rich material life, sports are more and more popular among people and have become a vital part of daily life. Physical exercise helps to improve the body's immunity, improves the function of the nervous system, can keep the athlete in good shape, and can keep their mood happy. Persistence in sports helps to promote the all-round development of the athlete. In addition, team sports can help people establish and maintain harmonious interpersonal relationships, improve their ability to communicate and coordinate, and cultivate participants' awareness of teamwork, especially for teenagers. Beautiful sports movements have high viewing value and can make people's lives more colorful. Watching sports events has become a common preference for sports enthusiasts around the world. In recent years, the popularity of sports such as basketball games on television (TV) screens and the Internet has fully reflected the popularity of sports [1][2][3][4].
If want to achieve your goals faster in sports, a professional training plan is indispensable. Since each athlete's physique and starting level are different, the training plan needs to be specially customized for each athlete's actual situation. As the hobby of sports continues to rise, the demand for professional training guidance is also rising, and scientific training plans need to be formulated by professional coaches. In the traditional situation, the coaches need to watch the performance of the athletes at the sports site and then formulate an appropriate training plan based on their rich experience. This solution has the following shortcomings. First, this situation consumes a lot of coaches' time for watching the sports scene and squeezes the time for coaches to formulate training plans. Due to the limited number of professional coaches, not all sports enthusiasts can get training guidance from excellent coaches. Secondly, only through visual observation, coaches cannot obtain quantitative data information like acceleration and angular velocity; it is difficult to accurately grasp the deep-level information that is crucial for athletes [5][6][7][8].
A ball is tossed into an opponent's basket in order to score or prevent the other team from collecting the ball and scoring according to particular rules in the game of basketball. Other ball games, such as soccer or volleyball, are less technical and tactical, but basketball is characterized by a high level of individual battle and synchronization. When it comes to a basketball game, each player's degree of skill has a noticeable effect on the entire squad. Basketball teams suffer when their players lack the necessary basketball abilities, as their shortcomings are exposed and their levels of defense and attack suffer as a result. Athletes should receive rigorous, evidence-based basketball training as a result. Coaches traditionally develop training regimens for their teams based on the performance of their players in practice and competition. Coaches' training theories and personal experiences inform this approach, which introduces an element of subjectivity. Athletes' training quality is evaluated by comparing their performance to a variety of test standards, and coaches must manually calculate their training performance. There are however some disadvantages to using this approach. As a result, it is critical for the development of athletes' competitive abilities and coaches' decision-making abilities that sports data and motions of players can be precisely captured in real time [9][10][11][12].
Artificial intelligence (AI) has appeared in frontier fields. The development for artificial intelligence requires support of big data. Artificial intelligence is a method to guide the direction and collect laws in the world of big data. AI can process large datasets beyond traditional human methods. Machines can perform deep iterative learning through powerful logical computing capabilities to make predictions and decisions. At present, some researchers have applied artificial intelligence technology to the field of sports to identify movements in sports. Based on the recognition results of each movement obtained by using these research results, coaches can quickly understand the performance of multiple athletes even when they are not at the sports site. This improves the efficiency of coaches in formulating training plans, so that more sports enthusiasts can get training guidance from excellent coaches [13][14][15].
This research work develops an action recognition mechanism for basketball sports training named BSTARNet. This mechanism is based on artificial neural network where training of network is carried out through basketball sports big data. Spatiotemporal information features are extracted from basketball sports training videos as input data for the proposed system. The ConvLSTM structure is used to extract the spatiotemporal information from video which is then encoded using Darknet network model. In the decoding stage, the AttLSTM structure is used to replace the ordinary LSTM. The above units are combined into the BSTARNet architecture to accurately recognize the actions in basketball sports training.

Related Work
Wei et al. [16] propose an action recognition system that uses deterministic finite automata to recognize sports actions, which can be used to recognize the actions of athletes and referees in videos. Aoun et al. [17] and Bilen et al. [18] successively tried to use 2-dimensional (2D) convolution neural network (CNN) and 3D CNN to recognize actions in football game videos. The experimental result is that the recognition accuracy rate when using 3D CNN is higher than that when using 2D CNN. This shows that the features extracted with 3D CNN can better reflect the real situation of the original data than the features extracted with 2D CNN. Ullah et al. [19] use multiple cameras to cooperatively track players. This solution can solve the problem that players are occluded in partial views, which affects the recognition effect. Target linkages are captured in a state-space model [20], which makes use of model field particles that integrate appearance and motion models. Occupied players in football games can be tracked with this technology, which also works well for multitarget monitoring in other team sports characterized by similar physical characteristics and unexpected movements. Fani et al. [21] examine football movies' structure, which includes the use of parallel feature-fusion networks to merge local and panoramic  2 Wireless Communications and Mobile Computing characteristics to identify perspectives, and then provide an advanced Markov model to detect the playback status of shots. It is possible to identify transition effects using a threshold-based technique and Gaussian mixture models for event candidates [22]. Using an extreme learning machine classifier, you may identify event categories, mark critical events, and identify video playbacks in sports footage. In sports videos, event detection and video summary have been the center of user interest. According to Suzuki et al. [23], a deep extreme learning machine is used to assess the two football teams' preset strategies and then changes the tactics based on the relationship between the teams and their ball possession statistics. Tejero-de-Pablos et al. [24] built a rugby tactical analysis system that employs time series data with added spatial information as features, applies projective transformation to get image coordinates, detects players' location information, and increases the accuracy of the system's tactical detection. Wang et al. [25] proposed a temporal segmentation network, which also includes two networks of temporal flow and spatial flow. The difference between it and the twostream network is that the temporal flow network in the temporal segmentation network takes the superposition of continuous optical flow fields as input, instead of using a single frame or stacked frames and optical flow. After each video segment obtains its own prediction result, it needs to be fused in the later stage, and the fusion result is used as the final video prediction. Tran et al. [26] proposed that C3D is a good feature extractor, which converts 2D convolution and pooling into 3D structure and builds a 3D network. Carreira and Zisserman [27] propose I3D, which increases the dimension of time in all convolution kernels and pooling layers by expanding the 2D convolutional neural network model into 3D. Branson et al. [28] proposes a Pose Normalized CNN method, which uses a prototype to perform pose alignment operations on images. Fu et al. [29] proposed RA-CNN, which uses APN network to locate key local areas, and the recognition performance is further improved by the combination of classification network and APN network. The accelerometer and angular velocity data of the basket-ball player's hand were obtained by affixing the sensor device to the back of the player's hand during the jump shot [30]. Each stage of the jump shot is broken down into a different shooting stance, and the audio feedback reminder is utilized to guide the athletes in making the necessary adjustments. As a result, the athlete's jump shot posture is represented in the movement of his arms and legs. During the shooting process, only the hand's posture is analyzed, and no other body parts are taken into account. Athletes' heart rate, oxygen consumption, and acceleration were measured, evaluated, and compared to determine the physiological features of basketball players during exercise [31]. It proves that wearable devices are very helpful for the quantification of basketball, but there is no specific research on basketball quantification. Nguyen et al. [32] use acceleration sensor to construct a basketball posture recognition system, collect the lower limb data of basketball players, and complete the recognition of 8 kinds of movements in basketball.
Currently, training quality of athletes is evaluated based on their performance to various test standards, and coaches calculate their training performance manually. Sports data and motions of players are very difficult to be precisely captured in real time manually by the coaches. This research paper helps the coaches to automatically record an action recognition for basketball sports players. The proposed mechanism is based on ANN where training of network is carried out through basketball sports big data. Spatiotemporal information features are extracted from basketball sports training videos as input data for the proposed system. The ConvLSTM structure is used to extract the spatiotemporal information from video which is then encoded using Darknet network model. In the decoding stage, the AttLSTM structure is used to replace the ordinary LSTM. The above units are combined into the BSTARNet architecture to accurately recognize the actions in basketball sports training.

Method
This work designs BSTARNet, an action recognition method for basketball sports training. The method is based on 3 Wireless Communications and Mobile Computing artificial intelligence neural network and carries out network training through basketball sports big data, so as to realize high-performance basketball sports training action recognition.

Convolution Neural Network and Long Short-Term
Memory. Convolution neural network (CNN) is a network that simulates the hierarchical cognition of the visual cortex and consists of convolutional layers, pooling layers, fully connected layers, and classifiers. When CNN receives the input information data, lower-level convolutional layer will first identify and extract the primary graphic features, and the abstract fusion of several underlying features will form the features of the high-level convolutional layer. Convolutional layer is important constituent unit for entire network. When convolution kernel performs the convolution operation on the image, it only convolves with a part of the area pixels, that is, the local connection. The advantage of this connection method over full connection is that it reduces feature redundancy and thus reduces parameters. However, each convolutional layer has several convolution kernels, and the weight parameters of each convolution kernel are the same, that is, the weights are shared. The pooling layer is to downsample the feature map obtained by the convolution layer, which is to make the feature map smaller according to the specified rules but the depth does not change. Commonly used pooling operations include maximum pooling and mean pooling, which are used to reduce the amount of training parameters and improved the training and learning speed. The fully connected layer is to convert the feature map into the input required by the classifier and then perform classification and recognition to obtain the output result.
Long Short-Term Memory (LSTM) successfully solves the defects of traditional recurrent neural network. LSTM improves the internal structure of traditional recurrent neural network (RNN) and uses a series of gate structures to control the state of the unit, including input gate and forget gate as well as output gate. Input gate is utilized to control how much information of the previous unit needs to be written into the unit state, the forget gate is to selectively forget or discard some information, and the output gate is to decide how much information needs to be saved to the next hidden state. To put it another way, this is like having three control switches, one for long-term preservation, one for immediate state input, and one for whether to use long-term state as the output of current LSTM. Figure 1 is a diagram of the internal structure of LSTM.

ConvLSTM Unit.
Because of its unique internal structure, LSTM has the functions of association and memory, and it is good at dealing with timing problems and spatial information. However, the internal connection method of LSTM is fully connected. For 3D graphics data, spatial information is rich and each pixel has a strong correlation with   Figure 2 is a diagram of the internal structure of ConvLSTM, which is similar to LSTM unit.
The difference between the two structures can be clearly found. The internal structure of ConvLSTM only adds a convolution operation between input to state and state to state, and other structures remain unchanged. When receiving an externally provided image sequence input, ConvLSTM performs feature extraction on image information in both spatial and temporal dimensions. The spatial dimension is to extract the spatial position information of each frame of the sequence, and the time dimension is to extract the time series information between the frames before and after. This double extraction method ensures the integrity of the spatiotemporal features of the video sequence, and the features that are not separated in time as well as space can improve recognition performance of the system.

AttLSTM Unit.
The implementation of the deep learning attention mechanism is to retain the intermediate output results of encoder for input sequence and then assign different attention weights to different locations at the current moment. These weights are then weighted and summed with the intermediate output results, and the obtained result is used as the input of the LSTM at the next moment. This process is called a cycle. The number of loops depends on frame length of video sequence. The weight vector obtained in the last loop is weighted and summed with the output results obtained at the previous moment, and the obtained results are directly input into the classifier. In this paper, the unit composed of the attention mechanism and LSTM is called AttLSTM, which is composed of several attention blocks. Attention block is a new module that improves its internal structure operation based on LSTM network, that is, adding attention calculation. Figure 3 demonstrates the specific implementation process of the deep learning attention mechanism.
The dotted box represents the calculation flow chart of the attention block. As can be seen from the figure, the context vector obtained after the encoder and the hidden state of the previous moment are used as input. Where attention represents a calculation method, and the result of the operation is normalized by softmax to obtain the attention weight vector.

BSTARNet.
Most algorithms use the common encoderdecoder framework. An input sequence is learned using LSTM units, encoded into a vector representation and decoded using an LSTM unit, in the typical LSTM model. The performance of this model is not sufficient when the input sequence is long. For the most part, this is because, during the encoding process, the structure can only represent the input as a fixed-length vector. Once the sequence is too long, the previous information will be forgotten and lost, so in this paper, when the action recognition of basketball sports training video is performed, the input sequence of the system is long or short. Therefore, by improving the traditional encoder-decoder structure, the AttLSTM unit is added in the decoding stage. When processing the vector obtained in the encoding stage, this unit will deemphasize the heavy to avoid discarding important information in the decoding stage. In fact, this unit can also be added in the encoding stage at the same time. The function is to assign different weights to different location regions when extracting features. However, considering the calculation time and algorithm complexity, this unit is only added in the decoding stage.   In this work, the ConvLSTM unit is selected to replace the ordinary LSTM unit in the encoder part, which can extract spatial information features and time series features at the same time. In the decoder part, the AttLSTM unit is used to replace the ordinary LSTM unit, which can assign attention to the content vector obtained in the encoding stage and assign different weights to different positions. Then, weighted summation with the original encoding vector, after several learning updates, the feature vector used for classification decision is obtained, and the final classification decision is made by the softmax classifier. Figure 4 is the system structure diagram of this paper.
This work uses Darknet as the encoder network; it combines the advantages of VGGNet and NIN structure. When this structure was proposed, it was applied in the field of target recognition. Compared with several other classical target recognition algorithms, it showed a very superior recognition performance. Therefore, this paper attempts to apply this network to video human action recognition. This network uses a convolutional kernel of size 3 × 3, and a 1 × 1 convolutional layer is added between the two convolutional layers. After this is a maximum pooling layer, global pooling is used to compress feature map into a 1 × 1 pixel value, which is used as the input of the classifier for decision classification. Table 1 is the specific structure of the Darknet network model.
The ConvLSTM structure has dual depth in time and space, which can effectively learn abstract representations of spatiotemporal information simultaneously. It is the combination of CNN and LSTM, that is, the convolution operation is integrated into LSTM. This unit is used in the same way as CNN, by stacking ConvLSTM units to build a deep neural network to extract video spatiotemporal features. In this paper, the ordinary convolution layer in the Darknet model is replaced by ConvLSTM, and size of convolution kernel is still 3 × 3 and 1 × 1. The 1 × 1 CovnLSTM layer is used for feature cross-channel fusion to reduce feature redundancy. Global mean pooling is used to compress the feature map size to 1 × 1, which is convenient for the network to make the final decision classification. The original Darknet model adds a fully connected layer after global pooling. This paper only uses this network model in the encoder, so this layer is not needed. The number of filters is appropriately adjusted according to the actual research in this paper.
The network model is used in the encoder only. On this basis, this work combines the AttLSTM unit to build a behavior recognition network BSTARNet for basketball sports training. The pipeline of BSTARNet is illustrated in Figure 5.
The network input is a continuous image sequence extracted at equal intervals, and the ConvLSTM layer and maxpooling layer stacked behind are connected according to the improved Darknet network model. The last layer of AttLSTM is used for the decoder part, and it also replaces the fully connected layer of the original Darknet, because the vector calculated by the decoding of AttLSTM can be directly applied to the softmax classifier.  Figure 6: Comparison results of BSTARNet with LRCN [26], ALSTM [33], VideoLSTM [34], and CHAM [35] methods.

Experiment and Analysis
performed with state of the art methods. The compared methods include LRCN [26], ALSTM [33], VideoLSTM [34], and CHAM [35]; the experimental results are illustrated in Figure 6. AI has extensively been used for different problems and its evaluation in different filed, such as [36][37][38].
BSTARNet proposed in this work can achieve 89.5% mAP and 95.4% accuracy, which can be improved to varying degrees compared with other methods, which proves the superiority of this method.

ConvLSTM Experiment
Result. This work combines convolution and LSTM, thereby designing the ConvLSTM unit.
To verify effectiveness of this unit, performances without ConvLSTM and with ConvLSTM are compared, respectively, and the results are illustrated in Figure 7.
After using the ConvLSTM unit, the two performance indicators can be improved by 1.3% and 1.1%, respectively, which proves the feasibility of the ConvLSTM unit.

AttLSTM Experiment
Result. This work embeds the attention mechanism into the LSTM to construct the AttLSTM unit. To verify effectiveness of this unit, performances without the AttLSTM unit and when the AttLSTM unit is used are compared, respectively, and the experimental results are illustrated in Figure 8.

Wireless Communications and Mobile Computing
After using the AttLSTM unit, the two performance indicators can be improved by 1.7% and 1.5%, respectively, which proves the feasibility of the AttLSTM unit.

Darknet Experiment
Result. This work uses Darknet as the base network of the encoder, and in order to evaluate the feasibility of this network, it is compared with the VGG network and the INI network. The experimental results are illustrated in Figure 9.
As can be seen from the data in the figure, using the Darknet network as the basic network of the encoder can obtain the highest mAP and accuracy, which verifies the correctness of the choice in this work.

Video Frame Experiment
Result. This work takes basketball sports training videos as input. To verify the impact of different video frames on performance, mAP and accuracy under different frame numbers are compared, respectively. The experimental results are illustrated in Figure 10.
As the number of frames increases, mAP and accuracy first rise to the maximum value and then decrease. When the frames is set to 10, the best performance is obtained.   Table 3. After using the two-layer AttLSTM, the mAP and accuracy of the model can be improved to a certain extent. However, in terms of training time, the time consumption is greatly increased. Therefore, this work only uses a singlelayer AttLSTM.

Conclusion
In basketball training, the analysis of the players can visually display the performance of the players for the coach, formulate corresponding training plans, and improve the team's game performance. With the application of video analysis technology, the movements of basketball players in training can be analyzed, and the human action recognition technology can be introduced to provide players with accurate action analysis results. This work designs BSTARNet, an action recognition method for basketball sports training. The method is based on artificial intelligence neural network and carries out network training through basketball sports big data, so as to realize high-performance basketball sports training action recognition. Considering that the research object is basketball training videos, it is proposed that the extraction of spatial location features and time series information features are inseparable. The ConvLSTM unit combined with convolution loops is used to extract spatiotemporal features at the same time in the encoding stage. ConvLSTM can not only extract spatial location features but also retain the associative memory function of LSTM in time series problems. In the decoding stage, the AttLSTM unit combining the attention mechanism and LSTM is used to redistribute the weight of the feature vector according to certain rules, which enhances the relevance of time series information. The action recognition in this paper adopts the Darknet network model, and then considering that the research object of this paper is video sequences, the structure is improved, and the BSTARNet network model is proposed by using ConvLSTM instead of Conv to extract spatiotemporal features. Comprehensive experiments verify the effectiveness of this method in action recognition for basketball sports training.

Data Availability
The datasets used during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest
The author declares that he has no conflict of interest.