# User Model-Based Personalized Recommendation Algorithm for News Media Education Resources

Authors: Zhu Shilin
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Traditional recommendations for news and media education resources usually ignore the importance of sequential patterns in user check-in behavior and fail to effectively capture the complex and dynamically changing interests of users. As a result, this study provides a recommendation model for news and media education materials based on a user model. To capture changes in users’ interests, the model can represent and fuse short-term and long-term preferences separately. For short-term preferences, a long- and short-term memory network incorporating spatiotemporal contextual information is proposed to learn complex sequential transfer patterns in users’ check-in behaviors and further extract short-term preferences accurately through a goal-based attention mechanism. A user attention-based approach is utilized to capture fine-grained links between users and interest points for long-term preferences. Finally, experimental simulations are conducted on two datasets, Foursquare and Gowalla. The results show that the proposed user model-based recommendation model for news media education resources has better performance compared with the mainstream recommendation methods on different evaluation criteria, which validates the effectiveness of the proposed model.


---

## Body

## 1. Introduction

In order to alleviate news overload, news recommendation (NR) is an effective method of assisting consumers in filtering and pushing items that may be of interest to them from a diverse variety of news sources. The recommendation algorithms used by major news applications such as Today’s Headlines and news websites such as MSN News have been integrated into the company’s business processes in order to give thousands of people news recommendations and improve the overall user experience. For example, Today’s Headline has developed news recommendation algorithms based on three dimensions: the qualities of news content, the characteristics of the user, and the characteristics of the environment, and has effectively applied these algorithms to its platform. If you compare it to other suggestions, such as commodities, movies, and music, news recommendation (NR) has great timeliness of news and rich semantic information. It is also an excellent choice for modeling the overall preferences of the user. Users’ preferences modeling, temporal interest modeling, and news modeling are all subtasks that present difficulties for the company to complete. Many research organizations at home and abroad have turned to natural language processing (NR) as a popular topic of study in recent years, and academic conferences in the domains of information retrieval, data mining, and artificial intelligence have paid close attention to the subject [1–8].Deep learning-based news recommendation approaches are grouped into three categories based on the diverse modeling ideas: “two-stage” methods, “fusion” methods, and “collaborative” methods. Each of these categories is introduced separately, and each of these methods is described in detail. In this case, the “two-stage” strategy emphasizes the importance of “breaking news first.” The “fusion” technique combines news and user information, and simultaneously learns news and user characteristics; the “collaborative” approach not only incorporates the user’s own information but also learns from it. While the “collaborative” strategy takes into consideration not only the individual user’s own news-clicking activity but it also takes into consideration how other users engage with the news. From “modeling news” to “modeling overall user preferences,” “modeling user temporal interests,” “modeling user-news dichotomies,” “modeling user preferences,” and “modeling user interests,” each type of approach is differentiated by the specific subtasks in the modeling process or the data organization on which they are based. A variety of views are used to examine the modeling characteristics and design elements of different DNR methodologies. These perspectives include “modeling news,” “modeling user’s overall preferences,” “modeling user’s temporal interest,” and “user-news dichotomy” [9–16].Over the past few years, location technology, mobile smart devices, and mobile Internet technology have advanced at a rapid pace, and location-based social networks (LBSN) have grown increasingly popular, including Foursquare, Gowalla, Yelp, and other similar services. By “checking in,” users on LBSNs can communicate their real-time location information, as well as geotagged text and photographs, with others more quickly. This technique makes use of the enormous amount of user history check-in data available in LBSNs in order to mine user behaviors and preferences and offer new locations that may be of interest to users referred to as point of interest (POI) recommendation. In LBSNs, the suggestion of point of interest is critical for the success of the network [17–22].Collaborative filtering (CF) models were used to integrate contextual information, and the majority of the early research concentrated on this topic. Studies have revealed that users’ check-in activity is sequential and that this attribute is critical for predicting users’ behavior. In order to model the sequential behavior of user check-in, a recurrent neural network (RNN) has been successfully implemented. However, in practice, users’ check-in sequences frequently contain complex spatiotemporal information features, and not all of the sites visited in the series are equally essential for forecasting users’ future behaviors, as demonstrated by the study. Furthermore, most point-of-interest recommendation systems fail to address the critical issue of users’ interests changing over time, which is a critical aspect of the problem. Users have preferences that are constant throughout time as well as short-term behavioral requirements. A model that combines long-term preference modeling using nonlocal networks with short-term preference modeling using spatially extended RNNs, for example, has been proposed by several researchers as a possible solution. By fully learning and combining consumers’ long- and short-term preferences, this model delivers a considerable boost in suggestion performance [23–26].Deep learning (DL) has become a mainstream technique to promote the development of news recommendations in recent years, which has significantly improved the effectiveness of news recommendations and received wide attention from researchers. The classification of deep learning is shown in Figure1.Figure 1
Taxonomy of deep learning-based news recommendation.As a consequence of this research, a user-based model for personalized educational material suggestion in news media has been established, and it is capable of accurately capturing users’ preferences both long term and short term. As a first stage, we employ long short-term memory (LSTM) to model short-term sequential preferences of users, and we pass spatiotemporal contextual information into each phase of the LSTM network in order to capture the short-term preferences of users. Information is captured in each phase of the LSTM network to capture the complicated transfer characteristics of the user’s short-term behavior. Long-term models are built using the attention mechanism, which filters away irrelevant check-in records from users’ long-term behavior history and enables the construction of users’ long-term preferences. Lastly, in this study, users’ short-term preferences are combined with their long-term preferences in order to produce a more comprehensive and rich preference representation of users, which allows for more efficient and accurate interest point recommendations.The following is a breakdown of the research: Section1 begins with an introduction. The second section examines some symbol definitions and problem definitions. The proposed methodologies are discussed in Section 3; the experimentation and assessment are discussed in Section 4. Finally, the research job is completed in Section 5.


