# Application of Collaborative Filtering and Data Mining Technology in Personalized National Music Recommendation and Teaching

Authors: Meilin Lu; Fangfang Deng
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Personalized music recommendations can accurately push the music of interest from a massive song library based on user information when the user’s listening needs are blurred. To this end, this paper proposes a method of national music recommendation based on ontology modeling and context awareness to explore the use of music resources to portray user preferences better. First, the expectation-maximization algorithm is used to cluster users and ethnic music scores, and similar users and music are divided into clusters. The similarity of objects in the same cluster is higher, and the similarity of objects in different clusters is lower. Second, we designed a multilayer collaborative filtering ethnic music recommendation model based on ontology modeling and tensor decomposition. This model uses ontology to construct a user knowledge model and integrates similarity measures in multiple situations. The actual case test and user feedback analysis show that the designed personalized national music model has good application and promotion effects.


---

## Body

## 1. Introduction

As a cultural carrier, Chinese national music records the music and cultural life of people in different regions in different historical periods, specific cultural backgrounds, and different regions of the Chinese nation [1, 2]. National music reflects the Chinese nation’s music culture level, way of thinking, philosophy, aesthetic orientation, and national individuality [3]. In this era of information overload, music closely related to people’s lives has flourished, and music resources have been greatly enriched, but it is increasingly difficult for people to find their favorite music, so the demand for personalized music recommendations is becoming more and more urgent [4, 5]. Although the personalized music recommendation system has received the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized to solve [6, 7].A personalized recommendation system is proposed to solve the common needs of enterprises and users and user preferences. This recommendation system can collect users’ behavioral preferences, personal attributes, purchase history and rating data, browsing history, and so on. According to the user’s data, analyze and mine the user’s potential preferences and interest project and recommend it to users. In this way, it can provide convenience to users to a great extent. At the same time, a personalized recommendation system can effectively alleviate the “Matthew Effect” of traditional recommendation algorithms, and it can mine the “long tail” of projects. Recommended items that users have not yet discovered are on the “long tail” distribution to target users, thereby giving them a sense of perspective different experiences. In addition, personalized recommendation systems can also tap into the diversity of projects and recommend them to target users’ unexpected but interesting projects to improve the user experience.Early music recommendation systems are generally based on acoustic information, using the similarity of music acoustic information to make recommendations [8]. For example, Cat10 uses audio fingerprint technology to analyze the acoustic information of music. This technology can accurately identify the music name, artist, album name, and other data [9]. Pole et al. also used audio-based technology to measure the similarity between music, by segmenting the audio at the same time interval to obtain sparse MFCC (Mel-frequency cepstral coefficients) and then relying on MFCC to simulate songs [10]. A single recommendation algorithm has its own shortcomings and limitations. Mixed recommendations of different recommendation algorithms can often make up for each other and have better recommendation performance [11, 12]. Hybrid recommendation methods include combining different recommendation methods according to weights to achieve better recommendation effects. Lu et al. proposed a hybrid recommendation algorithm based on content, collaborative filtering, and sentiment [13]. Kaminski’s Marius mixed the user’s geographic location information to make recommendations [14]. Markopoulos et al. combined content-based and collaborative filtering recommendations for hybrid recommendation [15].With the rapid development of Internet and digital music, various music platforms provide a large number of songs for users to listen. The study found that the topological structure of the data communication network is an important factor of threat. In such mobile computing, the computing robustness against intentional attack that aims to bring down network nodes may vary by changing the topology. This bringing down is a kind of destruction and interruption threat that attacks on the availability of the network (i.e., attack on network resources and links). However, with the increase in the number of songs, it is difficult for users to quickly find the music they are interested in when they are faced with a large amount of song information. In order to enhance the competitiveness of the industry, more and more music platforms use recommendation systems to provide users with quality services and personalized recommendation service. It can help users quickly find their favorite songs, provide users with good experience, and increase the satisfaction and loyalty of users to the music platform. Therefore, personalized music recommendation system. It has become the research direction that scholars and industry pay attention to. The collaborative filtering algorithm has been widely used in recommender systems because of its simple implementation and strong generality. The collaborative filtering recommendation algorithm is faced with many problems in the application process; the most typical problems include cold start, data sparsity, and grey sheep user issues. This paper aims at the problem of the traditional collaborative filtering algorithm in the music recommendation system.If we look at this issue from the perspective of the development of Chinese folk music, the international communication of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music [16]. This article attempts to use the expectation-maximization algorithm to cluster users and ethnic music scores. We designed a multilayer collaborative filtering ethnic music recommendation model based on ontology modeling and tensor decomposition. The model combines the gradient-enhanced decision tree algorithm, uses ontology to build a user knowledge model, and integrates multisituation similarity measures.First, this paper proposes a basis for the problems of cold start of users and items and sparse data in the music recommendation system. A personalized music recommendation algorithm based on improved auxiliary filtering is proposed. This algorithm is based on the traditional collaborative filtering algorithm [17]. The user portrait, user rating, and music label data are integrated, and user portrait is used to calculate user similarity and solve. Resolve the user cold start problem; use music label score to initialize unknown score, and solve music cold boot problem as well [18, 19]. After the scoring data were enriched, a project-based collaborative filtering method was used to mine the data.Second, to solve the grey sheep user problem and score sparsity problem in the music recommendation system, this paper proposes a coalition-based approach music recommendation algorithm with filter and playback coefficient. User pairs are calculated through user playback information and frequency linear function singers’ ratings to solve the sparse user rating problem: first, the singer’s listening coefficient is calculated by the singer’s listening system. The playback coefficient of the user is calculated and used as the user attribute, and then the cosine similarity formula is used to calculate user similarity; the user-based collaborative filtering algorithm is used to mine user preferences, to solve the grey sheep user and data sparsity problem.


