CN116010696A - News recommendation method, system and medium integrating knowledge graph and long-term interest of user - Google Patents

News recommendation method, system and medium integrating knowledge graph and long-term interest of user Download PDF

Info

Publication number
CN116010696A
CN116010696A CN202310005366.7A CN202310005366A CN116010696A CN 116010696 A CN116010696 A CN 116010696A CN 202310005366 A CN202310005366 A CN 202310005366A CN 116010696 A CN116010696 A CN 116010696A
Authority
CN
China
Prior art keywords
news
user
representation
representations
encoder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310005366.7A
Other languages
Chinese (zh)
Inventor
李西明
陈志浩
郭玉彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China Agricultural University
Original Assignee
South China Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China Agricultural University filed Critical South China Agricultural University
Priority to CN202310005366.7A priority Critical patent/CN116010696A/en
Publication of CN116010696A publication Critical patent/CN116010696A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a news recommendation method, a system and a medium integrating a knowledge graph and a long-term interest of a user, wherein the method comprises the following steps: acquiring a historical click news list and a plurality of candidate news of a user, and respectively inputting the historical click news list and the candidate news into a news semantic encoder to obtain a historical click news representation list and a candidate news representation; the news semantic encoder learns news representations of different types respectively, and then aggregates all the news representations into unified news representations; inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user; the user interest encoder comprises an attention module and a GRU network, and long-term interests and short-term preferences of the user are respectively learned from the historical click news sequence; and inputting the candidate news representations and the interest representations into a click predictor to obtain click scores of the candidate news, and further obtaining a news recommendation list and recommending the news recommendation list to the user. According to the news recommendation method and the news recommendation device, the news semantic encoder and the user interest encoder are constructed, so that the performance of news recommendation is improved.

Description