## 2. Symbol Description and Problem Definition

We define thatU=u1,u2,…,u|U denotes the set of users, L=l1,l2,…,l|L denotes the set of interest points, where U and L denote the total number of users and the total number of interest points, respectively. For the sake of illustration, a table of symbolic descriptions is given in Table 1.Table 1
Symbol description.
Symbol1U,LSet of users, set of points of interestMuThe sequence of historical check-ins of useruSt−1u,Lt−1uShort-term check-in sequence of useru at time t and long-term check-in sequenceet,elThe embedding vector at timet and the interest point lpsu,pluThe embedding vector at time t and the interest point lw,bWeight vectors and bias vectors of the modeldThe size of the embedding vector dimensionNThe number of interest points recommended by the userDefinition 1.
Point of interest (POI). A point of interest is defined as a geospatial item uniquely identified by latitude and longitude coordinates, such as a restaurant or museum, etc. A point of interest can be represented by the set of point of interest IDs, latitude, and longitudelid,latlid,lonlid.Definition 2.
Check-in. The check-in record of a user is represented by the set of three elements, useru, point of interest l, and time t. u,l,t indicates that user u∈U visited POI l∈L at time t.Definition 3.
Check-in sequence (CS). The check-in sequence of useru is the history of check-in records of user u sorted by time, denoted by Mu=r1u,r2u,…,rMuu, where riu=u,liu,ti, Mu represents the total number of user check-in records. For user u, given a query time t, we take Mu the k most recent check-in records before t as the user’s short-term sequence St−1u=rt−ku,rt−k+1u,…,rt−1u, which can reflect the user’s short-term preferences. We set all the check-in records before time t as the long-term sequence Lt−1u, Lt−1u=r1u,r2u,…,rt−1u, which reflects the long-term preferences of the user.Problem 1.
Definition-Interest point recommendation.
Given a check-in sequenceMu of user u and a query time t, we predict the probability that the user visits an unvisited interest point lt∈L at time t. The scores of the predicted probabilities are sorted in descending order to recommend the top N locations for the user.


## 3. The Proposed Method

