# Exercise Behavior Prediction and Injury Assessment Based on Swarm Intelligence Algorithm

Authors: Ding Ding; Jianqiong Jiang; Changya Liu
Journal: Discrete Dynamics in Nature and Society
 (2021)

---

## Abstract

The biggest view of the whole world on science and technology and sports is that science and technology and sports both represent national strength. At present, the integration of sports and science and technology has not reached a certain height, especially in the prediction of sports behavior and injury assessment, and the investment in science and technology is still lacking. This leads to a high number of injuries caused by sports every year. However, swarm intelligence algorithm has made few breakthrough achievements in the past few years, and the combination of sports behavior and swarm intelligence algorithm can just solve this problem. It is very important to choose the algorithm for predicting and assessing sports behavior. We should choose an efficient algorithm with high stability, high convergence speed, and optimization ability. In this paper, the IPSGWO algorithm is proposed to realize this application. IPSGWO algorithm is based on the GWO algorithm, with appropriate strategies and ideas, to maximize the improvement. In this paper, the convergence curve of PSO, GWO, and IPSGWO is tested to determine whether the IPSGWO algorithm has more stable and higher performance, and the simulation experiment is used to determine whether the IPSGWO algorithm is suitable for prediction and injury assessment compared with the other two. From the experimental results, the IPSGWO algorithm does have higher performance; because of this, it is more accurate for prediction and injury assessment.


---

## Body

## 1. Introduction

In contemporary society, with the rapid development of science and technology, people began to pay attention to sports. The national sports policy has gradually deepened, from the initial social sports to today’s science and technology sports, and the state has supported it. At the same time, in order to further improve sports, the prediction of sports behavior and injury assessment has also attracted much attention. The addition of science and technology is undoubtedly a good medicine, and the combination of sports behavior and computer intelligent algorithm is undoubtedly in line with the development trend of contemporary society and even the world. With the addition of intelligent algorithm, sports behavior is more predictable, and the harm it brings can be predicted and avoided in advance to a certain extent, which makes sports more stable and safe, and more children and the elderly can participate in sports activities with confidence and feel the changes brought by science and technology.Swarm intelligence [1] is developing rapidly nowadays, and it is involved in various fields, such as electronic media, company management, and other related fields. Two unrelated fields can be opened to traffic with swarm intelligence as a bridge. Researchers have also established and implemented important standards for the operation of swarm intelligence, so as to have further research on swarm intelligence. The research of swarm intelligence originated from insects [2], and the behavior characteristics of social insects that have survived for millions of years are not centralized distribution function and self-organization ability. Uncomplicated creatures can also complete complex tasks, and they can generate great abilities only by interacting with each other. Although social insects are not half as intelligent as humans [3], their self-organized work is to consciously accomplish one or more tasks by multiple individuals. However, despite this, they always have very effective ways to deal with all kinds of problems they encounter, and they can quickly adapt to the changing environment around them. After decades of research, scientists have put forward a rigorous mathematical model for this phenomenon of swarm intelligence, which has been applied to business management. Ants can walk the shortest way to find food, and this discovery has been used in telecommunication network communication and airline transportation of goods. Another kind of insect, the bee, performs very highly on activities, performing the most important tasks by comparison. And, this is also applied to truck painting system. Swarm intelligence is mostly used in the direction of artificial intelligence, and its collective behavior is not concentrated and organized in both artificial and natural aspects [4]. Uncomplicated agents or groups are members of swarm intelligence systems. They never break the rules of swarm intelligence systems, but they can behave arbitrarily and are not limited by centralized control structures. They communicate with each other to produce global behavioral agents, but the individual does not intervene, resulting in the individual not understanding. Most of the discoveries [5] that are different from the conventional ones and beneficial to scientific progress come from the fusion of some unrelated fields. Basic algorithms, such as simulated annealing, are the best examples of technologies that have been opened to traffic in two closed fields because of the bridge of swarm intelligence. Tough microsystem technology, aiming at innovation on the platform of multiagent system [6] and based on microrobot and swarm intelligence theory, a brand-new discipline, came into being. The algorithm is generated according to swarm intelligence, so that the uncomplicated robot agent can solve complex problems. Now, it is the combination of swarm intelligence and micro-operation tasks, which will have important features: each microrobot can perform shared information and technology. In order to observe the behavior of a large number of people after interaction [7], the experimenter applied swarm intelligence to blog data, from the modeling of collective behavior. Blog data will be trained and tested according to the ant colony optimization model. The combination of ant colony optimization model and CHI is a useful result of this experiment, and the experimenter is full of confidence in future research. Literature [8] most swarm intelligence is reverse analysis and research on a target product and adaptation to collective behavior in nature, so as to obtain a more optimized algorithm. Compared with the previous basic algorithms, these algorithms have stronger adaptability, sensitivity and robustness, which are the properties needed for the development of networks. After the investigation of network protocols, a new taxonomy is added to it, and protocol classification is carried out by this method. At the same time, the field of swarm intelligence needs more evaluation and analysis in order to have a better future. At present, society is not only concerned about the development of science and technology [9] but also very concerned about sports. As early as 1995, a series of problems existing in minority sports have been solved, and traditional sports and sports health have been integrated. At the same time, scientists have never stopped studying sports [10]. Due to personal subjective and socio-economic objective reasons, physical labor will gradually be occupied by sports behavior in the future. And, sports behavior also has extraordinary medical value in some aspects, and human subjective needs will be met. Sports behavior is influenced by individual personality [11]. As early as last century, some scholars have studied sports behavior and personality. Nowadays, research shows that sports personality is one of the important reasons that affect sports behavior. Subjective and objective factors influence each other [12], thus forming sports superstition behavior. Sports type, level, and role are important factors for the formation of sports superstition behavior. The dominant position of competition reflects that the higher the challenge and the lower the certainty, the more they will be. Social objective environment also affects sports superstition behavior. Different from religious belief, sports superstition is more used by athletes for nonphysical assistance. From the perspective of athletes’ personal personality factors, nonelites often have no superstition from elites. Among the predictive indexes of sports superstition behavior, the dominant one is the relationship between task difficulty and skills. To sum up, sports superstition has both advantages and disadvantages, and its advantage lies in that it can bring psychological comfort in an unknown objective environment. For sports, injury cannot be avoided [13]. Athletes were divided into injury group and noninjury group, and the relationship between their TABP tendency and sports injury was studied by questionnaire. According to the research, most of the experimental results are consistent with the predicted results, that is, the noninjury group has a lower TABP tendency than the injury group, and the higher the TABP score, the more injuries athletes suffer. Nixon H. L. in [14] explores the relationship between personal subjective factors and accidental or nonaccidental injuries to others in sports or before injuries in team sports through experimental research. Scientists have meaningful insights into the development of sports behavior. Different from female athletes, sports injury behavior is only related to sports contact itself, while male athletes are also related to personal subjective factors. At the same time, according to the experimental results [15], it is found that the identity and behavior of sports fans are obviously higher among men than among women, but the number of sports fans is equal between them. Then, in this situation, compared with women, men rarely call themselves sports fans, but prefer to think of themselves as sports fans. The reason for this is that men prefer to participate in sports and get something from them than watching sports with relatives and friends.


## 2. Analysis of Swarm Intelligence Algorithm

### 2.1. Basic Concepts

The research of swarm intelligence is originated from the long-lived social insects, which have the characteristics of high efficiency and creativity. Therefore, swarm intelligence belongs to decentralized control. Individuals interact with each other and influence each other, so that the whole behavior is changed and a new pattern is formed. After continuous research, swarm intelligence has already set foot in various fields, but at the same time, swarm intelligence needs to strictly follow five basic principles.


### 2.2. Particle Swarm Optimization

#### 2.2.1. Basic Concepts

The algorithm imitates the process of birds foraging in the ecological circle, and the individuals in the birds always fly in the direction of food. In the model, the population sizeN and D-dimensional space are initialized. Each individual at position X moves at velocity V like a bird foraging toward a food or target.


#### 2.2.2. PSO Algorithm

The algorithm flow chart is shown in Figure1:Figure 1
Flow chart of the PSO algorithm.The basic PSO algorithm formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,(2)xit+1=xit+vit+1,Formulas (1) and (2) are particle iteration update formulas, where vit represents the velocity of the i-th particle in the t-th iteration, xit represents the position of the i-th particle in the t-th iteration, and pit represents the historical optimal position when the i-th particle searches to the t-th generation. pgt indicates the historical optimal position of the whole population when searching to the t generation, that is, the global optimal position. When the superscript is changed to t+1, it indicates that it is the t+1 iteration. c1 and c2 denotes the learning factor, and the usual value is 2, r1 and r2 denotes the disturbance factor, which is usually randomly selected within [0, 1].In the PSO algorithm, there is a certain correlation between personality optimization and global optimization. Generally, the global optimum and local optimum are set by setting different inertia factors. Generally, the inertia factor is 0.4 and 0.9 to train the algorithm, which makes it easier to find the individual optimal and global optimal. Generally, individuals are optimized first. When individuals get optimal solutions, and these individuals get optimal solutions, they get a global optimal solution at this time. Repeatedly seeking the individual optimal solution, adjusting the inertia factor and constantly updating the global optimal solution, finally getting a group of individual optimum and getting the global optimal solution.The change of inertia weightω will cause the change of algorithm performance, which is mainly the global search ability and convergence speed. The increase of ω represents more benefits to the global exploration ability of the algorithm, and at the same time, the population presents more diverse states. On the contrary, the reduction of ω represents more benefits to the local mining ability of the algorithm, and at the same time, the convergence speed is faster. The addition of linear decreasing weight strategy will optimize the whole PSO algorithm.The formula of linear decreasing weight strategy is as follows:(3)ω=ωmax−ωmax−ωminGmax⋅t.In the initial stage of PSO algorithm, enhancing the global search ability can traverse the solution space more likely and avoid falling into the local optimal solution. In the later stage of PSO algorithm, enhancing local search ability can lock the optimal solution more likely and achieve global optimization.The improved speed update formula is as follows:(4)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.Among them,t represents the current number of iterations, Gmax represents the maximum number of iterations, ωmax represents the initial inertia weight, ωmin indicates the inertia weight at the maximum number of iterations, usually 0.4. Weight is also called inertia factor. When the setting value is large, the global optimization ability is strong, and the local optimization is relatively poor; when the setting value is large, the global ability is poor and the local optimization is easy.In formula (4), the inertia factor value is set to 0.4, which is based on the GWO algorithm tested in the experimental process, and 0.4 is set to make the GWO algorithm achieve the optimal performance. Generally, it is obtained through a large number of experiments and experiences, showing the best performance in the experiment. It has very important scientific significance and can reflect the rigor of the algorithm.


### 2.3. Gray Wolf Optimization Algorithm

#### 2.3.1. Basic Concepts

The gray wolf optimization algorithm has strict regulations, in which the gray wolf in the algorithm is divided intoα,β,δ,ω. This means that they will be assigned different tasks. These four tasks are in order: α is the command decision, that is, the optimal candidate solution. The status of β is only lower than α. Therefore, β does not obey any other gray wolf except α, which is the second best value; δ is β assistant, helping β to carry out ideological decisions, which is the third best value; ω is the cell of the gray wolf group, that is, the number is large but the status is lowest, which represents that ω is the most basic unit. The algorithm flow chart is shown in Figure 2:Figure 2
Flow chart of GWO algorithm.


#### 2.3.2. GWO algorithm

In GWO algorithm, the size of gray wolf populationX is N. Gray wolves are divided into α,β,δ,ω; among them, the first three are leaders, searching for prey within a certain range. ω gets the prey position according to the leader’s guidance, thus updating the personal position. The formula representing the actual distance between the gray wolf and its prey is as follows:(5)D=C⋅Xpt−Xt.The location update formula is as follows:(6)Xt+1=Xpt−A⋅D,A=2a⋅r1−a,C=2⋅r2,where t represents the number of iterations, Xpt represents the position vector of prey, Xt represents the position vector of each gray wolf individual, D represents the distance vector between gray wolf and prey, a changes from 2 to 0, and its change mode is linear decrease, and r is a random vector value with a range of [0, 1].After each iteration, the prey movement trend is the leader’s position, so while the leader preserves himself as the best solution,ω wolf also needs the leader’s command. Only in this way, can the position of ω be updated. The formula for the distance between ω and α, β, and δ is as follows:(7)Dα=C1⋅Xα−X,Dβ=C2⋅Xβ−X,Dδ=C3⋅Xδ−X.The update formula of the position of the gray wolf individual is as follows:(8)X1=Xα−A1⋅Dα,X2=Xβ−A2⋅Dβ,X3=Xδ−A3⋅Dδ,(9)Xt+1=X1+X2+X33.Formulas (7)–(9) is the method of adjusting the optimal individual position for global optimization. Formula (9) calculates the distance between the position of each wolf and the optimal position formula for Formula (7) to get three different distances, respectively, to get an adjustment of the three wolves after the adjustment of the position. Formula (9) averages the positions of the three wolves after adjustment to obtain the position of the current optimal individual.


## 2.1. Basic Concepts

The research of swarm intelligence is originated from the long-lived social insects, which have the characteristics of high efficiency and creativity. Therefore, swarm intelligence belongs to decentralized control. Individuals interact with each other and influence each other, so that the whole behavior is changed and a new pattern is formed. After continuous research, swarm intelligence has already set foot in various fields, but at the same time, swarm intelligence needs to strictly follow five basic principles.


## 2.2. Particle Swarm Optimization

### 2.2.1. Basic Concepts

The algorithm imitates the process of birds foraging in the ecological circle, and the individuals in the birds always fly in the direction of food. In the model, the population sizeN and D-dimensional space are initialized. Each individual at position X moves at velocity V like a bird foraging toward a food or target.


### 2.2.2. PSO Algorithm

The algorithm flow chart is shown in Figure1:Figure 1
Flow chart of the PSO algorithm.The basic PSO algorithm formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,(2)xit+1=xit+vit+1,Formulas (1) and (2) are particle iteration update formulas, where vit represents the velocity of the i-th particle in the t-th iteration, xit represents the position of the i-th particle in the t-th iteration, and pit represents the historical optimal position when the i-th particle searches to the t-th generation. pgt indicates the historical optimal position of the whole population when searching to the t generation, that is, the global optimal position. When the superscript is changed to t+1, it indicates that it is the t+1 iteration. c1 and c2 denotes the learning factor, and the usual value is 2, r1 and r2 denotes the disturbance factor, which is usually randomly selected within [0, 1].In the PSO algorithm, there is a certain correlation between personality optimization and global optimization. Generally, the global optimum and local optimum are set by setting different inertia factors. Generally, the inertia factor is 0.4 and 0.9 to train the algorithm, which makes it easier to find the individual optimal and global optimal. Generally, individuals are optimized first. When individuals get optimal solutions, and these individuals get optimal solutions, they get a global optimal solution at this time. Repeatedly seeking the individual optimal solution, adjusting the inertia factor and constantly updating the global optimal solution, finally getting a group of individual optimum and getting the global optimal solution.The change of inertia weightω will cause the change of algorithm performance, which is mainly the global search ability and convergence speed. The increase of ω represents more benefits to the global exploration ability of the algorithm, and at the same time, the population presents more diverse states. On the contrary, the reduction of ω represents more benefits to the local mining ability of the algorithm, and at the same time, the convergence speed is faster. The addition of linear decreasing weight strategy will optimize the whole PSO algorithm.The formula of linear decreasing weight strategy is as follows:(3)ω=ωmax−ωmax−ωminGmax⋅t.In the initial stage of PSO algorithm, enhancing the global search ability can traverse the solution space more likely and avoid falling into the local optimal solution. In the later stage of PSO algorithm, enhancing local search ability can lock the optimal solution more likely and achieve global optimization.The improved speed update formula is as follows:(4)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.Among them,t represents the current number of iterations, Gmax represents the maximum number of iterations, ωmax represents the initial inertia weight, ωmin indicates the inertia weight at the maximum number of iterations, usually 0.4. Weight is also called inertia factor. When the setting value is large, the global optimization ability is strong, and the local optimization is relatively poor; when the setting value is large, the global ability is poor and the local optimization is easy.In formula (4), the inertia factor value is set to 0.4, which is based on the GWO algorithm tested in the experimental process, and 0.4 is set to make the GWO algorithm achieve the optimal performance. Generally, it is obtained through a large number of experiments and experiences, showing the best performance in the experiment. It has very important scientific significance and can reflect the rigor of the algorithm.


## 2.2.1. Basic Concepts

The algorithm imitates the process of birds foraging in the ecological circle, and the individuals in the birds always fly in the direction of food. In the model, the population sizeN and D-dimensional space are initialized. Each individual at position X moves at velocity V like a bird foraging toward a food or target.


## 2.2.2. PSO Algorithm

The algorithm flow chart is shown in Figure1:Figure 1
Flow chart of the PSO algorithm.The basic PSO algorithm formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,(2)xit+1=xit+vit+1,Formulas (1) and (2) are particle iteration update formulas, where vit represents the velocity of the i-th particle in the t-th iteration, xit represents the position of the i-th particle in the t-th iteration, and pit represents the historical optimal position when the i-th particle searches to the t-th generation. pgt indicates the historical optimal position of the whole population when searching to the t generation, that is, the global optimal position. When the superscript is changed to t+1, it indicates that it is the t+1 iteration. c1 and c2 denotes the learning factor, and the usual value is 2, r1 and r2 denotes the disturbance factor, which is usually randomly selected within [0, 1].In the PSO algorithm, there is a certain correlation between personality optimization and global optimization. Generally, the global optimum and local optimum are set by setting different inertia factors. Generally, the inertia factor is 0.4 and 0.9 to train the algorithm, which makes it easier to find the individual optimal and global optimal. Generally, individuals are optimized first. When individuals get optimal solutions, and these individuals get optimal solutions, they get a global optimal solution at this time. Repeatedly seeking the individual optimal solution, adjusting the inertia factor and constantly updating the global optimal solution, finally getting a group of individual optimum and getting the global optimal solution.The change of inertia weightω will cause the change of algorithm performance, which is mainly the global search ability and convergence speed. The increase of ω represents more benefits to the global exploration ability of the algorithm, and at the same time, the population presents more diverse states. On the contrary, the reduction of ω represents more benefits to the local mining ability of the algorithm, and at the same time, the convergence speed is faster. The addition of linear decreasing weight strategy will optimize the whole PSO algorithm.The formula of linear decreasing weight strategy is as follows:(3)ω=ωmax−ωmax−ωminGmax⋅t.In the initial stage of PSO algorithm, enhancing the global search ability can traverse the solution space more likely and avoid falling into the local optimal solution. In the later stage of PSO algorithm, enhancing local search ability can lock the optimal solution more likely and achieve global optimization.The improved speed update formula is as follows:(4)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.Among them,t represents the current number of iterations, Gmax represents the maximum number of iterations, ωmax represents the initial inertia weight, ωmin indicates the inertia weight at the maximum number of iterations, usually 0.4. Weight is also called inertia factor. When the setting value is large, the global optimization ability is strong, and the local optimization is relatively poor; when the setting value is large, the global ability is poor and the local optimization is easy.In formula (4), the inertia factor value is set to 0.4, which is based on the GWO algorithm tested in the experimental process, and 0.4 is set to make the GWO algorithm achieve the optimal performance. Generally, it is obtained through a large number of experiments and experiences, showing the best performance in the experiment. It has very important scientific significance and can reflect the rigor of the algorithm.


## 2.3. Gray Wolf Optimization Algorithm

### 2.3.1. Basic Concepts

The gray wolf optimization algorithm has strict regulations, in which the gray wolf in the algorithm is divided intoα,β,δ,ω. This means that they will be assigned different tasks. These four tasks are in order: α is the command decision, that is, the optimal candidate solution. The status of β is only lower than α. Therefore, β does not obey any other gray wolf except α, which is the second best value; δ is β assistant, helping β to carry out ideological decisions, which is the third best value; ω is the cell of the gray wolf group, that is, the number is large but the status is lowest, which represents that ω is the most basic unit. The algorithm flow chart is shown in Figure 2:Figure 2
Flow chart of GWO algorithm.


### 2.3.2. GWO algorithm

