# Research on Resource Allocation and Optimization of Community Intelligent Sports Service for the Elderly Based on Group Intelligence

Authors: Qiaofeng Liu; Jinglun Huang; Bin Zhang; Jihong Zhao; Chengyun Zhang; Xiang Gao
Journal: Journal of Healthcare Engineering
 (2021)

---

## Abstract

Objective. The mainstream development trend in the era of intelligent sports. At present, with the rapid development of science and technology, it is absolutely wise to combine group intelligence with community intelligent sports services for the elderly. Group intelligence has opened a new era of intelligent sports service. Group intelligence has become an important factor in the development and growth of community intelligent sports service for the elderly and has become a hot topic at present. However, intelligence has encountered difficulties on the road of development. At present, the aging of the population is getting worse and worse, and the elderly have higher and higher requirements for fitness and leisure services, which leads to the need for sports services to be continuously strengthened. The distribution of resources is uneven, the data is not clear enough, and the swarm intelligence algorithm is not perfect. With the adaptation of the elderly to intelligence, more intelligent, concise, and personalized services need to be developed. The most important method is to optimize the swarm intelligence algorithm continuously. In this paper, PSO algorithm is optimized and HCSSPSO algorithm is proposed. HCSSPSO algorithm is a combination of PSO algorithm and clonal selection strategy, and test simulation experiments, PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm for comparison. From the experimental results, HCSSPSO algorithm has better convergence speed and stability, whether it is data or comparison graph. The data optimized by HCSSPSO algorithm is higher than the original data and the other two algorithms in terms of satisfaction and resource allocation.


---

## Body

## 1. Introduction

At present, people pay attention to the development of science and technology, and at the same time, they also pay attention to the development of sports services for the elderly. Since 2013, group intelligence has opened a new door to the development of sports. Up to now, group intelligence has created a lot of value for sports services for the elderly. With the addition of swarm intelligence, the research on sports service for the elderly has been deepened by experts, and the entry of computer intelligent algorithms and analysis methods has completely changed the original traditional sports service mode for the elderly. With the arrival of the new model, the data sources are more extensive, the data is more accurate in this province, and a qualitative leap has been made fundamentally. In this way, the service structure is no longer single but diversified. The elderly are no longer affected by time, weather, and geographical location, which enables the elderly to participate in community sports and enjoy the services brought by science and technology at will, greatly improving the sports level and enthusiasm of the elderly, and enabling smart sports services to continuously absorb suggestions and continuous optimization and improvement.Literature biology is the origin of swarm intelligence [1]. After continuous development, a group of uncomplicated agents or groups have become swarm intelligence systems. The emergence of “intelligent” global behavior is not known to individuals because its agent interaction follows the principle of locality and randomness. This means that biologists and computer scientists are obsessed with the complex and self-coordinating groups [2]. Out of individual behavior and interaction, flocks of birds, fish, and social insects show problem-solving skills. In the field of swarm intelligence, the development of new algorithms is closely related to biological behavior. Since 1990s, optimization problems in various fields have been solved by animal-based swarm optimization methods [3]. However, the optimization and deepening of swarm intelligence algorithm require continuous research on biological intelligence behavior. Up to now, swarm intelligence can be summarized into three parts. From the biological basis, scientists have obtained the operating principles in biological systems [4]. From the artificial literature, two basic analysis methods and group model techniques are provided and summarized. From the point of view of swarm engineering, Kazadi is the application foundation, and at the same time, swarm intelligence is dominant in a series of applications such as robot system. Similarly, because of the extensive development of swarm intelligence, it is also excellent in solving some theoretical problems [5]. There are many swarm intelligence algorithms, and particle swarm optimization is one of them. Particle swarm optimizer was invented by this algorithm. The random velocity of particles will deeply affect the arrangement of particles according to their unique values, and the addition of mutation factor can keep the balance of pBeat locality values. Therefore, the optimized particle swarm optimizer has great advantages in solving constraint satisfaction problems like n queen problem. It is not only a theoretical problem, but also an excellent solution to practical problems [6]. According to the ant colony optimization technology in swarm intelligence, a network framework suitable for the performance factors of small satellites can be constructed. This network framework is different from the traditional network communication architecture and can realize various functions among small satellites more. From the results, it can be seen that the factors of the proposed frame motion change are very consistent. At the same time, it shows that the network topology is not fixed and unadaptable, and it can be transformed to be changeable and adaptable under certain conditions. The necessity of transforming the knowledge of swarm intelligence algorithm effectively needs to be confirmed by considering the brain [7]. In the aspect of development science, the construction of framework is the basis of developing swarm intelligence algorithm, so as to realize the development and evolution of algorithm. However, there are serious problems in the current society, and the aging problem continues to worsen [8]. In order to avoid the weaknesses brought by the traditional old-age care model, a new smart community old-age care model has emerged. This smart community model is based on BCG and provides solutions for changing the original rigid, single, and crude social old-age care services. With the aggravation of population aging, people have higher requirements on the issue of providing for the aged [9]. With the rapid development of science and technology in today's society, people are willing to use science and technology to solve problems and improve schemes. The combination of old-age care and science and technology has become a matter of course and has been widely concerned. However, at present, the market development only considers the ability and needs of the elderly unilaterally, and interactive design is the most prominent aspect. In order to get a suitable interactive design of intelligent aged care services, we must fully consider the needs of the elderly in all aspects and correct the existing intelligent service problems. According to the survey [10], the service level of basic community sports for the elderly is still not high, and there is a high and low gap between urban and rural areas. As the main body of community sports, the satisfaction of the elderly is the future development of community sports [11]. From the aspect of facilities, satisfaction is deeply affected by equipment. From the aspect of sports management, men and women, as well as the elderly in different regions, are obviously satisfied with the first two aspects. From the perspective of education, the fluctuation of satisfaction is gentle under the influence of education. From the aspect of natural environment, the satisfaction degree in each dimension of environment is related to different ages. Community elderly service system is in a series of problems, and the solution can be found in the reform of community sports service management system and professional guidance [12], and laws, venues, facilities, resources, and other aspects should be strengthened. Because the elderly are old, their legs and feet are inconvenient, and their sports level is generally not high. Similarly, their satisfaction with community sports scores is the same [13]. The higher the satisfaction degree of the elderly for community sports including environment and equipment, the higher the willingness of the elderly to participate in community sports. The more the community sports activities and professional guidance, the more the elderly participate in community sports. Therefore, only by paying more attention to and improving the above factors can we strengthen the sports behavior of the elderly. From the perspective of the elderly themselves [14], after receiving physical education, the way the elderly use portable smart devices and the ease or difficulty of perceiving this behavior are important factors that positively affect their behavior intentions. The social pressure that the elderly feel about whether to use this kind of equipment is the main reason that negatively affects their behavioral intention, and the way that the elderly use this kind of equipment balances the social pressure and behavioral intention that the elderly feel. All in all [15], the traditional way of fitness will be broken by the Internet of Things, and this new technology will change the world outlook after the Internet. Smart sports are studied based on the Internet, and a series of effective measures to improve the overall physical fitness of the elderly are discussed. At the same time, the development of intelligent sports for the elderly in the community will be deeply analyzed and studied. As a product of smart sports, the information collected by smart devices will be uploaded to the database, analyzed and processed centrally, and managed properly. In this paper, PSO algorithm is optimized and HCSSPSO algorithm is proposed. HCSSPSO algorithm is a combination of PSO algorithm and clonal selection strategy. The PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm are compared by experiments. HCSSPSO algorithm has good convergence speed and stability in both data and comparison graph. The data optimized by HCSSPSO algorithm is higher than the original data and the other two algorithms in terms of satisfaction and resource allocation.


## 2. Analysis of Swarm Intelligence Algorithm

### 2.1. Basic Concepts