News recommendation method, system and medium integrating knowledge graph and long-term interest of user
Technical Field
The invention relates to the technical field of artificial intelligence and news recommendation, in particular to a news recommendation method, a system, computer equipment and a storage medium which integrate a knowledge graph and a long-term interest of a user.
Background
With the development and application of internet technology, more and more people acquire timely information from an online news platform. However, the amount of news delivered by each online news platform per day far exceeds the reading amount of users, and the users are obviously impractical to select the news of interest from massive news, so that the news recommendation system becomes an essential component of many online news platforms and is used for recommending news of possible interest to the users from massive news so as to relieve information overload.
Conventional news recommendation methods include collaborative filtering recommendation methods (DAS. A, et al, in Proceedings of the 16th International Conference on World Wide Web.WWW,2007:271-280;XUE.J,et al.JCAI,2017:3203-3209), content-based recommendation methods (IJNTEMA. W, et al, EDBT/ICDT,2010:22-26;HUANG P S,et al.CIKM,2013:2333-2338), and hybrid recommendation methods (MORALES. F, et al, WSDM,2012:153-162;LI.L,et al.SIGIR,2011:125-134). The collaborative filtering recommendation method filters massive information through collaboration of feedback, evaluation, opinion and the like of different users, and screens out information possibly interested by a target user. The collaborative filtering recommendation method is further divided into a collaborative filtering recommendation method (Wang Cheng, etc.) based on the user, a small microcomputer system (2016,37 (3): 428-432) and a collaborative filtering recommendation method (Bo Xusong) based on the article, a personalized video recommendation algorithm based on the collaborative filtering of the article improves research [ university of major science paper ]. 2015) based on the collaborative filtering recommendation method of the user, as shown in fig. 1 (a), user 1 and user 2 click on news a, news B, the user a and user B can be known to have common interests through analysis, and user 2 clicks on news N, so that user 1 may be interested in news N, and thus news N can be recommended to user 1. As shown in fig. 1 (B), the collaborative filtering recommendation method based on the object basically clicks on the news B by the user clicking on the news a, and the user 3 has clicked on the news a, so that the user 3 may be interested in the news B through analysis, and therefore the news B may be recommended to the user 3. The collaborative filtering recommendation method is simple and has no clear requirement for providing user information and article information, but has the following disadvantages: (1) the thinner the interactive data between the user and the article is, the lower the accuracy of recommendation is; (2) the recommended system has a cold start problem when it is first used.
The content-based recommendation method is a recommendation algorithm (LOPS.P, et al user Modeling and User-Adapted Interaction,2019,29 (2): 239-249) based on objects, users and interactions between the objects, and the information of the objects can be language description of the objects, comment content of the users and manually marked content. The user related information may include occupation, age, gender, etc., and the user may perform operations such as browsing, praying, stepping, sharing and comment on the target object. The relevant information of the subject matter is of a wide variety, including: text data, images, video and audio, etc., which can be used as a source of content recommendation. The content-based recommendation method is simple in principle, namely, similar articles which are liked by the user are recommended to the user. As shown in fig. 2, if a user watches hero's natural color on a video website, the content-based recommendation method can find that movies such as hero's natural color 2 and hero's natural color 3 have a great correlation with the content watched by the user according to the watching record (shu.j, et al multimedia Systems,2018,24 (2): 163-173), so that other parts can be recommended to you. The recommendation method based on the content is simple in principle, but has the defects that the content is required to be easily extracted to obtain information with a certain meaning, the structuring requirement of the characteristic content is higher, in addition, the interests of the user are required to be expressed through characteristic forms, and the judgment condition of other users is difficult to be obtained explicitly; at the same time, there is also the possibility of repeated recommendations.
The mixed recommendation method combines the collaborative filtering recommendation method and the content-based recommendation method, thereby playing the respective advantages and making up the respective shortages. Researchers have attempted to combine multiple recommendation algorithms together in a variety of ways, weighted, series, parallel, etc., to find better recommendation algorithms.
Aiming at the problems that the traditional news recommending method is difficult to acquire deep information in news and cannot reflect the interests of dynamic changes of users in real time and cold start exists, some researchers start to research the news recommending method based on deep learning. As Wu et al (wu.c, et al, emnlp/IJCNLP, 2019:6388-6393) proposed a news recommendation method NRMS (Neural News Recommendation with Multi-Head Self-Attention) based on a multi-Head Self-Attention mechanism that uses the multi-Head Self-Attention mechanism to learn a contextual representation of words from news headlines by modeling word-to-word interactions and uses the Attention mechanism to select important words to learn a more informative news representation, the framework of which is shown in fig. 3. An et al (an.m, et al acl, 2019:336-345) combined convolutional neural network (Convolutional Neural Networks, abbreviated CNN) with attention mechanisms to extract news features from news headlines and learn characterizations from ID embeddings of news topics, subtopics, and finally splice the headlines, topics and subtopics to get the final news representation, and propose An LSTUR (both Long-and Short-Term User Representations) method, the framework of which is shown in fig. 4. Wu et al (wu.c, et al ijcai, 2019:3863-3869) propose a NAML (neural News recommendation with Attentive Multi-view Learning) method that learns the different importance levels of different news data in modeling different news from news headlines, categories, and content using attention, resulting in a final news semantic representation, while the NAML model applies an attention mechanism to a user history click news sequence to aggregate user interest representations from different news, showing good recommendation performance. However, the existing news recommendation method based on deep learning mostly ignores the knowledge level connection between news, which may lead to insufficient extraction of news features, so that recommendation accuracy is reduced; and most of the users are not considered to have long-term interests and short-term preferences, so that the user interest representation cannot be accurately obtained, and the performance of the recommendation method is reduced.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a news recommendation method, a system, a computer device and a storage medium which integrate a knowledge graph and a long-term interest of a user. Meanwhile, the method not only extracts the long-term interests of the user, but also models the short-term preferences of the user, and the final interest representation of the user is obtained by combining the long-term interests and the short-term preferences of the user, so that the method is beneficial to obtaining more comprehensive interests of the user. Compared with other baseline methods, the method improves the performance of news recommendation.
The first object of the invention is to provide a news recommending method integrating a knowledge graph and a long-term interest of a user.
The second object of the present invention is to provide a news recommendation system that integrates knowledge maps and long-term interests of users.
A third object of the present invention is to provide a computer device.
A fourth object of the present invention is to provide a storage medium.
The first object of the present invention can be achieved by adopting the following technical scheme:
a news recommendation method integrating a knowledge graph and a long-term interest of a user, the method comprising:
acquiring a historical click news list and a plurality of candidate news of a user;
respectively inputting the historical click news list and a plurality of candidate news into a news semantic encoder to respectively obtain a historical click news representation list and candidate news representations; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
inputting the candidate news representations and the interest representations of the users into a click predictor to obtain click scores of a plurality of candidate news;
and acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
Further, both the history click news and the candidate news include headlines, profiles, categories, and knowledge entities;
the news semantic encoder includes a title encoder, a profile encoder, a category encoder, a knowledge entity encoder, and a feature attention network, wherein:
the title encoder is used for learning news representations from news titles;
the profile encoder is used for learning news representations from news profiles;
the category encoder is used for learning news representations from news categories;
the knowledge entity encoder is used for learning news representations from the knowledge entities;
the feature attention network is used for aggregating unified news semantic representations from different types of news representations.
Further, the title encoder comprises a word embedding layer, a CNN neural network and a word attention layer;
the title encoder for learning a news representation from a news title, comprising:
the word embedding layer is used for converting news headlines from word sequences to word vector sequences with low dimension and dense;
the CNN network learns the context representation of the word by capturing the context of the word according to the word vector sequence;
the word attention layer recognizes important words in the news headline for the user according to the context representation of the words, and obtains the attention weight of the words in the news headline;
and carrying out weighted summation on the context representations of all words in the news headline to obtain the news representation of the news headline.
Further, the profile encoder and the title encoder have the same structure, and the context representations of all words in the news profile are weighted and summed to obtain the news representation of the news profile.
Further, the category encoder comprises a category ID embedding layer and an implicit layer;
the category encoder for learning a news representation from a news category, comprising:
the input to the class ID embedding layer is a main class ID representation sub-class ID representation for converting the discrete class main class ID representation and sub-class ID representation into a low-dimensional dense class embedding g c And g sc
Implicit layer embeds g according to the category c And g sc Learning class information representation z implicit in class embedding, respectively c And z sc
Category information representation z c And z sc As a news representation in a news category.
Further, the knowledge entity encoder is configured to learn a news representation from a knowledge entity, and includes:
firstly, knowledge entity extraction is carried out, and a knowledge subgraph is constructed, which comprises the following steps:
extracting the knowledge entities mentioned in the news headlines and the profiles, wherein the MIND-small dataset has given the knowledge entities mentioned in the news headlines and the profiles;
because the number of the knowledge entities mentioned by the news headlines and the brief introduction is small, the knowledge entities mentioned by the news headlines and the brief introduction are expanded to all entities in one hop by utilizing the WikiData knowledge graph;
constructing all entities as knowledge subgraphs, and extracting all relations among the entities from the WikiData knowledge graph;
then, for the constructed knowledge subgraph, performing entity representation learning by using a TransE knowledge graph embedding method to obtain a knowledge entity embedding sequence;
finally, applying the entity attention network to the knowledge entity embedding sequence, and identifying the potential knowledge layer connections of different knowledge entities with different importance degrees among the mined news for the user, so as to obtain the attention weight of each knowledge entity in the news entity set;
and carrying out weighted summation on all the knowledge entity representations in the news entity set to obtain the news representations of the news entity set.
Further, the feature attention network is configured to aggregate unified news semantic representations from different types of news representations, and includes:
Figure BDA0004036231140000051
wherein d t Is an intermediate variable in calculating a news representation of a news headline, U t Is the attention query vector, R t And r t Is the mapping parameter, z t Is a news representation of a news headline; calculating intermediate variables d in profile, main category, sub-category and knowledge entity set news representations a 、d c 、d sc 、d e Are all equal to d t The same;
let the attention weights of news headlines, profile tables, main categories, sub-categories, and knowledge entity sets be α, respectively t 、α a 、α c 、α sc And alpha e Wherein the attention weight alpha of the news headline representation t The calculation formula of (2) is as follows:
Figure BDA0004036231140000052
attention to other news informationWeight calculation method and attention weight alpha t The same;
the final unified news semantic representation z is obtained by weighted summation of news representations of all news information, and the calculation formula is as follows:
z=α t z ta z ac z csc z sce z e
further, long-term interests of the user are captured from the user history click news representation sequence through an attention mechanism, and the weight of the ith history news clicked by the user is expressed as
Figure BDA0004036231140000053
The formula is as follows:
Figure BDA0004036231140000054
wherein:
Figure BDA0004036231140000055
wherein K is n And k n Is a mapping parameter, w n Is the attention query vector, z i Is the i-th historical click news representation of the user, n is the number of historical click news of the user;
and carrying out weighted summation on the historical click news representations of the user to obtain long-term interest representations of the user.
The second object of the invention can be achieved by adopting the following technical scheme:
a news recommendation system that fuses a knowledge graph and a long-short term interest of a user, the system comprising:
the news acquisition module is used for acquiring a historical click news list and a plurality of candidate news of a user;
the news representation aggregation module is used for respectively inputting the historical click news list and the candidate news into the news semantic encoder to respectively obtain the historical click news representation list and the candidate news representation; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
the interest representation generation module is used for inputting the historical click news representation list into the user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
the click score prediction module is used for inputting the candidate news representations and the interest representations of the users into the click predictor to obtain click scores of a plurality of candidate news;
and the news recommendation list generation module is used for acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
The third object of the present invention can be achieved by adopting the following technical scheme:
a computer device comprising a processor and a memory for storing a program executable by the processor, the processor implementing the news recommendation method described above when executing the program stored in the memory.
The fourth object of the present invention can be achieved by adopting the following technical scheme:
a storage medium storing a program which, when executed by a processor, implements the news recommendation method described above.
Compared with the prior art, the invention has the following beneficial effects:
1. according to the method provided by the invention, through constructing the news semantic encoder, not only are the headlines, the brief introduction and the topic category information of the news used for learning the news representation, but also knowledge entities mentioned in the headlines and the brief introduction are utilized and a knowledge sub-graph is constructed by combining with a WikiData knowledge graph, and potential knowledge-level relations between news are learned from the knowledge sub-graph, so that the obtained news semantic representation has more information quantity, and the performance of news recommendation is improved.
2. According to the method provided by the invention, the long-term interests and short-term preferences of the user are respectively extracted by constructing the user interest encoder, and the long-term interests and short-term preferences of the user are combined to be used as the final interest representation of the user, so that the user interest representation is modeled more comprehensively and accurately, and the performance of news recommendation is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
Fig. 1 (a) is a schematic diagram of a collaborative filtering recommendation method based on a user in the background art of the present invention, and fig. 1 (b) is a schematic diagram of a collaborative filtering recommendation method based on an object.
Fig. 2 is a schematic diagram of a content-based recommendation method in the background of the invention.
Fig. 3 is a block diagram of an NRMS method in the background of the invention.
Fig. 4 is a block diagram of the LSTUR method in the background of the invention.
Fig. 5 is a flowchart of a news recommendation method integrating knowledge maps and long-term interests of a user according to embodiment 1 of the present invention.
Fig. 6 is a schematic diagram of a news recommendation method integrating knowledge maps and long-term interests of a user according to embodiment 1 of the present invention.
Fig. 7 is a block diagram of a news recommendation model that integrates knowledge maps and long-term interests of a user according to embodiment 1 of the present invention.
Fig. 8 is a schematic diagram of a knowledge entity refinement process in embodiment 1 of the present invention.
Fig. 9 is a block diagram of a news recommendation system that integrates knowledge maps and long-term interests of a user according to embodiment 2 of the present invention.
Fig. 10 is a block diagram showing the structure of a computer device according to embodiment 3 of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection of the present invention. It should be understood that the description of the specific embodiments is intended for purposes of illustration only and is not intended to limit the scope of the present application.
Example 1:
as shown in fig. 5 and 6, the news recommendation method for fusing a knowledge graph and a long-short term interest of a user provided in this embodiment includes the following steps:
s501, acquiring a historical click news list and a plurality of candidate news of a user.
Both the history click news and the candidate news include headlines, profiles, categories, knowledge entities, and the like.
In this embodiment, the historical click news list is 50, and the candidate news includes at least 20 pieces.
S502, respectively inputting the historical click news list and the candidate news into a news semantic encoder to respectively obtain a historical click news representation list and candidate news representations.
The news recommendation model integrating the knowledge graph and the long-term interest of the user is divided into three modules, namely a news semantic encoder, a user interest encoder and a click predictor, and a frame diagram of the model is shown in fig. 7.
The news semantic encoder learns representations of different types of news information (e.g., headlines, profiles, entities, and categories) separately and then aggregates all of the news information representations into a unified news semantic representation. As shown in fig. 3, the news semantic encoder has five components: title encoder, profile encoder, category encoder, knowledge entity encoder, and feature attention network, wherein:
(1) A header encoder.
The first component of the news semantic encoder is a headline encoder for learning news representations from news headlines. The first layer is a word embedding layer for embedding news headlines from a word sequence
Figure BDA0004036231140000081
Conversion into a low-dimensional dense word vector sequence +.>
Figure BDA0004036231140000082
The second layer of the title encoder is a CNN neural network, which is applied to the word sequence to learn the word's contextual representation by capturing the word's contextual context. The context of the ith word is expressed as
Figure BDA0004036231140000083
The calculation formula is as follows: />
Figure BDA0004036231140000084
Wherein f is a nonlinear activation function,
Figure BDA0004036231140000085
and->
Figure BDA0004036231140000086
Is the CNN convolution kernel parameter, N is the number of convolution kernels, (2l+1) D is the size of the convolution kernels, +.>
Figure BDA0004036231140000087
Representing word directionsA quantity matrix. The output of this layer is the contextual representation sequence of the word +.>
Figure BDA0004036231140000088
The third layer of the headline encoder is a word attention layer for identifying important words in the news headline for different users, the attention weight of the ith word in the news headline being expressed as
Figure BDA0004036231140000089
The calculation formula is as follows:
Figure BDA00040362311400000810
wherein K is t And k t Is a mapping parameter, w t Is the attention query vector.
Final representation of news headlines z t The weighted sum is expressed by all word context in the news headline, and the calculation formula is as follows:
Figure BDA00040362311400000811
(2) A profile encoder.
The second component of the news semantic encoder is a profile encoder for learning news representations from news profiles, which are identical in structure to the headline encoder as shown in fig. 7. First, news introduction is conducted from a word sequence through a word embedding layer
Figure BDA0004036231140000091
Conversion into a low-dimensional dense word vector sequence +.>
Figure BDA0004036231140000092
Then learn the context of each word using CNN network to get the word context representation sequence of news profile +.>
Figure BDA0004036231140000093
Finally, aggregate all word context representations using an attention network weighting to get a final representation of news profile, z a
(3) A class encoder.
The third component of the news semantic encoder is a news category encoder for learning news representations from news categories. The class encoder comprises two layers, the first layer is a class ID embedding layer, and the input of the layer is that the main class ID represents v c And subcategory ID denotes v sc For converting discrete class IDs into low-dimensional dense class inserts g c And g sc . The second layer of the class encoder is an implicit layer for learning the implicit class information representation z in the class embedding c And z sc Wherein z is c The calculation formula of (2) is as follows:
z c =ReLU(K c ×g c +k c )
wherein K is c And k c Is an implicit layer parameter, and ReLU is a non-thread activated function.
z sc Calculated formula and z of (2) c Similarly.
(4) Knowledge entity encoder.
The fourth component of the news semantic encoder is a knowledge entity encoder for learning news representations from knowledge entities. Firstly, knowledge entity extraction and knowledge subgraph construction are needed, and the process comprises 3 steps, as shown in fig. 8: firstly, extracting knowledge entities mentioned in news headlines and brief introduction, wherein the MIND-small data set used by the method already provides the knowledge entities mentioned in the news headlines and brief introduction; secondly, because the number of the knowledge entities mentioned by the news headlines and the brief introduction is small and the relationship between the knowledge entities mentioned by other news is sparse and lacks diversity, the knowledge entities mentioned by the news headlines and the brief introduction are expanded to all entities in one hop by means of the WikiData knowledge graph; thirdly, all the entities construct a knowledge subgraph, and all the relations between the entities are extracted from the WikiData knowledge graph.
Then, for the constructed knowledge subgraph, entity representation learning is carried out by using a TransE knowledge graph embedding method to obtain an entity representation vector, wherein the knowledge entity embedding sequence is as follows
Figure BDA0004036231140000094
Finally, the entity attention network is applied to the knowledge entity embedding sequence to identify knowledge-level connections of different knowledge entities with potentially different degrees of importance between mining news for different users. The attention weight of the ith entity in the news entity set is expressed as +.>
Figure BDA0004036231140000095
The calculation formula is as follows:
Figure BDA0004036231140000096
wherein K is e And k e Is a mapping parameter, w e Is the attention query vector.
Final representation z of news entity sets e The method is obtained by weighted summation of all knowledge entity representations in a news entity set, and the calculation formula is as follows:
Figure BDA0004036231140000101
(5) Feature attention network.
The fifth component of the news semantic encoder is a feature attention network for aggregating unified news semantic representations from different types of news information representations. Different types of news information have different characteristics and may contain different amounts of information when learning semantic representations of different news. The present module uses a feature attention network to identify for different news the different importance of different types of news information in learning the news semantic representation, thereby accurately learning the news semantic representation. Attention weights defining news headlines, profile tables, main categories, sub-categories, and knowledge entity sets are α, respectively t 、α a 、α c 、α sc And alpha e Their calculation formula is as follows:
Figure BDA0004036231140000102
Figure BDA0004036231140000103
Figure BDA0004036231140000104
Figure BDA0004036231140000105
Figure BDA0004036231140000106
wherein U is t 、U a 、U c 、U sc And U e Is the attention query vector, R t 、R a 、R c 、R sc 、R e 、r t 、r a 、r c 、r sc And r e Is a mapping parameter.
The final unified news semantic representation z is obtained by weighting and summing all news information representations, and the calculation formula is as follows:
z=α t z ta z ac z csc z sce z e
s503, inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user.
The user interest encoder is used to learn the user interest representation u from the user history click news sequence. As shown in fig. 6, the user interest encoder includes two components. First oneThe component is an Attention module Attention that can apply higher weights to a category of news that the user repeatedly clicks on from a user's historical click news sequence to learn the user's long-term interest representation u 1 The weight of the ith historical news clicked by the user is expressed as
Figure BDA0004036231140000107
The calculation formula is as follows:
Figure BDA0004036231140000108
wherein K is n And k n Is a mapping parameter, w n Is the vector of the attention query,
Figure BDA0004036231140000109
is w n Transpose of z i Is the user's ith historical click news representation and n is the number of historical click news for the user. Long-term interest representation u of user 1 Is a weighted summation of user historical click news representations, the calculation formula of which is as follows: />
Figure BDA00040362311400001010
The second component of the user interest encoder is a GRU network that can learn the user's dynamically changing interests over time from the user's historical click news, with the last hidden layer being able to learn the user's short-term performance from the user's recent browsing history to capture their temporary interests. User short-term preference representation u 2 The calculation formula of (2) is as follows:
μ i =σ(W μ [h i-1 ,z i ]),
δ i =σ(W δ [h i-1 ,z i ]),
Figure BDA0004036231140000111
Figure BDA0004036231140000112
wherein σ is a sigmoid function, and by which is a itemized product, W μ 、W δ And
Figure BDA0004036231140000113
is a parameter of the GRU network, z i Is the user's ith historical click news representation. The user short-term preference representation is the last hidden state of the GRU network, i.e., u 2 =h N N is the number of historical click news for the user.
The final unified user interest representation is represented by the user long-term interest representation u 1 And user short-term preference representation u 2 The addition average, i.e., u= (u) 1 +u 2 )/2。
S504, inputting the candidate news representations and the interest representations of the users into a click predictor to obtain click scores of a plurality of candidate news.
The click predictor is used to predict the click score of the user for each candidate news. The scoring function should be as simple as possible to reduce delay. Experiments show that the inner product is not only the method with the best time efficiency, but also the method with the best performance. Therefore, candidate news x d Click score of (2)
Figure BDA0004036231140000114
Representing vector u by unified user interest and candidate news semantic representation vector z d Obtained by calculation of the inner product, i.e.>
Figure BDA0004036231140000115
S505, acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
The embodiment selects the first 20 candidate news with the highest click score from the candidate news to form a news recommendation list, and recommends the news recommendation list to the user.
Those skilled in the art will appreciate that all or part of the steps in a method implementing the above embodiments may be implemented by a program to instruct related hardware, and the corresponding program may be stored in a computer readable storage medium.
It should be noted that although the method operations of the above embodiments are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in that particular order or that all illustrated operations be performed in order to achieve desirable results. Rather, the depicted steps may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Example 2:
as shown in fig. 9, the present embodiment provides a news recommendation system that integrates a knowledge graph and a long-short-term interest of a user, and the system includes a news acquisition module 901, a news representation aggregation module 902, an interest representation generation module 903, a click score prediction module 904, and a news recommendation list generation module 905, wherein:
the news acquisition module 901 is configured to acquire a historical click news list and a plurality of candidate news of a user;
the news representation aggregation module 902 is configured to input the history click news list and the plurality of candidate news into a news semantic encoder respectively, so as to obtain a history click news representation list and a candidate news representation respectively; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
the interest representation generation module 903 is configured to input the historical click news representation list into a user interest encoder to obtain an interest representation of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain an interest representation click score prediction module 904, configured to input the candidate news representation and the interest representation of the user into a click predictor to obtain click scores of a plurality of candidate news;
the news recommendation list generating module 905 is configured to obtain a news recommendation list and recommend the news recommendation list to the user according to the click score.
Specific implementation of each module in this embodiment may be referred to embodiment 1 above, and will not be described in detail herein; it should be noted that, the apparatus provided in this embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure is divided into different functional modules, so as to perform all or part of the functions described above.
Example 3:
the present embodiment provides a computer device, which may be a computer, as shown in fig. 10, and is connected through a system bus 101 to a processor 102, a memory, an input device 103, a display 104 and a network interface 105, where the processor is configured to provide computing and control capabilities, the memory includes a nonvolatile storage medium 106 and an internal memory 107, where the nonvolatile storage medium 106 stores an operating system, a computer program and a database, and the internal memory 107 provides an environment for the operating system and the computer program in the nonvolatile storage medium, and when the processor 102 executes the computer program stored in the memory, the news recommending method of the foregoing embodiment 1 is implemented as follows:
acquiring a historical click news list and a plurality of candidate news of a user;
respectively inputting the historical click news list and a plurality of candidate news into a news semantic encoder to respectively obtain a historical click news representation list and candidate news representations; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
inputting the candidate news representations and the interest representations of the users into a click predictor to obtain click scores of a plurality of candidate news;
and acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
Example 4:
the present embodiment provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the news recommendation method of the above embodiment 1, as follows:
acquiring a historical click news list and a plurality of candidate news of a user;
respectively inputting the historical click news list and a plurality of candidate news into a news semantic encoder to respectively obtain a historical click news representation list and candidate news representations; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
inputting the candidate news representations and the interest representations of the users into a click predictor to obtain click scores of a plurality of candidate news;
and acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
The computer readable storage medium of the present embodiment may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The above-mentioned embodiments are only preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can make equivalent substitutions or modifications according to the technical solution and the inventive concept of the present invention within the scope of the present invention disclosed in the present invention patent, and all those skilled in the art belong to the protection scope of the present invention.

