# Application Research of theK-Means Clustering Algorithm in the Construction of Ideological and Political Education Resource Database in Colleges and Universities Based on 5G

Authors: Guohua Zhu; Guoping Zhu; Guangjin Lv
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

With the advance in the social economy, people’s life has undergone great changes, which brings additional enrichment to people’s lives and also greatly enhances their productivity. The changes brought about by this technology also affect people’s thinking. The ideological and political education in colleges and universities has also ushered in an opportunity for change. The goal of this paper is to investigate the implementation of theK-means clustering algorithm applied in a 5G-based intellectual and technical teaching database in high schools. The results of the demonstration indicate that 29 students in the laboratory group identified more with the work carried out by the school in administrative and practical teaching than the 16 students in the traditional control group, which met everyone’s needs for growth. The superiority of the K-means agglomerative categorization algorithm used for the institution’s educational resource base was verified.


---

## Body

## 1. Introduction

People are making progress, and the economy is growing, which also promotes the development of high-tech. 5G mobile communication technology has appeared in the public’s field of vision in the past two years, and people can enjoy various information more quickly. This not only offers considerable comfort to the livelihood of people but also promotes the development of education. The educational resource library is a comprehensive platform of educational resources, and it is a comprehensive platform of educational resources from which education and retention can be greatly enhanced in higher education. And as intellectual and social instruction is a learning point that many students in tertiary institutions today tend to neglect, the study of intellectual and social instruction materials is drawing the consideration of educators worldwide. In the category of intellectual and social instruction, resource construction can greatly enhance the study productivity of learners. Not only that, students can effectively learn all the resources in the resource platform and can effectively integrate them. Therefore, resource construction is sustainable and is an indispensable part of intellectual and social instruction in tertiary institutions. It is essential for intellectual and social instruction to absorb all the information technology that is beneficial to promote its innovation. From the current reality, high technology represented by big data and artificial intelligence provides good opportunities and conditions for the promotion of intellectual and social instruction in high schools.Driven by the economy and technology, the global education competition is becoming more and more intense. For better educational development and to fulfil the demands of social construction, educational research has become a popular concern for researchers as well in the last few years. Therefore, the use of research on theK-means agglomerative algorithm in the construction of a 5G-based intellectual and social instruction resource database in colleges and universities is extremely critical in improving the utilization rate of educational resources, promoting better educational development, and achieving a broader educational space. Intellectual and social instruction in higher education is a practical activity that progresses according to the times, and new elements should be continuously injected according to the development and changes of the times. This not only has important theoretical value but also has far-reaching practical significance.The segmentation of pathological blotches out of lobe pictures of crops is a critical element towards alert and prevention of diseases. In order to promote the precision and consistency of disease spot segmentation, Wang et al. suggested a method for self-adaptive fragmentation of blotch analysis using theK-means agglomerative method. To demonstrate the feasibility of the suggested method, partitioning tests were conducted on applications of three-type cucumber infestation and one-type soybean infestation data. The results of the trials were compared with those gained with the stationary threshold approach, Otsu approach, classical K-means agglomerative approaches, and Renyi entropy approach, indicating that this self-adaptive fragmentation approach is precise and robust for the fragmentation of their crop [1]. Interpolated splittable densitometric functioning (ISDF) is an accurate and useful antirank resolution that can reduce a large amount of calculation expenses and internal storage associated with Hartree-Fock Exchange (HFX) procedures carried out on the subject by using numbered atomic orientations (NAO). To this end, Qin et al. propose a computer learning K-means agglomerative method to situate the intermediate rotation sites in the ISDF, which offers a more affordable replacement for the more costly QR factorisation and collinear rotation (QRCP) procedures. The results show as well that this approach can produce comparable levels of resolution for numerators and liquids at a much-reduced calculation budget [2]. For the purpose of pinpointing determination sites with greater precision and improving the ruggedness of agglomerative algorithms, Wang and other researchers proposed a quantitative K-means solution for probabilistic scaling (PS) 64 with quadrature admittance management (QAM) signals. The outcomes indicate that the claimed method outperforms K-means in terms of baud error ratio (BER), agglomerative rootedness, and interiteration time in both bidirectional and 375 km delivery situations [3]. Within variable liquid chromatography (VLC) subsystems, numerous equipment-related nonlinearity impacts, including digital magnifiers and optoelectronic facilities, dramatically reduce aggregate subsystem functionality. For the purpose of alleviating nonlinear misalignment problems, Ma and others proposed a K-means-based clustering method and performed it experimentally in a VLC system. Experimental results show that the baud error ratio (BER) can be reduced from 2.4×10−1 to 3.6×10−3 by compensating for the nonlinear effect with the support of the clustering method [4]. Due to the development of highways and the increase in vehicle usage, high priority requires the advancement of efficient and safe intelligent transportation structures. Recognizing identical license plates turns out to be a task problem due to their different formats, colors, shapes, viewpoints, and uneven lighting environments. Therefore, Chen proposes a model for number plate discrimination as well as a partitioning based on K-means agglomerative classification using concessional nerve necks (CNNs). As a consequence of the demonstrations, the proposed model proved to be more useful than the other methods which have been described up to now [5]. Financial risk early warning is to recognise and diagnose available thermal insurance agents and determine the likelihood and magnitude of risk occurrence, so as to offer a rational foundation for preventing and implementing strategies for crisis control. The vulnerable nature of the monetary market and the damaging nature of monetary conflicts render the construction of a comprehensive monitoring strategy for a monetary crisis. Zhu and Liu suggested a monetary crisis indicator system supported by the K-means agglomerative algorithm, conducting the evaluation of the choice of monetary risk indicators and statistical operations, developing a forecasting strategy for categorising risk types, and improving monetary risk containment. The research outcomes indicate that the K-means agglomerative model can help to reduce the disadvantage of arbitrary thresholds [6]. Clusterization is a valuable tool for organizing massive unstructured collections of objects into a limited amount of significant and continuous sets of data. Each gathering approach is dependent on an exponential resemblance or dissemblance between datalots. Usman and Sani investigated the most optimal approach to measuring the closeness of binary items in areas of rarefaction and complexity using squared Euclidean and Manhattan distances and indicated that the approach is fast and provides high-quality clustering results [7]. There are numerous kinds of interference signatures in the operational surroundings of contactless and radioactive surf acoustic wave (SAW) detectors. Within these interferences, cochannel disturbances can be hard to inhibit. To address this problem, Fan and others proposed an immunity method for SAW detectors to enhance the safety and durability of SAW detectors. It was demonstrated that the approach can distinctly discriminate between SAW replies and coincident intrusive signalling. Furthermore, the approach is applicable as an immunity technique to enhance the performance of SAW sensors [8]. The energy-efficient gathering in sensor information system (PEGASIS) protocol is an energy-saving protocol. To extend the life of the web by reducing energy consumption, Jawad and Ali improved the PEGASIS algorithm by clustering sensor nodes into groups, applying the K-means algorithm for clustering, and each group was regarded as PEGASIS. The optimization data of the proposed method is presented in the simulation test. The outcome indicates that the proposed method has been modified compared with the original PEGASIS [9]. Land and seed fires are frequent hazards in Indonesia. One of the areas with the tallest fire heat spots is West Kalimantan. Taking into account the effects caused by wood and earth fires, Khairani and Sutoyo used a clustering method of the K-means method to identify popular and vulnerable regions in West Kalimantan and expounded that data mining is a suitable method to find out the information of hot spots. The data extraction approaches employed are clustering, as this approach allows the handling of heat spot information into something that can communicate the regions that are susceptible to heat spots [10]. To sum up, it is not difficult to see that in recent years, K-means clustering not only has related research on crop segmentation but also has a very good outlook for use in the banking and transportation sector. However, there is not much practical research on education; therefore, in further facilitating the growth of pedagogy, the building of educational repositories database and the in-depth exploration of the K-means clustering algorithm are urgent.In recent years, although many specialists and academicians have devoted a great deal of effort to the study of theK-means clustering algorithm, they have not paid much attention to the use of the K-means clustering method in the building of the 5G-based intellectual and cultural education resource database in institutes and schools. They only talked about the feasibility and research value of the K-means clustering method in the construction of college education resource bases but lacked specific conceptual research and practical exploration. Therefore, the research content of this paper is novel, which can well increase the growth of college training and also provide a reference for future related research on the K-means clustering algorithm.


