# E-Sports Competition Analysis Based on Intelligent Analysis System

Authors: Yao Lu; Hao Chen; Hongqiao Yan
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

To improve the analysis effect of e-sports competitions, this paper studies the intelligent analysis methods of e-sports, compares the advantages and disadvantages of various multi-classification methods, and innovatively designs a two-layer SVM classifier structure for four types of motor imagery EEG signals. Moreover, this paper uses the competition data set to test the classification accuracy of the designed double-layer SVM classifier structure and compares it with the DAG-SVM multi-classification method. The research results show that the e-sports competition analysis system based on the intelligent analysis system proposed in this paper has a good e-sports competition analysis effect, and has a good effect in e-sports competition prediction.


---

## Body

## 1. Introduction

With the rapid development of e-sports, the relevant e-sports talents are relatively scarce, and the lack of talents has also become a bottleneck in the development of e-sports. As the main places where talents gather, the development of e-sports in colleges and universities will help all sectors of society pay attention to healthy e-sports sports and promote its rational development. Moreover, it also helps to cultivate more esports talents and push the esports industry in the right direction.E-sports usually means using electronic equipment as a carrier to participate in games developed by various game developers, compete with each other, and achieve projects similar to traditional competitive competitions such as Go and badminton [1]. In this way, e-sports refers to the use of various electronic devices, such as mobile phones, iPads, PCs, etc., as sports equipment, to carry out mental, physical and other confrontation sports between players [2]. In this sport, if it is a team event, it can greatly cultivate team spirit, or if it is an individual event, it can continuously improve the athletes’ various willpower and coordination and control capabilities [3].Due to the youthfulness of e-sports itself and the roughness of the past, not many scholars have devoted their academic energy to it in the past, and the traditional Tour de France and other technologies such as game replay have no obvious effect on e-sports., so this area has not been studied by relevant scholars until recent years, and the general research methods used are still some primary research methods [4]. Some machine learning methods used in literature [5], whether it is a traditional machine learning algorithm such as k-nearest neighbor (KNN), or a currently popular neural network algorithm or even a deep neural network algorithm for deep learning, etc. used in related research analysis. So for the entire traditional machine learning algorithms, such as KNN, SVM, logistic regression, etc., are some algorithms that have been studied since the last century and have been developed so far, so I will not go into details here, but if you consider the If we think about the whole game winning and losing analysis model from a different angle, and convert it into a small dictionary, a special kind of natural language processing model (NLP) in the form of reassociation, we will find that some of today’s natural language processing methods have an impact on it. Adaptability [6]: the natural language recognition model was also proposed in the last century and has been continuously studied so far. Most of the models are modeled by using expert rules of grammatical features such as syntax and lexical features. Later, due to the rapid increase in the magnitude of the data to be processed, at the beginning of this century, people mostly adopted It is a supervised feature engineering method built on the above features to model [7]. For such large-scale data, a series of problems such as how to minimize the label training brought by supervision without using feature engineering are put in front of us [8]. In the subsequent development, due to the continuous application and addition of neural network technology with the new method of deep learning, it has played a great role in various fields. Especially in tasks such as speech analysis and image processing and recognition, which are traditionally difficult to deal with by machine learning, after using deep neural networks, the improvement is obvious, and each performance index exceeds traditional solutions. The provided scheme [9]. However, due to the particularity of the textual information itself, even for simple synonyms such as “Sunday” and “Sunday”, the difference in their performance is huge, unlike in the fields of speech analysis and image recognition, the signal data are similar, which means that we need more background information to deal with these problems [10].Literature [11] believes that there is a difference between the broad and narrow senses of e-sports: in a broad sense, e-sports is the implementation and development of traditional sports through e-sports; in a narrow sense, both the connotation and extension of e-sports should be Clearly, we can define e-sports. However, whether in a broad or narrow sense, it is necessary to determine that e-sports itself is a sport, and then we must look at problems from a developmental perspective, and we must also use a developmental perspective to look at the impact of e-sports on social development. Influence [12]: Ivanytska [13] believes that e-sports refers to sports that players perform by operating computers. That is, players need to operate a computer and rely on the software and hardware facilities of the computer to perform sports. And e-sports should have a unified set of rules to implement like sports in real life, but the environment in real life is moved to the competitive competition in virtual environment. E-sports has two basic attributes: e-sports and sports. “Electronics” refers to the core of science and technology and the support of computer hardware and software facilities, which is the equipment and venues required by traditional sports in real life [14]. And “sports” is the essence of all sports. No matter how e-sports is introduced, its core must still be confrontation and competition [15]. Literature [16] made four definitions for the concept of e-sports: first, e-sports must be carried out under the constraints of rules, which first emphasizes the competition and confrontation between people; second, the software and hardware facilities of e-sports are Like the various equipment venues of traditional sports, it is the basic carrier for carrying e-sports; third, e-sports can also promote exchanges between people; fourth, participating in e-sports can cultivate and develop participants’ various skills. This ability also greatly promotes the healthy growth of its physical and mental health.


## 2. Intelligent e-Sports Competition Analysis Algorithm

### 2.1. EEG Signal Processing Algorithm

When people are thinking about e-sports in a certain part of their body such as their hands and feet, or in their minds, the activation energy of a certain part of the cerebral cortex that controls the e-sports behavior of the body increases. This state is called Event-related Synchronization (ERS). However, the activation energy of the part of the cortex opposite this part of the cerebral cortex is reduced, and this state is called Event-related De-synchronization (ERD).Some research groups have used ERS/ERD, which imagines the e-sports behavior of a certain part of the body, in BCI. When we imagine gaming behaviors in a certain part of the body, there will be ERS/ERDs that activate energy states in the relevant part of the cerebral cortex that controls the gaming behaviors of the body. For example, when we imagine hand e-sports behavior, the activation energy ofμ and β in the same lateral cortical part that controls hand e-sports behavior is enhanced, which is the ERS state. The activation energies of μ and β in the opposite lateral cortical parts that control hand esports behavior are reduced, which is the ERD state.