In GWO algorithm, the size of gray wolf populationX is N. Gray wolves are divided into α,β,δ,ω; among them, the first three are leaders, searching for prey within a certain range. ω gets the prey position according to the leader’s guidance, thus updating the personal position. The formula representing the actual distance between the gray wolf and its prey is as follows:(5)D=C⋅Xpt−Xt.The location update formula is as follows:(6)Xt+1=Xpt−A⋅D,A=2a⋅r1−a,C=2⋅r2,where t represents the number of iterations, Xpt represents the position vector of prey, Xt represents the position vector of each gray wolf individual, D represents the distance vector between gray wolf and prey, a changes from 2 to 0, and its change mode is linear decrease, and r is a random vector value with a range of [0, 1].After each iteration, the prey movement trend is the leader’s position, so while the leader preserves himself as the best solution,ω wolf also needs the leader’s command. Only in this way, can the position of ω be updated. The formula for the distance between ω and α, β, and δ is as follows:(7)Dα=C1⋅Xα−X,Dβ=C2⋅Xβ−X,Dδ=C3⋅Xδ−X.The update formula of the position of the gray wolf individual is as follows:(8)X1=Xα−A1⋅Dα,X2=Xβ−A2⋅Dβ,X3=Xδ−A3⋅Dδ,(9)Xt+1=X1+X2+X33.Formulas (7)–(9) is the method of adjusting the optimal individual position for global optimization. Formula (9) calculates the distance between the position of each wolf and the optimal position formula for Formula (7) to get three different distances, respectively, to get an adjustment of the three wolves after the adjustment of the position. Formula (9) averages the positions of the three wolves after adjustment to obtain the position of the current optimal individual.


## 2.3.1. Basic Concepts

The gray wolf optimization algorithm has strict regulations, in which the gray wolf in the algorithm is divided intoα,β,δ,ω. This means that they will be assigned different tasks. These four tasks are in order: α is the command decision, that is, the optimal candidate solution. The status of β is only lower than α. Therefore, β does not obey any other gray wolf except α, which is the second best value; δ is β assistant, helping β to carry out ideological decisions, which is the third best value; ω is the cell of the gray wolf group, that is, the number is large but the status is lowest, which represents that ω is the most basic unit. The algorithm flow chart is shown in Figure 2:Figure 2
Flow chart of GWO algorithm.


## 2.3.2. GWO algorithm

In GWO algorithm, the size of gray wolf populationX is N. Gray wolves are divided into α,β,δ,ω; among them, the first three are leaders, searching for prey within a certain range. ω gets the prey position according to the leader’s guidance, thus updating the personal position. The formula representing the actual distance between the gray wolf and its prey is as follows:(5)D=C⋅Xpt−Xt.The location update formula is as follows:(6)Xt+1=Xpt−A⋅D,A=2a⋅r1−a,C=2⋅r2,where t represents the number of iterations, Xpt represents the position vector of prey, Xt represents the position vector of each gray wolf individual, D represents the distance vector between gray wolf and prey, a changes from 2 to 0, and its change mode is linear decrease, and r is a random vector value with a range of [0, 1].After each iteration, the prey movement trend is the leader’s position, so while the leader preserves himself as the best solution,ω wolf also needs the leader’s command. Only in this way, can the position of ω be updated. The formula for the distance between ω and α, β, and δ is as follows:(7)Dα=C1⋅Xα−X,Dβ=C2⋅Xβ−X,Dδ=C3⋅Xδ−X.The update formula of the position of the gray wolf individual is as follows:(8)X1=Xα−A1⋅Dα,X2=Xβ−A2⋅Dβ,X3=Xδ−A3⋅Dδ,(9)Xt+1=X1+X2+X33.Formulas (7)–(9) is the method of adjusting the optimal individual position for global optimization. Formula (9) calculates the distance between the position of each wolf and the optimal position formula for Formula (7) to get three different distances, respectively, to get an adjustment of the three wolves after the adjustment of the position. Formula (9) averages the positions of the three wolves after adjustment to obtain the position of the current optimal individual.


## 3. Optimization Algorithm

### 3.1. Enhanced Gray Wolf Optimization Algorithm Design

Gray wolf algorithm in the problem solving, although the ability of optimization is relatively strong, but with the increase of iteration times, the similarity between gray wolf individuals exists, and the value is extremely high. With the increasing similarity, the population diversity will decrease, and the final result is the premature convergence phenomenon, which leads to the change of optimization ability.


#### 3.1.1. Immune Cloning Operation

After calculating the fitness value of preserved gray wolf individuals,m better individuals in gray wolf population are selected to form elite population. The elite population individuals are cloned to form a new elite clone population T, and the population size is Nc. The Nc formula is as follows:(10)Nc=∑i=1mroundλ⋅mi+b,where λ represents a random value with a value range of [0, 1] and b is not less than 1 and is an integer constant.In order to increase the species diversity of the clonal population, it is necessary to mutate each individual in the elite clonal population to make each individual have a high degree of discrimination. The variation method formula is as follows:(11)tcnew=tc+p⋅η⋅tc⋅r4−p⋅η⋅tc⋅r5,p=1,r6≤0.5,0,others,η=1−1exp1−1∗expccmax−1−1.Among them,ti represents the gray wolf individual of the elite clone population at the i-th time, tcnew represents the elite gray wolf with mutation, r represents random value, and the value range is [0, 1], cmax represents the maximum iteration number in mutation, and the value of η tends to 1 at first and approaches 0 with the increase of c.After the above contents are completed, a better individual is selected from the new population, and the above contents are repeated until the maximum iteration time’s stop.


#### 3.1.2. Particle Swarm Position Update Idea

According to the immune cloning operation, the elite population is the population in the algorithm iteration, so the elite population needs to be arranged in order to find a more accurate position of prey in the mutation process. The update formula for the location of the gray wolf is as follows:(12)Xt+1=X1+X2+X33+vt.The iterative formula of velocity change is as follows:(13)vt+1=w⋅vt+C1⋅r7⋅X1−Xt+C2⋅r8⋅X2−Xt+C3⋅r9⋅X3−Xt,where w represents a random value with a value range of [0, 1] and r represents an arbitrary value with a value range of [0, 1].


#### 3.1.3. Enhanced Grey Wolf Optimization Algorithm Flow

The flow of the enhanced gray wolf optimization algorithm is shown in Figure3:Figure 3
Flow chart of IPSGWO algorithm.


## 3.1. Enhanced Gray Wolf Optimization Algorithm Design

Gray wolf algorithm in the problem solving, although the ability of optimization is relatively strong, but with the increase of iteration times, the similarity between gray wolf individuals exists, and the value is extremely high. With the increasing similarity, the population diversity will decrease, and the final result is the premature convergence phenomenon, which leads to the change of optimization ability.


### 3.1.1. Immune Cloning Operation