## 2. Overview of National Music

Chinese folk music began its history of international dissemination more than two thousand years ago [20, 21]. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power [22]. The attenuation parameter a controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals [23]. Too fast will overemphasize the time factor and ignore the long-term interest of users. National music is unique, and it is the deduction of a nation’s culture over time and history. Folk music audio thumbnails are shown in Figure 1.Figure 1
Sample ethnic music audio thumbnail.An artistic genre that has precipitated carries the musical soul of a nation. In “Chinese National Music,” Wang Yahola pointed out that “national music covers the music of all nationalities in a broad sense and is the manifestation of the community after the collection of national cultures; in the narrower sense, it is the specific musical expression form of national music.” In different national music styles, the tunes are all different [24, 25]. An important part of national music includes folk music, which is the driving force for the growth and development of national music. Education is the key to the development of a nation [26]. The main meaning is to inherit and innovate and develop culture. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power [27]. Every member of the nation should consider and act on the inheritance of the nation’s excellent culture. Ethnic music education is a branch of music education that allows elementary and middle school students to directly obtain information about national culture in the learning process. Although China’s national music education has experienced a bumpy development process, today it is an indispensable force for national development.


## 3. Multilayer Collaborative Filtering National Music Recommendation Model

At present, the mainstream recommendation algorithms in the recommendation system are divided into content-based recommendation algorithm [28], collaborative filtering recommendation algorithms [29], and hybrid recommendation algorithm. Among them, the most widely used recommendation algorithm is based on collaborative filtering and content-based. Most music platforms at home and abroad usually use these two types of recommendation technologies. The content-based recommendation approach is according to the user’s historical preference for the item, the most similar item is recommended to the target user through calculation, and the recommendation algorithm needs to know the content information of the item. Another method according to the use has a historical score of the songs and then calculates the users with similar hobbies or similar songs, thus giving them to the user. Personalized recommendation service is provided. Both of these two types of recommendation algorithms have their advantages and disadvantages, and content-based recommendation algorithms need additional ones. In addition, the complexity is high, and the recommendation algorithm based on collaborative filtering has data sparse problem and cold start problem.In a complete recommendation system, the most critical part is the recommendation algorithm. Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. At present, the main recommendation algorithms include collaborative filtering recommendation algorithm, recommendation algorithm based on data mining, recommendation algorithm based on content, and hybrid recommendation algorithm.


### 3.1. Multilayer Collaborative Filtering Algorithm

The algorithm implementation steps are shown in Figure2. First, a user-item score matrix is established, the similarity between users based on the user-item score is calculated, then the k nearest neighbors of the target user are found, and finally the unrated items are scored according to the nearest neighbor. The target user’s predicted score for the item is calculated. The attenuation parameter a controls the degree of attenuation. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. The structure diagram of a typical recommendation model is shown in Figure 2.Figure 2
Model structure diagram of the typical recommendation model.In the recommendation system, the original data are stored in the user’s item scoring matrix based on the user’s scoring record of the item. For example, if a set ofm users is included, a user-item rating matrix is constructed. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The attenuation parameter a controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating the similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. The flowchart of the user-based collaborative filtering algorithm is shown in Figure 3.Figure 3
User-based collaborative filtering algorithm flow.Content-based recommendation is the extraction of feature vectors, which means that the feature vectors are learned from the content network. For example, the user has listened to all the songs and then encodes all the song information. Since the song is marked as a heart among some users, you can give a tag and add other tags so that you can get a set of songs that you like from all the songs the user has listened to. It can be seen that network structures with better predictive capabilities, such as RNN (recurrent neural network) and LSTM (long short-term memory), will no longer classify labels. Here is just an example of obtaining training data with classification problem). For recommendation task, since we have tens of thousands of users with different tastes, there is also a lot of data for training when new users come; some apps will ask you what songs you like first and then predict what you will like to listen to later based on the songs you have listened to for a while (so the more you listen, the more accurate the recommendation is not necessarily the gimmick of those apps to let you use it). This method of feature vector extraction based on content recommendation is to judge the possibility of your subsequent state based on the previous content. In this case, there is no detailed explanation between users. For example, user A may have listened to 10,000 songs, user B may have listened to 15 popular songs, and C has listened to 8 songs. These songs are all in A and B’s song lists. However, as the network learns the previous data, resulting in the possible distribution of the later data, the prediction range of user A for the later data is wider than that of B. At this time, user C can often be recommended to some minority, and related songs of this kind of recommendation algorithm can find users’ unique niche preferences and make users feel surprised. To briefly explain, the so-called online collaboration is to find items that users may like through online data, while offline filtering is to filter out some data that are not worth recommending, such as data with low recommendation scores, or data that users like. Although the recommendation value is very high, the collaborative filtering based on the model-based clustering algorithm is somewhat similar to the collaborative filtering based on the user. In terms of features, the difference between collaborative filtering and the feature vectors of deep learning above lies in that collaborative filtering is mainly to find users. The similarity between objects, to some extent, is more like the clustering in traditional machine learning, and the purpose of extracting features at this time is mainly to make our clustering effect better.If you use this round, user A may have 10,000 songs, and user B may have 15 popular songs. The user now listens to 8 songs, and they are all in the A and B playlists. Therefore, the first recommendation at the time should be for the other 7 to talk about features, more likely to be noise, so it is possible that the accuracy of this method is high, so the content based on the recommendation is to extract the characteristic users, which can better realize the possibility of the data content process. Where to go, starting from the content components, the relationship between each set of training data is not obvious. The model based on collaborative filtering features is equivalent to analyzing each set of data based on the features. By explaining user characteristics, a new user can match and recommend at most one data packet, and there is an obvious parallel relationship between training data.Feature Selection Classification Part. This article divides the features into two parts according to the order of importance. This article first extracts the top-k features of importance, which are the common parts of the two types of features. Next, this article will split the feature set after sorting by importance. The split method is to encode the odd-even value of the sequence number. Odd numbers belong to the first category of features, and even numbers belong to the second category of features. Then, this paper selects and classifies the original features. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. If we look at this issue from the perspective of the development of Chinese folk music, the international communication of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music. The first type of features is top-k features plus odd-ranked features; the second type of features is top-k features plus even-ranked features.


### 3.2. National Music Recommendation Model Based on Multilayer Collaborative Filtering

Traditional collaborative filtering can recommend items like movies and music because they all have low selection costs and strong interest-related features. However, this technique does not work well in music recommendations. It only considers the user’s behavioral characteristics and ignores other characteristics of the user or the song, such as whether they have long been accustomed to a certain music style and the popularity of the current song. These characteristics can be mined from user historical data. Therefore, the data modeling method based on machine learning is one of the first choices of many music recommendation systems [30].When checking the causal relationship between sums, letΩn be all the information in the world until the period, Yn be all the information until the expiration, and then Ωn−Yn be all the information except. If one thinks that “today’s weather affects tomorrow’s weather and tomorrow’s weather cannot affect today’s weather,” the hypothesis does not include any redundant information.(1)FXn+1|Ωn≠FXn+1|Ωn−Yn.The above information setΩn not only includes all the variables related to it but also includes the values that have been lagging, but it is basically difficult to get a true and reliable data set Ωn in the real world, so we must reduce the unreliable data in a limited range information, changing Ωn to the currently available information set Jn.(2)FXn+1|Jn≠FXn+1|Jn−Yn.In other words, the information in the data about all the information can be used to assist the prediction time of judgment based on this, and for other related data, the formation has the causality of the initial relevant evidence. After changing all relevant information sets to information sets that can be effectively obtained, the Granger causality test can add the basis with the initial results. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. The specific reason is like the relevant basis above. The main reason is that in this case, it is not possible to clearly understand whether there are other variables outside the specific relationship set that have an impact on, and it is impossible to determine whether it is the real “cause.” Figure4 shows a schematic diagram of ethnic music spectrum clustering.Figure 4
Schematic diagram of ethnic music spectrum clustering.For the test of the ethnic music scale, this article also uses the “principal component analysis” in the factor analysis method to extract factors with feature values greater than 1 in the research and rotate them through the maximization of variance to obtain 9 factors, as shown in Table1. The increase basically shows a trend of first decreasing and then increasing. This is because the user’s interest is divided into long-term interest and short-term interest. This shows that the 9 factors extracted in this paper retain enough information and are highly explanatory. Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. The specific analysis results are as follows. An explanation of the total variance of the ethnic music scale is shown in Table 1.Table 1
Explanation of the total variance of the ethnic music scale.
Second grade indexSatisfaction evaluation comment★★★★★★★☆★★☆☆★☆☆☆☆☆☆☆Y110.1460.0310.1770.1730.177Y120.1630.0740.0770.2170.077Y130.2640.0950.1150.1650.115Y140.2090.0650.0580.2690.058Y150.3410.0050.2210.1830.221Y160.2810.0910.1060.1350.106Y170.2410.0660.1250.1880.125Y210.2180.0320.1350.2270.135Y220.4720.0720.0670.1730.067Y230.2260.0380.1250.2600.125Y240.2890.0420.2380.1440.238In actual operation, it is very difficult to deal with the distribution function of variables. A simpler way is to deal with it from the perspective of the expected value according to the formula as follows:(3)EXn+1|Jn≠EXn+1|Jn−Yn.A regression equation is built as follows:(4)Xt=∑i=1kαiXt−i+∑i=1kβiYt−i+u1t,xj+1=xj+sjdj,Δfr=∂fr∂x1,∂fr∂x2,…,∂fr∂xn,in which Sj is the optimal step size factor. The convergence condition of the iteration is given as follows:(5)fj−fj−1≤τ,fj−fb≤τ.The null hypothesis is thatY does not constitute causality to X, that is, H0: β1=β2=⋯=βk=0. If the null hypothesis holds,(6)F=SSEr−SSEu/kSSEu/T−2k:Fk,T−2k.Among them, SSEr is the minimum error sum of squares under certain constraints, T is the residual sum of squares without constraints, and k is the sample size. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power.