### 2.2. Preprocessing Algorithms

EEG signals are very weak and prone to interference. To filter out noise and artifacts and improve the signal-to-noise ratio and spatial resolution, EEG signals must be preprocessed before feature extraction and pattern classification. At present, the preprocessing methods of EEG signal mainly include spatial filter and frequency domain filter.Common average reference method (CAR) for EEG signal preprocessing. First, the average of all the collected channel data is calculated, and then the calculated average is subtracted from each channel data, and finally, the new data after CAR filtering are obtained. The calculation formula of the CAR algorithm is as follows:(1)ViCAR=ViER−1n∑j=1nVjER.In the formula, ViCAR is the signal of the ith channel after CAR filtering, and ViER is the signal of the ith channel minus the reference electrode signal.The Laplacian algorithm processes EEG signals. First, the average number of several channels of data near each channel of data is selected, and then the calculated average number is subtracted from the data of this channel, and the new data after Laplacian filtering are obtained after processing the data of all channels. The Laplacian formula is as follows:(2)ViLAP=ViER−∑j∈SigijVjER.Among them, gij=1/dij/∑j∈Si1/dij,ViLAP is the Laplacian filtered signal of the original signal of the ith channel, ViER is the potential difference between the electrode of the ith channel and the reference electrode, and Si is the electrodes around the ith channel. Meanwhile, dij is the scalp surface distance between the i-th and j-th channels.In the actual calculation of Laplacian, each channel selects the adjacent 4 channels to calculate the average, and then the data of each channel is obtained by subtracting the corresponding average filtered data. The mathematical formula is as follows:(3)ViLAP=ViER−14∑j∈SiVjER.Among them,Si is the number of the four electrodes around the desired electrode.Frequency domain filtering methods include frequency domain bandpass filtering and notch filtering. The frequency domain filtering of EEG signal can filter out the power frequency signal of50Hz and reserve the specific frequency band 8−26Hz to extract the EEG signal related to motor imagery and improve the signal-to-noise ratio of the signal. Filters are mainly divided into IIR filters and FIR filters. The system function of the filter is:(4)Hz=AzBz=a0+a1z−1+a2z−2+…+aNz−N1+b1z−1+b2z−2+…+bMz−M.In the formula, when there isM≥1, the impulse response of the system is infinitely long, which is called IIR filter. When there is Bz=1, the response length of the system is N+1, which is called FIR filter.


### 2.3. Feature Extraction Algorithm

Feature extraction refers to extracting the information in the EEG signal that can best express human thinking tasks. The most different information between different thinking tasks can be extracted, and the classification accuracy can be significantly improved after training the classifier with such characteristic information. At present, the commonly used EEG signal feature extraction algorithms include time domain analysis method, frequency domain analysis method, time-frequency domain analysis method, and common spatial pattern.The power spectrum estimation of EEG signal is a frequency domain analysis method. It transforms the EEG signal in the time domain into the energy change of the EEG signal in the frequency domain with frequency. If the sampling valuexNn of the N points of the EEG signal Xn is set, and XNejω is obtained after Fourier transform, the power spectrum Pejω of Xn is estimated as:(5)P^ejω=1NXNω2.The main idea of the short-time Fourier transform is to use a sliding window functionWt to analyze the signal Xt , and then perform Fourier transform on the windowed signal:(6)STFTxt,Ω=∫−∞+∞xτwτ−te−jΩτdτ.In the formula,Ω is the angular frequency, and the window function Wt generally chooses the Hanning window.When the short-time Fourier transform is used to analyze the signal, the determination of the window function is very critical. We adjust the size of the window to adjust the resolution in time and frequency. We use a certain window to select the signal for Fourier transform, and then slide the window to select the next signal for the same analysis. Finally, the time-spectrogram will be obtained, and the power spectral density is:(7)Pt,Ω=STFTxΩ,t22π.In the process of analyzing the signal, the local analysis ability of the wavelet transform is very good, that is, the resolution of time and frequency is high. The main idea is to use the window function that can change at any time to analyze the detailed information of each scale of the signal. There is a higher frequency resolution in the low-frequency band, and a higher time resolution in the high-frequency band.If functionψt∈L2R satisfies:(8)∫Rψtdt=0.Then,ψt is called a basic wavelet.The above wavelet function is transformed by scaling and translation, that is, by scaling factor a and translation factorb, the transformed wavelet function is:(9)ψa,bt=a−1/2ψt−ba.In the formula, the scale factor a determines the frequency domain information in the wavelet transform, and the translation factorb determines the time domain information. The continuous wavelet transform of any function ft∈L2R is as follows:(10)WTfa,b=ft,ψa,bt=a−1/2∫−∞+∞ftψt−badt.If discrete wavelet transform is required,a and b need to be discretized. For example, if we set the scale factor a=2j and the translation factor b=2jk, the discrete wavelet transform is:(11)WTfa,b=2−j/2∫Rftψ2−jt−kdt.Mallat algorithm is a fast algorithm for wavelet decomposition and reconstruction proposed by Mallat in 1989. According to the Mallat algorithm, the signalft can be decomposed to obtain:(12)ft=AL+∑j=1LDj=AL+DL+DL−1+…+D1.In the formula,L is the number of decomposition layers, AL is the approximate component of the Lth layer, and Dj is the detail component at the j-th scale. We set the sampling frequency of the signal ft as fs, and the frequency of the signal can be divided into L+1 subbands, then the subbands corresponding to each component AL,DL,DL−1,⋯,D1 are:(13)0,fs2L+1,fs2L+1,fs2L,fs2L,fs2L−1,…,fs22,fs2.The corresponding wavelet coefficients of each layer arecAL,cDL,cDL−1,…,cD1 in turn. The Mallat tower decomposition is shown in Figure 1.Figure 1
L-layer decomposition of signalf(t).The EEG signal is formed by the superposition of many source signals, and CSP analyzes it according to the method of decomposing the source signals. We assume that the EEG signals collected when imagining event A and event B areXA and XB,XA B and XB are represented as:(14)XA=CACCSASC,XB=CBCCSBSC.In the formula,SA is the source signal caused by event A, SB is the source signal caused by event B, and SC is the source signal caused by event A and B together. Meanwhile, CA,CB,CC are the spatial patterns of the three types of source signals, respectively, and the idea of CSP is to estimate CASA and CBSB related to events A and B. If the spatial filters of events A and B obtained by CSP are FA and FB, for the input X, there is the following relationship:(15)CASA=FAXCBSB=FBX.When eventA is imagined, CASA relative to event A is greater than when event B is imagined. Meanwhile, when event B is imagined, CBSB relative to event B is greater than when event A is imagined. According to this principle, different imaginary events can be classified, so CSP converts the events to extract the source signals SA and SB related to the events.The procedure of the CSP algorithm will now be described. We setXA and XB to be the EEG signals when events A and B are imagined, then the normalized covariance matrices of XA and XB are:(16)RA=XAXATtraceXAXATRB=XBXBTtraceXBXBT.In the formula,XAT is the transpose of XA and traceXAXAT is the trace of XAXAT. The RA of multiple groups of XA is averaged to obtain RA¯, and the average of RB of multiple groups of XB is also averaged to obtain RB¯, and the mixed covariance matrix R is:(17)R=RA¯+RB¯.After the mixed covariance matrixR eigenvalues are decomposed, we get(18)R=UΣUT.In the formula,U is the eigenvector of the R matrix, and Σ is the eigenvalue matrix corresponding to the eigenvector of R. The whitening matrix P is constructed:(19)P=Σ−1/2UT.Then,RA¯ and RB¯ are whitened and transformed into:(20)SA=PRA¯PTSB=PRB¯PT.SA and SB are decomposed into eigenvalues to get(21)SA=UAΣAUATSB=UBΣBUBT.It is easy to know thatSA and SB have the following characteristics:(22)UA=UB=UΣA+ΣB=I.This shows that the sum of the elements corresponding to the diagonals ofΣA and ΣB is 1, the maximum value in ΣA of SA corresponds to the minimum value in ΣB of SB, and the maximum value in ΣB of SB corresponds to the minimum value in ΣA of SA. If the ΣA value of SA is sorted from large to small, and U is arranged accordingly, so that the ΣB value of SB is sorted from small to large. Therefore, it can be classified according to the difference between the first m and the last m values in the sorted ΣA and ΣB. Accordingly, the spatial filter matrix is designed:(23)SF=UTP.According to the sortedΣA and ΣB,U, they are also sorted accordingly, and then the first m rows and the last m rows of U are selected to form a new U′, and the spatial filter matrix is obtained:(24)SF′=U′TP.For the EEG signalXk, Zk=SF′Xk is used to obtain the projected EEG signal Zk. According to the m value, the line Zp is taken out from the projected EEG signal Zk to calculate the variance, and then the eigenvalues are obtained by the following calculation:(25)fp=lgvarZp∑i=12mvarZi.In the formula,var represents the variance, and there is p=1,2,…,2m. After processing by CSP algorithm, 2m-dimensional feature vector can be obtained for classification.


### 2.4. Support Vector Machines

The Support Vector Machine (SVM) classification method is very effective in pattern classification problems of small samples, nonlinear and high-dimensional data sets, and it can be applied to machine learning problems such as function fitting.When the sample data are linearly separable, the main goal of SVM is to find the classification hyperplane that can accurately separate the two types of sample data and has the largest classification interval in the sample space. As shown in Figure2, the red hollow circles and green small triangles in the figure represent the sample data of two different motor imagery tasks, respectively. H is the classification hyperplane of the two types of sample data, H1 and H2 are the classification boundaries made by the data points closest to H in the two types of sample data, and the distance between H1 and H2 is called the classification interval.Figure 2
Schematic diagram of linear time-divisible SVM classification.We set the sample asxi,yi,xi is the ith input sample, yi is the class label of the input sample xi, there is yi∈−1,+1. i=1,2,…,l,l is the number of input samples. The discriminant function is: fx=w⋅x+b,w is the weight vector, b is the classification threshold, then the classification hyperplane is w⋅x+b≤0, so that we have:(26)w⋅xi+b≥1,yi=1,w⋅xi+b≤1,yi=−1.That is, it merges into:(27)yiw⋅xi+b≥1.AfterfX is normalized, x satisfies fx≥1, and the nearest x to H satisfies fx=1, then the distance from x to H is:(28)d=fxw=1w.Therefore, the classification interval of the two types of sample data is2/w. If we want to maximize the classification interval, we want to minimize w. This can be transformed into a quadratic programming problem:(29)minw,b12w2.S.t. yix⋅w+b≥1The constructed Lagrangian function is:(30)Lw,b,α=12w2−∑i=1lαiyiw⋅xi+b−1.In the formula, the αi parameter is called the Lagrange multiplier. The Lagrangian function takes the partial derivatives of the w and b parameters respectively, and then the optimization problem can be transformed into a dual problem to solve:(31)max∑i=1lαi−12∑i=1l∑j=1lyiyjαiαjxi,xjs.t.∑i=1lyiαi≤0,αi≥0.According to this,α∗ is obtained as the optimal solution, and we then obtain:(32)w∗=∑i=1lyiαi∗xi,b∗=yj−∑i=1lyiαixi,xj.Parametersα∗,w∗ and b∗ satisfy αi∗yiw∗⋅xi+b∗−1=0,i=1,2,…,l. This formula shows that the interval is 1 x corresponds to α∗≠0, and other x corresponds to α∗=0. Therefore, w consists of ls≤l eigenvectors, and w is:(33)w=∑i=1lsyiαixi,α∗≠0.Finally, the available classification function is:(34)gx=sgnw∗⋅x+b∗=sgn∑i=1lαi∗yixi,x+b∗.In the formula,sgn⋅ is the sign function.When the sample data are linearly inseparable, the loose variableξi is introduced, and the constraints are transformed into:(35)yiw⋅xi+b≥1−ξi,ξi≥0,i=1,2,…,l.The optimal problem is transformed into:(36)min12w2+C∑i=1lξis.t.yiw⋅xi+b≥1−ξi.In the formula, C is called the penalty parameter that controls the number of misclassified samples.The constructed Lagrangian function is:(37)Lw,b,ξ,α=12w2−∑i=1lαiyiw⋅xi+b−1+ξi+C2∑i=1lξi.The Lagrangian function is solved and transformed into the solution dual problem:(38)max∑i=1lαi−12∑i=1l∑j=1lyiyjαiαjxi,xjs.t.∑i=1lyiαi=0,0≤αi≤C.Nonlinear sample data are classified by using a nonlinear SVM. The most important method of SVM classification is to use the kernel function to map the sample data to a new high-dimensional feature space F, and use linear SVM for classification inF. We set ϕx as the nonlinear mapping from the input sample data space X to the new feature space F, then the classification hyperplane transformation in the nonlinear case is:(39)w⋅ϕx+b=0.The decision function is:(40)fx=sgnw⋅ϕx+b.Since it involves inner product operations in SVM, such asxi,xj and ϕxi,ϕxj, the concept of kernel function is introduced. We set K as a kernel function, then for all xi,xj∈X, Kxi,xj=ϕxi⋅ϕxj is satisfied.The kernel functions commonly used in SVM classification are as follows:Linear kernel function:Kxi,xj=xiTxjPolynomial kernel function:Kxi,xj=xiTxj+1q,q>0Radial basis kernel function:Kxi,xj=exp−xi−xj2/σ2Sigmoid kernel function:Kxi,xj=tanhβxiTxj+γ


### 2.5. Selection of SVM Kernel Function and Parameters

The SVM kernel function mainly maps the input sample data into a high-dimensional feature space. When different SVM kernel functions are selected, different classification hyperplanes will be generated, and when several kernel functions are used for the same sample, it will be found that the classification effects are different. Therefore, it is critical to use a better SVM kernel function. Among them, the radial basis kernel function (RBF) has a wide range of applications in the feature classification of EEG signals, regardless of the sample size and dimension, the RBF kernel function is applicable. Because the RBF kernel function has the advantages of simple calculation and fast training speed, this paper chooses the SVM classifier with RBF as the kernel function to classify the EEG signals.If using RBF as the kernel function for classification, two parameters need to be optimized, namely the penalty parameter C and the RBF kernel parameter. When looking for the optimal (C, g) parameter pair, a combination of cross-validation (K-fold cross-validation, K-CV) and grid search is generally used. First, the parameters C and g take values within a certain range. When the parameter pairs (C, g) is selected, the K-CV method is used on the training data set to obtain the classification accuracy of the training data set. After that, the next set of parameter pairs (C, g) are selected for testing, and the test will not end until all parameter pairs (C, g) have been determined. Finally, the group (C, g) with the highest classification accuracy of the training data set is selected as the optimal parameter. If the highest classification accuracy rate in the training data set corresponds to multiple parameter pairs (C, g), the group (C, g) with the smallest C parameter is selected. If the selected minimum C parameter has multipleg parameters, the first group (C, g) is selected as the optimal parameter. However, if the selected C parameter is too large, it is easy to generate an over-learning state. Therefore, among the multiple parameter pairs (C, g) corresponding to the highest classification accuracy rate, the group with the smaller penalty parameter C should be selected as the optimal parameter.This paper uses the grid parameter optimization function SVMcgForClass in the libsvm-mat-2.89-3 [FarutoUltimate3.0] toolbox. The results of selecting the optimal SVM parameter pair (C, g) using the K-CV method and grid search method are shown in Figures3 and 4, where K = 5. It can be seen from the figure that the optimal SVM parameter pair selected by the K-CV method and the grid search method for the data of the subjects is C = 0.035856 and g = 1.75326.Figure 3
Result diagram of optimal parameter selection (3D view).Figure 4
Result diagram of optimal parameter selection (contour map).SVM is a two-class classifier. When classifying multi-class data, there are mainly the following two classification methods. 1. It expands the original two-class optimization problem so that it can find all multi-class classification functions at the same time, and complete multi-class classification at one time in the classification process.The original question can be rewritten as:(41)min12∑m=1kwm2+C∑i=1l∑m≠yiξims.t.wi⋅xi+bi≥wm⋅xi+bm+2−ξim,ξim≥0.In the formula, i=1,2,⋯,l,l is the number of samples, and m=1,2,…k,k is the number of categories. The decision function fx=maxiwi⋅x+bi can be obtained, and the discriminant result is the ith class.This paper uses a combination of multiple two-class SVM classifiers to design a multi-class classification method, mainly including:


#### 2.5.1. OVR-SVM

When CSP extracts the EEG signal features of four types of motor imagery, one of the features is One-Versus-Rest CSP (OVR-CSP). After extracting four types of EEG signal features by this method, four SVMs are used to classify them respectively. If only one +1 appears in the classification results of the four SVM classifiers, the class corresponding to the classifier is the input signal class. This multi-class classifier structure designed above is called OVR-SVM, as shown in Figure5.Figure 5
The structure of the OVR-SVM classifier.


#### 2.5.2. OVO-SVM

Another method for feature extraction of four types of motor imagery EEG signals using the CSP algorithm is the One-Versus-One CSP (OVO-CSP) method. After extracting 4 types of EEG signal features in this way, 6 SVM classifications are used, and then the number of votes is counted to determine the final recognition output. The above classification method is called OVO-SVM, as shown in Figure6.Figure 6
The structure of the OVO-SVM classifier.


#### 2.5.3. DAY-SVM

DAG-SVM is a multi-class classifier structure designed based on the directed acyclic graph DAG proposed by Platt, mainly to solve the problem of misclassification and rejection of the OVO-SVM classifier structure. DAG-SVM is simple and easy to implement, and the test speed is fast. The principle of DAG-SVM for 4 categories is shown in Figure7. However, the DAG-SVM classifier structure has the defect of error accumulation. If one of the classifiers is wrongly classified, it will affect the subsequent classification and make the final classification result wrong.Figure 7
DAG-SVM schematic diagram.


## 2.1. EEG Signal Processing Algorithm

When people are thinking about e-sports in a certain part of their body such as their hands and feet, or in their minds, the activation energy of a certain part of the cerebral cortex that controls the e-sports behavior of the body increases. This state is called Event-related Synchronization (ERS). However, the activation energy of the part of the cortex opposite this part of the cerebral cortex is reduced, and this state is called Event-related De-synchronization (ERD).Some research groups have used ERS/ERD, which imagines the e-sports behavior of a certain part of the body, in BCI. When we imagine gaming behaviors in a certain part of the body, there will be ERS/ERDs that activate energy states in the relevant part of the cerebral cortex that controls the gaming behaviors of the body. For example, when we imagine hand e-sports behavior, the activation energy ofμ and β in the same lateral cortical part that controls hand e-sports behavior is enhanced, which is the ERS state. The activation energies of μ and β in the opposite lateral cortical parts that control hand esports behavior are reduced, which is the ERD state.


## 2.2. Preprocessing Algorithms

EEG signals are very weak and prone to interference. To filter out noise and artifacts and improve the signal-to-noise ratio and spatial resolution, EEG signals must be preprocessed before feature extraction and pattern classification. At present, the preprocessing methods of EEG signal mainly include spatial filter and frequency domain filter.Common average reference method (CAR) for EEG signal preprocessing. First, the average of all the collected channel data is calculated, and then the calculated average is subtracted from each channel data, and finally, the new data after CAR filtering are obtained. The calculation formula of the CAR algorithm is as follows:(1)ViCAR=ViER−1n∑j=1nVjER.In the formula, ViCAR is the signal of the ith channel after CAR filtering, and ViER is the signal of the ith channel minus the reference electrode signal.The Laplacian algorithm processes EEG signals. First, the average number of several channels of data near each channel of data is selected, and then the calculated average number is subtracted from the data of this channel, and the new data after Laplacian filtering are obtained after processing the data of all channels. The Laplacian formula is as follows:(2)ViLAP=ViER−∑j∈SigijVjER.Among them, gij=1/dij/∑j∈Si1/dij,ViLAP is the Laplacian filtered signal of the original signal of the ith channel, ViER is the potential difference between the electrode of the ith channel and the reference electrode, and Si is the electrodes around the ith channel. Meanwhile, dij is the scalp surface distance between the i-th and j-th channels.In the actual calculation of Laplacian, each channel selects the adjacent 4 channels to calculate the average, and then the data of each channel is obtained by subtracting the corresponding average filtered data. The mathematical formula is as follows:(3)ViLAP=ViER−14∑j∈SiVjER.Among them,Si is the number of the four electrodes around the desired electrode.Frequency domain filtering methods include frequency domain bandpass filtering and notch filtering. The frequency domain filtering of EEG signal can filter out the power frequency signal of50Hz and reserve the specific frequency band 8−26Hz to extract the EEG signal related to motor imagery and improve the signal-to-noise ratio of the signal. Filters are mainly divided into IIR filters and FIR filters. The system function of the filter is:(4)Hz=AzBz=a0+a1z−1+a2z−2+…+aNz−N1+b1z−1+b2z−2+…+bMz−M.In the formula, when there isM≥1, the impulse response of the system is infinitely long, which is called IIR filter. When there is Bz=1, the response length of the system is N+1, which is called FIR filter.


## 2.3. Feature Extraction Algorithm