In order to use space, some different kinds of animals will live together, and they are often more complex than other animals. At the same time, this lifestyle means high efficiency and strong creativity. Scientists have taken a fancy to this property, thus developing swarm intelligence [16]. It is precisely because of this property that the control of swarm intelligence is decentralized. Individual behavior in a group will affect other individuals, resulting in a new behavior pattern. There are five basic principles of swarm intelligence. First, all time and space can be calculated without complexity and follow the proximity principle. Secondly, the change of quality factor is closely related to the group and follows the quality principle. Third, groups should not move in a too narrow environment and follow the principle of diversity. Fourthly, groups should avoid changing their behavior with the change of environment and follow the principle of stability. Finally, the behavior of a group can be appropriately changed according to the conditions with low cost.The development history of swarm intelligence optimization algorithm is shown in Figure1.Figure 1
Development history of swarm intelligence optimization algorithm.In recent years, the main research aspect is biological swarm intelligence algorithm, and great research results and optimization strategies have also been obtained. The classification diagram of swarm intelligence algorithm is shown in Figure2.Figure 2
Classification diagram of swarm intelligence algorithm.


### 2.2. Particle Swarm Optimization

#### 2.2.1. Basic Concepts

This algorithm is called PSO for short [17, 18], which is developed by researchers through exploring and summarizing the behavior of bird predation. Like birds preying in groups, the optimal solution of this algorithm also needs the cooperation among individual particles. In the process of predation, birds will learn from each other's predation experience, thus forming an exchange of experiences and making the predation process orderly. Similarly, in this algorithm, each particle also needs to realize information exchange, so that the process of finding the optimal solution can be orderly.(1) Basic PSO Algorithm. In a space that needs to be represented by D component coordinates, there are countless particles with searching ability. They are not disordered, each particle individual has its own position, and this position is the most suitable position for this individual. PSO algorithm will update the performance of particles according to the velocity update formula. At this time, the intervention of objective function will bring the position comparison before and after the update of particles, which can clearly see whether the updated position is better than the position before the update. Complete the algorithm once in this way. The PSO algorithm flowchart is shown in Figure 3.Figure 3
Flowchart of PSO algorithm.The particle iterative update formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,xit+1=xit+vit+1.where xit is the position of the i-th particle in the t-th iteration, vit is the velocity of the i-th particle in the t-th iteration, xit+1 is the position of the i-th particle in the t+1 th iteration, vit+1 is the velocity of the i-th particle in the t+1 th iteration, pit indicates the historical optimal position when the i-th particle searches to the t-th generation, pgt is the historical optimal position of the whole population when the t generation is searched, that is, the global optimal position, c1,c2 is the learning factor, usually 2, and r1, r2 is the disturbance factor, usually randomly taken within [0, 1].The values of C1, C2 and R1, R2 will affect whether the particles rush across the target region or wander outside the target region, and a better solution can be obtained when they are constant values.The performance of PSO algorithm will influence each other, which leads to the instability of PSO algorithm, so it is necessary to add linear decreasing weights.The speed update equation at this time is(2)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.The formula of linear decreasing weight strategy is as follows:(3)ωt=ωmax−ωmax−ωminGmax⋅t,where t is the current number of iterations, Gmax is the maximum number of iterations, ωmax is the initial inertia weight, and ωmin is the inertia weight at the maximum number of iterations Gmax, usually 0.4.(2) Comprehensive Learning Particle Swarm Optimization Algorithm. In order to improve PSO algorithm and solve the shortcomings of PSO algorithm, a comprehensive learning strategy is added, and the combination of the two algorithms is developed into CLPSO algorithm. The update speed of CLPSO algorithm is different from that of PSO algorithm [19], and the best position of individuals is an important basis for updating the speed of CLPSO algorithm.The comprehensive learning particle swarm optimization algorithm firstly calculates the learning probability of each particlepc. The formula is as follows:(4)pci=a+b∗exp10∗i−1/N−1exp10−1.According to the experimental experience, generallya and b are constants, usually a = 0.05 and b = 0.45.The update formula of comprehensive learning particle swarm optimization algorithm is as follows:(5)vid=w∗vid+c∗ridpbestfid,d−xid,xid=xid+vid.Pbest is the optimal position of the individual. fid is the dimension value of the d dimension in the best position of the i-th particle individual. fi=fi1,fi2,…,fiD is the learning sample vector set by particle i. pbestfid,d indicates the dimension value corresponding to the best position produced by previous iterations of a particle.Each dimension of the particle will produce a random number and compare the random number with the learning probability parameterpc. If the former is greater than the latter, the dimension of the particle in the best position in each iteration will be learned; otherwise, the dimension of the particle in the best position of the individual will be learned.Specific subgroup types are as follows:Extreme learning subgroup:(6)xit+1=αxit+βc1r1gt−xit,r≥pg,αxit+βc2r2nt−xit,r<pg.Compound learning subgroup:(7)xit+1=αxit+βc1r1gt−xit+c3r3pit−xit.Domain learning subgroup:(8)xit+1=αxit+βc2r2nit−xit.Random learning subgroups:(9)xit+1=αxit+βr4Xmax−Xmin2.The advantage of particle swarm optimization is to avoid the phenomenon that the evolved particles will lose their search ability after many iterations, which makes the algorithm have stronger global search ability and save the calculation times of the algorithm. At the same time, the convergence speed of the comprehensive learning particle algorithm will not lead to the decrease of population diversity, so that the algorithm will not fall into premature convergence, especially for peak and multipeak objective functions. Through the construction of learning application program, the group learning behavior is richer and the diversity of population information is increased.


## 2.1. Basic Concepts

In order to use space, some different kinds of animals will live together, and they are often more complex than other animals. At the same time, this lifestyle means high efficiency and strong creativity. Scientists have taken a fancy to this property, thus developing swarm intelligence [16]. It is precisely because of this property that the control of swarm intelligence is decentralized. Individual behavior in a group will affect other individuals, resulting in a new behavior pattern. There are five basic principles of swarm intelligence. First, all time and space can be calculated without complexity and follow the proximity principle. Secondly, the change of quality factor is closely related to the group and follows the quality principle. Third, groups should not move in a too narrow environment and follow the principle of diversity. Fourthly, groups should avoid changing their behavior with the change of environment and follow the principle of stability. Finally, the behavior of a group can be appropriately changed according to the conditions with low cost.The development history of swarm intelligence optimization algorithm is shown in Figure1.Figure 1
Development history of swarm intelligence optimization algorithm.In recent years, the main research aspect is biological swarm intelligence algorithm, and great research results and optimization strategies have also been obtained. The classification diagram of swarm intelligence algorithm is shown in Figure2.Figure 2
Classification diagram of swarm intelligence algorithm.


## 2.2. Particle Swarm Optimization

### 2.2.1. Basic Concepts