## 3.1. Multilayer Collaborative Filtering Algorithm

The algorithm implementation steps are shown in Figure2. First, a user-item score matrix is established, the similarity between users based on the user-item score is calculated, then the k nearest neighbors of the target user are found, and finally the unrated items are scored according to the nearest neighbor. The target user’s predicted score for the item is calculated. The attenuation parameter a controls the degree of attenuation. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. The structure diagram of a typical recommendation model is shown in Figure 2.Figure 2
Model structure diagram of the typical recommendation model.In the recommendation system, the original data are stored in the user’s item scoring matrix based on the user’s scoring record of the item. For example, if a set ofm users is included, a user-item rating matrix is constructed. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The attenuation parameter a controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating the similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. The flowchart of the user-based collaborative filtering algorithm is shown in Figure 3.Figure 3
User-based collaborative filtering algorithm flow.Content-based recommendation is the extraction of feature vectors, which means that the feature vectors are learned from the content network. For example, the user has listened to all the songs and then encodes all the song information. Since the song is marked as a heart among some users, you can give a tag and add other tags so that you can get a set of songs that you like from all the songs the user has listened to. It can be seen that network structures with better predictive capabilities, such as RNN (recurrent neural network) and LSTM (long short-term memory), will no longer classify labels. Here is just an example of obtaining training data with classification problem). For recommendation task, since we have tens of thousands of users with different tastes, there is also a lot of data for training when new users come; some apps will ask you what songs you like first and then predict what you will like to listen to later based on the songs you have listened to for a while (so the more you listen, the more accurate the recommendation is not necessarily the gimmick of those apps to let you use it). This method of feature vector extraction based on content recommendation is to judge the possibility of your subsequent state based on the previous content. In this case, there is no detailed explanation between users. For example, user A may have listened to 10,000 songs, user B may have listened to 15 popular songs, and C has listened to 8 songs. These songs are all in A and B’s song lists. However, as the network learns the previous data, resulting in the possible distribution of the later data, the prediction range of user A for the later data is wider than that of B. At this time, user C can often be recommended to some minority, and related songs of this kind of recommendation algorithm can find users’ unique niche preferences and make users feel surprised. To briefly explain, the so-called online collaboration is to find items that users may like through online data, while offline filtering is to filter out some data that are not worth recommending, such as data with low recommendation scores, or data that users like. Although the recommendation value is very high, the collaborative filtering based on the model-based clustering algorithm is somewhat similar to the collaborative filtering based on the user. In terms of features, the difference between collaborative filtering and the feature vectors of deep learning above lies in that collaborative filtering is mainly to find users. The similarity between objects, to some extent, is more like the clustering in traditional machine learning, and the purpose of extracting features at this time is mainly to make our clustering effect better.If you use this round, user A may have 10,000 songs, and user B may have 15 popular songs. The user now listens to 8 songs, and they are all in the A and B playlists. Therefore, the first recommendation at the time should be for the other 7 to talk about features, more likely to be noise, so it is possible that the accuracy of this method is high, so the content based on the recommendation is to extract the characteristic users, which can better realize the possibility of the data content process. Where to go, starting from the content components, the relationship between each set of training data is not obvious. The model based on collaborative filtering features is equivalent to analyzing each set of data based on the features. By explaining user characteristics, a new user can match and recommend at most one data packet, and there is an obvious parallel relationship between training data.Feature Selection Classification Part. This article divides the features into two parts according to the order of importance. This article first extracts the top-k features of importance, which are the common parts of the two types of features. Next, this article will split the feature set after sorting by importance. The split method is to encode the odd-even value of the sequence number. Odd numbers belong to the first category of features, and even numbers belong to the second category of features. Then, this paper selects and classifies the original features. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. If we look at this issue from the perspective of the development of Chinese folk music, the international communication of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music. The first type of features is top-k features plus odd-ranked features; the second type of features is top-k features plus even-ranked features.


## 3.2. National Music Recommendation Model Based on Multilayer Collaborative Filtering