Claims (10)

1. A news recommendation method integrating a knowledge graph and a long-term interest of a user, the method comprising:
acquiring a historical click news list and a plurality of candidate news of a user;
respectively inputting the historical click news list and a plurality of candidate news into a news semantic encoder to respectively obtain a historical click news representation list and candidate news representations; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
inputting the historical click news representation list into a user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
inputting the candidate news representations and the interest representations of the users into a click predictor to obtain click scores of a plurality of candidate news;
and acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
2. The news recommendation method of claim 1, wherein the history click news and the candidate news each include a title, a profile, a category, and a knowledge entity;
the news semantic encoder includes a title encoder, a profile encoder, a category encoder, a knowledge entity encoder, and a feature attention network, wherein:
the title encoder is used for learning news representations from news titles;
the profile encoder is used for learning news representations from news profiles;
the category encoder is used for learning news representations from news categories;
the knowledge entity encoder is used for learning news representations from the knowledge entities;
the feature attention network is used for aggregating unified news semantic representations from different types of news representations.
3. The news recommendation method of claim 2, wherein the headline encoder comprises a word embedding layer, a CNN neural network, and a word attention layer;
the title encoder for learning a news representation from a news title, comprising:
the word embedding layer is used for converting news headlines from word sequences to word vector sequences with low dimension and dense;
the CNN network learns the context representation of the word by capturing the context of the word according to the word vector sequence;
the word attention layer recognizes important words in the news headline for the user according to the context representation of the words, and obtains the attention weight of the words in the news headline;
and carrying out weighted summation on the context representations of all words in the news headline to obtain the news representation of the news headline.
4. The news recommendation method of claim 3, wherein the profile encoder and the headline encoder are identical in structure, and wherein the weighted summation of contextual representations of all words in the news profile results in a news representation of the news profile.
5. The news recommendation method of claim 2, wherein the category encoder includes a category ID embedding layer and an implicit layer;
the category encoder for learning a news representation from a news category, comprising:
the input to the class ID embedding layer is a main class ID representation sub-class ID representation for converting the discrete class main class ID representation and sub-class ID representation into a low-dimensional dense class embedding g c And g sc
Implicit layer embeds g according to the category c And g sc Learning class information representation z implicit in class embedding, respectively c And z sc
Category information representation z c And z sc As a news representation in a news category.
6. The news recommendation method of claim 2, wherein the knowledge entity encoder is configured to learn a news representation from a knowledge entity, comprising:
firstly, knowledge entity extraction is carried out, and a knowledge subgraph is constructed, which comprises the following steps:
extracting the knowledge entities mentioned in the news headlines and the profiles, wherein the MIND-small dataset has given the knowledge entities mentioned in the news headlines and the profiles;
because the number of the knowledge entities mentioned by the news headlines and the brief introduction is small, the knowledge entities mentioned by the news headlines and the brief introduction are expanded to all entities in one hop by utilizing the WikiData knowledge graph;
constructing all entities as knowledge subgraphs, and extracting all relations among the entities from the WikiData knowledge graph;
then, for the constructed knowledge subgraph, performing entity representation learning by using a TransE knowledge graph embedding method to obtain a knowledge entity embedding sequence;
finally, applying the entity attention network to the knowledge entity embedding sequence, and identifying the potential knowledge layer connections of different knowledge entities with different importance degrees among the mined news for the user, so as to obtain the attention weight of each knowledge entity in the news entity set;
and carrying out weighted summation on all the knowledge entity representations in the news entity set to obtain the news representations of the news entity set.
7. The news recommendation method of claim 2, wherein the feature attention network for aggregating unified news semantic representations from different types of news representations comprises:
Figure FDA0004036231130000031
wherein d t Is an intermediate variable in calculating a news representation of a news headline, U t Is the attention query vector, R t And r t Is the mapping parameter, z t Is a news representation of a news headline; calculating intermediate variables d in profile, main category, sub-category and knowledge entity set news representations a 、d c 、d sc 、d e Are all equal to d t The same;
let the attention weights of news headlines, profile tables, main categories, sub-categories, and knowledge entity sets be α, respectively t 、α a 、α c 、α sc And alpha e Wherein the attention weight alpha of the news headline representation t The calculation formula of (2) is as follows:
Figure FDA0004036231130000032
attention weight calculation method and attention weight alpha for other news information t The same;
the final unified news semantic representation z is obtained by weighted summation of news representations of all news information, and the calculation formula is as follows:
z=α t z ta z ac z csc z sce z e
8. the news recommendation method of any one of claims 1-7, wherein long-term interests of the user are captured from a sequence of user history click news representations by an attention mechanism, and the weight of the ith history news clicked by the user is expressed as
Figure FDA0004036231130000033
The formula is as follows:
Figure FDA0004036231130000034
wherein:
Figure FDA0004036231130000035
wherein K is n And k n Is a mapping parameter, w n Is the attention query vector, z i Is the i-th historical click news representation of the user, n is the number of historical click news of the user;
and carrying out weighted summation on the historical click news representations of the user to obtain long-term interest representations of the user.
9. A news recommendation system that integrates knowledge maps and long-term interests of a user, the system comprising:
the news acquisition module is used for acquiring a historical click news list and a plurality of candidate news of a user;
the news representation aggregation module is used for respectively inputting the historical click news list and the candidate news into the news semantic encoder to respectively obtain the historical click news representation list and the candidate news representation; the news semantic encoder learns news representations of different types respectively, and then gathers all news information representations into unified news representations;
the interest representation generation module is used for inputting the historical click news representation list into the user interest encoder to obtain interest representations of the user; wherein the user interest encoder comprises an attention module and a GRU network; the attention module applies higher weight to the news repeatedly clicked by the user from the historical click news sequence so as to learn the long-term interest representation of the user; the GRU network learns short-term preference representation of a user dynamically changing along with time from a historical click news sequence, and the last hidden layer learns the short-term representation of the user from the latest browsing history of the user so as to capture the short-term preference of the user; finally, aggregating the long-term interest representation and the short-term preference representation of the user to obtain the interest representation of the user;
the click score prediction module is used for inputting the candidate news representations and the interest representations of the users into the click predictor to obtain click scores of a plurality of candidate news;
and the news recommendation list generation module is used for acquiring a news recommendation list according to the click score and recommending the news recommendation list to the user.
10. A storage medium storing a program, wherein the program, when executed by a processor, implements the news recommendation method of any one of claims 1-8.
CN202310005366.7A 2023-01-04 2023-01-04 News recommendation method, system and medium integrating knowledge graph and long-term interest of user Pending CN116010696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310005366.7A CN116010696A (en) 2023-01-04 2023-01-04 News recommendation method, system and medium integrating knowledge graph and long-term interest of user

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310005366.7A CN116010696A (en) 2023-01-04 2023-01-04 News recommendation method, system and medium integrating knowledge graph and long-term interest of user