This algorithm is called PSO for short [17, 18], which is developed by researchers through exploring and summarizing the behavior of bird predation. Like birds preying in groups, the optimal solution of this algorithm also needs the cooperation among individual particles. In the process of predation, birds will learn from each other's predation experience, thus forming an exchange of experiences and making the predation process orderly. Similarly, in this algorithm, each particle also needs to realize information exchange, so that the process of finding the optimal solution can be orderly.(1) Basic PSO Algorithm. In a space that needs to be represented by D component coordinates, there are countless particles with searching ability. They are not disordered, each particle individual has its own position, and this position is the most suitable position for this individual. PSO algorithm will update the performance of particles according to the velocity update formula. At this time, the intervention of objective function will bring the position comparison before and after the update of particles, which can clearly see whether the updated position is better than the position before the update. Complete the algorithm once in this way. The PSO algorithm flowchart is shown in Figure 3.Figure 3
Flowchart of PSO algorithm.The particle iterative update formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,xit+1=xit+vit+1.where xit is the position of the i-th particle in the t-th iteration, vit is the velocity of the i-th particle in the t-th iteration, xit+1 is the position of the i-th particle in the t+1 th iteration, vit+1 is the velocity of the i-th particle in the t+1 th iteration, pit indicates the historical optimal position when the i-th particle searches to the t-th generation, pgt is the historical optimal position of the whole population when the t generation is searched, that is, the global optimal position, c1,c2 is the learning factor, usually 2, and r1, r2 is the disturbance factor, usually randomly taken within [0, 1].The values of C1, C2 and R1, R2 will affect whether the particles rush across the target region or wander outside the target region, and a better solution can be obtained when they are constant values.The performance of PSO algorithm will influence each other, which leads to the instability of PSO algorithm, so it is necessary to add linear decreasing weights.The speed update equation at this time is(2)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.The formula of linear decreasing weight strategy is as follows:(3)ωt=ωmax−ωmax−ωminGmax⋅t,where t is the current number of iterations, Gmax is the maximum number of iterations, ωmax is the initial inertia weight, and ωmin is the inertia weight at the maximum number of iterations Gmax, usually 0.4.(2) Comprehensive Learning Particle Swarm Optimization Algorithm. In order to improve PSO algorithm and solve the shortcomings of PSO algorithm, a comprehensive learning strategy is added, and the combination of the two algorithms is developed into CLPSO algorithm. The update speed of CLPSO algorithm is different from that of PSO algorithm [19], and the best position of individuals is an important basis for updating the speed of CLPSO algorithm.The comprehensive learning particle swarm optimization algorithm firstly calculates the learning probability of each particlepc. The formula is as follows:(4)pci=a+b∗exp10∗i−1/N−1exp10−1.According to the experimental experience, generallya and b are constants, usually a = 0.05 and b = 0.45.The update formula of comprehensive learning particle swarm optimization algorithm is as follows:(5)vid=w∗vid+c∗ridpbestfid,d−xid,xid=xid+vid.Pbest is the optimal position of the individual. fid is the dimension value of the d dimension in the best position of the i-th particle individual. fi=fi1,fi2,…,fiD is the learning sample vector set by particle i. pbestfid,d indicates the dimension value corresponding to the best position produced by previous iterations of a particle.Each dimension of the particle will produce a random number and compare the random number with the learning probability parameterpc. If the former is greater than the latter, the dimension of the particle in the best position in each iteration will be learned; otherwise, the dimension of the particle in the best position of the individual will be learned.Specific subgroup types are as follows:Extreme learning subgroup:(6)xit+1=αxit+βc1r1gt−xit,r≥pg,αxit+βc2r2nt−xit,r<pg.Compound learning subgroup:(7)xit+1=αxit+βc1r1gt−xit+c3r3pit−xit.Domain learning subgroup:(8)xit+1=αxit+βc2r2nit−xit.Random learning subgroups:(9)xit+1=αxit+βr4Xmax−Xmin2.The advantage of particle swarm optimization is to avoid the phenomenon that the evolved particles will lose their search ability after many iterations, which makes the algorithm have stronger global search ability and save the calculation times of the algorithm. At the same time, the convergence speed of the comprehensive learning particle algorithm will not lead to the decrease of population diversity, so that the algorithm will not fall into premature convergence, especially for peak and multipeak objective functions. Through the construction of learning application program, the group learning behavior is richer and the diversity of population information is increased.


## 2.2.1. Basic Concepts

This algorithm is called PSO for short [17, 18], which is developed by researchers through exploring and summarizing the behavior of bird predation. Like birds preying in groups, the optimal solution of this algorithm also needs the cooperation among individual particles. In the process of predation, birds will learn from each other's predation experience, thus forming an exchange of experiences and making the predation process orderly. Similarly, in this algorithm, each particle also needs to realize information exchange, so that the process of finding the optimal solution can be orderly.(1) Basic PSO Algorithm. In a space that needs to be represented by D component coordinates, there are countless particles with searching ability. They are not disordered, each particle individual has its own position, and this position is the most suitable position for this individual. PSO algorithm will update the performance of particles according to the velocity update formula. At this time, the intervention of objective function will bring the position comparison before and after the update of particles, which can clearly see whether the updated position is better than the position before the update. Complete the algorithm once in this way. The PSO algorithm flowchart is shown in Figure 3.Figure 3
Flowchart of PSO algorithm.The particle iterative update formula is as follows:(1)vit+1=vit+c1r1pit−xit+c2r2pgt−xit,xit+1=xit+vit+1.where xit is the position of the i-th particle in the t-th iteration, vit is the velocity of the i-th particle in the t-th iteration, xit+1 is the position of the i-th particle in the t+1 th iteration, vit+1 is the velocity of the i-th particle in the t+1 th iteration, pit indicates the historical optimal position when the i-th particle searches to the t-th generation, pgt is the historical optimal position of the whole population when the t generation is searched, that is, the global optimal position, c1,c2 is the learning factor, usually 2, and r1, r2 is the disturbance factor, usually randomly taken within [0, 1].The values of C1, C2 and R1, R2 will affect whether the particles rush across the target region or wander outside the target region, and a better solution can be obtained when they are constant values.The performance of PSO algorithm will influence each other, which leads to the instability of PSO algorithm, so it is necessary to add linear decreasing weights.The speed update equation at this time is(2)vit+1=ωvit+c1r1pit−xit+c2r2pgt−xit.The formula of linear decreasing weight strategy is as follows:(3)ωt=ωmax−ωmax−ωminGmax⋅t,where t is the current number of iterations, Gmax is the maximum number of iterations, ωmax is the initial inertia weight, and ωmin is the inertia weight at the maximum number of iterations Gmax, usually 0.4.(2) Comprehensive Learning Particle Swarm Optimization Algorithm. In order to improve PSO algorithm and solve the shortcomings of PSO algorithm, a comprehensive learning strategy is added, and the combination of the two algorithms is developed into CLPSO algorithm. The update speed of CLPSO algorithm is different from that of PSO algorithm [19], and the best position of individuals is an important basis for updating the speed of CLPSO algorithm.The comprehensive learning particle swarm optimization algorithm firstly calculates the learning probability of each particlepc. The formula is as follows:(4)pci=a+b∗exp10∗i−1/N−1exp10−1.According to the experimental experience, generallya and b are constants, usually a = 0.05 and b = 0.45.The update formula of comprehensive learning particle swarm optimization algorithm is as follows:(5)vid=w∗vid+c∗ridpbestfid,d−xid,xid=xid+vid.Pbest is the optimal position of the individual. fid is the dimension value of the d dimension in the best position of the i-th particle individual. fi=fi1,fi2,…,fiD is the learning sample vector set by particle i. pbestfid,d indicates the dimension value corresponding to the best position produced by previous iterations of a particle.Each dimension of the particle will produce a random number and compare the random number with the learning probability parameterpc. If the former is greater than the latter, the dimension of the particle in the best position in each iteration will be learned; otherwise, the dimension of the particle in the best position of the individual will be learned.Specific subgroup types are as follows:Extreme learning subgroup:(6)xit+1=αxit+βc1r1gt−xit,r≥pg,αxit+βc2r2nt−xit,r<pg.Compound learning subgroup:(7)xit+1=αxit+βc1r1gt−xit+c3r3pit−xit.Domain learning subgroup:(8)xit+1=αxit+βc2r2nit−xit.Random learning subgroups:(9)xit+1=αxit+βr4Xmax−Xmin2.The advantage of particle swarm optimization is to avoid the phenomenon that the evolved particles will lose their search ability after many iterations, which makes the algorithm have stronger global search ability and save the calculation times of the algorithm. At the same time, the convergence speed of the comprehensive learning particle algorithm will not lead to the decrease of population diversity, so that the algorithm will not fall into premature convergence, especially for peak and multipeak objective functions. Through the construction of learning application program, the group learning behavior is richer and the diversity of population information is increased.


## 3. Optimization Algorithm

### 3.1. Design of Hybrid Clonal Selection Particle Swarm Optimization

#### 3.1.1. Clone Selection Strategy

In order to improve the PSO, improve the convergence performance, increase the diversity of population, and avoid premature algorithm [20, 21], clonal selection strategy can be combined with PSO [22].The new population Sub is formed by the expansion and growth of the temporary clone group formed by individual extremum, and the ranking of individuals in the new population will be related to the size of affinity, and the clone size of individual extremum will increase with the increase of affinity. The formula of cloning multipleNc is as follows:(10)Nc=∑i=1Nroundβ∗Ni+1∗cm.N is Sub scale, I is the individual affinity value ranking in Sub, β indicates that the cloning coefficient is 0.8, cm indicates that the clone cardinality value is 5, and Round represents a function to round an integer.In Sub population, Cauchy mutation is used to get new mutation individuals, which increases population diversity and improves the global search ability of the algorithm. The mutation operator formula is as follows:(11)xijt+1=xijt+r∗cauchy∗xijt,where r is the parameter with a value of 10.Cauchy variogram is as follows:(12)Cauchyx=1π∗arctan−0.5+random∗10.0t+1.Random represents computer-generated random numbers from 0 to 1 and t is the number of iterations.The extreme value of the individual with the highest affinity in the mutated population is compared with the extreme value of the individual in the original population. If the former is higher than the latter, it will be updated and replaced; otherwise, it will remain unchanged. At the same time, the optimal value of individual extremum of population is compared with gbest, and if the former is higher than the latter, it is updated and replaced.


#### 3.1.2. HCSPSO Algorithm Flow

The flowchart of the HCSSPSO algorithm is shown in Figure4.Figure 4
Flowchart of HCSSPO algorithm.


#### 3.1.3. Time Complexity Analysis

The time complexity of particle swarm optimization and clonal selection strategy synthesizes the time complexity of HCSSPSO algorithm. The parameter is set asC to represent the number of parameters, T (C) to represent the time complexity of test function, and O (C).(13)TPSOC=OMaxlter∗PS∗PPSO∗TC,TCSC=OMaxlter∗PS∗NC∗TC,THCSPSOC=TPSOC+TCSC.Maxlter is the maximum number of iterations of the algorithm, PS is the population size, PPSO is the individual mutation probability in the algorithm, the value range (0, 1), and NC is the multiple of particles.


## 3.1. Design of Hybrid Clonal Selection Particle Swarm Optimization

### 3.1.1. Clone Selection Strategy

In order to improve the PSO, improve the convergence performance, increase the diversity of population, and avoid premature algorithm [20, 21], clonal selection strategy can be combined with PSO [22].The new population Sub is formed by the expansion and growth of the temporary clone group formed by individual extremum, and the ranking of individuals in the new population will be related to the size of affinity, and the clone size of individual extremum will increase with the increase of affinity. The formula of cloning multipleNc is as follows:(10)Nc=∑i=1Nroundβ∗Ni+1∗cm.N is Sub scale, I is the individual affinity value ranking in Sub, β indicates that the cloning coefficient is 0.8, cm indicates that the clone cardinality value is 5, and Round represents a function to round an integer.In Sub population, Cauchy mutation is used to get new mutation individuals, which increases population diversity and improves the global search ability of the algorithm. The mutation operator formula is as follows:(11)xijt+1=xijt+r∗cauchy∗xijt,where r is the parameter with a value of 10.Cauchy variogram is as follows:(12)Cauchyx=1π∗arctan−0.5+random∗10.0t+1.Random represents computer-generated random numbers from 0 to 1 and t is the number of iterations.The extreme value of the individual with the highest affinity in the mutated population is compared with the extreme value of the individual in the original population. If the former is higher than the latter, it will be updated and replaced; otherwise, it will remain unchanged. At the same time, the optimal value of individual extremum of population is compared with gbest, and if the former is higher than the latter, it is updated and replaced.


### 3.1.2. HCSPSO Algorithm Flow

The flowchart of the HCSSPSO algorithm is shown in Figure4.Figure 4
Flowchart of HCSSPO algorithm.


### 3.1.3. Time Complexity Analysis

The time complexity of particle swarm optimization and clonal selection strategy synthesizes the time complexity of HCSSPSO algorithm. The parameter is set asC to represent the number of parameters, T (C) to represent the time complexity of test function, and O (C).(13)TPSOC=OMaxlter∗PS∗PPSO∗TC,TCSC=OMaxlter∗PS∗NC∗TC,THCSPSOC=TPSOC+TCSC.Maxlter is the maximum number of iterations of the algorithm, PS is the population size, PPSO is the individual mutation probability in the algorithm, the value range (0, 1), and NC is the multiple of particles.


## 3.1.1. Clone Selection Strategy

In order to improve the PSO, improve the convergence performance, increase the diversity of population, and avoid premature algorithm [20, 21], clonal selection strategy can be combined with PSO [22].The new population Sub is formed by the expansion and growth of the temporary clone group formed by individual extremum, and the ranking of individuals in the new population will be related to the size of affinity, and the clone size of individual extremum will increase with the increase of affinity. The formula of cloning multipleNc is as follows:(10)Nc=∑i=1Nroundβ∗Ni+1∗cm.N is Sub scale, I is the individual affinity value ranking in Sub, β indicates that the cloning coefficient is 0.8, cm indicates that the clone cardinality value is 5, and Round represents a function to round an integer.In Sub population, Cauchy mutation is used to get new mutation individuals, which increases population diversity and improves the global search ability of the algorithm. The mutation operator formula is as follows:(11)xijt+1=xijt+r∗cauchy∗xijt,where r is the parameter with a value of 10.Cauchy variogram is as follows:(12)Cauchyx=1π∗arctan−0.5+random∗10.0t+1.Random represents computer-generated random numbers from 0 to 1 and t is the number of iterations.The extreme value of the individual with the highest affinity in the mutated population is compared with the extreme value of the individual in the original population. If the former is higher than the latter, it will be updated and replaced; otherwise, it will remain unchanged. At the same time, the optimal value of individual extremum of population is compared with gbest, and if the former is higher than the latter, it is updated and replaced.


## 3.1.2. HCSPSO Algorithm Flow

The flowchart of the HCSSPSO algorithm is shown in Figure4.Figure 4
Flowchart of HCSSPO algorithm.


## 3.1.3. Time Complexity Analysis

The time complexity of particle swarm optimization and clonal selection strategy synthesizes the time complexity of HCSSPSO algorithm. The parameter is set asC to represent the number of parameters, T (C) to represent the time complexity of test function, and O (C).(13)TPSOC=OMaxlter∗PS∗PPSO∗TC,TCSC=OMaxlter∗PS∗NC∗TC,THCSPSOC=TPSOC+TCSC.Maxlter is the maximum number of iterations of the algorithm, PS is the population size, PPSO is the individual mutation probability in the algorithm, the value range (0, 1), and NC is the multiple of particles.


## 4. Simulation Experiment

### 4.1. Convergence Curve

#### 4.1.1. Test Function and Parameter Settings

According to the selected eight test functions, in which functions 1 to 5 are single modal functions and functions 6 to 8 are multimodal functions, the HCSSPSO algorithm, basic PSO algorithm, and CLPSO algorithm are compared, and their ability and convergence speed are analyzed to verify the effectiveness of HCSSPSO algorithm.Setting parameters:Gm = 1000, pm = 0.8, Popsize = 40, cm = 5, NC = 30.The 8 standard test functions are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1D∑j=12xj2,−100≤xi≤100,f4x=∑i=1Dixi4+random0,1,−1.28≤xi≤1.28,f5x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f6x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f7x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f8x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.In this equation, the optimal solution of all functions is set to 0. In comparison, we only compare the overall performance of each algorithm, such as convergence speed, but the overall test of this algorithm is not compared with other algorithms. However, when the whole algorithm has been compared with absolute advantages, and this advantage is in line with the performance of simulation experiments, we think the comparison between the whole test and local advantages can be omitted.


#### 4.1.2. Experimental Comparison and Results