## 2. Construction of Ideological and Political Education Resource Base in Colleges and Universities

### 2.1. Educational Resources

Education and economic development are mutually reinforcing and evolving. Both need to be harmoniously promoted to achieve sustainable development, as shown in Figure1. The progress of the social economy offers economic assistance and physical support for the growth of education. At the same time, the development of education provides human, scientific, and technological resources for social and economic development [11].Figure 1
Interaction mechanism of coordinated development of education and social economy.Education is not only learning at the level of acquiring knowledge but also an activity that promotes the integration and development of society and individuals. Educational resources belong to social resources, which refer to the sum of education-related knowledge, systems, concepts, experiences, facilities, assets, etc., created and accumulated since the emergence of educational activities in human society [12]. Education is composed of various subsystems, and educational resources are often limited. The allocation of educational resources, as the name implies, is to allocate resources reasonably within education, so as to make the most of assets, thereby promoting the development of health education [13]. Educational human resources are the carrier of educational activities, and the development of educational activities requires teachers to engage in teaching activities and also requires students to receive education. Educational material resources are classrooms, sports venues, multimedia equipment, experimental equipment, books, and other materials necessary for performing administrative tasks in education. The financial resources of education are the economic guarantee that educational activities can be implemented and are the public or utility funds used for educational activities.


### 2.2. Ideological and Political Education in Colleges and Universities

Ideas and power teaching in higher education all want greater execution of educational work; it not only enables students to gain the appropriate learning but also helps them to achieve holistic development. However, online learning is often not the same as real teaching [14–15].First, the educational environment is different. Education in the network environment is often virtual, not real education. The real educational environment has specific locations and teaching aids. The network environment is an information system constructed by various technologies such as computers. It can express specific things and describe natural and life phenomena through sounds and images.The second difference is the connection between the teacher and the recipient of education; in thought and practice, more teachers teach, and there is not much engagement among instructors and learners. In the network environment, it is mostly to enhance the core quality of students. Faculty and learners are equal to each other, promote each other, and communicate with each other [16]. In the online world, instructors and learners do not hold specific identities, and they all teach and receive learning in digital symbols.Finally, there are differences in content in political and spiritual education. Education in the network environment is diversified, and the teaching content of web ideas and culture education is not as simple as that of real education. In the web setting, the taught content can be flat or three-dimensional; it can be realistic or superspace; it can be static or dynamic. With the power of the web, the taught content is very flexible and selective.“Three-comprehensive education” is a system of political and spiritual education in higher education. It consists of different elements. Subject, orientation, and process are the three main elements [17–18]. The main element, as the title implies, is the subject of educating people. The main body includes not only the teaching teachers of the political and spiritual education courses but also all the teaching staff of the school. In the “three-comprehensive education” system, all faculty and staff need to cooperate with each other and jointly participate in the construction of a long-term mechanism for educating people. On the basis of cultivating people by virtue, we introduce content that is appropriate to the times, so as to enhance the breadth of students’ knowledge and combine more practical activities to better develop students’ behavioral abilities, through a wide range of educational methods with full awareness of the object of education, in a positive environment, so that students can develop holistically. The element of process education means that in the procedure of political and spiritual education, it should be penetrated not only during school but also in holidays, employment, and life. Political and spiritual education should be continuous rather than intermittent.


### 2.3. Fifth Generation Mobile Communication System

With the rapid growth of society, the coming generation of linear communication will have to deal with new demands, such as faster speed and more device connections. Therefore, in the past two years, a new generation of wireless communication has emerged, namely 5G mobile communication [19]. The key technology of radiofrequency is the key technology of 5G. There are three main radiofrequency key technologies. The first is the same-frequency full-duplex technology. The technology can achieve simultaneous reception and transmission at the , which theoretically can effectively utilize wireless spectrum resources and bring unexpected benefits to wireless network design. The second technology is mobile communication technology in the millimeter-wave band. This technology, combined with massive MIMO technology, can not only improve the utilization of spectrum but also give strong spatial resolution. Massive MIMO technology is the third radiofrequency technology. This technology achieves the purpose of signal enhancement by using many antenna arrays in the system, so that the space can be reused, thereby improving the stability of the system. Not only that, but the technology also greatly increases the spectral productivity of the device [20–21]. In the realm of teaching, the educational elements supported by 5G are teachers, students, learning environment, and resources, as shown in Figure 2.Figure 2
Interactions between educational elements supported by 5G.


### 2.4. Construction of Ideological and Political Education Resource Base in Colleges and Universities Based on 5G

Students and teachers are the main roles of education, and administrators constitute the three main elements in the building of the education repository platform [22]. According to the course content, students can not only complete personal management, including friend settings but also check relevant course information. The main content of the teacher’s role has three parts [23]. The first part is the relevant content of the course. The teacher needs to set the access conditions so that the course content can be displayed in the students’ field of vision. The second part is that the teacher divides the focus and difficulty of the course. The third part is the interaction with students to make the relationship between faculty and learners more harmonious. The role of the administrator is mainly to manage and maintain the repository [24].During the building of the 5G-based political and spiritual education resource library in the academy and campus, most of the college education resource library systems use J2ME mobile terminals. Combined with the application server software platform and the server side of the educational resource library system, reasonable integrated solutions can be formulated, as shown in Figure3.Figure 3
The overall design of the political and spiritual education resource database system in academy and campus.On the basis of 5G technology, the mobile terminal system has been well realized. As shown in Figure4, the 5th generation of communication technology can make it faster, more efficient, and better.Figure 4
Handheld client system framework.


## 2.1. Educational Resources

Education and economic development are mutually reinforcing and evolving. Both need to be harmoniously promoted to achieve sustainable development, as shown in Figure1. The progress of the social economy offers economic assistance and physical support for the growth of education. At the same time, the development of education provides human, scientific, and technological resources for social and economic development [11].Figure 1
Interaction mechanism of coordinated development of education and social economy.Education is not only learning at the level of acquiring knowledge but also an activity that promotes the integration and development of society and individuals. Educational resources belong to social resources, which refer to the sum of education-related knowledge, systems, concepts, experiences, facilities, assets, etc., created and accumulated since the emergence of educational activities in human society [12]. Education is composed of various subsystems, and educational resources are often limited. The allocation of educational resources, as the name implies, is to allocate resources reasonably within education, so as to make the most of assets, thereby promoting the development of health education [13]. Educational human resources are the carrier of educational activities, and the development of educational activities requires teachers to engage in teaching activities and also requires students to receive education. Educational material resources are classrooms, sports venues, multimedia equipment, experimental equipment, books, and other materials necessary for performing administrative tasks in education. The financial resources of education are the economic guarantee that educational activities can be implemented and are the public or utility funds used for educational activities.


## 2.2. Ideological and Political Education in Colleges and Universities

Ideas and power teaching in higher education all want greater execution of educational work; it not only enables students to gain the appropriate learning but also helps them to achieve holistic development. However, online learning is often not the same as real teaching [14–15].First, the educational environment is different. Education in the network environment is often virtual, not real education. The real educational environment has specific locations and teaching aids. The network environment is an information system constructed by various technologies such as computers. It can express specific things and describe natural and life phenomena through sounds and images.The second difference is the connection between the teacher and the recipient of education; in thought and practice, more teachers teach, and there is not much engagement among instructors and learners. In the network environment, it is mostly to enhance the core quality of students. Faculty and learners are equal to each other, promote each other, and communicate with each other [16]. In the online world, instructors and learners do not hold specific identities, and they all teach and receive learning in digital symbols.Finally, there are differences in content in political and spiritual education. Education in the network environment is diversified, and the teaching content of web ideas and culture education is not as simple as that of real education. In the web setting, the taught content can be flat or three-dimensional; it can be realistic or superspace; it can be static or dynamic. With the power of the web, the taught content is very flexible and selective.“Three-comprehensive education” is a system of political and spiritual education in higher education. It consists of different elements. Subject, orientation, and process are the three main elements [17–18]. The main element, as the title implies, is the subject of educating people. The main body includes not only the teaching teachers of the political and spiritual education courses but also all the teaching staff of the school. In the “three-comprehensive education” system, all faculty and staff need to cooperate with each other and jointly participate in the construction of a long-term mechanism for educating people. On the basis of cultivating people by virtue, we introduce content that is appropriate to the times, so as to enhance the breadth of students’ knowledge and combine more practical activities to better develop students’ behavioral abilities, through a wide range of educational methods with full awareness of the object of education, in a positive environment, so that students can develop holistically. The element of process education means that in the procedure of political and spiritual education, it should be penetrated not only during school but also in holidays, employment, and life. Political and spiritual education should be continuous rather than intermittent.


## 2.3. Fifth Generation Mobile Communication System

With the rapid growth of society, the coming generation of linear communication will have to deal with new demands, such as faster speed and more device connections. Therefore, in the past two years, a new generation of wireless communication has emerged, namely 5G mobile communication [19]. The key technology of radiofrequency is the key technology of 5G. There are three main radiofrequency key technologies. The first is the same-frequency full-duplex technology. The technology can achieve simultaneous reception and transmission at the , which theoretically can effectively utilize wireless spectrum resources and bring unexpected benefits to wireless network design. The second technology is mobile communication technology in the millimeter-wave band. This technology, combined with massive MIMO technology, can not only improve the utilization of spectrum but also give strong spatial resolution. Massive MIMO technology is the third radiofrequency technology. This technology achieves the purpose of signal enhancement by using many antenna arrays in the system, so that the space can be reused, thereby improving the stability of the system. Not only that, but the technology also greatly increases the spectral productivity of the device [20–21]. In the realm of teaching, the educational elements supported by 5G are teachers, students, learning environment, and resources, as shown in Figure 2.Figure 2
Interactions between educational elements supported by 5G.


## 2.4. Construction of Ideological and Political Education Resource Base in Colleges and Universities Based on 5G

Students and teachers are the main roles of education, and administrators constitute the three main elements in the building of the education repository platform [22]. According to the course content, students can not only complete personal management, including friend settings but also check relevant course information. The main content of the teacher’s role has three parts [23]. The first part is the relevant content of the course. The teacher needs to set the access conditions so that the course content can be displayed in the students’ field of vision. The second part is that the teacher divides the focus and difficulty of the course. The third part is the interaction with students to make the relationship between faculty and learners more harmonious. The role of the administrator is mainly to manage and maintain the repository [24].During the building of the 5G-based political and spiritual education resource library in the academy and campus, most of the college education resource library systems use J2ME mobile terminals. Combined with the application server software platform and the server side of the educational resource library system, reasonable integrated solutions can be formulated, as shown in Figure3.Figure 3
The overall design of the political and spiritual education resource database system in academy and campus.On the basis of 5G technology, the mobile terminal system has been well realized. As shown in Figure4, the 5th generation of communication technology can make it faster, more efficient, and better.Figure 4
Handheld client system framework.


## 3.K-Means Clustering Algorithm

Cluster analysis is an important method for processing data, and clustering has also been applied in various industries, such as the business field and biology. The classical algorithmK-means has always been the focus of the research field and is a clustering method based on data partitioning [25]. Clustering is the separation of a tapestry of data into distinct categories according to certain criteria (such as distance criteria), so that the data in the same category can be better correlated, and the data that are not in one category can be greatly different [26]. Therefore, the introduction of the concept of “distance” can know the correlation between the data, that is, the similarity of the data, and at the same time, it can increase the efficiency of sample classification, because the essence of cluster analysis is the classification of samples in different dimensions. The three distance functions commonly used in cluster analysis are shown in the following formula.The Minkowski distance is as follows:(1)DqX,Y=∑IXi−Yiq1/q.Whenq takes 1, 2, and ∞, the absolute distance can be obtained.The Mahalanobis distance is as follows:(2)DX,Y=X−YT×∑−1X−Y.∑ is the covariance matrix of the sample matrix A. Mahalanobis distance is an improvement for the shortcoming of Mingshi distance affected by dimension.The Lance distance is as follows:(3)DX,Y=∑iXi−YiXi+Yi.The calculation formula of the similarity coefficient function of cluster analysis is shown in the formula. The similarity coefficient function can represent the similarity measure between feature variables.The similarity coefficient is as follows:(4)CX,Y≤1,(5)CX,Y=1,(6)CX,Y=CY,X.C means function C:V×V⟶−1,1. The closer CX,Y is to 1, the closer the relationship between the two feature variables.There are two types of similarity coefficients:(1)
Cosine of the included angle:(7)CX,Y=∑iXi×Yi∑iXi2×∑iYi2.Angle cosine considers the relationship between the various vectors in terms of shape. When the directions of the two vectors are similar, the cosine of the included angle is larger, and vice versa(2)
Relevant factors:(8)CX,Y=∑iXi−X¯×Yi−Y¯∑iXi−X¯2×∑iYi−Y¯2.The correlation coefficient represents the degree of linear correlation between two vectors.The measurement between classes generally uses the distance as the measure function. The shortest distance method is a commonly used one, and its calculation formula is shown in the following formula.(9)DG1,G2=minDX,YX∈G1,Y∈G2.Hierarchical clustering, also known as systematic clustering, is the most widely used class of algorithms. Hierarchical clustering is a method of dividing classes from more to less. Commonly used hierarchical clustering methods include the median distance method, the centroid method, the class average method, and the deviation sum of squares method.The intermediate distance method is as follows:(10)Dkr=12Dkp2+12Dkq2−14Dpq21/2,where Gk indicates a certain category and Gr indicates a certain type, which is a combination of Gp and Gq.
(11)Dkr=12Dkp2+12Dkq2+βDpq21/2,−14≤β≤0.Whenβ=−1/4, it is the middle distance method.The center of gravity method is as follows: the distance between classes can be represented by the distance between the centers of gravity.(12)Dpq=dX¯p,X¯q,(13)X¯r=1nrnpX¯p+nqX¯q,(14)Dkr=npnrDkp2+nqnrDkq2−npnqnr2Dpq21/2.Among them,Gk is represented as a certain class, and its center of gravity is X¯k. The centers of gravity of Gp and Gq are X¯p and X¯q, respectively. Gp and Gq are combined into Gr, the number of samples of each type is np, nq, and nr=np+nq, respectively, and the corresponding centers of gravity are X¯p, X¯q, and X¯r.The class average method is as follows: it is defined that the square of the distance between two classesGp and Gq is equal to the average squared distance between the elements in the two classes, and its calculation formula is shown in the formula.
(15)Dpq=1npnq∑Xi∈Gp,Xj∈Gqdij2,(16)Dkr=npnrDkp2+npnrDkq21/2.Among them,np and nq are the volume of the models of Gp and Gq.The dispersion sum of squares method is as follows: this method comes from difference analysis. If the classes are correctly classified, the total value of similar specimens’ squared discrepancies shall be smaller, while the value of the sum of squared discrepancies among categories shall be larger. The calculation formula of this method is shown in the following formula.(17)St=∑i=1ntXit−X¯tTXit−X¯t.The total within-class variance sum of squares is(18)S=∑t=1k∑i=1ntXit−X¯tTXit−X¯t.The distance between classes is defined as(19)Dpq2=npnqnrX¯p−X¯qTX¯p−X¯q.The recursive formula for distance is(20)Dkr2=np+nknr+nkDkp2+nq+nknr+nkDkq2−nknr+nkDpq2.Among them,np,nq,nr,nk are the size of the specimens of Gp,Gq,Gr,Gk, separately. n sample is divided into K classes, G1,G2,⋯,Gk. Xit represents the i-th sample in Gt, nt stands for the size of Gt samples, and X¯t is the center of gravity of Gt.The above four hierarchical clustering methods are unified, namely(21)Dkr2=αpDkr2+αqDkp2+βDpq2+γDkp2−Dkq2,where Gr=Gp∪Gq; the same parameters are substituted to obtain different hierarchical clustering methods. These parties are listed in Table 1.Table 1
Hierarchical clustering method specification table.
MethodαpαqβγMiddle distance method1/21/2−1/4≤β≤00Center of gravitynp/nrnq/nr−npnq/nr20Class averagenp/nrnq/nr00Sum of squared deviationsnk+np/nk+nrnk+np/nk+nr−nk/nk+nr0The algorithmK-means is an evaluation method that uses distance as the data correlation. Simply put, the farther the distance, the smaller the similarity; the closer the distance, the higher the correlation. The diagram of algorithm K-means is shown in Figure 5. The algorithm usually uses the standard method of zero-sum of squares as the aggregation standard function, and the norm value of the squared sum-of-errors curve is defined as indicated in the formula.
(22)Jc=∑i=1k∑p∈Cip−Mi2,where Mi represents the average value of fish items in class Ci and P represents space spots in class Ci.Figure 5
TheK-means algorithm diagram.TheK-means method is a hill-climbing program. When the algorithm terminates, it often finds a local minimum, as shown in Figure 6.Figure 6
Local minima and global optimum.To further validate the effectiveness of theK-means method, the SPSS software was used to cluster the data set, and the obtained outcomes were contrasted with the clustering findings of the algorithm.First, enter 15 data objects, as listed in Table2.Table 2
Data objects.
Data objectVariable 1Variable 2x157x258x387x455x559x65.54x789x8115x9106x10117x11105x128.58x1385x144.54x155.55Then, the data objects are randomly selected as the initial cluster centers. The analysis was performed withK-means on the SPSS software, and the values received are presented in Tables 3 and 4.Table 3
Cluster centers obtained by theK-means program.
Cluster1234VAR000013.667.019.304.00VAR000029.649.007.646.30VAR000034.108.239.604.30Table 4
K-means clustering results.
Case numberClusterDistance110.870220.390331.009430.609521.267620.655741.009810.802930.6681021.3571110.8011230.3861340.1361420.6201530.422Finally, through the analysis of the results, it is concluded that the clustering results obtained by algorithmsK-means and SPSS are the same, which verifies that the algorithm has obvious clustering effects and superior performance.


## 4. Application Analysis of theK-Means Clustering Algorithm

The example in this article comes from a questionnaire survey on the learning situation of college students on the school’s political and spiritual education resource database terrace. The article will carry out questionnaire analysis from four aspects, so as to explore the learning effect of the two learning modes. These four aspects are the development of political and spiritual education, the affinity of political and spiritual education in colleges and universities, the advocacy of learning, and the diversification of assessment. The questionnaires were distributed in the test and controlled groups, respectively; 46 copies were distributed in these four aspects, and 46 copies were returned.


### 4.1. Conducting of Political and Spiritual Education

As shown in Figures7 and 8, 29 people in the experimental group believed that the school’s political and spiritual education was well developed, which was very helpful to their own growth, while only 16 college learners in the controlled group consent to this view. This shows that the development of political and spiritual education in the experimental group is good than those of the comparison group.Figure 7
Survey results on the development of political and spiritual education: (a) the survey results of the development of political and spiritual education in the control group; (b) the survey results of the development of political and spiritual education in the experimental group.
(a)(b)Figure 8
Survey results of the affinity of political and spiritual education in the academy and campus: (a) the survey results of the affinity of political and spiritual education in academy and campus in the controlling group; (b) the survey results of the affinity of political and spiritual education in academy and campus in the experimental group.
(a)(b)


### 4.2. Affinity for Political and Spiritual Education in the Academy and Campus

Teachers’ educational attitude, theoretical literacy, educational methods, and educational art are important components of educational subject affinity and are also the key to political and spiritual education subject affinity, which have a significant direct influence on learners’ education. The survey found that 31 college students in the control group believed that teachers were not very enthusiastic and lacked affinity when teaching. A total of 34 people in the experimental group felt very cordial when communicating with the teacher, and they were willing to discuss with the teacher when they encountered problems.


### 4.3. Learning Initiative

College students pay less attention to political and spiritual information. In the control group, 33 tertiary students expressed no interest in politics, while 37 in the experimental group responded positively to social hot issues. This is because, on the political and spiritual education resource database platform of the experimental group, the teaching content has added practical problems. It is precisely because of this that college students are more willing to respond to problems related to real life, which not only increases their interest in learning but also cultivates their awareness of the times and practical concerns.


### 4.4. Diversification of Assessment

The examination method for political and spiritual courses is still based on one test paper to determine the grade. Through the open-book examination method, it focuses on the cognitive level examination, and it is impossible to understand the students’ moral standards and values. Through the use of theK-means clustering method, the assessment of students’ ideological construction and value establishment has been added to the platform of the political and spiritual education resource database of the academy and campus. As can be observed from Figures 9 and 10, a total of 31 people in the experimental group believed that the platform of the political and spiritual education resource library in the academy and campus satisfies the assessment diversification.Figure 9
Survey results on the initiative of political and spiritual learning in academy and campus: (a) the survey results of the political and spiritual learning initiative in academy and campus in the controlled group; (b) the survey outcomes of the political and spiritual learning initiative of academy and campus in the experimental group.
(a)(b)Figure 10
Survey results for assessing diversity: (a) the survey results of the diversity of political and spiritual assessments in academy and campus in the control group; (b) the survey results of the diversity of political and spiritual assessments in academy and campus in the experimental group.
(a)(b)


## 4.1. Conducting of Political and Spiritual Education

As shown in Figures7 and 8, 29 people in the experimental group believed that the school’s political and spiritual education was well developed, which was very helpful to their own growth, while only 16 college learners in the controlled group consent to this view. This shows that the development of political and spiritual education in the experimental group is good than those of the comparison group.Figure 7
Survey results on the development of political and spiritual education: (a) the survey results of the development of political and spiritual education in the control group; (b) the survey results of the development of political and spiritual education in the experimental group.
(a)(b)Figure 8
Survey results of the affinity of political and spiritual education in the academy and campus: (a) the survey results of the affinity of political and spiritual education in academy and campus in the controlling group; (b) the survey results of the affinity of political and spiritual education in academy and campus in the experimental group.
(a)(b)


## 4.2. Affinity for Political and Spiritual Education in the Academy and Campus

Teachers’ educational attitude, theoretical literacy, educational methods, and educational art are important components of educational subject affinity and are also the key to political and spiritual education subject affinity, which have a significant direct influence on learners’ education. The survey found that 31 college students in the control group believed that teachers were not very enthusiastic and lacked affinity when teaching. A total of 34 people in the experimental group felt very cordial when communicating with the teacher, and they were willing to discuss with the teacher when they encountered problems.