Traditional collaborative filtering can recommend items like movies and music because they all have low selection costs and strong interest-related features. However, this technique does not work well in music recommendations. It only considers the user’s behavioral characteristics and ignores other characteristics of the user or the song, such as whether they have long been accustomed to a certain music style and the popularity of the current song. These characteristics can be mined from user historical data. Therefore, the data modeling method based on machine learning is one of the first choices of many music recommendation systems [30].When checking the causal relationship between sums, letΩn be all the information in the world until the period, Yn be all the information until the expiration, and then Ωn−Yn be all the information except. If one thinks that “today’s weather affects tomorrow’s weather and tomorrow’s weather cannot affect today’s weather,” the hypothesis does not include any redundant information.(1)FXn+1|Ωn≠FXn+1|Ωn−Yn.The above information setΩn not only includes all the variables related to it but also includes the values that have been lagging, but it is basically difficult to get a true and reliable data set Ωn in the real world, so we must reduce the unreliable data in a limited range information, changing Ωn to the currently available information set Jn.(2)FXn+1|Jn≠FXn+1|Jn−Yn.In other words, the information in the data about all the information can be used to assist the prediction time of judgment based on this, and for other related data, the formation has the causality of the initial relevant evidence. After changing all relevant information sets to information sets that can be effectively obtained, the Granger causality test can add the basis with the initial results. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. The specific reason is like the relevant basis above. The main reason is that in this case, it is not possible to clearly understand whether there are other variables outside the specific relationship set that have an impact on, and it is impossible to determine whether it is the real “cause.” Figure4 shows a schematic diagram of ethnic music spectrum clustering.Figure 4
Schematic diagram of ethnic music spectrum clustering.For the test of the ethnic music scale, this article also uses the “principal component analysis” in the factor analysis method to extract factors with feature values greater than 1 in the research and rotate them through the maximization of variance to obtain 9 factors, as shown in Table1. The increase basically shows a trend of first decreasing and then increasing. This is because the user’s interest is divided into long-term interest and short-term interest. This shows that the 9 factors extracted in this paper retain enough information and are highly explanatory. Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. The specific analysis results are as follows. An explanation of the total variance of the ethnic music scale is shown in Table 1.Table 1
Explanation of the total variance of the ethnic music scale.
Second grade indexSatisfaction evaluation comment★★★★★★★☆★★☆☆★☆☆☆☆☆☆☆Y110.1460.0310.1770.1730.177Y120.1630.0740.0770.2170.077Y130.2640.0950.1150.1650.115Y140.2090.0650.0580.2690.058Y150.3410.0050.2210.1830.221Y160.2810.0910.1060.1350.106Y170.2410.0660.1250.1880.125Y210.2180.0320.1350.2270.135Y220.4720.0720.0670.1730.067Y230.2260.0380.1250.2600.125Y240.2890.0420.2380.1440.238In actual operation, it is very difficult to deal with the distribution function of variables. A simpler way is to deal with it from the perspective of the expected value according to the formula as follows:(3)EXn+1|Jn≠EXn+1|Jn−Yn.A regression equation is built as follows:(4)Xt=∑i=1kαiXt−i+∑i=1kβiYt−i+u1t,xj+1=xj+sjdj,Δfr=∂fr∂x1,∂fr∂x2,…,∂fr∂xn,in which Sj is the optimal step size factor. The convergence condition of the iteration is given as follows:(5)fj−fj−1≤τ,fj−fb≤τ.The null hypothesis is thatY does not constitute causality to X, that is, H0: β1=β2=⋯=βk=0. If the null hypothesis holds,(6)F=SSEr−SSEu/kSSEu/T−2k:Fk,T−2k.Among them, SSEr is the minimum error sum of squares under certain constraints, T is the residual sum of squares without constraints, and k is the sample size. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power.


## 4. Test and Analysis of the Model of National Music Recommendation

To verify the reliability of the method in this paper, simulation experiments are carried out. To ensure that the experimental results are in sharp contrast, during the experiment, the same educational data compression access format was selected to ensure the integrity of the educational data. At the same time, to improve the accuracy of the experimental data, each of experimental result data is taken as the average of 30 times of the same experiment. Anyone already familiar with the confusion matrix knows that most of the time it is explained for a binary classification problem. Therefore, we use the confuse matrix, accuracy, precision, and F1-score to evaluate the model performance. True Positive (TP) refers to the number of predictions where the classifier correctly predicts the positive class as positive. True Negative (TN) refers to the number of predictions where the classifier correctly predicts the negative class as negative. False Positive (FP) refers to the number of predictions where the classifier incorrectly predicts the negative class as positive. False Negative (FN) refers to the number of predictions where the classifier incorrectly predicts the positive class as negative.(7)Accuracy=TP+TNTP+TN+FP+FN,F1−score=2∗precise∗recallprecise+recall,Precise=TPTP+FP,Recall=TPTP+FN.


### 4.1. National Music Data Source