The performance of the algorithm is represented by the mean value and standard deviation of the eight test functions. The convergence rate is reflected by the mean value, while the standard deviation can show the stability of the algorithm. The experimental results are shown in Table1.Table 1
Results of different algorithms in different functions.
FunctionComputing modePSOCLPSOHCSPSOf1Average0.000171.58E − 121.72E − 42Standard deviation0.000267.70E − 132.76E − 42f2Average1.6839500Standard deviation3.8867400f3Average4101.682.56E − 012.76E − 34Standard deviation3820.526.38E − 016.72E − 34f4Average0.043915.85E − 031.20E − 06Standard deviation0.019631.11E − 033.67E − 06f5Average7.474182.51E − 081.06E − 22Standard deviation6.237885.84E − 091.78E − 22f6Average80.47389.09E − 050Standard deviation22.78351.25E − 040f7Average0.035719.02E − 094.34E − 20Standard deviation0.054398.57E − 092.94E − 20f8Average2.420143.66E − 071.57E − 14Standard deviation1.260847.57E − 087.98E − 15The function includes unimodal function and multimodal function and has a large number of local minima, which can explain the ability of each algorithm to deal with multimodal problems.It can be seen from the table that the average value and standard value data of HCSSPSO algorithm under 8 evaluation functions are better than the other two algorithms. It can be seen that clonal selection strategy can improve the performance of PSO algorithm and is higher than other optimization algorithms.The convergence curves of the three algorithms for function 1 are shown in Figure5.Figure 5
Comparison of convergence curves of three algorithms to function 1.The convergence curves of the three algorithms for function 2 are shown in Figure6.Figure 6
Comparison of convergence curves of three algorithms to function 2.The convergence curves of the three algorithms for function 3 are shown in Figure7.Figure 7
Comparison of convergence curves of three algorithms to function 3.The convergence curves of the three algorithms for function 4 are shown in Figure8.Figure 8
Comparison of convergence curves of three algorithms to function 4.The convergence curves of the three algorithms for function 5 are shown in Figure9.Figure 9
Comparison of convergence curves of three algorithms to function 5.The convergence curves of the three algorithms for function 6 are shown in Figure10.Figure 10
Comparison of convergence curves of three algorithms to function 6.The convergence curves of the three algorithms for function 7 are shown in Figure11.Figure 11
Comparison of convergence curves of three algorithms to function 7.The convergence curves of the three algorithms for function 8 are shown in Figure12.Figure 12
Comparison of convergence curves of three algorithms to function 8.From the above table, we can see that, by comparing the convergence curves obtained from eight classical evaluation functions selected by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, we can see that the convergence speed and stability of HCSSPSO algorithm are optimized compared with the other two algorithms and have better optimization ability.


### 4.2. Simulation Experiment and Parameter Setting

#### 4.2.1. Establishment of Objective Function

Community smart sports service for the elderly follows the principle of maximizing benefits, and the elderly judge their satisfaction with smart sports service. Therefore, the use of swarm intelligence algorithm should minimize the allocation cost of community intelligent sports services for the elderly, optimize the service facilities, maximize the satisfaction of the elderly, and maximize the population served. In this experiment, the region is set to N rows andM columns, and K smart sports service types are set at the same time. i and j represent cells (i, j), N represents total space, Suit represents suitability, and ω represents satisfaction. The objective function is as follows:Service configuration fee:(15)Min∑i=1n∑j=1m∑k=1kCijkNijk.Suitability of service facilities:(16)Max∑i=1n∑j=1m∑k=1kSuitijkNijk.Satisfaction of the elderly:(17)Max∑i=1n∑j=1m∑k=1kωijkNijk.Number of serviced population:(18)Max∑i=1n∑j=1m∑k=1kCdense∑i=1n∑j=1mmaxdensec×Darea×exp−r×disxcNijk.Nijk determine whether the service facility type on cell (i, j) is equal to k, the equal value is 1, and the opposite is 0. disxc represents the Euclidean distance from C to P communities. densec is the Population density on c. Darea is the size of area occupied by service facility type. exp−r×disxc is the population attraction of P community locations to C. Cdense is the objective function coefficient.


#### 4.2.2. Simulation Experiment and Result Analysis

In order to analyze the reasonable feasibility and optimization performance of HCSSPSO algorithm, an optimization model of community intelligent sports service was designed. Firstly, according to the data published by the network, the population density of the elderly in the community is calculated, and all relevant data are converted into parameter data. Assuming that the community service area is 50 × 60 units, according to the survey, the initialization data of community sports service are as follows: service A: 324, service B: 361, service C: 655, service D: 904, service E: 518, and service F: 238. After the algorithm is optimized, the data are as follows: service A: 250, service B: 473, service C: 705, service D: 964, service E: 386, and service F: 222. Publish data through the network, and the evaluation index is the objective function set in 4.2.1. After the data is unified, PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm are applied, and the results are compared. The forecast results are shown in Table2.Table 2
Forecast results.
Objective functionNumerical valueOriginal dataPSOCLPSOHCSPSOService configuration fee (10,000)8759.60498622.76908166.30767752.1985Suitability of service facilities369855378860382491390167Satisfaction of the elderly0.680.760.810.89Number of service population23160249272550926751The following is a comparison between the predicted configuration cost, service suitability, satisfaction of the elderly, and service population and the actual values after optimization by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, taking a certain 20 days as sampling points in 2020. The data comparison is shown in Table3.Table 3
Comparison of actual values and predicted values of the three algorithms.
Sampling timeCategoryActual valuePSO predictionCLPSO predictionHCSPSO prediction1Facility cost (10,000)8700880487738685Suitability0.560.550.570.59Satisfaction of the elderly0.630.550.600.69Number of service population231062104522621238912Facility cost (10,000)8667872386508600Suitability0.510.430.500.6Satisfaction of the elderly0.650.570.600.73Number of service population210852003721109220843Facility cost (10,000)8623887687328540Suitability0.670.580.650.70Satisfaction of the elderly0.700.540.600.73Number of service population272432506124101292014Facility cost (10,000)8677883287238420Suitability0.700.610.750.79Satisfaction of the elderly0.680.600.700.80Number of service population283472714028897301425Facility cost (10,000)8867910284538014Suitability0.780.690.700.80Satisfaction of the elderly0.790.650.700.85Number of service population295872720128754320486Facility cost (10,000)8593880486758103Suitability0.750.650.710.84Satisfaction of the elderly0.820.660.760.88Number of service population284992654227413304727Facility cost (10,000)8604870685008304Suitability0.840.710.800.91Satisfaction of the elderly0.880.720.800.93Number of service population301392804631284350418Facility cost (10,000)8379857184738047Suitability0.820.700.720.85Satisfaction of the elderly0.810.680.760.87Number of service population299522703628769340579Facility cost (10,000)8508893487648204Suitability0.850.750.800.90Satisfaction of the elderly0.870.670.770.93Number of service population3207930042310983547810Facility cost (10,000)8672895785347950Suitability0.800.650.780.85Satisfaction of the elderly0.830.710.760.90Number of service population3108528014307953425811Facility cost (10,000)8684880385038350Suitability0.860.760.830.90Satisfaction of the elderly0.850.740.810.95Number of service population3018527521316943504112Facility cost (10,000)8578895487648046Suitability0.790.630.750.85Satisfaction of the elderly0.800.660.780.89Number of service population3087227924295403625013Facility cost (10,000)8610901488048103Suitability0.880.680.770.94Satisfaction of the elderly0.820.720.800.93Number of service population3310531024326803657214Facility cost (10,000)8640881484157924Suitability0.900.800.870.95Satisfaction of the elderly0.890.760.840.91Number of service population3420830450330753725015Facility cost (10,000)8796892488218430Suitability0.910.750.800.95Satisfaction of the elderly0.890.770.820.91Number of service population3502434214362043852416Facility cost (10,000)8721904289408106Suitability0.900.740.850.96Satisfaction of the elderly0.900.770.830.94Number of service population3480231064350143756217Facility cost (10,000)8496862782077824Suitability0.870.680.740.90Satisfaction of the elderly0.860.730.900.93Number of service population3450633201354073852418Facility cost (10,000)8143852484107731Suitability0.920.780.900.96Satisfaction of the elderly0.930.760.890.97Number of service population3562130249351033824519Facility cost (10,000)7903832181047624Suitability0.910.840.870.93Satisfaction of the elderly0.900.740.880.91Number of service population3510231259345204064120Facility cost (10,000)7710812576587103Suitability0.900.820.850.95Satisfaction of the elderly0.950.840.900.97Number of service population36045342533725039240The actual value of facility cost is compared with the predicted values of three algorithms, such as Figure13.Figure 13
Comparison of actual forecast of facility cost.The actual suitability values are paired with the predicted values of the three algorithms, such as Figure14.Figure 14
Comparison of actual prediction of suitability value.The actual value of satisfaction of the elderly is compared with the predicted values of the three algorithms, such as Figure15.Figure 15
Comparison of actual predictions of satisfaction of the elderly.The actual value of the service population is paired with the predicted values of the three algorithms, such as Figure16.Figure 16
Comparison of actual forecast of service population.Therefore, HCSSPSO algorithm has a higher reasonable degree of resource allocation for community intelligent sports services for the elderly and has higher cost performance, suitability, satisfaction, and even population. Compared with the original data, HCSPOS algorithm greatly optimizes the configuration of community service and brings higher and more advanced community service. Compared with other algorithms, HCSSPSO algorithm is more excellent. Compared with the optimized data, the data obtained by HCSSPSO algorithm is obviously higher than other algorithms. The HCSSPSO algorithm proposed in this paper has more advantages.