After calculating the fitness value of preserved gray wolf individuals,m better individuals in gray wolf population are selected to form elite population. The elite population individuals are cloned to form a new elite clone population T, and the population size is Nc. The Nc formula is as follows:(10)Nc=∑i=1mroundλ⋅mi+b,where λ represents a random value with a value range of [0, 1] and b is not less than 1 and is an integer constant.In order to increase the species diversity of the clonal population, it is necessary to mutate each individual in the elite clonal population to make each individual have a high degree of discrimination. The variation method formula is as follows:(11)tcnew=tc+p⋅η⋅tc⋅r4−p⋅η⋅tc⋅r5,p=1,r6≤0.5,0,others,η=1−1exp1−1∗expccmax−1−1.Among them,ti represents the gray wolf individual of the elite clone population at the i-th time, tcnew represents the elite gray wolf with mutation, r represents random value, and the value range is [0, 1], cmax represents the maximum iteration number in mutation, and the value of η tends to 1 at first and approaches 0 with the increase of c.After the above contents are completed, a better individual is selected from the new population, and the above contents are repeated until the maximum iteration time’s stop.


### 3.1.2. Particle Swarm Position Update Idea

According to the immune cloning operation, the elite population is the population in the algorithm iteration, so the elite population needs to be arranged in order to find a more accurate position of prey in the mutation process. The update formula for the location of the gray wolf is as follows:(12)Xt+1=X1+X2+X33+vt.The iterative formula of velocity change is as follows:(13)vt+1=w⋅vt+C1⋅r7⋅X1−Xt+C2⋅r8⋅X2−Xt+C3⋅r9⋅X3−Xt,where w represents a random value with a value range of [0, 1] and r represents an arbitrary value with a value range of [0, 1].


### 3.1.3. Enhanced Grey Wolf Optimization Algorithm Flow

The flow of the enhanced gray wolf optimization algorithm is shown in Figure3:Figure 3
Flow chart of IPSGWO algorithm.


## 3.1.1. Immune Cloning Operation

After calculating the fitness value of preserved gray wolf individuals,m better individuals in gray wolf population are selected to form elite population. The elite population individuals are cloned to form a new elite clone population T, and the population size is Nc. The Nc formula is as follows:(10)Nc=∑i=1mroundλ⋅mi+b,where λ represents a random value with a value range of [0, 1] and b is not less than 1 and is an integer constant.In order to increase the species diversity of the clonal population, it is necessary to mutate each individual in the elite clonal population to make each individual have a high degree of discrimination. The variation method formula is as follows:(11)tcnew=tc+p⋅η⋅tc⋅r4−p⋅η⋅tc⋅r5,p=1,r6≤0.5,0,others,η=1−1exp1−1∗expccmax−1−1.Among them,ti represents the gray wolf individual of the elite clone population at the i-th time, tcnew represents the elite gray wolf with mutation, r represents random value, and the value range is [0, 1], cmax represents the maximum iteration number in mutation, and the value of η tends to 1 at first and approaches 0 with the increase of c.After the above contents are completed, a better individual is selected from the new population, and the above contents are repeated until the maximum iteration time’s stop.


## 3.1.2. Particle Swarm Position Update Idea

According to the immune cloning operation, the elite population is the population in the algorithm iteration, so the elite population needs to be arranged in order to find a more accurate position of prey in the mutation process. The update formula for the location of the gray wolf is as follows:(12)Xt+1=X1+X2+X33+vt.The iterative formula of velocity change is as follows:(13)vt+1=w⋅vt+C1⋅r7⋅X1−Xt+C2⋅r8⋅X2−Xt+C3⋅r9⋅X3−Xt,where w represents a random value with a value range of [0, 1] and r represents an arbitrary value with a value range of [0, 1].


## 3.1.3. Enhanced Grey Wolf Optimization Algorithm Flow

The flow of the enhanced gray wolf optimization algorithm is shown in Figure3:Figure 3
Flow chart of IPSGWO algorithm.


## 4. Simulation Experiment

### 4.1. Convergence Curve

#### 4.1.1. Test Function and Parameter Settings

Test functions are used to measure the performance of these three algorithms. The six benchmark function formulas are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f4x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f5x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f6x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.Among them, the dimensions of six functions are all 30, the iteration times of the algorithm are all 1000 times, and the optimal solution of the function is set to 0.f1–f6 test functions are unimodal functions and multimodal test functions. These test functions are commonly used test functions, which are verified by a large number of intelligent algorithms and summarized after comparison. It can guarantee the test effect of the algorithm proposed in this paper and achieve the optimal value is the best effect of the function in the algorithm performance. Other test functions have the same test effect as the test functions in f1–f6.


#### 4.1.2. Experimental Comparison

For six benchmark functions, after 30 runs of the three algorithms, the average value and standard deviation of the functions are solved, respectively, in which the average value can reflect the convergence speed of the algorithm, while the standard deviation can reflect the stability of the algorithm. The convergence results of functions 1 through 6 are shown in Table1:Table 1
Results of different algorithms in different functions.
FunctionPSOGWOIPSGWOf1Average1.17e − 053.38e − 330Standard deviation2.99e − 051.90e − 350f2Average1.6839500Standard deviation3.8867400f3Average7.474182.51e − 081.06e − 22Standard deviation6.237885.84e − 091.78e − 22f4Average4.80e − 012.34e − 000Standard deviation2.08e − 013.55e − 000f5Average0.035719.02e − 094.34e − 20Standard deviation0.054398.57e − 092.94e − 20f6Average2.420143.90e − 148.88e − 16Standard deviation1.260844.19e − 150The convergence curve of function 1 is shown in Figure4.Figure 4
Comparison of convergence curves of three algorithms to function 1.The convergence curve of function 2 is shown in Figure5: average fitness value.Figure 5
Comparison of convergence curves of three algorithms to function 2.The convergence curve of function 3 is shown in Figure6:Figure 6
Comparison of convergence curves of three algorithms to function 3.The convergence curve of function 4 is shown in Figure7:Figure 7
Comparison of convergence curves of three algorithms to function 4.The convergence curve of function 5 is shown in Figure8:Figure 8
Comparison of convergence curves of three algorithms to function 5.The convergence curve of function 6 is shown in Figure9:Figure 9
Comparison of convergence curves of three algorithms to function 6.From the above table, it can be seen that the convergence speed, optimization ability, and stability of IPSGWO algorithm are obviously higher than the other two algorithms, whether facing unimodal reference function or multimodal reference function. It can be seen that adding immune cloning method and position adjustment idea to GWO algorithm can obviously optimize the original algorithm.


### 4.2. Simulation Experiment

#### 4.2.1. Establishment of objective function