This data set contains more than 700 million rating records of more than 130,000 songs from nearly 1.8 million users from the Web scope music community from 2010 to 2018. The rating scale is 1–5, and the level of the rating value indicates the user’s the degree of preference of the song, where 1 means dislike it very much and 5 means like it very much. Each user in the data set has rated more than 20 songs, and each song has been rated by more than 20 users. The information of each song also includes information such as singer, album, and genre. In addition, the data set also gives descriptions of a total of 215 genres. In addition, we have established a dedicated data cleaning and transmission architecture, which is shown in Figure5.Figure 5
Schematic diagram of ethnic music data cleaning and transmission architecture.The experimental results show that compared with the traditional collaborative filtering algorithm, the root mean square error of the music recommendation algorithm based on improved collaborative filtering is smaller. The music recommendation algorithm based on collaborative filtering and playback coefficients is evaluated in various evaluation standards (RMSE, MAE, NMAE, MAP, NDCG, and AUC) which are superior to other collaborative filtering methods and their variant methods, which can effectively improve the quality of music recommendation.Therefore, the experiment in this section chooses to extract a sub-data set containing nearly 240,000 score records of about 5,000 users on 2000 songs from the score data set and select 10 score records of each user as the test. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The attenuation parametera controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. Too fast will overemphasize the time factor and ignore the long-term interest of users. The calculation of similarity is an important step in collaborative filtering recommendation. The data size is comparable to another scoring data set provided by the project team.


### 4.2. National Music Recommendation Model Test

The experimental data set is the set of similar candidate songs calculated by the hybrid recommendation to assemble data according to the input format required by the multilayer collaborative filtering model. The information of each song also includes information such as singer, album, and genre. In addition, the data set also gives descriptions of a total of 215 genres. After assembling the data, input the multilayer collaborative filtering model to predict the cut rate of each song and filter out the songs whose cut probability exceeds a certain thresholdK. Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. The experimental evaluation indicators adopt MAE and RMSE, and the values of these two indicators are obtained by recommending them to users for real scoring. Figure 6 shows the influence of time factors on the national music recommendation algorithm.Figure 6
The influence of time factors on the national music recommendation algorithm.As can be seen from the experimental results, among these metrics, we proposed that all of these methods give better results than other methods. We can conclude that this method has obvious advantages over other methods in terms of average accuracy (MAP) and normalized loss cumulative return (NDCG). The area under the ROC curve (AUC) has less advantage. Another observation we want to emphasize is user-based. The experimental results of the KNN (UB-KNN) and the project-based KNN (IB-KNN) algorithms are poor because of this. The two algorithms only use user ratings to calculate the similarity. Algorithms that use other user attributes can improve the push recommended effects, especially when UPC is used alone as a user attribute.The MAE value of the algorithm gradually increases with the attenuation parametera. The increase basically shows a trend of first decreasing and then increasing. This is because the user’s interest is divided into long-term interest and short-term interest. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. The attenuation parameter a controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. Figure 7 shows the performance of the multilayer collaborative filtering model under different k values.Figure 7
Performance of the multilayer collaborative filtering model under differentk values.The personalized music recommendation algorithm based on ontology and tensor decomposition is compared with collaborative filtering based on user-improved cosine similarity, music recommendation based on user’s instant behavior, and high-order singular value decomposition. The information of each song also includes information such as singer, album, and genre. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. In addition, the data set also gives descriptions of a total of 215 genres. In the case of neighbors, the smaller the average MAE value, the higher the prediction accuracy. As the number of nearest neighbors increases, the accuracy rate tends to stabilize.Aiming at user rating differences, this article analyzes the factors that cause user rating differences. The algorithm first uses the modified cosine similarity calculation formula to correct the standard error of the score between users. By introducing the user influence factor into the similarity calculation formula, the difference in the degree of mutual influence between different users is reflected. If we look at this issue from the perspective of the development of Chinese folk music, the international communication of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating the similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. Comparing data source 1 and data source 2 at the same time, it is found that when the data are sparser, the MAE value obtained by the personalized music recommendation algorithm based on ontology and tensor decomposition under different nearest neighbors is smaller; that is, the accuracy of recommendation is higher. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The calculation of similarity is an important step in collaborative filtering recommendation. The MAE value calculated by high-order singular value decomposition all increases to varying degrees. The performance of different methods under different numbers of recommendation songs is shown in Figure8.Figure 8
Performance of different methods under different numbers of recommendation songs.We also inspected the models’ recommendation and teaching abilities for national music. As shown in Figure8, under different numbers of recommended music, considering their respective recognition abilities, the results show that our method obtains the best results under different numbers. Moreover, the hybrid model is not as good as their results compared with the content-based and collaborative filtering methods, which shows that increasing the complexity of the model does not necessarily improve the performance of the recommendation system. It indicated that our proposal can perform well than the other three methods.In Figure9, we took 20,000 pieces of pop, Jazz, rock, folk, and children’s songs in the system, then pushed them to different groups of people, and compared their results in different aspects. Finally, we found that our system has the best results in all kinds of music, especially in popular music and folk songs. Analyzing the inventory of the system, it can be found that the number of these two songs is larger and the song age is longer, so the recommendation effect is significantly better than the others. More importantly, with the age composition and preferences of users, the popularity of these two tracks is higher. The recommendation results of different models show that the recommendation results of our method in different types of songs are all due to other methods. Under different methods, the accuracy of folk and pop music is the highest. In addition, we can see that the result of Jazz is not well in all methods, especially in collaborative filtering methods. However, this may not prove that the recommended filtering method cannot be used for jazz. We believe that none of the existing research methods are suitable for jazz. On the one hand, Jazz may not be prevailing in our daily life, we have an insufficient example to train the model that has great experience; on the other hand, the 20000 Jazz music is not distinctive to represent the Jazz that lead the Jazz lover unwilling to accept them. In addition, as we can see from Figure 10, Jazz’s F1 has an improvement, which indicated that Jazz has a better recall. It means that the users like Jazz can always receive the Jazz music which is their favorite.Figure 9
Performance of different methods under different types of songs.Figure 10
F1-measure of different methods under different numbers of recommendation songs.Figure10 shows the F1-measure of all methods; we can see that all methods have the almost same F1-measure in hybrid methods and collaborative filtering methods; this indicated that collaborative filtering may have great recall results though it is not well in precision. Our methods do all best in all kinds of music in both recall and precision. Our model uses ontology to construct a user knowledge model and integrates similarity measures in multiple situations. The actual case test and user feedback analysis show that the designed personalized national music model has good application and promotion effects. Compared with other methods, it can avoid overfitting and it can also increase the ability of generation. Thus, our approach can recommend different types of music for users and for each types of music; more music items can be recommended.