## 4.1. Convergence Curve

### 4.1.1. Test Function and Parameter Settings

According to the selected eight test functions, in which functions 1 to 5 are single modal functions and functions 6 to 8 are multimodal functions, the HCSSPSO algorithm, basic PSO algorithm, and CLPSO algorithm are compared, and their ability and convergence speed are analyzed to verify the effectiveness of HCSSPSO algorithm.Setting parameters:Gm = 1000, pm = 0.8, Popsize = 40, cm = 5, NC = 30.The 8 standard test functions are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1D∑j=12xj2,−100≤xi≤100,f4x=∑i=1Dixi4+random0,1,−1.28≤xi≤1.28,f5x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f6x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f7x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f8x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.In this equation, the optimal solution of all functions is set to 0. In comparison, we only compare the overall performance of each algorithm, such as convergence speed, but the overall test of this algorithm is not compared with other algorithms. However, when the whole algorithm has been compared with absolute advantages, and this advantage is in line with the performance of simulation experiments, we think the comparison between the whole test and local advantages can be omitted.


### 4.1.2. Experimental Comparison and Results

The performance of the algorithm is represented by the mean value and standard deviation of the eight test functions. The convergence rate is reflected by the mean value, while the standard deviation can show the stability of the algorithm. The experimental results are shown in Table1.Table 1
Results of different algorithms in different functions.
FunctionComputing modePSOCLPSOHCSPSOf1Average0.000171.58E − 121.72E − 42Standard deviation0.000267.70E − 132.76E − 42f2Average1.6839500Standard deviation3.8867400f3Average4101.682.56E − 012.76E − 34Standard deviation3820.526.38E − 016.72E − 34f4Average0.043915.85E − 031.20E − 06Standard deviation0.019631.11E − 033.67E − 06f5Average7.474182.51E − 081.06E − 22Standard deviation6.237885.84E − 091.78E − 22f6Average80.47389.09E − 050Standard deviation22.78351.25E − 040f7Average0.035719.02E − 094.34E − 20Standard deviation0.054398.57E − 092.94E − 20f8Average2.420143.66E − 071.57E − 14Standard deviation1.260847.57E − 087.98E − 15The function includes unimodal function and multimodal function and has a large number of local minima, which can explain the ability of each algorithm to deal with multimodal problems.It can be seen from the table that the average value and standard value data of HCSSPSO algorithm under 8 evaluation functions are better than the other two algorithms. It can be seen that clonal selection strategy can improve the performance of PSO algorithm and is higher than other optimization algorithms.The convergence curves of the three algorithms for function 1 are shown in Figure5.Figure 5
Comparison of convergence curves of three algorithms to function 1.The convergence curves of the three algorithms for function 2 are shown in Figure6.Figure 6
Comparison of convergence curves of three algorithms to function 2.The convergence curves of the three algorithms for function 3 are shown in Figure7.Figure 7
Comparison of convergence curves of three algorithms to function 3.The convergence curves of the three algorithms for function 4 are shown in Figure8.Figure 8
Comparison of convergence curves of three algorithms to function 4.The convergence curves of the three algorithms for function 5 are shown in Figure9.Figure 9
Comparison of convergence curves of three algorithms to function 5.The convergence curves of the three algorithms for function 6 are shown in Figure10.Figure 10
Comparison of convergence curves of three algorithms to function 6.The convergence curves of the three algorithms for function 7 are shown in Figure11.Figure 11
Comparison of convergence curves of three algorithms to function 7.The convergence curves of the three algorithms for function 8 are shown in Figure12.Figure 12
Comparison of convergence curves of three algorithms to function 8.From the above table, we can see that, by comparing the convergence curves obtained from eight classical evaluation functions selected by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, we can see that the convergence speed and stability of HCSSPSO algorithm are optimized compared with the other two algorithms and have better optimization ability.


## 4.1.1. Test Function and Parameter Settings

According to the selected eight test functions, in which functions 1 to 5 are single modal functions and functions 6 to 8 are multimodal functions, the HCSSPSO algorithm, basic PSO algorithm, and CLPSO algorithm are compared, and their ability and convergence speed are analyzed to verify the effectiveness of HCSSPSO algorithm.Setting parameters:Gm = 1000, pm = 0.8, Popsize = 40, cm = 5, NC = 30.The 8 standard test functions are as follows:(14)f1x=∑i=1Dxi2,−100≤xi≤100,f2x=∑i=1Dxi+0.52,−100≤xi≤100,f3x=∑i=1D∑j=12xj2,−100≤xi≤100,f4x=∑i=1Dixi4+random0,1,−1.28≤xi≤1.28,f5x=∑i=1Dxi+∏i=1Dxi,−10≤xi≤10,f6x=∑i=1Dxi2−10cos2πxi+10,−5.12≤xi≤5.12,f7x=1400∑i=1Dxi2−∏i=1Dcosxii+1,−300≤xi≤300,f8x=−20exp−0.21D∑i=1Dxi−1D∑i=1Dcos2πxi+20+e,−32≤xi≤32.In this equation, the optimal solution of all functions is set to 0. In comparison, we only compare the overall performance of each algorithm, such as convergence speed, but the overall test of this algorithm is not compared with other algorithms. However, when the whole algorithm has been compared with absolute advantages, and this advantage is in line with the performance of simulation experiments, we think the comparison between the whole test and local advantages can be omitted.


## 4.1.2. Experimental Comparison and Results