In this section, we define the short-term performance modeling and long-term performance modeling.There are three elements to the suggested point-of-interest recommendation model. The first is a short-term preference module, followed by a long-term preference module, and then a long- and short-term preference fusion module of users.When utilized in conjunction with spatiotemporal context information, the LSTM is trained to learn the complicated sequential transfer patterns in user check-in behavior, and the short-term preferences are then accurately extracted by the attention mechanism depending on the target location. Learners’ attentional and discriminative abilities in learning serialized dependencies, as well as the ability to filter out extraneous information. The short-term behavioral demands of users are taken into consideration, as well as their long-term stable preferences, to arrive at an interest point recommendation that takes into account both their short-term behavioral needs and their long-term stable preferences.


### 3.1. Short-Term Preference Modeling

Short-term preferences reflect the interests and needs of users in a short period of time. The purpose of modeling short-term preferences is to capture the user’s sequential transfer preferences for interest points in the check-in sequences. In this module, this paper first uses LSTM to model the input check-in sequence and then uses an attention network based on the target interest points to further extract the user’s short-term preferences accurately.Let the short-term sequenceSt−1u=rt−ku,rt−k+1u,…,rt−1u be the input of this module, and each check-in in the sequence contains all the check-in time information t, the interest point identifier l, and the geographical information of the interest point, i.e., longitude and latitude lati,loni. It is difficult to capture the short-term interest of users effectively if only the sequential relationship between interest points is learned. Considering the influence of spatiotemporal contextual information on users’ activities in the physical world, modeling the geographic influence and temporal dynamics is important to predict users’ next mobile behavior. For any check-in record in the sequence, the interest point temporal embedding feature vector eti, the embedding feature vector eli, and the interest point geographic features are stitched to obtain ci, and then ci is transformed into xi; the expression is as follows:(1)ci=eli;eti;lati,loni,xi=RELUWcx⋅ci+bcx.The LSTM model is an enhanced RNN model that is frequently used in a variety of recommendation systems. It can learn the dependencies of both short- and long-term sequences, and it does so in a creative way that avoids the problems associated with gradient explosion and gradient disappearance that have plagued previous RNNs. The specific composition structure of LSTM is shown in Figure2.Figure 2
Composition structure diagram of LSTM model.The following is the expression for the LSTM model that was utilized in this paper:(2)ft=sigmoidWf⋅ht−1,xt+bf,(3)it=sigmoidWi⋅ht−1,xt+bi,(4)ot=sigmoidWo⋅ht−1,xt+bo,(5)c˜t=tanhWc⋅ht−1,xt+bc,(6)ct=ft⋅ct−1+it⋅c˜t,(7)ht=ot⋅tanhct.In equations (2) to (7), it is the input gate, ot is the output gate, ft is the forget gate, ct is the input value in the cell at time t, ct is the updated value in the cell at time t, ht is the vector that stores the hidden information at time t and the previous time, sigmoid,tanh is the activation function, Wf,Wi,Wc,Wo is the weight matrix, and bf,bi,bc,bo is the corresponding bias of Wf,Wi,Wc,Wo, and the structure of each neuron model is shown in Figure 3.Figure 3
Structure of each cell of the nonlinear mathematical model LSTM.A target POI-based attention network is used in this paper to model the sequence representation produced by LSTM modeling in order to extract more information about users’ short-term preferences from the sequence representation. As a result, this article makes use of the target POI to dynamically assign larger weights to the more relevant points of interest in the short-term sequence, in order to better anticipate whether a user would visit this point of interest. It should be noted that the following are the formulas for calculating the weightsαis and the short-term preferences psu.(8)αis=expfelT,hiu∑j=1kexpfelT,hju,psu=∑i=1kαishiu,where f, is the scoring function for attention distribution calculation, and the common scoring functions are the bilinear model, scaled dot product model, dot product model, and additive model. Since the scaled dot product model introduces a scaling factor d, which can alleviate the problem of large dot product calculation when the dimensionality d of the input vector is relatively high, the text adopts the scaled dot product model. The attention formula is shown as follows:(9)fq,k=qTkd.


### 3.2. Long-Term Preference Modeling