Scan the sports behavior of human body. The whole human body will be swept in, and a two-dimensional rectangular coordinate system will be established here. The sports behavior of the swept human body will be put into the coordinate system in a two-dimensional mode, and two kinds of external rectangles of the human body will be quoted for behavior analysis. Rectangle 1 (black) is the rectangle where the position of the human body is initially determined, and the position does not change with the change of the angle of the human body. Rectangle 2 (red) is a variable matrix, which changes with the change of human body angle. The four vertices of the rectangle are defined asA1,A2,A3,A4, and they have their own position points in this rectangular coordinate system, so that three characteristics describing regional behavior can be obtained, which can well detect the occurrence and prediction of injuries during sports behavior. The scan result diagram that can be referenced is shown in Figure 10:Figure 10
Reference diagram of scanning results.Centroid difference distribution:(15)X=∑x,y∈rectx⋅hx,y∑x,y∈recthx,y,Y=∑x,y∈recty⋅hx,y∑x,y∈recthx,y,β=∑i=1kYik−Yk,where x represents abscissa, y represents ordinate, ∑x,y∈recthx,y represents gray values of all pixels in this area, and Yk represents ordinate of centroid of k-th frame. When people’s movement behavior causes injury, β will obviously become smaller.Width-height ratio of rectangle:(16)B=rect⋅Wrect⋅H=xA1−xA32+yA1−yA32xA1−xA22+yA1−yA22.When the value ofB is much less than 1, it indicates that people’s sports behavior is normal, while when the value of B is greater than 1, it indicates that people will fall down.Tilt angle of rectangular box:(17)φ=arctany1−y2x1−x2.When the range of inclination angle is in0°,45°∪145°,180°, it indicates that people’s sports behavior is abnormal and injuries may occur.


#### 4.2.2. Simulation Experiment and Result Analysis

On the premise of ensuring the same number of people tested during the test, the motion behavior from frame 0 to frame 1000 is tested by objective function, and the actual detection accuracy is calculated with every 100 frames as a calculation point. Then, IPSGWO, GWO, and PSO algorithms are combined with the objective function to predict the detection accuracy. The formula for calculating the correct rate P is as follows:(18)P=A+BW,where W is the total detection time, A is the number of times when the detection behavior is normal, and B is the number of times when the detection behavior is abnormal.Results of the comparative data are shown in Table2.Table 2
Results comparison data table.
NumberTest accuracy categoryActual (%)PSO (%)GWO (%)IPSGWO (%)100Centroid difference distribution86.4076.2081.3087.00Rectangular aspect ratio86.8076.4080.9086.20Rectangular frame tilt angle87.1076.9081.9087.50200Centroid difference distribution86.8078.5082.0087.10Rectangular aspect ratio87.0079.8081.0087.00Rectangular frame tilt angle87.5079.7082.6088.00300Centroid difference distribution87.0080.0082.9086.90Rectangular aspect ratio87.6080.1081.6087.20Rectangular frame tilt angle88.3081.0083.0088.90400Centroid difference distribution87.6080.6082.9088.40Rectangular aspect ratio88.1081.0081.6088.00Rectangular frame tilt angle88.8081.3083.3088.90500Centroid difference distribution88.3081.3082.9088.00Rectangular aspect ratio88.9081.9081.7088.00Rectangular frame tilt angle89.6082.0083.5089.00600Centroid difference distribution88.7081.9083.5088.50Rectangular aspect ratio89.5082.6082.0089.00Rectangular frame tilt angle90.5083.1084.0090.90700Centroid difference distribution89.4082.6083.8089.00Rectangular aspect ratio90.3082.6082.3090.80Rectangular frame tilt angle90.8083.1084.1091.00800Centroid difference distribution90.6082.6083.8090.30Rectangular aspect ratio90.8083.7082.8090.80Rectangular frame tilt angle91.6083.8084.5091.30900Centroid difference distribution91.2083.0083.9091.80Rectangular aspect ratio91.7084.0083.1091.90Rectangular frame tilt angle92.3083.9084.7093.101000Centroid difference distribution91.7083.7084.1092.00Rectangular aspect ratio92.5084.5083.7092.20Rectangular frame tilt angle93.0085.0085.4093.50The actual accuracy of the centroid difference distribution is compared with the predicted values of the three algorithms, such as Figure11:Figure 11
Comparison between the actual accuracy of centroid difference distribution and the predicted values of three algorithms.The actual accuracy of the rectangular aspect ratio is compared with the predicted values of the three algorithms, such as Figure12.Figure 12
Comparison between the actual correct rate of rectangular aspect ratio and the predicted values of three algorithms.The actual correct rate of rectangular frame tilt angle is compared with the predicted values of three algorithms, such as Figure13:Figure 13
Comparison between the actual correct rate of rectangular frame tilt angle and the predicted values of three algorithms.Therefore, compared with the other two algorithms, IPSGWO algorithm has higher accuracy and stability and can better predict data. With the help of immune cloning strategy and location updating idea, the performance of GWO algorithm has far exceeded that of GWO algorithm and PSO algorithm. Therefore, it can be seen from the experiments that the IPSGWO algorithm proposed in this paper has more advantages, and IPSGWO algorithm is more favorable for sports behavior prediction and injury assessment.


## 4.1. Convergence Curve

### 4.1.1. Test Function and Parameter Settings

Test functions are used to measure the performance of these three algorithms. The six benchmark function formulas are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f4x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f5x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f6x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.Among them, the dimensions of six functions are all 30, the iteration times of the algorithm are all 1000 times, and the optimal solution of the function is set to 0.f1–f6 test functions are unimodal functions and multimodal test functions. These test functions are commonly used test functions, which are verified by a large number of intelligent algorithms and summarized after comparison. It can guarantee the test effect of the algorithm proposed in this paper and achieve the optimal value is the best effect of the function in the algorithm performance. Other test functions have the same test effect as the test functions in f1–f6.


### 4.1.2. Experimental Comparison

For six benchmark functions, after 30 runs of the three algorithms, the average value and standard deviation of the functions are solved, respectively, in which the average value can reflect the convergence speed of the algorithm, while the standard deviation can reflect the stability of the algorithm. The convergence results of functions 1 through 6 are shown in Table1:Table 1
Results of different algorithms in different functions.
FunctionPSOGWOIPSGWOf1Average1.17e − 053.38e − 330Standard deviation2.99e − 051.90e − 350f2Average1.6839500Standard deviation3.8867400f3Average7.474182.51e − 081.06e − 22Standard deviation6.237885.84e − 091.78e − 22f4Average4.80e − 012.34e − 000Standard deviation2.08e − 013.55e − 000f5Average0.035719.02e − 094.34e − 20Standard deviation0.054398.57e − 092.94e − 20f6Average2.420143.90e − 148.88e − 16Standard deviation1.260844.19e − 150The convergence curve of function 1 is shown in Figure4.Figure 4
Comparison of convergence curves of three algorithms to function 1.The convergence curve of function 2 is shown in Figure5: average fitness value.Figure 5
Comparison of convergence curves of three algorithms to function 2.The convergence curve of function 3 is shown in Figure6:Figure 6
Comparison of convergence curves of three algorithms to function 3.The convergence curve of function 4 is shown in Figure7:Figure 7
Comparison of convergence curves of three algorithms to function 4.The convergence curve of function 5 is shown in Figure8:Figure 8
Comparison of convergence curves of three algorithms to function 5.The convergence curve of function 6 is shown in Figure9:Figure 9
Comparison of convergence curves of three algorithms to function 6.From the above table, it can be seen that the convergence speed, optimization ability, and stability of IPSGWO algorithm are obviously higher than the other two algorithms, whether facing unimodal reference function or multimodal reference function. It can be seen that adding immune cloning method and position adjustment idea to GWO algorithm can obviously optimize the original algorithm.