Feature extraction refers to extracting the information in the EEG signal that can best express human thinking tasks. The most different information between different thinking tasks can be extracted, and the classification accuracy can be significantly improved after training the classifier with such characteristic information. At present, the commonly used EEG signal feature extraction algorithms include time domain analysis method, frequency domain analysis method, time-frequency domain analysis method, and common spatial pattern.The power spectrum estimation of EEG signal is a frequency domain analysis method. It transforms the EEG signal in the time domain into the energy change of the EEG signal in the frequency domain with frequency. If the sampling valuexNn of the N points of the EEG signal Xn is set, and XNejω is obtained after Fourier transform, the power spectrum Pejω of Xn is estimated as:(5)P^ejω=1NXNω2.The main idea of the short-time Fourier transform is to use a sliding window functionWt to analyze the signal Xt , and then perform Fourier transform on the windowed signal:(6)STFTxt,Ω=∫−∞+∞xτwτ−te−jΩτdτ.In the formula,Ω is the angular frequency, and the window function Wt generally chooses the Hanning window.When the short-time Fourier transform is used to analyze the signal, the determination of the window function is very critical. We adjust the size of the window to adjust the resolution in time and frequency. We use a certain window to select the signal for Fourier transform, and then slide the window to select the next signal for the same analysis. Finally, the time-spectrogram will be obtained, and the power spectral density is:(7)Pt,Ω=STFTxΩ,t22π.In the process of analyzing the signal, the local analysis ability of the wavelet transform is very good, that is, the resolution of time and frequency is high. The main idea is to use the window function that can change at any time to analyze the detailed information of each scale of the signal. There is a higher frequency resolution in the low-frequency band, and a higher time resolution in the high-frequency band.If functionψt∈L2R satisfies:(8)∫Rψtdt=0.Then,ψt is called a basic wavelet.The above wavelet function is transformed by scaling and translation, that is, by scaling factor a and translation factorb, the transformed wavelet function is:(9)ψa,bt=a−1/2ψt−ba.In the formula, the scale factor a determines the frequency domain information in the wavelet transform, and the translation factorb determines the time domain information. The continuous wavelet transform of any function ft∈L2R is as follows:(10)WTfa,b=ft,ψa,bt=a−1/2∫−∞+∞ftψt−badt.If discrete wavelet transform is required,a and b need to be discretized. For example, if we set the scale factor a=2j and the translation factor b=2jk, the discrete wavelet transform is:(11)WTfa,b=2−j/2∫Rftψ2−jt−kdt.Mallat algorithm is a fast algorithm for wavelet decomposition and reconstruction proposed by Mallat in 1989. According to the Mallat algorithm, the signalft can be decomposed to obtain:(12)ft=AL+∑j=1LDj=AL+DL+DL−1+…+D1.In the formula,L is the number of decomposition layers, AL is the approximate component of the Lth layer, and Dj is the detail component at the j-th scale. We set the sampling frequency of the signal ft as fs, and the frequency of the signal can be divided into L+1 subbands, then the subbands corresponding to each component AL,DL,DL−1,⋯,D1 are:(13)0,fs2L+1,fs2L+1,fs2L,fs2L,fs2L−1,…,fs22,fs2.The corresponding wavelet coefficients of each layer arecAL,cDL,cDL−1,…,cD1 in turn. The Mallat tower decomposition is shown in Figure 1.Figure 1
L-layer decomposition of signalf(t).The EEG signal is formed by the superposition of many source signals, and CSP analyzes it according to the method of decomposing the source signals. We assume that the EEG signals collected when imagining event A and event B areXA and XB,XA B and XB are represented as:(14)XA=CACCSASC,XB=CBCCSBSC.In the formula,SA is the source signal caused by event A, SB is the source signal caused by event B, and SC is the source signal caused by event A and B together. Meanwhile, CA,CB,CC are the spatial patterns of the three types of source signals, respectively, and the idea of CSP is to estimate CASA and CBSB related to events A and B. If the spatial filters of events A and B obtained by CSP are FA and FB, for the input X, there is the following relationship:(15)CASA=FAXCBSB=FBX.When eventA is imagined, CASA relative to event A is greater than when event B is imagined. Meanwhile, when event B is imagined, CBSB relative to event B is greater than when event A is imagined. According to this principle, different imaginary events can be classified, so CSP converts the events to extract the source signals SA and SB related to the events.The procedure of the CSP algorithm will now be described. We setXA and XB to be the EEG signals when events A and B are imagined, then the normalized covariance matrices of XA and XB are:(16)RA=XAXATtraceXAXATRB=XBXBTtraceXBXBT.In the formula,XAT is the transpose of XA and traceXAXAT is the trace of XAXAT. The RA of multiple groups of XA is averaged to obtain RA¯, and the average of RB of multiple groups of XB is also averaged to obtain RB¯, and the mixed covariance matrix R is:(17)R=RA¯+RB¯.After the mixed covariance matrixR eigenvalues are decomposed, we get(18)R=UΣUT.In the formula,U is the eigenvector of the R matrix, and Σ is the eigenvalue matrix corresponding to the eigenvector of R. The whitening matrix P is constructed:(19)P=Σ−1/2UT.Then,RA¯ and RB¯ are whitened and transformed into:(20)SA=PRA¯PTSB=PRB¯PT.SA and SB are decomposed into eigenvalues to get(21)SA=UAΣAUATSB=UBΣBUBT.It is easy to know thatSA and SB have the following characteristics:(22)UA=UB=UΣA+ΣB=I.This shows that the sum of the elements corresponding to the diagonals ofΣA and ΣB is 1, the maximum value in ΣA of SA corresponds to the minimum value in ΣB of SB, and the maximum value in ΣB of SB corresponds to the minimum value in ΣA of SA. If the ΣA value of SA is sorted from large to small, and U is arranged accordingly, so that the ΣB value of SB is sorted from small to large. Therefore, it can be classified according to the difference between the first m and the last m values in the sorted ΣA and ΣB. Accordingly, the spatial filter matrix is designed:(23)SF=UTP.According to the sortedΣA and ΣB,U, they are also sorted accordingly, and then the first m rows and the last m rows of U are selected to form a new U′, and the spatial filter matrix is obtained:(24)SF′=U′TP.For the EEG signalXk, Zk=SF′Xk is used to obtain the projected EEG signal Zk. According to the m value, the line Zp is taken out from the projected EEG signal Zk to calculate the variance, and then the eigenvalues are obtained by the following calculation:(25)fp=lgvarZp∑i=12mvarZi.In the formula,var represents the variance, and there is p=1,2,…,2m. After processing by CSP algorithm, 2m-dimensional feature vector can be obtained for classification.


## 2.4. Support Vector Machines