The performance of the algorithm is represented by the mean value and standard deviation of the eight test functions. The convergence rate is reflected by the mean value, while the standard deviation can show the stability of the algorithm. The experimental results are shown in Table1.Table 1
Results of different algorithms in different functions.
FunctionComputing modePSOCLPSOHCSPSOf1Average0.000171.58E − 121.72E − 42Standard deviation0.000267.70E − 132.76E − 42f2Average1.6839500Standard deviation3.8867400f3Average4101.682.56E − 012.76E − 34Standard deviation3820.526.38E − 016.72E − 34f4Average0.043915.85E − 031.20E − 06Standard deviation0.019631.11E − 033.67E − 06f5Average7.474182.51E − 081.06E − 22Standard deviation6.237885.84E − 091.78E − 22f6Average80.47389.09E − 050Standard deviation22.78351.25E − 040f7Average0.035719.02E − 094.34E − 20Standard deviation0.054398.57E − 092.94E − 20f8Average2.420143.66E − 071.57E − 14Standard deviation1.260847.57E − 087.98E − 15The function includes unimodal function and multimodal function and has a large number of local minima, which can explain the ability of each algorithm to deal with multimodal problems.It can be seen from the table that the average value and standard value data of HCSSPSO algorithm under 8 evaluation functions are better than the other two algorithms. It can be seen that clonal selection strategy can improve the performance of PSO algorithm and is higher than other optimization algorithms.The convergence curves of the three algorithms for function 1 are shown in Figure5.Figure 5
Comparison of convergence curves of three algorithms to function 1.The convergence curves of the three algorithms for function 2 are shown in Figure6.Figure 6
Comparison of convergence curves of three algorithms to function 2.The convergence curves of the three algorithms for function 3 are shown in Figure7.Figure 7
Comparison of convergence curves of three algorithms to function 3.The convergence curves of the three algorithms for function 4 are shown in Figure8.Figure 8
Comparison of convergence curves of three algorithms to function 4.The convergence curves of the three algorithms for function 5 are shown in Figure9.Figure 9
Comparison of convergence curves of three algorithms to function 5.The convergence curves of the three algorithms for function 6 are shown in Figure10.Figure 10
Comparison of convergence curves of three algorithms to function 6.The convergence curves of the three algorithms for function 7 are shown in Figure11.Figure 11
Comparison of convergence curves of three algorithms to function 7.The convergence curves of the three algorithms for function 8 are shown in Figure12.Figure 12
Comparison of convergence curves of three algorithms to function 8.From the above table, we can see that, by comparing the convergence curves obtained from eight classical evaluation functions selected by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, we can see that the convergence speed and stability of HCSSPSO algorithm are optimized compared with the other two algorithms and have better optimization ability.


## 4.2. Simulation Experiment and Parameter Setting

### 4.2.1. Establishment of Objective Function

Community smart sports service for the elderly follows the principle of maximizing benefits, and the elderly judge their satisfaction with smart sports service. Therefore, the use of swarm intelligence algorithm should minimize the allocation cost of community intelligent sports services for the elderly, optimize the service facilities, maximize the satisfaction of the elderly, and maximize the population served. In this experiment, the region is set to N rows andM columns, and K smart sports service types are set at the same time. i and j represent cells (i, j), N represents total space, Suit represents suitability, and ω represents satisfaction. The objective function is as follows:Service configuration fee:(15)Min∑i=1n∑j=1m∑k=1kCijkNijk.Suitability of service facilities:(16)Max∑i=1n∑j=1m∑k=1kSuitijkNijk.Satisfaction of the elderly:(17)Max∑i=1n∑j=1m∑k=1kωijkNijk.Number of serviced population:(18)Max∑i=1n∑j=1m∑k=1kCdense∑i=1n∑j=1mmaxdensec×Darea×exp−r×disxcNijk.Nijk determine whether the service facility type on cell (i, j) is equal to k, the equal value is 1, and the opposite is 0. disxc represents the Euclidean distance from C to P communities. densec is the Population density on c. Darea is the size of area occupied by service facility type. exp−r×disxc is the population attraction of P community locations to C. Cdense is the objective function coefficient.


### 4.2.2. Simulation Experiment and Result Analysis

In order to analyze the reasonable feasibility and optimization performance of HCSSPSO algorithm, an optimization model of community intelligent sports service was designed. Firstly, according to the data published by the network, the population density of the elderly in the community is calculated, and all relevant data are converted into parameter data. Assuming that the community service area is 50 × 60 units, according to the survey, the initialization data of community sports service are as follows: service A: 324, service B: 361, service C: 655, service D: 904, service E: 518, and service F: 238. After the algorithm is optimized, the data are as follows: service A: 250, service B: 473, service C: 705, service D: 964, service E: 386, and service F: 222. Publish data through the network, and the evaluation index is the objective function set in 4.2.1. After the data is unified, PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm are applied, and the results are compared. The forecast results are shown in Table2.Table 2
Forecast results.
Objective functionNumerical valueOriginal dataPSOCLPSOHCSPSOService configuration fee (10,000)8759.60498622.76908166.30767752.1985Suitability of service facilities369855378860382491390167Satisfaction of the elderly0.680.760.810.89Number of service population23160249272550926751The following is a comparison between the predicted configuration cost, service suitability, satisfaction of the elderly, and service population and the actual values after optimization by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, taking a certain 20 days as sampling points in 2020. The data comparison is shown in Table3.Table 3
Comparison of actual values and predicted values of the three algorithms.
Sampling timeCategoryActual valuePSO predictionCLPSO predictionHCSPSO prediction1Facility cost (10,000)8700880487738685Suitability0.560.550.570.59Satisfaction of the elderly0.630.550.600.69Number of service population231062104522621238912Facility cost (10,000)8667872386508600Suitability0.510.430.500.6Satisfaction of the elderly0.650.570.600.73Number of service population210852003721109220843Facility cost (10,000)8623887687328540Suitability0.670.580.650.70Satisfaction of the elderly0.700.540.600.73Number of service population272432506124101292014Facility cost (10,000)8677883287238420Suitability0.700.610.750.79Satisfaction of the elderly0.680.600.700.80Number of service population283472714028897301425Facility cost (10,000)8867910284538014Suitability0.780.690.700.80Satisfaction of the elderly0.790.650.700.85Number of service population295872720128754320486Facility cost (10,000)8593880486758103Suitability0.750.650.710.84Satisfaction of the elderly0.820.660.760.88Number of service population284992654227413304727Facility cost (10,000)8604870685008304Suitability0.840.710.800.91Satisfaction of the elderly0.880.720.800.93Number of service population301392804631284350418Facility cost (10,000)8379857184738047Suitability0.820.700.720.85Satisfaction of the elderly0.810.680.760.87Number of service population299522703628769340579Facility cost (10,000)8508893487648204Suitability0.850.750.800.90Satisfaction of the elderly0.870.670.770.93Number of service population3207930042310983547810Facility cost (10,000)8672895785347950Suitability0.800.650.780.85Satisfaction of the elderly0.830.710.760.90Number of service population3108528014307953425811Facility cost (10,000)8684880385038350Suitability0.860.760.830.90Satisfaction of the elderly0.850.740.810.95Number of service population3018527521316943504112Facility cost (10,000)8578895487648046Suitability0.790.630.750.85Satisfaction of the elderly0.800.660.780.89Number of service population3087227924295403625013Facility cost (10,000)8610901488048103Suitability0.880.680.770.94Satisfaction of the elderly0.820.720.800.93Number of service population3310531024326803657214Facility cost (10,000)8640881484157924Suitability0.900.800.870.95Satisfaction of the elderly0.890.760.840.91Number of service population3420830450330753725015Facility cost (10,000)8796892488218430Suitability0.910.750.800.95Satisfaction of the elderly0.890.770.820.91Number of service population3502434214362043852416Facility cost (10,000)8721904289408106Suitability0.900.740.850.96Satisfaction of the elderly0.900.770.830.94Number of service population3480231064350143756217Facility cost (10,000)8496862782077824Suitability0.870.680.740.90Satisfaction of the elderly0.860.730.900.93Number of service population3450633201354073852418Facility cost (10,000)8143852484107731Suitability0.920.780.900.96Satisfaction of the elderly0.930.760.890.97Number of service population3562130249351033824519Facility cost (10,000)7903832181047624Suitability0.910.840.870.93Satisfaction of the elderly0.900.740.880.91Number of service population3510231259345204064120Facility cost (10,000)7710812576587103Suitability0.900.820.850.95Satisfaction of the elderly0.950.840.900.97Number of service population36045342533725039240The actual value of facility cost is compared with the predicted values of three algorithms, such as Figure13.Figure 13
Comparison of actual forecast of facility cost.The actual suitability values are paired with the predicted values of the three algorithms, such as Figure14.Figure 14
Comparison of actual prediction of suitability value.The actual value of satisfaction of the elderly is compared with the predicted values of the three algorithms, such as Figure15.Figure 15
Comparison of actual predictions of satisfaction of the elderly.The actual value of the service population is paired with the predicted values of the three algorithms, such as Figure16.Figure 16
Comparison of actual forecast of service population.Therefore, HCSSPSO algorithm has a higher reasonable degree of resource allocation for community intelligent sports services for the elderly and has higher cost performance, suitability, satisfaction, and even population. Compared with the original data, HCSPOS algorithm greatly optimizes the configuration of community service and brings higher and more advanced community service. Compared with other algorithms, HCSSPSO algorithm is more excellent. Compared with the optimized data, the data obtained by HCSSPSO algorithm is obviously higher than other algorithms. The HCSSPSO algorithm proposed in this paper has more advantages.