Publications (1)

Publication Number Publication Date
CN116010696A true CN116010696A (en) 2023-04-25

Family

ID=86036936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310005366.7A Pending CN116010696A (en) 2023-01-04 2023-01-04 News recommendation method, system and medium integrating knowledge graph and long-term interest of user

Country Status (1)

Country Link
CN (1) CN116010696A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911304A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Text recommendation method and device
CN118396659A (en) * 2024-06-26 2024-07-26 广州平云信息科技有限公司 AIGC-based digital cultural product user behavior analysis method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911304A (en) * 2023-09-12 2023-10-20 深圳须弥云图空间科技有限公司 Text recommendation method and device
CN116911304B (en) * 2023-09-12 2024-02-20 深圳须弥云图空间科技有限公司 Text recommendation method and device
CN118396659A (en) * 2024-06-26 2024-07-26 广州平云信息科技有限公司 AIGC-based digital cultural product user behavior analysis method and system

Similar Documents

Publication Publication Date Title
US11893071B2 (en) Content recommendation method and apparatus, electronic device, and storage medium
CN111444428B (en) Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
Anandhan et al. Social media recommender systems: review and open research issues
CN111339415B (en) Click rate prediction method and device based on multi-interactive attention network
CN112131350B (en) Text label determining method, device, terminal and readable storage medium
Sang et al. Context-dependent propagating-based video recommendation in multimodal heterogeneous information networks
CN110390052B (en) Search recommendation method, training method, device and equipment of CTR (China train redundancy report) estimation model
CN111737578A (en) Recommendation method and system
CN111949886B (en) Sample data generation method and related device for information recommendation
CN110069713B (en) Personalized recommendation method based on user context perception
CN112016002A (en) Mixed recommendation method integrating comment text level attention and time factors
CN113761383A (en) Search and recommendation fusion system based on unified user behavior modeling
CN112036659A (en) Social network media information popularity prediction method based on combination strategy
Meddeb et al. Personalized smart learning recommendation system for arabic users in smart campus
Song et al. Coarse-to-fine: A dual-view attention network for click-through rate prediction
CN115964560A (en) Information recommendation method and equipment based on multi-mode pre-training model
CN114201516A (en) User portrait construction method, information recommendation method and related device
Zhu Network Course Recommendation System Based on Double‐Layer Attention Mechanism
Li et al. From edge data to recommendation: A double attention-based deformable convolutional network
CN116010696A (en) News recommendation method, system and medium integrating knowledge graph and long-term interest of user
Xie et al. Attentive preference personalized recommendation with sentence-level explanations
Yin et al. Multimodal deep collaborative filtering recommendation based on dual attention
Ji et al. A fuzzy intelligent group recommender method in sparse-data environments based on multi-agent negotiation
CN116628345A (en) Content recommendation method and device, electronic equipment and storage medium
Meng Cross-domain information fusion and personalized recommendation in artificial intelligence recommendation system based on mathematical matrix decomposition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination