# A Recommendation Method of National Fitness Items Based on Neural Network Algorithm

Authors: Liangming Li; Aihua Yang
Journal: Scientific Programming
 (2022)

---

## Abstract

In order to improve the effectiveness of national fitness programs, this article analyzes the method of national fitness items recommendation based on a neural network algorithm. By using the time and space characteristics of fitness users’ sign-in, a novel POI recommendation model is proposed, and a novel fusion method is proposed to combine similarity and spatial similarity to achieve the final similarity calculation based on fitness users’ temporal and spatial preferences. In addition, in order to model the spatial similarity of fitness users, the Voronoi diagram is constructed by using the geographic locations of all POIs. Finally, this paper constructs a recommendation system for national fitness items based on a neural network algorithm. The experimental research results show that the national fitness program recommendation system proposed in this article basically meets the expected demand.


---

## Body

## 1. Introduction

The implementation of the national fitness program and the development of mass sports have improved the overall quantity and quality of China’s sports population. However, only participating in physical exercises cannot meet people’s fitness needs. The development of sports events, especially mass sports events, should be enriched. The relationship between mass physical exercises and mass sports events complements and promotes each other. Mass sports events are the display of the results of mass sports exercises, the best test of fitness activities, can better motivate and drive the masses to participate in sports exercises, and play a “leveraging” role in setting off a mass sports climax. Mass sports are the basis for conducting mass sports events, and they support and guarantee the development of mass sports events [1]. Mass sports events set off a fitness craze among the masses, allowing them to show their strong physiques and fighting spirit, while also forming a carnival that focuses on participation, national fitness, and happy sports. Moreover, they promote the improvement of the masses’ awareness of physical exercise and the development of lifelong physical exercise habits, so that fitness can be integrated into the daily life of the masses [2].National fitness is an important foundation for building a healthy China and an inevitable requirement for the people to yearn for a better life. The improvement of the national fitness system can enhance the country’s overall national strength and reflect the level of social civilization. This study conducted research on the construction of the nationwide fitness system, deeply explores the relevant laws, regulations, policy documents, etc. promulgated by China for the development of nationwide fitness programs and finds the problems and shortcomings in the development of nationwide fitness programs. This has important practical significance for improving the construction of the nationwide fitness system, fully implementing the nationwide fitness strategy, and accelerating the construction of a sports power [3].With the continuous development and progress of the times, the domestic economic development continues to accelerate, people’s income is further increased, the quality of life is improved, and people’s needs for quality of life and sports activities are increasing. However, from the current basic situation, there are still many problems in public sports services, and the quality level cannot meet actual needs. With the holding of the Olympic Games, the whole people’s love for sports has set off a frenzy on the land of China. The manifestation of this contradiction is very prominent.With the continuous development and progress of the times, people have more and more demands for quality of life and sports activities. However, judging from the current domestic basic situation, there are serious deficiencies in the supply and construction of related infrastructure. Everyone has a relatively limited number of fitness venues. The common problem is that the existing fitness venues are not used efficiently at this stage. The popularity of fitness education among people is generally low. There are no unified system standard, legal conditions, and scientific and reasonable fitness requirements for the development of fitness among the whole people. It is necessary to continuously rationalize the operation mode and operation mechanism of the national fitness program and improve and innovatively deepen reforms.According to the actual needs of the national fitness program, this paper combines the neural network algorithm to construct the national fitness program recommendation system to improve the recommendation efficiency of the national fitness program.


## 2. Related Works

For the understanding of the national fitness program’s mechanism, Ferguson et al.’s [4] point of view is that it can provide all the people with basic conditions for physical exercise activities and the creation of the environment to meet public’s basic requirements for physical fitness. The physical quality has been significantly improved, and the related services and guarantee systems are produced by it. Kimasi et al.’s [5] view is that the national fitness system should be a system that has a direct impact on and restricts the participation of all people in fitness activities, comprehensively improves the overall physique of the people, and serves, adapts, and guarantees a comprehensive physique. The basic structural framework of the mechanism is the organization, activity, and material guarantee related to fitness activities. There are many support systems that can meet diversified and different requirements at the same time. Service and management are as important as the integrity structure, openness, and effectiveness. Literature [6] conducts research and analysis on the relevant systems of social sports instructors. The system mechanism of sports instructors has two parts: “Social Sports Instructor Technical Grade System” and “Social Sports Instructor National Professional Standards.” The research direction of the literature [7] is to focus on the basic status of fitness for all the people in China. Through investigation and analysis, it is concluded that the problems in the process of fitness for the whole people are as follows: the source of funds is relatively single, there is no professional social nature, sports instructors, there is no conscious structure of participating in physical exercises in the subconsciousness of farmers [8], and the sports management mechanism in rural areas is very backward [9]. The research direction of the literature [10] is the characteristics of the population participating in sports. In terms of gender, men are generally higher than women. In terms of geographic composition, cities are generally higher than rural areas and the east is higher than the west. In terms of age, the two ends are taller, and the middle is shorter like a pommel horse-shaped structure. At the same time, it also clearly pointed out that the entry point for the improvement of the demographic structure in sports is the country’s policy solution to social problems.When the researcher Dong Li analyzed, according to the relevance of content and level, the formation of the national fitness system was divided into categories [11]. Divided according to the level, the national fitness mechanism can be divided into national and provincial levels in different regions, and a more detailed national fitness system should be built in the city to form the entire national fitness-related mechanism in the city [12]. To distinguish from the level, the content structure of the national fitness system is composed of basic services and basic guarantees, and a comprehensive analysis on the existing relationship level should be conducted. Comprehensive research on various elements should be conducted, and a reasonable combination should be carried out. Continuous improvement of the operation form and operation system of the fitness business and coordination of all the elements should be carried out, so as to give full play to the basic role of the national fitness operation mechanism [13]. According to the analysis carried out by Mountjoy et al. [14], the factors that influence the national fitness service mechanism include different types. The basic content can be summarized as the formulation and implementation of policies and systems, the arrangement and organization of fitness activities, the investment of funds, and so on.. Regarding the supply and construction of related infrastructure, the collection and analysis of information and materials, etc., through the research and analysis of these levels, we can more scientifically and reasonably grasp the operating mechanism related to national fitness. Pulido et al. [15] points out that the establishment of a national fitness service mechanism needs to focus on research and development from the following five aspects: publicity, construction of facilities and equipment, scientific guidance, dynamic monitoring, and organizational management.


## 3. A Recommendation Method of National Fitness Items Based on a Neural Network Algorithm