## 4.1.1. Test Function and Parameter Settings

Test functions are used to measure the performance of these three algorithms. The six benchmark function formulas are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f4x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f5x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f6x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.Among them, the dimensions of six functions are all 30, the iteration times of the algorithm are all 1000 times, and the optimal solution of the function is set to 0.f1–f6 test functions are unimodal functions and multimodal test functions. These test functions are commonly used test functions, which are verified by a large number of intelligent algorithms and summarized after comparison. It can guarantee the test effect of the algorithm proposed in this paper and achieve the optimal value is the best effect of the function in the algorithm performance. Other test functions have the same test effect as the test functions in f1–f6.


## 4.1.2. Experimental Comparison

For six benchmark functions, after 30 runs of the three algorithms, the average value and standard deviation of the functions are solved, respectively, in which the average value can reflect the convergence speed of the algorithm, while the standard deviation can reflect the stability of the algorithm. The convergence results of functions 1 through 6 are shown in Table1:Table 1
Results of different algorithms in different functions.
FunctionPSOGWOIPSGWOf1Average1.17e − 053.38e − 330Standard deviation2.99e − 051.90e − 350f2Average1.6839500Standard deviation3.8867400f3Average7.474182.51e − 081.06e − 22Standard deviation6.237885.84e − 091.78e − 22f4Average4.80e − 012.34e − 000Standard deviation2.08e − 013.55e − 000f5Average0.035719.02e − 094.34e − 20Standard deviation0.054398.57e − 092.94e − 20f6Average2.420143.90e − 148.88e − 16Standard deviation1.260844.19e − 150The convergence curve of function 1 is shown in Figure4.Figure 4
Comparison of convergence curves of three algorithms to function 1.The convergence curve of function 2 is shown in Figure5: average fitness value.Figure 5
Comparison of convergence curves of three algorithms to function 2.The convergence curve of function 3 is shown in Figure6:Figure 6
Comparison of convergence curves of three algorithms to function 3.The convergence curve of function 4 is shown in Figure7:Figure 7
Comparison of convergence curves of three algorithms to function 4.The convergence curve of function 5 is shown in Figure8:Figure 8
Comparison of convergence curves of three algorithms to function 5.The convergence curve of function 6 is shown in Figure9:Figure 9
Comparison of convergence curves of three algorithms to function 6.From the above table, it can be seen that the convergence speed, optimization ability, and stability of IPSGWO algorithm are obviously higher than the other two algorithms, whether facing unimodal reference function or multimodal reference function. It can be seen that adding immune cloning method and position adjustment idea to GWO algorithm can obviously optimize the original algorithm.


## 4.2. Simulation Experiment

### 4.2.1. Establishment of objective function

Scan the sports behavior of human body. The whole human body will be swept in, and a two-dimensional rectangular coordinate system will be established here. The sports behavior of the swept human body will be put into the coordinate system in a two-dimensional mode, and two kinds of external rectangles of the human body will be quoted for behavior analysis. Rectangle 1 (black) is the rectangle where the position of the human body is initially determined, and the position does not change with the change of the angle of the human body. Rectangle 2 (red) is a variable matrix, which changes with the change of human body angle. The four vertices of the rectangle are defined asA1,A2,A3,A4, and they have their own position points in this rectangular coordinate system, so that three characteristics describing regional behavior can be obtained, which can well detect the occurrence and prediction of injuries during sports behavior. The scan result diagram that can be referenced is shown in Figure 10:Figure 10
Reference diagram of scanning results.Centroid difference distribution:(15)X=∑x,y∈rectx⋅hx,y∑x,y∈recthx,y,Y=∑x,y∈recty⋅hx,y∑x,y∈recthx,y,β=∑i=1kYik−Yk,where x represents abscissa, y represents ordinate, ∑x,y∈recthx,y represents gray values of all pixels in this area, and Yk represents ordinate of centroid of k-th frame. When people’s movement behavior causes injury, β will obviously become smaller.Width-height ratio of rectangle:(16)B=rect⋅Wrect⋅H=xA1−xA32+yA1−yA32xA1−xA22+yA1−yA22.When the value ofB is much less than 1, it indicates that people’s sports behavior is normal, while when the value of B is greater than 1, it indicates that people will fall down.Tilt angle of rectangular box:(17)φ=arctany1−y2x1−x2.When the range of inclination angle is in0°,45°∪145°,180°, it indicates that people’s sports behavior is abnormal and injuries may occur.


### 4.2.2. Simulation Experiment and Result Analysis

On the premise of ensuring the same number of people tested during the test, the motion behavior from frame 0 to frame 1000 is tested by objective function, and the actual detection accuracy is calculated with every 100 frames as a calculation point. Then, IPSGWO, GWO, and PSO algorithms are combined with the objective function to predict the detection accuracy. The formula for calculating the correct rate P is as follows:(18)P=A+BW,where W is the total detection time, A is the number of times when the detection behavior is normal, and B is the number of times when the detection behavior is abnormal.Results of the comparative data are shown in Table2.Table 2
Results comparison data table.
NumberTest accuracy categoryActual (%)PSO (%)GWO (%)IPSGWO (%)100Centroid difference distribution86.4076.2081.3087.00Rectangular aspect ratio86.8076.4080.9086.20Rectangular frame tilt angle87.1076.9081.9087.50200Centroid difference distribution86.8078.5082.0087.10Rectangular aspect ratio87.0079.8081.0087.00Rectangular frame tilt angle87.5079.7082.6088.00300Centroid difference distribution87.0080.0082.9086.90Rectangular aspect ratio87.6080.1081.6087.20Rectangular frame tilt angle88.3081.0083.0088.90400Centroid difference distribution87.6080.6082.9088.40Rectangular aspect ratio88.1081.0081.6088.00Rectangular frame tilt angle88.8081.3083.3088.90500Centroid difference distribution88.3081.3082.9088.00Rectangular aspect ratio88.9081.9081.7088.00Rectangular frame tilt angle89.6082.0083.5089.00600Centroid difference distribution88.7081.9083.5088.50Rectangular aspect ratio89.5082.6082.0089.00Rectangular frame tilt angle90.5083.1084.0090.90700Centroid difference distribution89.4082.6083.8089.00Rectangular aspect ratio90.3082.6082.3090.80Rectangular frame tilt angle90.8083.1084.1091.00800Centroid difference distribution90.6082.6083.8090.30Rectangular aspect ratio90.8083.7082.8090.80Rectangular frame tilt angle91.6083.8084.5091.30900Centroid difference distribution91.2083.0083.9091.80Rectangular aspect ratio91.7084.0083.1091.90Rectangular frame tilt angle92.3083.9084.7093.101000Centroid difference distribution91.7083.7084.1092.00Rectangular aspect ratio92.5084.5083.7092.20Rectangular frame tilt angle93.0085.0085.4093.50The actual accuracy of the centroid difference distribution is compared with the predicted values of the three algorithms, such as Figure11:Figure 11
Comparison between the actual accuracy of centroid difference distribution and the predicted values of three algorithms.The actual accuracy of the rectangular aspect ratio is compared with the predicted values of the three algorithms, such as Figure12.Figure 12
Comparison between the actual correct rate of rectangular aspect ratio and the predicted values of three algorithms.The actual correct rate of rectangular frame tilt angle is compared with the predicted values of three algorithms, such as Figure13:Figure 13
Comparison between the actual correct rate of rectangular frame tilt angle and the predicted values of three algorithms.Therefore, compared with the other two algorithms, IPSGWO algorithm has higher accuracy and stability and can better predict data. With the help of immune cloning strategy and location updating idea, the performance of GWO algorithm has far exceeded that of GWO algorithm and PSO algorithm. Therefore, it can be seen from the experiments that the IPSGWO algorithm proposed in this paper has more advantages, and IPSGWO algorithm is more favorable for sports behavior prediction and injury assessment.