## 4.1. National Music Data Source

This data set contains more than 700 million rating records of more than 130,000 songs from nearly 1.8 million users from the Web scope music community from 2010 to 2018. The rating scale is 1–5, and the level of the rating value indicates the user’s the degree of preference of the song, where 1 means dislike it very much and 5 means like it very much. Each user in the data set has rated more than 20 songs, and each song has been rated by more than 20 users. The information of each song also includes information such as singer, album, and genre. In addition, the data set also gives descriptions of a total of 215 genres. In addition, we have established a dedicated data cleaning and transmission architecture, which is shown in Figure5.Figure 5
Schematic diagram of ethnic music data cleaning and transmission architecture.The experimental results show that compared with the traditional collaborative filtering algorithm, the root mean square error of the music recommendation algorithm based on improved collaborative filtering is smaller. The music recommendation algorithm based on collaborative filtering and playback coefficients is evaluated in various evaluation standards (RMSE, MAE, NMAE, MAP, NDCG, and AUC) which are superior to other collaborative filtering methods and their variant methods, which can effectively improve the quality of music recommendation.Therefore, the experiment in this section chooses to extract a sub-data set containing nearly 240,000 score records of about 5,000 users on 2000 songs from the score data set and select 10 score records of each user as the test. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The attenuation parametera controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. Too fast will overemphasize the time factor and ignore the long-term interest of users. The calculation of similarity is an important step in collaborative filtering recommendation. The data size is comparable to another scoring data set provided by the project team.


## 4.2. National Music Recommendation Model Test