For long-term preference modeling, existing approaches usually learn a static potential vectorqu∈Rd directly for each user to represent the user’s long-term interest preferences, which can reflect the user’s inherent preference characteristics.Users’ previous check-in records have a tendency to vary with time, and their long-term histories often reveal a complex and broad range of interests. As a result, learning only a static embedding vector will limit the model’s ability to capture users’ evolving and complex long-term preferences to a certain extent. In this paper, we choose to encode users’ historical check-in records in order to obtain an alternative preference representation, referred to as the user memory embedding vector, that can be dynamically reconstructed based on users’ continuously updated check-in records, as described in the previous section.The points of interest that a user visits can serve as a representation of his or her preferences. While users commonly visit multiple places of interest over a long period of time, these previously visited points of interest may not have the same reference value for expressing user preferences. Consequently, when dealing with long-term preferences of users’ interest points, it is critical to distinguish between users’ interests by assigning weights to their historical behaviors, in order to minimize the influence of “irrelevant information” in the sequence of historical behaviors on interest point recommendations. In this study, the long-term preference of users, denoted by the letterp percent, is expressed as the weighted sum of interest points in the long-term sequence, with the following expression:(10)pl−tu=∑lt∈Lt−1uαileli.For each interest pointli∈Lt−1u, the corresponding weight α indicates the importance of interest point li for the long-term preferences of user u.In this paper, we use the feature vectoru∈Rd to represent the user and use u as a query vector to access the user’s historical behavior sequence m. The attention distribution (i.e., weights) is calculated as follows:(11)αil=soft maxfmi,u=efmi,u∑j=1LNefmi,u,where LN is the source length, i.e., the length of the user’s historical behavior sequence. Similar to the short-term preference model, the attention calculation here also uses the scaled dot product model.Although the changing attributes of users’ long-term preferences can be captured by aggregating their long-term check-in histories, such an approach still cannot accurately represent the general attributes of users’ long-term preferences because the actual number of users’ check-ins is limited.In order to obtain a comprehensive long-term preference of users, in this paper, the long-term embedding memory∑lt∈Lt−1uαileli is fused with qu. The final representation of the user’s long-term preference plu is(12)plu=∑lt∈Lt−1uαileli⊕quWl+bl,where bl∈Rd is a bias matrix and Wl∈R2d×d is a weight matrix.


## 3.1. Short-Term Preference Modeling

Short-term preferences reflect the interests and needs of users in a short period of time. The purpose of modeling short-term preferences is to capture the user’s sequential transfer preferences for interest points in the check-in sequences. In this module, this paper first uses LSTM to model the input check-in sequence and then uses an attention network based on the target interest points to further extract the user’s short-term preferences accurately.Let the short-term sequenceSt−1u=rt−ku,rt−k+1u,…,rt−1u be the input of this module, and each check-in in the sequence contains all the check-in time information t, the interest point identifier l, and the geographical information of the interest point, i.e., longitude and latitude lati,loni. It is difficult to capture the short-term interest of users effectively if only the sequential relationship between interest points is learned. Considering the influence of spatiotemporal contextual information on users’ activities in the physical world, modeling the geographic influence and temporal dynamics is important to predict users’ next mobile behavior. For any check-in record in the sequence, the interest point temporal embedding feature vector eti, the embedding feature vector eli, and the interest point geographic features are stitched to obtain ci, and then ci is transformed into xi; the expression is as follows:(1)ci=eli;eti;lati,loni,xi=RELUWcx⋅ci+bcx.The LSTM model is an enhanced RNN model that is frequently used in a variety of recommendation systems. It can learn the dependencies of both short- and long-term sequences, and it does so in a creative way that avoids the problems associated with gradient explosion and gradient disappearance that have plagued previous RNNs. The specific composition structure of LSTM is shown in Figure2.Figure 2
Composition structure diagram of LSTM model.The following is the expression for the LSTM model that was utilized in this paper:(2)ft=sigmoidWf⋅ht−1,xt+bf,(3)it=sigmoidWi⋅ht−1,xt+bi,(4)ot=sigmoidWo⋅ht−1,xt+bo,(5)c˜t=tanhWc⋅ht−1,xt+bc,(6)ct=ft⋅ct−1+it⋅c˜t,(7)ht=ot⋅tanhct.In equations (2) to (7), it is the input gate, ot is the output gate, ft is the forget gate, ct is the input value in the cell at time t, ct is the updated value in the cell at time t, ht is the vector that stores the hidden information at time t and the previous time, sigmoid,tanh is the activation function, Wf,Wi,Wc,Wo is the weight matrix, and bf,bi,bc,bo is the corresponding bias of Wf,Wi,Wc,Wo, and the structure of each neuron model is shown in Figure 3.Figure 3
Structure of each cell of the nonlinear mathematical model LSTM.A target POI-based attention network is used in this paper to model the sequence representation produced by LSTM modeling in order to extract more information about users’ short-term preferences from the sequence representation. As a result, this article makes use of the target POI to dynamically assign larger weights to the more relevant points of interest in the short-term sequence, in order to better anticipate whether a user would visit this point of interest. It should be noted that the following are the formulas for calculating the weightsαis and the short-term preferences psu.(8)αis=expfelT,hiu∑j=1kexpfelT,hju,psu=∑i=1kαishiu,where f, is the scoring function for attention distribution calculation, and the common scoring functions are the bilinear model, scaled dot product model, dot product model, and additive model. Since the scaled dot product model introduces a scaling factor d, which can alleviate the problem of large dot product calculation when the dimensionality d of the input vector is relatively high, the text adopts the scaled dot product model. The attention formula is shown as follows:(9)fq,k=qTkd.