## 4.2.1. Establishment of objective function

Scan the sports behavior of human body. The whole human body will be swept in, and a two-dimensional rectangular coordinate system will be established here. The sports behavior of the swept human body will be put into the coordinate system in a two-dimensional mode, and two kinds of external rectangles of the human body will be quoted for behavior analysis. Rectangle 1 (black) is the rectangle where the position of the human body is initially determined, and the position does not change with the change of the angle of the human body. Rectangle 2 (red) is a variable matrix, which changes with the change of human body angle. The four vertices of the rectangle are defined asA1,A2,A3,A4, and they have their own position points in this rectangular coordinate system, so that three characteristics describing regional behavior can be obtained, which can well detect the occurrence and prediction of injuries during sports behavior. The scan result diagram that can be referenced is shown in Figure 10:Figure 10
Reference diagram of scanning results.Centroid difference distribution:(15)X=∑x,y∈rectx⋅hx,y∑x,y∈recthx,y,Y=∑x,y∈recty⋅hx,y∑x,y∈recthx,y,β=∑i=1kYik−Yk,where x represents abscissa, y represents ordinate, ∑x,y∈recthx,y represents gray values of all pixels in this area, and Yk represents ordinate of centroid of k-th frame. When people’s movement behavior causes injury, β will obviously become smaller.Width-height ratio of rectangle:(16)B=rect⋅Wrect⋅H=xA1−xA32+yA1−yA32xA1−xA22+yA1−yA22.When the value ofB is much less than 1, it indicates that people’s sports behavior is normal, while when the value of B is greater than 1, it indicates that people will fall down.Tilt angle of rectangular box:(17)φ=arctany1−y2x1−x2.When the range of inclination angle is in0°,45°∪145°,180°, it indicates that people’s sports behavior is abnormal and injuries may occur.


## 4.2.2. Simulation Experiment and Result Analysis

On the premise of ensuring the same number of people tested during the test, the motion behavior from frame 0 to frame 1000 is tested by objective function, and the actual detection accuracy is calculated with every 100 frames as a calculation point. Then, IPSGWO, GWO, and PSO algorithms are combined with the objective function to predict the detection accuracy. The formula for calculating the correct rate P is as follows:(18)P=A+BW,where W is the total detection time, A is the number of times when the detection behavior is normal, and B is the number of times when the detection behavior is abnormal.Results of the comparative data are shown in Table2.Table 2
Results comparison data table.
NumberTest accuracy categoryActual (%)PSO (%)GWO (%)IPSGWO (%)100Centroid difference distribution86.4076.2081.3087.00Rectangular aspect ratio86.8076.4080.9086.20Rectangular frame tilt angle87.1076.9081.9087.50200Centroid difference distribution86.8078.5082.0087.10Rectangular aspect ratio87.0079.8081.0087.00Rectangular frame tilt angle87.5079.7082.6088.00300Centroid difference distribution87.0080.0082.9086.90Rectangular aspect ratio87.6080.1081.6087.20Rectangular frame tilt angle88.3081.0083.0088.90400Centroid difference distribution87.6080.6082.9088.40Rectangular aspect ratio88.1081.0081.6088.00Rectangular frame tilt angle88.8081.3083.3088.90500Centroid difference distribution88.3081.3082.9088.00Rectangular aspect ratio88.9081.9081.7088.00Rectangular frame tilt angle89.6082.0083.5089.00600Centroid difference distribution88.7081.9083.5088.50Rectangular aspect ratio89.5082.6082.0089.00Rectangular frame tilt angle90.5083.1084.0090.90700Centroid difference distribution89.4082.6083.8089.00Rectangular aspect ratio90.3082.6082.3090.80Rectangular frame tilt angle90.8083.1084.1091.00800Centroid difference distribution90.6082.6083.8090.30Rectangular aspect ratio90.8083.7082.8090.80Rectangular frame tilt angle91.6083.8084.5091.30900Centroid difference distribution91.2083.0083.9091.80Rectangular aspect ratio91.7084.0083.1091.90Rectangular frame tilt angle92.3083.9084.7093.101000Centroid difference distribution91.7083.7084.1092.00Rectangular aspect ratio92.5084.5083.7092.20Rectangular frame tilt angle93.0085.0085.4093.50The actual accuracy of the centroid difference distribution is compared with the predicted values of the three algorithms, such as Figure11:Figure 11
Comparison between the actual accuracy of centroid difference distribution and the predicted values of three algorithms.The actual accuracy of the rectangular aspect ratio is compared with the predicted values of the three algorithms, such as Figure12.Figure 12
Comparison between the actual correct rate of rectangular aspect ratio and the predicted values of three algorithms.The actual correct rate of rectangular frame tilt angle is compared with the predicted values of three algorithms, such as Figure13:Figure 13
Comparison between the actual correct rate of rectangular frame tilt angle and the predicted values of three algorithms.Therefore, compared with the other two algorithms, IPSGWO algorithm has higher accuracy and stability and can better predict data. With the help of immune cloning strategy and location updating idea, the performance of GWO algorithm has far exceeded that of GWO algorithm and PSO algorithm. Therefore, it can be seen from the experiments that the IPSGWO algorithm proposed in this paper has more advantages, and IPSGWO algorithm is more favorable for sports behavior prediction and injury assessment.


## 5. Conclusion

PSO algorithm and GWO algorithm will have problems after many iterations, and it is found that both of them have problems in convergence speed and optimization ability. The optimized and enhanced GWO algorithm, namely, IPSGWO algorithm, has superior stability and optimization ability after choosing appropriate strategies and ideas. Therefore, IPSGWO algorithm is more suitable for predicting and evaluating sports behavior.



---

*Source: 1541816-2021-12-06.xml*