## 4.3. Learning Initiative

College students pay less attention to political and spiritual information. In the control group, 33 tertiary students expressed no interest in politics, while 37 in the experimental group responded positively to social hot issues. This is because, on the political and spiritual education resource database platform of the experimental group, the teaching content has added practical problems. It is precisely because of this that college students are more willing to respond to problems related to real life, which not only increases their interest in learning but also cultivates their awareness of the times and practical concerns.


## 4.4. Diversification of Assessment

The examination method for political and spiritual courses is still based on one test paper to determine the grade. Through the open-book examination method, it focuses on the cognitive level examination, and it is impossible to understand the students’ moral standards and values. Through the use of theK-means clustering method, the assessment of students’ ideological construction and value establishment has been added to the platform of the political and spiritual education resource database of the academy and campus. As can be observed from Figures 9 and 10, a total of 31 people in the experimental group believed that the platform of the political and spiritual education resource library in the academy and campus satisfies the assessment diversification.Figure 9
Survey results on the initiative of political and spiritual learning in academy and campus: (a) the survey results of the political and spiritual learning initiative in academy and campus in the controlled group; (b) the survey outcomes of the political and spiritual learning initiative of academy and campus in the experimental group.
(a)(b)Figure 10
Survey results for assessing diversity: (a) the survey results of the diversity of political and spiritual assessments in academy and campus in the control group; (b) the survey results of the diversity of political and spiritual assessments in academy and campus in the experimental group.
(a)(b)


## 5. Discussion

Through the application analysis of theK-means clustering algorithm in the construction of political and spiritual education resource database in the academy and campus, the below findings can be reached:
(1)
The development of political and spiritual education: the experimental group believes that the school can provide more diversified and personalized political and spiritual education products and services to meet everyone’s different needs and expectations. However, the control group did not think so. There are 23 campus residents who believed that the school’s political and spiritual education was not very good and could not help their growth to a certain extent(2)
The approachability of political and spiritual education in academy and campus: in the control group, 31 college students said that the school’s propaganda on ideological and political education was not strong, so everyone paid little attention to politics and even got bored. In the experimental group, only 4 college students agreed with this view. More students in the experimental group are still willing to exchange their political ideas with the teacher. This shows that the effect of ideological and political education in the experimental group is better than that in the control group(3)
Learning initiative: there are 37 students in the experimental group who expressed that they would pay attention to some social issues every day and communicate with their classmates and teachers. The students in the control group believed that political matters had little to do with their real life, so they seldom participated in discussions on political topics. The data shows that there are 18 boys in the control group who are not interested in political and spiritual information, and the number is more than that of girls(4)
Diversification of assessment: in the political and spiritual education classroom, it is easy to see that the whole semester is over, the students have no notes in their textbooks, and they are still in the state of new books. Everyone is more likely to study the key points and difficulties mentioned by the teacher during the exam. For the students themselves, ideological and political education does not help everyone except to cope with the school exam. However, the data showed that 31 learners in the test group believed that the political and spiritual course not only allowed everyone to learn knowledge but also improved their thinking at a higher level. This shows that the use of theK-means clustering method in the construction of political and spiritual education resource base in the academy and campus brings a new method to the core of political and spiritual education(5)
The whole laboratory statistics indicate that theK-means clustering method is applied to the political and spiritual education resource database in colleges and universities, whether in terms of political and spiritual education development and educational affinity or in terms of political and spiritual education learning initiative and assessment diversification; it is superior to the traditional political and spiritual education resource library. It will be viewed as the use of the K-means clustering method in the construction of an ideological and political education resource database based on 5G is excellent and effective


## 6. Conclusion

This paper conducts questionnaire analysis from four aspects: the development of political and spiritual education and the affinity of political and spiritual education in colleges and universities, so as to explore the learning effects of the experimental group and the control group. The feasibility and effectiveness of the use of theK-means clustering algorithm in the construction of 5G-based political and spiritual education resource databases in the academy and campus are verified. The resource base of political and spiritual education in academy and campus is very complex and spans a broad scope. Due to the limited time and energy of the author, and the limitation of resources, this article has some shortcomings, such as the refinement and expansion of the political and spiritual education resource base in academy and campus; this paper does not consider other interference factors involved in the process of verifying the performance of the K-means clustering algorithm and the compatibility of theK-means clustering algorithm with the educational resource library.



---

*Source: 1465387-2022-05-21.xml*