## 3.2. Long-Term Preference Modeling

For long-term preference modeling, existing approaches usually learn a static potential vectorqu∈Rd directly for each user to represent the user’s long-term interest preferences, which can reflect the user’s inherent preference characteristics.Users’ previous check-in records have a tendency to vary with time, and their long-term histories often reveal a complex and broad range of interests. As a result, learning only a static embedding vector will limit the model’s ability to capture users’ evolving and complex long-term preferences to a certain extent. In this paper, we choose to encode users’ historical check-in records in order to obtain an alternative preference representation, referred to as the user memory embedding vector, that can be dynamically reconstructed based on users’ continuously updated check-in records, as described in the previous section.The points of interest that a user visits can serve as a representation of his or her preferences. While users commonly visit multiple places of interest over a long period of time, these previously visited points of interest may not have the same reference value for expressing user preferences. Consequently, when dealing with long-term preferences of users’ interest points, it is critical to distinguish between users’ interests by assigning weights to their historical behaviors, in order to minimize the influence of “irrelevant information” in the sequence of historical behaviors on interest point recommendations. In this study, the long-term preference of users, denoted by the letterp percent, is expressed as the weighted sum of interest points in the long-term sequence, with the following expression:(10)pl−tu=∑lt∈Lt−1uαileli.For each interest pointli∈Lt−1u, the corresponding weight α indicates the importance of interest point li for the long-term preferences of user u.In this paper, we use the feature vectoru∈Rd to represent the user and use u as a query vector to access the user’s historical behavior sequence m. The attention distribution (i.e., weights) is calculated as follows:(11)αil=soft maxfmi,u=efmi,u∑j=1LNefmi,u,where LN is the source length, i.e., the length of the user’s historical behavior sequence. Similar to the short-term preference model, the attention calculation here also uses the scaled dot product model.Although the changing attributes of users’ long-term preferences can be captured by aggregating their long-term check-in histories, such an approach still cannot accurately represent the general attributes of users’ long-term preferences because the actual number of users’ check-ins is limited.In order to obtain a comprehensive long-term preference of users, in this paper, the long-term embedding memory∑lt∈Lt−1uαileli is fused with qu. The final representation of the user’s long-term preference plu is(12)plu=∑lt∈Lt−1uαileli⊕quWl+bl,where bl∈Rd is a bias matrix and Wl∈R2d×d is a weight matrix.


## 4. Experiment