The Support Vector Machine (SVM) classification method is very effective in pattern classification problems of small samples, nonlinear and high-dimensional data sets, and it can be applied to machine learning problems such as function fitting.When the sample data are linearly separable, the main goal of SVM is to find the classification hyperplane that can accurately separate the two types of sample data and has the largest classification interval in the sample space. As shown in Figure2, the red hollow circles and green small triangles in the figure represent the sample data of two different motor imagery tasks, respectively. H is the classification hyperplane of the two types of sample data, H1 and H2 are the classification boundaries made by the data points closest to H in the two types of sample data, and the distance between H1 and H2 is called the classification interval.Figure 2
Schematic diagram of linear time-divisible SVM classification.We set the sample asxi,yi,xi is the ith input sample, yi is the class label of the input sample xi, there is yi∈−1,+1. i=1,2,…,l,l is the number of input samples. The discriminant function is: fx=w⋅x+b,w is the weight vector, b is the classification threshold, then the classification hyperplane is w⋅x+b≤0, so that we have:(26)w⋅xi+b≥1,yi=1,w⋅xi+b≤1,yi=−1.That is, it merges into:(27)yiw⋅xi+b≥1.AfterfX is normalized, x satisfies fx≥1, and the nearest x to H satisfies fx=1, then the distance from x to H is:(28)d=fxw=1w.Therefore, the classification interval of the two types of sample data is2/w. If we want to maximize the classification interval, we want to minimize w. This can be transformed into a quadratic programming problem:(29)minw,b12w2.S.t. yix⋅w+b≥1The constructed Lagrangian function is:(30)Lw,b,α=12w2−∑i=1lαiyiw⋅xi+b−1.In the formula, the αi parameter is called the Lagrange multiplier. The Lagrangian function takes the partial derivatives of the w and b parameters respectively, and then the optimization problem can be transformed into a dual problem to solve:(31)max∑i=1lαi−12∑i=1l∑j=1lyiyjαiαjxi,xjs.t.∑i=1lyiαi≤0,αi≥0.According to this,α∗ is obtained as the optimal solution, and we then obtain:(32)w∗=∑i=1lyiαi∗xi,b∗=yj−∑i=1lyiαixi,xj.Parametersα∗,w∗ and b∗ satisfy αi∗yiw∗⋅xi+b∗−1=0,i=1,2,…,l. This formula shows that the interval is 1 x corresponds to α∗≠0, and other x corresponds to α∗=0. Therefore, w consists of ls≤l eigenvectors, and w is:(33)w=∑i=1lsyiαixi,α∗≠0.Finally, the available classification function is:(34)gx=sgnw∗⋅x+b∗=sgn∑i=1lαi∗yixi,x+b∗.In the formula,sgn⋅ is the sign function.When the sample data are linearly inseparable, the loose variableξi is introduced, and the constraints are transformed into:(35)yiw⋅xi+b≥1−ξi,ξi≥0,i=1,2,…,l.The optimal problem is transformed into:(36)min12w2+C∑i=1lξis.t.yiw⋅xi+b≥1−ξi.In the formula, C is called the penalty parameter that controls the number of misclassified samples.The constructed Lagrangian function is:(37)Lw,b,ξ,α=12w2−∑i=1lαiyiw⋅xi+b−1+ξi+C2∑i=1lξi.The Lagrangian function is solved and transformed into the solution dual problem:(38)max∑i=1lαi−12∑i=1l∑j=1lyiyjαiαjxi,xjs.t.∑i=1lyiαi=0,0≤αi≤C.Nonlinear sample data are classified by using a nonlinear SVM. The most important method of SVM classification is to use the kernel function to map the sample data to a new high-dimensional feature space F, and use linear SVM for classification inF. We set ϕx as the nonlinear mapping from the input sample data space X to the new feature space F, then the classification hyperplane transformation in the nonlinear case is:(39)w⋅ϕx+b=0.The decision function is:(40)fx=sgnw⋅ϕx+b.Since it involves inner product operations in SVM, such asxi,xj and ϕxi,ϕxj, the concept of kernel function is introduced. We set K as a kernel function, then for all xi,xj∈X, Kxi,xj=ϕxi⋅ϕxj is satisfied.The kernel functions commonly used in SVM classification are as follows:Linear kernel function:Kxi,xj=xiTxjPolynomial kernel function:Kxi,xj=xiTxj+1q,q>0Radial basis kernel function:Kxi,xj=exp−xi−xj2/σ2Sigmoid kernel function:Kxi,xj=tanhβxiTxj+γ


## 2.5. Selection of SVM Kernel Function and Parameters

The SVM kernel function mainly maps the input sample data into a high-dimensional feature space. When different SVM kernel functions are selected, different classification hyperplanes will be generated, and when several kernel functions are used for the same sample, it will be found that the classification effects are different. Therefore, it is critical to use a better SVM kernel function. Among them, the radial basis kernel function (RBF) has a wide range of applications in the feature classification of EEG signals, regardless of the sample size and dimension, the RBF kernel function is applicable. Because the RBF kernel function has the advantages of simple calculation and fast training speed, this paper chooses the SVM classifier with RBF as the kernel function to classify the EEG signals.If using RBF as the kernel function for classification, two parameters need to be optimized, namely the penalty parameter C and the RBF kernel parameter. When looking for the optimal (C, g) parameter pair, a combination of cross-validation (K-fold cross-validation, K-CV) and grid search is generally used. First, the parameters C and g take values within a certain range. When the parameter pairs (C, g) is selected, the K-CV method is used on the training data set to obtain the classification accuracy of the training data set. After that, the next set of parameter pairs (C, g) are selected for testing, and the test will not end until all parameter pairs (C, g) have been determined. Finally, the group (C, g) with the highest classification accuracy of the training data set is selected as the optimal parameter. If the highest classification accuracy rate in the training data set corresponds to multiple parameter pairs (C, g), the group (C, g) with the smallest C parameter is selected. If the selected minimum C parameter has multipleg parameters, the first group (C, g) is selected as the optimal parameter. However, if the selected C parameter is too large, it is easy to generate an over-learning state. Therefore, among the multiple parameter pairs (C, g) corresponding to the highest classification accuracy rate, the group with the smaller penalty parameter C should be selected as the optimal parameter.This paper uses the grid parameter optimization function SVMcgForClass in the libsvm-mat-2.89-3 [FarutoUltimate3.0] toolbox. The results of selecting the optimal SVM parameter pair (C, g) using the K-CV method and grid search method are shown in Figures3 and 4, where K = 5. It can be seen from the figure that the optimal SVM parameter pair selected by the K-CV method and the grid search method for the data of the subjects is C = 0.035856 and g = 1.75326.Figure 3
Result diagram of optimal parameter selection (3D view).Figure 4
Result diagram of optimal parameter selection (contour map).SVM is a two-class classifier. When classifying multi-class data, there are mainly the following two classification methods. 1. It expands the original two-class optimization problem so that it can find all multi-class classification functions at the same time, and complete multi-class classification at one time in the classification process.The original question can be rewritten as:(41)min12∑m=1kwm2+C∑i=1l∑m≠yiξims.t.wi⋅xi+bi≥wm⋅xi+bm+2−ξim,ξim≥0.In the formula, i=1,2,⋯,l,l is the number of samples, and m=1,2,…k,k is the number of categories. The decision function fx=maxiwi⋅x+bi can be obtained, and the discriminant result is the ith class.This paper uses a combination of multiple two-class SVM classifiers to design a multi-class classification method, mainly including:


### 2.5.1. OVR-SVM

When CSP extracts the EEG signal features of four types of motor imagery, one of the features is One-Versus-Rest CSP (OVR-CSP). After extracting four types of EEG signal features by this method, four SVMs are used to classify them respectively. If only one +1 appears in the classification results of the four SVM classifiers, the class corresponding to the classifier is the input signal class. This multi-class classifier structure designed above is called OVR-SVM, as shown in Figure5.Figure 5
The structure of the OVR-SVM classifier.


### 2.5.2. OVO-SVM

Another method for feature extraction of four types of motor imagery EEG signals using the CSP algorithm is the One-Versus-One CSP (OVO-CSP) method. After extracting 4 types of EEG signal features in this way, 6 SVM classifications are used, and then the number of votes is counted to determine the final recognition output. The above classification method is called OVO-SVM, as shown in Figure6.Figure 6
The structure of the OVO-SVM classifier.


### 2.5.3. DAY-SVM

DAG-SVM is a multi-class classifier structure designed based on the directed acyclic graph DAG proposed by Platt, mainly to solve the problem of misclassification and rejection of the OVO-SVM classifier structure. DAG-SVM is simple and easy to implement, and the test speed is fast. The principle of DAG-SVM for 4 categories is shown in Figure7. However, the DAG-SVM classifier structure has the defect of error accumulation. If one of the classifiers is wrongly classified, it will affect the subsequent classification and make the final classification result wrong.Figure 7
DAG-SVM schematic diagram.


## 2.5.1. OVR-SVM

When CSP extracts the EEG signal features of four types of motor imagery, one of the features is One-Versus-Rest CSP (OVR-CSP). After extracting four types of EEG signal features by this method, four SVMs are used to classify them respectively. If only one +1 appears in the classification results of the four SVM classifiers, the class corresponding to the classifier is the input signal class. This multi-class classifier structure designed above is called OVR-SVM, as shown in Figure5.Figure 5
The structure of the OVR-SVM classifier.


## 2.5.2. OVO-SVM

Another method for feature extraction of four types of motor imagery EEG signals using the CSP algorithm is the One-Versus-One CSP (OVO-CSP) method. After extracting 4 types of EEG signal features in this way, 6 SVM classifications are used, and then the number of votes is counted to determine the final recognition output. The above classification method is called OVO-SVM, as shown in Figure6.Figure 6
The structure of the OVO-SVM classifier.


## 2.5.3. DAY-SVM

DAG-SVM is a multi-class classifier structure designed based on the directed acyclic graph DAG proposed by Platt, mainly to solve the problem of misclassification and rejection of the OVO-SVM classifier structure. DAG-SVM is simple and easy to implement, and the test speed is fast. The principle of DAG-SVM for 4 categories is shown in Figure7. However, the DAG-SVM classifier structure has the defect of error accumulation. If one of the classifiers is wrongly classified, it will affect the subsequent classification and make the final classification result wrong.Figure 7
DAG-SVM schematic diagram.


## 3. E-Sports Competition Analysis Based on Intelligent Analysis System

To better determine which classifier to use to build the final model, the modules operate independently and work in a variety of ways, so the system is more flexible. Figure8 shows the detailed modules of each module of the entire e-sports competition analysis system working with each other, and attaches the relevant flow chart.Figure 8
E-sports competition analysis system.The competition is observed and analyzed to gain important information related to the science of training. This information pertains to psychological and physical characteristics that limit athletic ability, technical and tactical abilities, team leadership, and the development of formations in team games such as soccer. Figure9 shows a schematic diagram of the game observation steps of the system.Figure 9
Schematic diagram of the game observation steps of the system.Based on the above research, the effect of the e-sports competition analysis system proposed in this paper is verified, the data analysis effect of e-sports competition is counted, its prediction effect is studied, and the results shown in Tables1 and 2 are obtained.Table 1
The analysis effect of e-sports competition analysis system based on intelligent analysis system on e-sports competition data.
NumberAnalysis of e-sports competitions180.39275.32376.35477.87583.03685.44775.29885.99973.831085.221183.861276.691384.501482.101571.141684.511778.001878.481981.482080.962174.592284.102380.162472.612574.182673.922775.062874.812977.603086.58Table 2
The prediction effect of the e-sports competition analysis system based on the intelligent analysis system on the e-sports competition.
NumberE-sports predictions163.56262.63354.29455.14554.28657.00753.98858.10956.371057.321157.251260.091357.571459.271555.501654.671754.241854.121963.882057.172158.922263.122357.802456.322560.522653.462754.412854.392953.343054.06From the above research, it can be seen that the e-sports competition analysis system based on the intelligent analysis system proposed in this paper has a good e-sports competition analysis effect, and has a good effect in e-sports competition prediction.


## 4. Conclusion

As a newly developed sport, e-sports integrates culture, technology, intelligence, and sports. Healthy e-sports is fundamentally different from online games. In essence, it regards electronic equipment and electronic technology as sports equipment to compete against each other in the specified time according to the unified competition standard in the virtual information technology environment it has set up. Moreover, e-sports is not only an intellectual exercise, but also a form of exercise that integrates the mind and body. It can not only promote the improvement of participants’ responsiveness, thinking ability, teamwork, and stress resistance, but also better realize the ideals and values of participants. The research results show that the e-sports competition analysis system based on the intelligent analysis system proposed in this paper has a good e-sports competition analysis effect, and has a good effect in e-sports competition prediction.



---

*Source: 4855550-2022-07-08.xml*