This paper proposes a novel POI recommendation model by using the time and space characteristics of fitness users’ sign-in. The POI recommendation problem is defined as follows: when the sign-in record of the target fitness user is given, the main task of POI recommendation is to recommend the top-k positions that may be of interest to the fitness user. Table1 lists some symbols that need to be used.Table 1
Symbol description.
SymbolIllustrateUCollection of all fitness usersuiThe i-th fitness user inUPCollection of all POIspiThe i-th sign-in point inPSiCollection of check-in points visited by the fitness useruiPTTime category preference matrix of fitness usersKNumber of similar fitness usersThe model implements the POI personalized recommendation problem. The general idea is as follows: after the target fitness userui is given, the system first searches for a collection of fitness users with similar temporal and spatial characteristics to the target fitness user ui. In addition, the personalized recommendation system should not set a fixed K-nearest neighbor value for all fitness users. Therefore, our system has proposed a set of adaptive K-nearest neighbor algorithm, which can select different K-nearest neighbors for different fitness users, so as to provide personalized location recommendation services for fitness users. Finally, based on the idea of collaborative filtering, suitable points of interest are selected and recommended to target fitness users.Our model is designed with two modules: a fitness user similarity module that integrates temporal and spatial characteristics and a point-of-interest recommendation module. The details of these two modules will be introduced below.In order to find fitness user groups with temporal and spatial similarity to the target fitness user, this research will model the temporal and spatial characteristics of fitness users, respectively, and then, design a personalized calculation method of fitness user similarity.Generally, fitness users display different preferences at different time intervals. Each time interval is represented by a time ID, and the timestamp of each check-in record belongs to an interval. In order to model the time characteristics of fitness users, we construct a third-order tensorX∈RU×T×C, where U, T, and C represent the number of fitness users, the number of time intervals, and the number of categories, respectively.The tensor decomposition can be used to alleviate missing or sparse data and explore the potential associations of fitness users, time, and POI categories. To avoid those negative values which have no meaning for the preference measure during the restoration process, we add non-negative constraints in the decomposition process. The decomposition formula is as follows:(1)X=G×1A×2B×3C.After non-negative tensor decomposition, we obtain a time-related preference matrix for each fitness user, as shown in Figure1. In order to more accurately infer the time preference characteristics of fitness users, we normalize the sum of each row of the matrix. Therefore, the matrix shows a certain fitness user’s preference for POI categories at different time intervals.Figure 1
Time influence modeling.We usePTi to represent the time category preference matrix of the fitness user ui. PTi1,1 represents the access probability of the fitness user ui accessing the POI of the category c1 at a time interval t1. Therefore, the similarity of preferences of different fitness users based on time is expressed as follows [16]:(2)φui,uj=∑PTi⊙PTj∑si,k∈PTisi,k2∑sj,k∈PTjsj,k2.In order to model the spatial activity preferences of fitness users, we use the geographic locations of all POIs to construct a Voronoi diagram. Specifically, as shown in Figure2, the entire city is divided into multiple Voronoi grids. Therefore, a fitness user’s spatial activity preference can be reflected by including a set of POIs that he has visited.Figure 2
Example of a Voronoi diagram.We use the Voronoi diagram to check the geographic check-in locations of fitness users because the Voronoi diagram can define whether two POIs are adjacent or not more reasonably than the Euclidean distance. In different areas of the city, the distribution of interest points of fitness users when signing in may be sparse or dense. Obviously, in sparse areas, the area of Voronoi grid cells is relatively large, while in dense areas, where check-in points are distributed, the area of Voronoi grid cells is relatively small. Therefore, it can provide an adaptive estimate of the distance between POIs.After the Voronoi diagram is constructed, we can measure the similarity of the spatial activities of the two fitness users by exploring whether there are overlaps or adjacent Voronoi grid units in the check-in records of the two fitness users. For two fitness usersui and uj, our steps to calculate the spatial similarity are as follows:(1)
For each check-in pointpr in the fitness user check-in set, we use formula (3) to calculate the similarity of each check-in point p [17]:(3)yr=logUnr.Among them,U represents the total number of fitness users in the check-in set, and nr is the number of fitness users who have visited pr.(2)
The algorithm constructs an array Y to store the similarity of each POI and uses the minimum and maximum normalization method to realize the normalization of Y.(3)
The algorithm constructs setSi and Sj to store fitness users ui- and uj-visited check-in points, respectively. The algorithm constructs set A and B such that A=Si∩Sj and B=Si∪Sj.(4)
The algorithm constructs a setC such that C=B-A. The D set is a subset of the C set. The D set stores each pair of adjacent POIs visited by fitness users ui and uj in the Voronoi diagram. Therefore, we use formula (4) to count the spatial similarity between ui and uj [18]:(4)ωui,uj=∑pr∈Ayr+1/2∑pm,pn∈Dym+yn/2B.After two fitness usersui and uj are given, we first calculate the time similarity and spatial similarity, respectively. A novel fusion method is proposed to combine them together to realize the final similarity calculation based on the temporal and spatial preferences of fitness users. Our model uses two weights to reflect the influence of time preference and spatial preference characteristics, respectively. The specific calculation is as (5)simui,uj=αφui,uj+βωui,uj.By using our fusion similarity calculation method, the similarity between each pair of fitness users can be obtained. We set the number of neighborsK = {1,2,3,4, ..., 20} and set the fitness user ui. According to the top K most similar fitness users, the recommended score for each POI can be calculated as follows:(6)scorei,j,k=∑uq∈Ksimui,uq×rq,j,(7)rq,j=Mini+Maxi−MiniMaxq−Minq×fq,j−Minq.In formula (7), fq,j represents the access probability of the fitness user uq at the check-in point pj. In formula (6), rq,j is the result of the normalization of fq,j. rq,j represents the pseudoscoring of the fitness user uq on the pj at the check-in point. The range of the check-in probability of the fitness user n at each POI is between Maxi and Mini.In order to improve the accuracy of the recommendation, we use an adaptive K-nearest neighbor algorithm to determine the value of K. That is, for different fitness users, we select a different number of similar fitness users to generate the corresponding recommendation list. The specific steps of our algorithm are as follows:(1)
For different K value selections, we use formula (8) to calculate the corresponding recommendation error:(8)errori=∑j∈Siri,j−scorei,j,kSi.In formula (8), ri,j represents the pseudorating of the fitness user ui on the check-in point pj. Score(i,j,k) represents the recommendation score of the fitness user ui on the check-in point pj based on the top K most similar fitness users. Si represents the records of POIs actually visited by fitness users in the training set.(2)
The algorithm selects the K value that causes the least error as the number of the most similar fitness user groups to recommend points of interest.Then, we propose the next POI recommendation system. We will describe the overall framework of the model. As shown in Figure3, our next POI recommendation system consists of two main parts: a context-aware similarity calculation module and a point-of-interest recommendation module.Figure 3
Schematic diagram of the system model.For each fitness user, we connect all check-in records to construct a virtual trajectory of the fitness user. Therefore, each fitness user has six virtual trajectories corresponding to 6 time intervals.Figure4 shows the construction of a virtual trajectory for fitness users. The Voronoi diagram is constructed by using three kinds of information: time, latitude, and longitude. Moreover, the constructed trajectory is not the real exercise trajectory of the fitness user but a virtual trajectory constructed by Voronoi, and the virtual trajectory is only used for the calculation of the similarity of the fitness user.Figure 4
Example of construction of the virtual trajectory for fitness users.We set a target fitness userui. tk is the geographic location of the check-in point pk, and ck represents a specific category of the check-in point pk [19].We first set a virtual trajectory for the target fitness userui.We divide the virtual trajectory of the fitness userui into n groups. The detailed steps are as follows:(1)
The algorithm constructs an empty set groupk for each sign-in point pkpk∈Lqi of the fitness user ui.(2)
The algorithm constructs a virtual trajectory for the fitness useruj, denoted by Lqj.For each check-in pointpkpk∈Lqi, the algorithm calculates tm−tk.The algorithm compares each time distance and finds the check-in pointpmn closest to pm in the check-in time, where pmin∈Lqi.Figure5 shows an example diagram of the trajectory division, and there may be empty sets in these groups.Figure 5
Schematic diagram of fitness user trajectory grouping.By considering the time characteristics, our method successfully converts the trajectory similarity calculation into the similarity calculation between each check-in pointpx and the check-in point in the corresponding group. The specific similarity calculation formula is as follows:(9)simuserui,uj=∑k=1nsimpk,groupkn,(10)simpk,groupk=∑pm∈groupsimpointpk,pmgroupk.Specifically, in formula (9), simuserpk,sroupk represents the fitness track between fitness users Ui and Uj in a given time interval. n represents the virtual fitness track length of the fitness user ui. simpk,sroupk represents the similarity between the fitness location pkpk∈Lqi and its corresponding set. In formula (10), simpk,sroupk represents the similarity between the fitness location pkpk∈Lqi as well as pmpk∈groupk of the fitness user u [20].To model the spatial similarity of fitness users, we construct the Voronoi diagram. Each unit contains one and only one POI. Therefore, the spatial-related preferences of fitness users can be reflected by including the POIs they have visited. The Voronoi diagram defines whether there is a spatial proximity relationship between two POIs more reasonably than the Euclidean distance, and it can provide an adaptive estimate of the distance between POIs.The calculation method of the geographic similarity based on the Voronoi diagram is described. When the time interval Tx is given:(1)
The algorithm determines the set of adjacent points. They are defined as adjacent points.(2)
The algorithm adds an undirected edge.We use equation (11) to calculate the spatial similarity:(11)ωpk,pm=1,s=0,2−d2s−1,s≥1..Figure6 shows a constructed undirected graph. In Figure 6, the shortest path length from pk to pm is 4, so s = 4.Figure 6
Spatial distance modeling for fitness users.First, the algorithm constructs a fitness user category sign-in matrix and then uses the matrix factorization technology to recover the lost data.After obtaining a fitness user category sign-in matrix,C represents the total number of categories. Therefore, each column of Q represents the check-in frequency of fitness users in a certain category, which can be regarded as the feature vector of the category.For each sign-in pointpkpk∈Lqi,(12)ψpk,pm=cpk⟶⋅cpm⟶cpk⟶2×cpm⟶2.In formula (12), cpk⟶ and cpm⟶ represent the category feature vectors corresponding to their check-in points, respectively.After a given target fitness userui, we calculate contextual perception similarity between the fitness user ui and other fitness user uj. The detailed steps are as follows:(1)
The algorithm constructs groupk as shown in the previous section. Each sign-in point pmpm∈groupk and pk share similar time characteristics. Repeat the following operations until all check-in points in groupk are traversed:(i)
The algorithm uses formula (11) to calculate the spatial similarity ωpk,pm between sign-in points pk and pm and uses formula (12) to calculate the category similarity ψpk,pm between sign-in points pk and pm.(ii)
The algorithm uses formula (13) to calculate the overall similarity between sign-in points pk and pm.(13)simpointpk,pm=ψpk,pmψpk,pm.(2)
The algorithm calculates the similarity between the sign-in pointpk and its corresponding set groupk by using formula (11).The algorithm calculates the context-aware similarity between the fitness userui and fitness user uj by using formula (9).After calculating the similarity between the target fitness userUi and other fitness user Uj , we construct a Sui set to store the top k most similar fitness users of the target fitness user Ui. Therefore, Sui=k, a recommended list of target fitness user ui. The detailed steps are as follows:(1)
The algorithm constructs a setCPui, which contains all the POIs visited by fitness users in Sui.(2)
The algorithm sets the distance thresholdλ to determine the recommended area. The recommended area is a circle with the current position of the target fitness user ui as the center and λ as the radius.(3)
For each sign-in pointpmpm∈CPui, we set the formula:(14)Φl,pm=λ−1,dl,pm≤λ,dl,pm−1,dl,pm>λ..Specifically,l is the current position of the fitness user ui. dl,pm represents the Euclidean distance between l and pm.(4)
The algorithm uses formula (15) to calculate the pseudoscoring:(15)scoreui,pm=∑k=1Suisimuserui,ukfuk,pmΦl,pm.Among them,fuk,pm represents the pseudoscore of the fitness user ukuk∈Sui to the check-in point pm, which is counted by(16)fuk,pm=Nuk,pmLkq.Among them,fuk,pm represents the number of visits by the fitness user uk to check-in point pm, and fuk,pm represents the total number of check-in points visited by the fitness user uk in a time interval Tq.(5)
After obtaining the pseudoscoring of each POI inCPui, the algorithm arranges in descending order and recommends the first k POIs.