The datasets for this experiment are from Foursquare and Gowall, which are real and publicly available data. Foursquare is a cell phone service website, and Gowalla is a social game network platform, both of which can provide location-based web services to users. In this paper, we obtain the check-in records of more than 20,000 users for one year from two datasets, respectively, and each check-in record contains information such as user ID, interest point ID, check-in timestamp, and latitude and longitude of the interesting point. The comparison algorithms are POP, FPMC-LR, and so on [4–10].In order to evaluate the accuracy of the algorithm, the data that are not suitable for this model are eliminated from the Foursquare and Gowalla datasets, i.e., the data are preprocessed. The data with less than 10 check-in records and less than 10 visited locations were excluded. In the model training, the older check-ins are used to train the model, while the most recent check-ins are used as a test sample to evaluate the model performance.The performance of our algorithm is reflected by the recall.(13)RECALL=TPTP+FN.Using the Foursquare andl Gowalla datasets, the recommendation performance of each model is shown in Figures 4 and 5, with the number of recommended interest points being 5, 10, and 20, respectively. The recall of any model increases in direct proportion to the number of proposed interest points that are used. This is due to the fact that the greater the number of interest points that are offered to the user, the better the mining of user preferences, which has a certain impact on the performance of the model’s recommendation recommendations.Figure 4
Recall comparison of different models on Foursquare dataset.Figure 5
Recall comparison of different models on Gowalla dataset.Figures4 and 5 show that the proposed model’s recall performance is significantly better than that of the other seven models. In this experiment, the optimal recall performance of this model can reach, respectively, 15.06 percent and 15.06 percent, which is at least 2.17 percent higher than that of the comparison algorithms. Because the POP model just evaluates the popularity of locations and does not take into consideration the differences between individual users, its performance is much lower than the performance of the other models in this group. In this paper, we describe two recommendation approaches: FPMC-LR (a Markov chain-based recommendation approach) and POI2Vec (an embedding-based recommendation approach). Both approaches can capture the relationship between pairs of check-in sequences for personalized recommendation, and as a result, the recommendation performance is improved. As a result, because these approaches do not investigate more complex association methods, the performance of these recommendation methods is still inferior to the performance of deep learning-based point-of-interest recommendation algorithms like RUM. AttRec and SHAN outperform the deep learning-based point-of-interest recommendation models ST-RNN, RUM, and SHAN by a small margin. This validates the superiority of user preference and time series-based ideas in point-of-interest recommendation over the other deep learning-based recommendation models studied in this study. The effect of sequence length k is shown in Figure 6.Figure 6
The effect of sequence lengthk.The sequence lengthk is critical in the short-term preference module because it allows the attention network to collect the sequence patterns of the users. As shown in Figure 5, the conclusions of this work are based on a sequence length k that ranges from 1 to 10. According to the figure, increasing k improves the performance of the model on the Foursquare and Gowalla datasets in the beginning, but when a certain value is reached, the model performance falls to a certain level with increasing k. The best model performance is achieved on the two datasets when the parameter k is 4 and 3, respectively. According to the user’s sequence pattern, shorter sequences are more common than longer sequences, and larger sequences introduce noise into the model, which is counterproductive to performance development efforts. The effect of regularization coeffic is shown in Figure 7.Figure 7
The effect of regularization coeffic.For the regularization coefficient input, the values in this paper are 1 × 10−6, 5 × 10−6, 1 × 10−5, 5 × 10−5, 1 × 1 × 10−4, and 1 × 1 × 10−3 in turn, and the results are shown in Figure 7. It can be seen that when λ is 5 × 10−6, the best effect is achieved, and a too high or too low regularization coefficient will lead to poor model effect. The reason may be because if the regularization coefficient is too small, the objective function area tends to be low order and under fitting occurs, and if the regularization coefficient is too large, the objective function area may tend to be high-order terms and overfitting may occur, which also leads to poor model recommendation effect. It can be seen that the appropriate short-term sequence length and regularization are selected in the model. The transformation coefficients are very important to improve the performance of the model.


## 5. Conclusion

According to the complexity and variability of user interest point preferences, this paper proposes a news media education resource recommendation model based on the user model. On the basis of the classic recommendation system, this work improves it by using LTSM and attention mechanisms. A short-term model is created, then the attention mechanism is used to create a long-term model, and finally, the long-term and short-term models are integrated. Users are provided with POI recommendation services. The experimental results show that the performance of the POI recommendation model proposed in this paper is better than the recall evaluation standard when compared with other methods. Future work will further expand the experimental dataset to verify the universality of the model. In this document, the results reveal that the suggested user model-based recommendation model for news media education materials outperforms mainstream recommendation approaches on various assessment criteria, indicating that the proposed model is effective.



---

*Source: 7431948-2022-03-24.xml*