The experimental data set is the set of similar candidate songs calculated by the hybrid recommendation to assemble data according to the input format required by the multilayer collaborative filtering model. The information of each song also includes information such as singer, album, and genre. In addition, the data set also gives descriptions of a total of 215 genres. After assembling the data, input the multilayer collaborative filtering model to predict the cut rate of each song and filter out the songs whose cut probability exceeds a certain thresholdK. Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. The experimental evaluation indicators adopt MAE and RMSE, and the values of these two indicators are obtained by recommending them to users for real scoring. Figure 6 shows the influence of time factors on the national music recommendation algorithm.Figure 6
The influence of time factors on the national music recommendation algorithm.As can be seen from the experimental results, among these metrics, we proposed that all of these methods give better results than other methods. We can conclude that this method has obvious advantages over other methods in terms of average accuracy (MAP) and normalized loss cumulative return (NDCG). The area under the ROC curve (AUC) has less advantage. Another observation we want to emphasize is user-based. The experimental results of the KNN (UB-KNN) and the project-based KNN (IB-KNN) algorithms are poor because of this. The two algorithms only use user ratings to calculate the similarity. Algorithms that use other user attributes can improve the push recommended effects, especially when UPC is used alone as a user attribute.The MAE value of the algorithm gradually increases with the attenuation parametera. The increase basically shows a trend of first decreasing and then increasing. This is because the user’s interest is divided into long-term interest and short-term interest. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. National music is unique, and it is the deduction of a nation’s culture over time and history. The attenuation parameter a controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. Figure 7 shows the performance of the multilayer collaborative filtering model under different k values.Figure 7
Performance of the multilayer collaborative filtering model under differentk values.The personalized music recommendation algorithm based on ontology and tensor decomposition is compared with collaborative filtering based on user-improved cosine similarity, music recommendation based on user’s instant behavior, and high-order singular value decomposition. The information of each song also includes information such as singer, album, and genre. The dissemination of national music culture has changed from unconscious dissemination to conscious dissemination, meeting the needs of domestic and foreign music culture, and now actively conducting international dissemination has become one of the effective ways to enhance the country’s soft power. In addition, the data set also gives descriptions of a total of 215 genres. In the case of neighbors, the smaller the average MAE value, the higher the prediction accuracy. As the number of nearest neighbors increases, the accuracy rate tends to stabilize.Aiming at user rating differences, this article analyzes the factors that cause user rating differences. The algorithm first uses the modified cosine similarity calculation formula to correct the standard error of the score between users. By introducing the user influence factor into the similarity calculation formula, the difference in the degree of mutual influence between different users is reflected. If we look at this issue from the perspective of the development of Chinese folk music, the international communication of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music. The calculation of similarity is an important step in collaborative filtering recommendation. The quality of the calculation method usually determines the quality of the recommendation. The current common methods for calculating the similarity between users include Pearson correlation, standard cosine similarity, and modified cosine similarity. Comparing data source 1 and data source 2 at the same time, it is found that when the data are sparser, the MAE value obtained by the personalized music recommendation algorithm based on ontology and tensor decomposition under different nearest neighbors is smaller; that is, the accuracy of recommendation is higher. For the user-based collaborative filtering recommendation algorithm, the similarity measurement between users considers the calculation of the correlation between two-row vectors in the user-item score matrix. The calculation of similarity is an important step in collaborative filtering recommendation. The MAE value calculated by high-order singular value decomposition all increases to varying degrees. The performance of different methods under different numbers of recommendation songs is shown in Figure8.Figure 8
Performance of different methods under different numbers of recommendation songs.We also inspected the models’ recommendation and teaching abilities for national music. As shown in Figure8, under different numbers of recommended music, considering their respective recognition abilities, the results show that our method obtains the best results under different numbers. Moreover, the hybrid model is not as good as their results compared with the content-based and collaborative filtering methods, which shows that increasing the complexity of the model does not necessarily improve the performance of the recommendation system. It indicated that our proposal can perform well than the other three methods.In Figure9, we took 20,000 pieces of pop, Jazz, rock, folk, and children’s songs in the system, then pushed them to different groups of people, and compared their results in different aspects. Finally, we found that our system has the best results in all kinds of music, especially in popular music and folk songs. Analyzing the inventory of the system, it can be found that the number of these two songs is larger and the song age is longer, so the recommendation effect is significantly better than the others. More importantly, with the age composition and preferences of users, the popularity of these two tracks is higher. The recommendation results of different models show that the recommendation results of our method in different types of songs are all due to other methods. Under different methods, the accuracy of folk and pop music is the highest. In addition, we can see that the result of Jazz is not well in all methods, especially in collaborative filtering methods. However, this may not prove that the recommended filtering method cannot be used for jazz. We believe that none of the existing research methods are suitable for jazz. On the one hand, Jazz may not be prevailing in our daily life, we have an insufficient example to train the model that has great experience; on the other hand, the 20000 Jazz music is not distinctive to represent the Jazz that lead the Jazz lover unwilling to accept them. In addition, as we can see from Figure 10, Jazz’s F1 has an improvement, which indicated that Jazz has a better recall. It means that the users like Jazz can always receive the Jazz music which is their favorite.Figure 9
Performance of different methods under different types of songs.Figure 10
F1-measure of different methods under different numbers of recommendation songs.Figure10 shows the F1-measure of all methods; we can see that all methods have the almost same F1-measure in hybrid methods and collaborative filtering methods; this indicated that collaborative filtering may have great recall results though it is not well in precision. Our methods do all best in all kinds of music in both recall and precision. Our model uses ontology to construct a user knowledge model and integrates similarity measures in multiple situations. The actual case test and user feedback analysis show that the designed personalized national music model has good application and promotion effects. Compared with other methods, it can avoid overfitting and it can also increase the ability of generation. Thus, our approach can recommend different types of music for users and for each types of music; more music items can be recommended.


## 5. Conclusion

Although the personalized music recommendation system has attracted the attention of many researchers, the development of personalized music recommendation still faces many challenges and problems, which need to be continuously studied and optimized. If we look at this issue from the perspective of the development of Chinese folk music, the international dissemination of Chinese folk music has the positive significance of promoting China’s own development and enhancing the influence of Chinese folk music. The increase basically shows a trend of first decreasing and then increasing. This is because the user’s interest is divided into long-term interest and short-term interest. The attenuation parametera controls the attenuation rate of the time attenuation factor. If the attenuation rate is too slow, it will not be able to distinguish users’ preferences for items with different scoring intervals. Too fast will overemphasize the time factor and ignore the long-term interest of users. Situational awareness can be used to explore the use of music resources, and this method can better explore user roles. This article attempts to use the expectation-maximization algorithm to cluster users and ethnic music scores. In the process of writing this thesis, many journals were referred and consulted, and a detailed investigation and analysis of the status quo in some fields were made, to make data analysis and theoretical research authentic and scientific. While scalability issues have not yet been addressed, in future work, we intend to segment users through search. Then, the method based on auxiliary filtering can enter different training sets independently. Because the recommendation will be conducted in more space, we will try to provide recommendations in a more effective way. Although several clustering techniques have been used in the recommender system to obtain user groups with similar preferences, attempt will be made to approach the problem from different angles, focusing on characterizing users based on their degree of greyness. Therefore, the playback factor will be one of the properties involved in different user groups. In addition, in view of the objectives of our work, one is not to separate grey sheep users from other users; our goal is to create fuzzy clustering so that users can belong to multiple clusters with different memberships. We will further focus on exploring the combination of folk music recommendation and music teaching in the future.



---

*Source: 3140341-2021-11-05.xml*