## 4. National Fitness Item Recommendation System Based on a Neural Network Algorithm

Based on the above neural network recommendation algorithm, the nationwide fitness item recommendation system based on the neural network algorithm constructed in this article is shown in Figure7.Figure 7
National fitness item recommendation system based on a neural network algorithm.The design of the overall service process of the platform is shown in Figure8:Figure 8
The overall service process of the platform.After the above model is constructed, the effect of the model is evaluated. First, the effect of neural network algorithm fitness data processing is evaluated, and the result is shown in Figure9.Figure 9
Neural network algorithm data processing.It can be seen from the above research that the neural network algorithm proposed in this paper has a good data processing effect on the fitness data. On this basis, the effect of the national fitness item recommendation of the system in this paper is verified, and the result is shown in Figure10.Figure 10
Recommendation effect of national fitness items based on the neural network algorithm.From the above research, it can be known that the recommendation method of national fitness items based on the neural network algorithm has a certain effect.


## 5. Conclusion

National fitness activities have developed rapidly, and related achievements in the field of sports have entered a new level. At this stage, the problem that China faces in national fitness is the uneven development of public services. The main task at this stage is to use the construction of public service facilities to solve the problems and contradictions in China’s fitness industry. Secondly, China’s social public undertakings in the fields of education, culture, health, etc. have initially established competitive sports activities to win glory for the national Olympics. However, the public service system in the field of national fitness is relatively backward and to a certain extent cannot meet the national demand for physical fitness. According to the actual needs of the national fitness program, this paper combines the neural network algorithm to construct the national fitness program recommendation system to improve the recommendation efficiency of the national fitness program. The experimental research results verify that the method proposed in this article has a good performance in the recommendation efficiency of national fitness programs.



---

*Source: 1544767-2022-01-18.xml*