## 4.2.1. Establishment of Objective Function

Community smart sports service for the elderly follows the principle of maximizing benefits, and the elderly judge their satisfaction with smart sports service. Therefore, the use of swarm intelligence algorithm should minimize the allocation cost of community intelligent sports services for the elderly, optimize the service facilities, maximize the satisfaction of the elderly, and maximize the population served. In this experiment, the region is set to N rows andM columns, and K smart sports service types are set at the same time. i and j represent cells (i, j), N represents total space, Suit represents suitability, and ω represents satisfaction. The objective function is as follows:Service configuration fee:(15)Min∑i=1n∑j=1m∑k=1kCijkNijk.Suitability of service facilities:(16)Max∑i=1n∑j=1m∑k=1kSuitijkNijk.Satisfaction of the elderly:(17)Max∑i=1n∑j=1m∑k=1kωijkNijk.Number of serviced population:(18)Max∑i=1n∑j=1m∑k=1kCdense∑i=1n∑j=1mmaxdensec×Darea×exp−r×disxcNijk.Nijk determine whether the service facility type on cell (i, j) is equal to k, the equal value is 1, and the opposite is 0. disxc represents the Euclidean distance from C to P communities. densec is the Population density on c. Darea is the size of area occupied by service facility type. exp−r×disxc is the population attraction of P community locations to C. Cdense is the objective function coefficient.


## 4.2.2. Simulation Experiment and Result Analysis

In order to analyze the reasonable feasibility and optimization performance of HCSSPSO algorithm, an optimization model of community intelligent sports service was designed. Firstly, according to the data published by the network, the population density of the elderly in the community is calculated, and all relevant data are converted into parameter data. Assuming that the community service area is 50 × 60 units, according to the survey, the initialization data of community sports service are as follows: service A: 324, service B: 361, service C: 655, service D: 904, service E: 518, and service F: 238. After the algorithm is optimized, the data are as follows: service A: 250, service B: 473, service C: 705, service D: 964, service E: 386, and service F: 222. Publish data through the network, and the evaluation index is the objective function set in 4.2.1. After the data is unified, PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm are applied, and the results are compared. The forecast results are shown in Table2.Table 2
Forecast results.
Objective functionNumerical valueOriginal dataPSOCLPSOHCSPSOService configuration fee (10,000)8759.60498622.76908166.30767752.1985Suitability of service facilities369855378860382491390167Satisfaction of the elderly0.680.760.810.89Number of service population23160249272550926751The following is a comparison between the predicted configuration cost, service suitability, satisfaction of the elderly, and service population and the actual values after optimization by PSO algorithm, CLPSO algorithm, and HCSSPSO algorithm, taking a certain 20 days as sampling points in 2020. The data comparison is shown in Table3.Table 3
Comparison of actual values and predicted values of the three algorithms.
Sampling timeCategoryActual valuePSO predictionCLPSO predictionHCSPSO prediction1Facility cost (10,000)8700880487738685Suitability0.560.550.570.59Satisfaction of the elderly0.630.550.600.69Number of service population231062104522621238912Facility cost (10,000)8667872386508600Suitability0.510.430.500.6Satisfaction of the elderly0.650.570.600.73Number of service population210852003721109220843Facility cost (10,000)8623887687328540Suitability0.670.580.650.70Satisfaction of the elderly0.700.540.600.73Number of service population272432506124101292014Facility cost (10,000)8677883287238420Suitability0.700.610.750.79Satisfaction of the elderly0.680.600.700.80Number of service population283472714028897301425Facility cost (10,000)8867910284538014Suitability0.780.690.700.80Satisfaction of the elderly0.790.650.700.85Number of service population295872720128754320486Facility cost (10,000)8593880486758103Suitability0.750.650.710.84Satisfaction of the elderly0.820.660.760.88Number of service population284992654227413304727Facility cost (10,000)8604870685008304Suitability0.840.710.800.91Satisfaction of the elderly0.880.720.800.93Number of service population301392804631284350418Facility cost (10,000)8379857184738047Suitability0.820.700.720.85Satisfaction of the elderly0.810.680.760.87Number of service population299522703628769340579Facility cost (10,000)8508893487648204Suitability0.850.750.800.90Satisfaction of the elderly0.870.670.770.93Number of service population3207930042310983547810Facility cost (10,000)8672895785347950Suitability0.800.650.780.85Satisfaction of the elderly0.830.710.760.90Number of service population3108528014307953425811Facility cost (10,000)8684880385038350Suitability0.860.760.830.90Satisfaction of the elderly0.850.740.810.95Number of service population3018527521316943504112Facility cost (10,000)8578895487648046Suitability0.790.630.750.85Satisfaction of the elderly0.800.660.780.89Number of service population3087227924295403625013Facility cost (10,000)8610901488048103Suitability0.880.680.770.94Satisfaction of the elderly0.820.720.800.93Number of service population3310531024326803657214Facility cost (10,000)8640881484157924Suitability0.900.800.870.95Satisfaction of the elderly0.890.760.840.91Number of service population3420830450330753725015Facility cost (10,000)8796892488218430Suitability0.910.750.800.95Satisfaction of the elderly0.890.770.820.91Number of service population3502434214362043852416Facility cost (10,000)8721904289408106Suitability0.900.740.850.96Satisfaction of the elderly0.900.770.830.94Number of service population3480231064350143756217Facility cost (10,000)8496862782077824Suitability0.870.680.740.90Satisfaction of the elderly0.860.730.900.93Number of service population3450633201354073852418Facility cost (10,000)8143852484107731Suitability0.920.780.900.96Satisfaction of the elderly0.930.760.890.97Number of service population3562130249351033824519Facility cost (10,000)7903832181047624Suitability0.910.840.870.93Satisfaction of the elderly0.900.740.880.91Number of service population3510231259345204064120Facility cost (10,000)7710812576587103Suitability0.900.820.850.95Satisfaction of the elderly0.950.840.900.97Number of service population36045342533725039240The actual value of facility cost is compared with the predicted values of three algorithms, such as Figure13.Figure 13
Comparison of actual forecast of facility cost.The actual suitability values are paired with the predicted values of the three algorithms, such as Figure14.Figure 14
Comparison of actual prediction of suitability value.The actual value of satisfaction of the elderly is compared with the predicted values of the three algorithms, such as Figure15.Figure 15
Comparison of actual predictions of satisfaction of the elderly.The actual value of the service population is paired with the predicted values of the three algorithms, such as Figure16.Figure 16
Comparison of actual forecast of service population.Therefore, HCSSPSO algorithm has a higher reasonable degree of resource allocation for community intelligent sports services for the elderly and has higher cost performance, suitability, satisfaction, and even population. Compared with the original data, HCSPOS algorithm greatly optimizes the configuration of community service and brings higher and more advanced community service. Compared with other algorithms, HCSSPSO algorithm is more excellent. Compared with the optimized data, the data obtained by HCSSPSO algorithm is obviously higher than other algorithms. The HCSSPSO algorithm proposed in this paper has more advantages.


## 5. Conclusion

Because PSO algorithm has some shortcomings, it may bring premature problem and cannot guarantee population diversity, so it is not suitable as an algorithm for optimizing intelligent sports. Therefore, this paper proposes HCSSPSO algorithm, which combines PSO algorithm with clonal selection strategy. Compared with PSO algorithm and CLPSO algorithm, it has better convergence speed and stability and is more suitable for resource allocation and optimization of community intelligent sports services for the elderly.



---

*Source: 1185533-2021-12-21.xml*