A news recommendation method based on knowledge graph

By introducing the relationship attributes and emotional tags of news texts into the news knowledge graph, combined with similarity weights and time weights, the accuracy and diversity problems in news recommendations are solved, and personalized and diversified news recommendations for users are achieved, and the content is The review mechanism improves user experience.

CN118051604BActive Publication Date: 2024-10-29HAINAN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410027854.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-09
Publication Date
2024-10-29
Estimated Expiration
2044-01-09

AI Technical Summary

Technical Problem

Existing text recommendation methods based on knowledge graphs have low accuracy in news recommendation and fail to effectively consider the timeliness, publication region and domain attributes of news texts, resulting in insufficiently accurate and diverse recommendation results.

Method used

When constructing the news knowledge graph, the relational attributes of the news text such as publication time, publication area and affiliation are introduced, and the similarity weight is calculated through the cosine algorithm. Combined with the time weight, the final matching value is obtained, keyword matching and recommendation are performed, and emotions are used at the same time. The dictionary assigns emotional tags to news texts and dynamically filters and adjusts recommended content.

Benefits of technology

It improves the accuracy and diversity of news recommendations, ensures that users obtain the latest, most relevant and valuable news content, meets users' personalized needs, and avoids the continuous appearance of sensitive words through the content review mechanism to improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118051604B_ABST
    Figure CN118051604B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for recommending news based on a knowledge graph, including: constructing a news knowledge graph according to a news database; obtaining a first news text that a user is browsing, and determining a keyword set and a relationship attribute corresponding to the first news text; the relationship attribute includes a publishing time, a publishing area, and a subordinate field; based on the keyword set and the relationship attribute corresponding to the first news text, similarity calculation is performed with a triple in the news knowledge graph to obtain a matching value between the first news text and the triple in the news knowledge graph; according to the matching value, a target keyword set is determined; according to the target keyword set, a target news text is determined in the news database; and the target news text is pushed to a news client for user browsing. Thus, a news knowledge graph can be constructed according to the particularity of the news, and the news text content with high accuracy and certain diversity can be recommended to the user in combination with the knowledge graph matching degree and the user's personalized characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recommended news, and in particular to a news recommendation method based on knowledge graph. Background Art

[0002] Since the concept of knowledge graph was proposed, it has been applied to various object recommendation systems, including text, commodity, and person recommendation systems, because it contains rich information such as rich entity objects and the relationships between entity objects. With the popularization of real-time communication between news databases, the application demand for object recommendation methods with the goal of intelligently recommending similar news information is gradually increasing.

[0003] The currently popular knowledge graph-based text recommendation methods usually construct knowledge graphs from the perspective of text matching, and then use the triples in the knowledge graph as training data sets to train the text recommendation model using machine learning. This type of method is essentially based on the literal feature similarity of text for text recommendation, and is generally suitable for the recommendation of general texts. However, since it does not take into account the particularity of news texts, when applied to news recommendations, it will lead to low accuracy of recommendation results. For example, news texts have certain timeliness attributes, publishing region attributes, and publishing field attributes. For example, even if a news article several years ago has a high similarity with the news topic that the user is interested in, or a news article from city A has a high similarity with the news article from city B that the user is interested in, when the news is used as a recommendation object, its recommendation value will be relatively low. Summary of the invention

[0004] The present application provides a news recommendation method based on a knowledge graph, which can recommend news content according to user personalization while enabling the user's news browsing interface to contain news with high browsing value and a certain degree of diversity.

[0005] The present application provides a news recommendation method based on knowledge graph, which is characterized by comprising:

[0006] Build a news knowledge graph based on the news database;

[0007] Acquire a first news text that a user is browsing, and determine a keyword set and a relationship attribute corresponding to the first news text; the keyword set includes keywords whose occurrence frequency meets a frequency threshold and sub-keywords associated with the keywords; the relationship attributes include publication time, publication area, and affiliated field;

[0008] Based on the keyword set and relationship attributes corresponding to the first news text, similarity calculation is performed with the triples in the news knowledge graph to obtain matching values ​​between the first news text and the triples in the news knowledge graph;

[0009] Determining a target keyword set corresponding to the first news text according to the matching value;

[0010] Determining a target news text in a news database according to a target keyword set corresponding to the first news text;

[0011] The target news text is pushed to the news client for user browsing.

[0012] Preferably, a news knowledge graph is constructed based on the news database, including:

[0013] According to all news texts in the news database, a number of triples are acquired in real time to obtain a first triple set;

[0014] Merge the triplets corresponding to the same entity in the first triplet set to obtain a second triplet set;

[0015] generating the news knowledge graph according to the second triple set;

[0016] The head entity of the triple is a keyword in the news text, the tail entity is a sub-keyword associated with the keyword in the news text, and the entity relationship is a feature vector representing a relationship attribute.

[0017] Preferably, the similarity calculation is performed with the triples in the news knowledge graph to obtain the matching value between the first news text and the triples in the news knowledge graph, including:

[0018] For any keyword in the keyword set, if an entity in the news knowledge graph is found to match it, then keywords corresponding to other entities in the news knowledge graph connected to the entity are determined as candidate keywords;

[0019] Obtaining a first feature vector according to the relationship attribute represented by the entity relationship of the triple corresponding to the candidate keyword in the news knowledge graph;

[0020] Obtaining a second feature vector according to the relationship attribute represented by the entity relationship corresponding to the first news text;

[0021] A matching value is obtained according to the first feature vector and the second feature vector.

[0022] Preferably, obtaining a matching value according to the first feature vector and the second feature vector further includes:

[0023] Calculate the similarity between the first eigenvector and the second eigenvector by using the cosine value to obtain a similarity weight;

[0024] Obtaining a time weight according to the publication time and current time of the triplet corresponding to the candidate keyword in the news knowledge graph;

[0025] Perform a product operation on the time weight and the similarity weight to obtain a matching value;

[0026] The time weight is obtained according to the following formula: α_i=e^(-λ×Δt), α_i is the time weight, λ is the preset decay rate, and Δt is the difference between the current time and the publication time.

[0027] Preferably, the news client comprises an evaluation module, and the evaluation module is used for the user to evaluate the news text being browsed and generate an evaluation text.

[0028] Preferably, the construction of the news knowledge graph further includes:

[0029] Obtain news text and corresponding evaluation text in the news database;

[0030] Based on a preset sentiment dictionary, the evaluation text is queried to obtain a target score corresponding to the evaluation text;

[0031] If the target score is within the threshold range, assigning a first sentiment label to the news text corresponding to the target score;

[0032] If the target score is greater than the upper limit of the threshold interval, assigning a second emotion label to the news text corresponding to the target score;

[0033] If the target score is not greater than the lower limit of the threshold interval, assigning a third emotion label to the news text corresponding to the target score;

[0034] The relationship attributes of the news text also include sentiment tags.

[0035] Preferably, determining the target keyword set corresponding to the first news text includes:

[0036] If the matching value is greater than the preset weight, the candidate keyword corresponding to the matching value is used as the target keyword;

[0037] A target keyword set is determined according to the target keyword and the keyword set corresponding to the first news text.

[0038] Preferably, the determining of the target news text in the news database according to the target keyword set corresponding to the first news text further includes:

[0039] Based on the target keyword set corresponding to the first news text and the sentiment tags in the triples corresponding to the target keyword set, matching keywords and sentiment tags in the news database is performed to obtain a first recommended news text set;

[0040] According to the occurrence frequency of each keyword in the target keyword set in the first recommended news text set, the news texts in the first recommended news text set are prioritized to obtain a second recommended news text set;

[0041] Get summary keywords based on the news titles clicked by users during the target time period;

[0042] Calculating similarity between the summary keyword and the news text in the second recommended news text set, and prioritizing the news text in the second recommended news text set according to the similarity;

[0043] According to a preset number of recommendations, news texts in the second recommended news text set are filtered to obtain a third recommended news text set.

[0044] Preferably, the method further comprises:

[0045] Determining target summary keywords according to the similarity between the summary keywords and the news texts in the third recommended news text set;

[0046] According to the matching of the target summary keyword in the news database, the occurrence frequency of the target summary keyword in the news text is obtained, and the supplementary recommended number of news texts is determined according to the occurrence frequency to obtain a supplementary news text set;

[0047] Merging the supplementary news text set and the third recommended news text set to obtain the target news text;

[0048] The supplementary recommended quantity is determined based on the preset recommended quantity and the target proportion, and the supplementary recommended quantity is obtained by multiplying the target proportion by the preset recommended quantity.

[0049] Preferably, the method further comprises:

[0050] Determine the attribution information corresponding to the news client, the attribution information including user information and IP address;

[0051] According to the attribution information and pre-set sensitive attribution information, determining whether the news client terminal is a special client terminal;

[0052] Wherein, the attribution information corresponding to the news client is determined to be a special client, and an audit terminal is set at the communication connection port between the special client and the central server, and the central server communicates with the special client through the audit terminal;

[0053] If the news client is a special client, the target news text is sent to the review terminal, and the review terminal searches the received target news text according to the sensitive dictionary. If sensitive words are retrieved in a window of a preset size and reach a warning value, a feedback signal is triggered. Otherwise, the review is passed and the target news text is pushed to the news client;

[0054] Receive a feedback signal sent by the review terminal, adjust the preset weight to a weight interval, and if the matching value is within the weight interval, use the candidate keyword corresponding to the matching value as the target keyword, and the weight interval can limit the matching value of the first news text and the corresponding target keyword set to be close to 0;

[0055] According to the target keywords, determine the target news text in the news database until it is successfully pushed after being reviewed and approved by the review terminal;

[0056] Monitor in real time the duration of the weight interval adjusted by the special client. If the duration is longer than the warning time, adjust the weight interval back to the preset weight.

[0057] One or more technical solutions provided in this application have at least the following technical effects or advantages:

[0058] Taking into account the particularity of news texts, the relationship attributes of news texts are added when constructing the news knowledge graph, including publication time, publishing area and affiliation field. As entity relationships, a keyword set is extracted based on the first news text that the user is reading, and keyword matching and relationship attribute matching are performed through the news knowledge graph. The similarity weight is calculated using the cosine algorithm. However, considering that news texts have a certain timeliness and that too old news does not have recommendation value, the final matching value is obtained by introducing the calculation of time weight and combining it with the similarity weight. This results in a more accurate and richer keyword set that matches the first news text, and ensures the user experience when browsing the news client, ensuring that the news texts obtained by users are the latest, most relevant and most valuable.

[0059] Through the preset sentiment dictionary, the sentiment labels of the evaluation texts of news texts are identified, and the sentiment scores of each news text are obtained. According to the sentiment scores, sentiment labels are assigned to each news text. As the entity relationship content constructed by the news knowledge graph, the relationship attribute matching degree of the news text is characterized in multiple dimensions, which further enriches and improves the news knowledge graph. It can effectively capture the emotional needs corresponding to the reading tendencies and personality differences of different users and meet the diversity of user groups.

[0060] Based on the obtained target summary keywords, the news database is dynamically screened, the target summary keywords are matched in the timely news database, and a certain number of supplementary recommended news texts are selected to ensure that the news text content read by users not only meets the user's reading characteristics, but also has a certain degree of diversity and freshness, reduces reading fatigue, avoids content monotony, and improves the user's reading experience; through real-time detection of the user's click rate on the recommended news text, dynamically adjusts the preset number of recommendations and the number of supplementary recommendations, and can reflect the user's reading limit according to the click rate, thereby adjusting the number of recommended news texts on the news client interface according to the acceptance of news content by different user groups, so as to better meet the needs of users.

[0061] Based on the special client, an audit terminal is established between the central server and the special client to conduct content audit before pushing the target news text to the news client, so as to avoid the continuous appearance of sensitive words in the news text pushed to users in special places, improve the user's reading experience and mentality, and avoid the change of user mentality due to continuous sensitive news texts, thereby affecting the effect of collective learning; by adjusting the preset weights, it can ensure that the target news text is not too sensitive while still providing users with some relevant news texts. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 A schematic diagram of a flow chart of a news recommendation method based on a knowledge graph according to an embodiment of the present invention;

[0063] Figure 2 A schematic diagram of the process of constructing a news knowledge graph according to an embodiment of the present invention;

[0064] Figure 3 A schematic diagram of a process for obtaining matching values ​​of triples in a first news text and a news knowledge graph according to an embodiment of the present invention;

[0065] Figure 4 A schematic diagram of a process of obtaining a matching value according to a first eigenvector and a second eigenvector according to an embodiment of the present invention;

[0066] Figure 5A schematic diagram of a process of determining a target keyword set corresponding to a first news text according to a matching value according to an embodiment of the present invention;

[0067] Figure 6 A schematic diagram of a process for constructing a news knowledge graph according to another embodiment of the present invention;

[0068] Figure 7 A schematic diagram of a process of determining a target news text in a news database according to a target keyword set corresponding to a first news text according to an embodiment of the present invention;

[0069] Figure 8 A schematic diagram of a flow chart of a news recommendation method based on a knowledge graph according to another embodiment of the present invention;

[0070] Fig. 9 A flowchart of a method for recommending news based on a knowledge graph according to an example of the present invention;

[0071] Fig.10 The figure is a flow chart of pushing target news text to a news client according to an example of the present invention. DETAILED DESCRIPTION

[0072] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.

[0073] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.

[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.

[0075] Embodiment 1

[0076] Figure 1 It is a flowchart of a news recommendation method based on knowledge graph according to an embodiment of the present invention.

[0077] The user opens the news client through the user terminal to read the recommended news text, and the news client is connected to the central server to interact with data information.

[0078] The user terminal can be one or more of a smart phone, a tablet, and a computer.

[0079] The central server includes a processing unit, a retrieval unit, and a recommendation unit. The processing unit extracts entities and relationship attributes from news texts, and calculates similarities and matching values; the retrieval unit obtains news databases to build news knowledge graphs and retrieves news texts from news clients; the recommendation unit recommends news texts to news clients based on the processing results of the processing unit.

[0080] like Figure 1 As shown, a news recommendation method based on a knowledge graph according to an embodiment of the present invention is applied to a central server and includes the following steps:

[0081] S101, construct a news knowledge graph based on the news database.

[0082] In some embodiments, a news knowledge graph is constructed based on a news database, such as Figure 2 As shown, specifically including:

[0083] S201, acquiring a number of triples in real time according to all news texts in a news database to obtain a first triple set.

[0084] Specifically, knowledge graphs are usually stored in the form of triples, namely head entity, entity relationship and tail entity. The head entity of the triple is the keyword in the news text, the tail entity is the sub-keyword associated with the keyword in the news text, and the entity relationship is a feature vector representing the relationship attributes.

[0085] Specifically, several triples are obtained in real time, including:

[0086] A1. Preprocess all news texts in the news database, including word segmentation, stop word removal, and part-of-speech tagging.

[0087] A2. Use the TF-IDF algorithm to perform high-frequency content word search in any news text in the news database to extract keywords from the news text.

[0088] A3. Based on the extracted keywords, a content word search is performed in a window of a preset range in the context of the keywords, and content words associated with the keywords are extracted as sub-keywords.

[0089] A4. Relationship attributes include publication time, publication area, and affiliated field. Publication time refers to the publication or effective date of the news text, which represents the timeliness of the news text; publication area refers to the geographical scope of the news text publication, which represents the regional orientation of the news text for content description; affiliated field refers to the field scope of the news text archived. Due to the particularity of the relationship attributes set for news texts, the relationship attributes of news texts can be accurately obtained in the archiving rules of the news database. The relationship attributes are represented as feature vectors, which contain multi-dimensional information such as publication time, publication area, and affiliated field.

[0090] A5. Use the extracted keywords as the head entity in the news knowledge graph, the sub-keywords as the tail entity associated with the keyword entity, and the extracted entity relationships as the relationship edges between entities to construct the knowledge graph.

[0091] S202: Merge the triples corresponding to the same entity in the first triple set to obtain a second triple set.

[0092] S203: Generate a news knowledge graph based on the second triple set.

[0093] It should be noted that the news knowledge graph is updated in real time according to the real-time changes of the news database to adapt to the dynamic changes of the news text.

[0094] S102, obtaining the first news text that the user is browsing, and determining the keyword set and relationship attributes corresponding to the first news text; the keyword set includes keywords whose occurrence frequency meets the frequency threshold and sub-keywords associated with the keywords; the relationship attributes include publication time, publication area, and affiliated field.

[0095] The method for extracting the keyword set and relationship attributes corresponding to the first news text is consistent with the extraction method in the above step S201, and will not be described in detail.

[0096] S103, based on the keyword set and relationship attributes corresponding to the first news text, similarity calculation is performed with the triples in the news knowledge graph to obtain matching values ​​between the first news text and the triples in the news knowledge graph.

[0097] In some embodiments, similarity calculation is performed with the triples in the news knowledge graph to obtain the matching value between the first news text and the triples in the news knowledge graph, such as Figure 3 As shown, specifically including:

[0098] S301, for any keyword in the keyword set, if an entity in the news knowledge graph is found to match it, then the keywords corresponding to other entities connected to the entity in the news knowledge graph are determined as candidate keywords.

[0099] S302, obtaining a first feature vector according to the relationship attributes represented by the entity relationships of the corresponding triples of the candidate keywords in the news knowledge graph.

[0100] Among them, the first feature vector represents the entity relationship in the triple corresponding to any candidate keyword in the news knowledge graph.

[0101] S303: Obtain a second feature vector according to the relationship attribute represented by the entity relationship corresponding to the first news text.

[0102] Among them, the second feature vector represents the entity relationship of the triple of entities matched by any keyword in the keyword set corresponding to the first news text in the news knowledge graph.

[0103] S304: Obtain a matching value according to the first eigenvector and the second eigenvector.

[0104] In some embodiments, a matching value is obtained according to the first feature vector and the second feature vector, such as Figure 4 As shown, specifically including:

[0105] S401, calculating the similarity between the first eigenvector and the second eigenvector by using the cosine value to obtain a similarity weight.

[0106] For example, a news text has corresponding publishing time, publishing area and affiliated field, and these relationship attributes are represented as feature vectors, namely the second feature vector, denoted as A = (a_{time}, a_{location}, a_{department}). Similarly, the triple entity relationship of candidate keywords in the news knowledge graph also has corresponding publishing time, publishing area and affiliated field, represented as feature vectors, namely the first feature vector, denoted as B = (b_{time}, b_{location}, b_{department}).

[0107] In order to verify whether the candidate keyword is suitable for the first news text, it is necessary to calculate the similarity between the two feature vectors. In the embodiment of the present invention, the calculation formula of the cosine similarity is selected:

[0108] similarity=cos(θ)=(A·B) / (|A||B|), where θ is the angle between vector A and vector B, “·” represents the dot product, and |A| and |B| are the lengths of vectors A and B respectively.

[0109] Among them, the dot product A·B=Σ(A[i]×B[i]), i is each dimension of the vector, the length of vector A is |A|=√(Σ(A[i]^2)), and the length of vector B is |B|=√(Σ(B[i]^2)).

[0110] Thus, the cosine similarity between vector A and vector B, ie, the similarity weight, is calculated.

[0111] S402, obtaining the time weight according to the publication time and current time of the triplet corresponding to the candidate keyword in the news knowledge graph.

[0112] For example, suppose that the publication time of the corresponding triple of a candidate keyword i in the news knowledge graph is t_i, the current time is t_c, and the time difference Δt is t_c-t_i. The time difference Δt is used to define a time weight α_i, a value between 0 and 1, which is used to indicate the degree to which the similarity weight decays over time.

[0113] In this embodiment of the present invention, an exponential decay function is selected to calculate the time weight:

[0114] α_i=e^(-λ×Δt), where λ is the decay rate, which determines the decay speed. λ is set to 0.5 and can be adjusted according to actual applications.

[0115] S403, multiplying the time weight and the similarity weight to obtain a matching value.

[0116] For example, assuming that the similarity weights of feature vector A and feature vector B are 0.9, but the time weight corresponding to feature vector B is 0.6, then the final matching value is 0.54. Therefore, considering that the timeliness of news text has a great impact on the recommendation value, even if the similarity weight is as high as 0.9, due to the disparity in time weight, the final matching value is only 0.54.

[0117] S104: Determine a target keyword set corresponding to the first news text according to the matching value.

[0118] In some embodiments, a target keyword set corresponding to the first news text is determined based on the matching value, such as Figure 5 As shown, specifically including:

[0119] S501: If the matching value is greater than a preset weight, the candidate keyword corresponding to the matching value is used as a target keyword.

[0120] S502: Determine a target keyword set according to the target keyword and the keyword set corresponding to the first news text.

[0121] S105: Determine a target news text in a news database according to the target keyword set corresponding to the first news text.

[0122] S106, pushing the target news text to a news client for user browsing.

[0123] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0124] 1. Taking into account the particularity of news texts, the relationship attributes of news texts are added when constructing the news knowledge graph, including publication time, publication area and affiliated field, as entity relationships. A keyword set is extracted based on the first news text that the user is reading, and keyword matching and relationship attribute matching are performed through the news knowledge graph to obtain a more accurate and richer keyword set that matches the first news text. Matching is performed in the news database based on this keyword set, and the recommended news text obtained is more robust, avoiding the limitations of recommendations caused by the inherent writing vocabulary in the news text.

[0125] 2. When calculating the relationship attribute matching between the candidate keywords and the keyword set corresponding to the first news text, the cosine algorithm is used to calculate the similarity weight. However, considering that news texts have a certain timeliness and that too old news does not have recommendation value, the time weight calculation is introduced and combined with the similarity weight to obtain the final matching value. This matching value can more accurately and comprehensively judge the degree of association between the candidate keywords and the first news text, thereby ensuring the accuracy of subsequent matching in the news database; and ensuring the user experience of users browsing the news client, satisfying that the news texts obtained by users are the latest, most relevant and most valuable.

[0126] Embodiment 2

[0127] In the first embodiment, considering the particularity of news content, when reporting news content, publishers generally base their reports on real-time topics based on specific emotional tendencies, such as positive, negative or neutral attitudes. Users have personal reading tendencies when reading news. If recommendations are only made based on text topics or relationship attributes, it cannot meet the diversity of user group personalities.

[0128] Therefore, the embodiment of the present application is optimized to a certain extent on the basis of the above-mentioned embodiment 1.

[0129] In some embodiments, the news client includes an evaluation module, which is used for the user to evaluate the news text being browsed and generate an evaluation text.

[0130] All evaluation texts corresponding to any news text are stored in the news database along with the corresponding news text through the Internet communication interface.

[0131] In some embodiments, such as Figure 6 As shown, the construction of the news knowledge graph also includes:

[0132] S601, obtaining news text and corresponding evaluation text in a news database.

[0133] S602: Based on a preset sentiment dictionary, the evaluation text is queried to obtain a target score corresponding to the evaluation text.

[0134] S603: If the target score is within the threshold range, a first emotion label is assigned to the news text corresponding to the target score.

[0135] S604: If the target score is greater than the upper limit of the threshold interval, a second emotion label is assigned to the news text corresponding to the target score.

[0136] S605: If the target score is not greater than the lower limit of the threshold interval, a third emotion label is assigned to the news text corresponding to the target score.

[0137] In some embodiments, the relational attributes of the news text in Embodiment 1 further include sentiment tags.

[0138] Specifically, existing sentiment dictionary resources, such as HowNet, NTUSD, etc., are used to construct a preset sentiment dictionary, which includes words with positive, negative and neutral sentiment labels; and the first sentiment label corresponds to "neutral", the second sentiment label corresponds to "positive", and the third sentiment label corresponds to "negative".

[0139] Each emotion label is assigned a corresponding emotion score, the first emotion label is assigned a first score, the second emotion label is assigned a second score, and the third emotion label is assigned a third score.

[0140] For example, a sentiment dictionary query is performed on the evaluation text attached to a certain news text to obtain all the sentiment tags corresponding to the news text, and a sentiment score is set for each sentiment tag, specifically: "positive" is given 1 point, "neutral" is given 0 point, and "negative" is given -1 point. The sentiment scores of all sentiment tags corresponding to the news text are accumulated and added to obtain the target score.

[0141] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0142] 1. Through the preset sentiment dictionary, the sentiment labels of the evaluation texts of the news texts are identified, and the sentiment scores of each news text are obtained. According to the sentiment scores, sentiment labels are assigned to each news text. As the entity relationship content constructed by the news knowledge graph, the relationship attribute matching degree of the news text is characterized in multiple dimensions, which further enriches and improves the news knowledge graph, can effectively capture the reading tendencies and emotional needs corresponding to the personality differences of different users, and meet the diversity of the user group.

[0143] 2. Since the evaluation module is generated in real time, it can dynamically capture the emotional changes of news texts and real-time feedback from users. According to real-time changes, it can update the news database and news knowledge graph in real time, providing a more accurate matching environment for subsequent recommendation selections.

[0144] 3. Comprehensively considering the similarity, time weight and emotional label of the relationship attributes between the candidate keywords and the keywords corresponding to the first news text can further improve the quality and accuracy of the recommendation while adapting to the reading habits and emotional value tendencies of different user groups.

[0145] Embodiment 3

[0146] In the above embodiment, news recommendations are made based on the news text that the user is clicking or browsing, which may have certain limitations. Although the news text that the user is currently browsing may represent the news field or theme that the user is concerned about, the reference scope is too limited.

[0147] Therefore, the embodiments of the present application are optimized to a certain extent based on the above embodiments.

[0148] In some embodiments, a target news text is determined in a news database according to a target keyword set corresponding to the first news text, such as Figure 7 As shown, it also includes:

[0149] S701, based on the target keyword set corresponding to the first news text and the sentiment tags in the triplet corresponding to the target keyword set, matching the keywords and sentiment tags in the news database is performed to obtain a first recommended news text set.

[0150] S702 , according to the occurrence frequency of each keyword in the target keyword set in the first recommended news text set, the news texts in the first recommended news text set are prioritized to obtain a second recommended news text set.

[0151] Specifically, the frequency of the keywords in the target keyword set appearing in each news text in the first recommended news text set is obtained respectively, and the news texts in the first recommended news text set are sorted in descending order according to the frequency to obtain the second recommended news text set.

[0152] S703, obtaining summary keywords according to the news titles clicked by the user within the target time period.

[0153] Specifically, the summary text of news headlines clicked by the user within the target time period is obtained, and entities are extracted from the summary text of news headlines to obtain summary keywords.

[0154] S704: Calculate similarity between the summary keyword and the news text in the second recommended news text set, and prioritize the news text in the second recommended news text set according to the similarity.

[0155] Specifically, in this step, the index for judging similarity can be based on the number of appearances of the summary keywords in each news text in the second recommended news text set, and the order of the news texts in the second recommended news text set is swapped in descending order according to the number of appearances, so as to obtain the second recommended news text set after secondary sorting.

[0156] In another embodiment, the average value of the word vector used for the summary keyword can also be used as the representation of the feature vector of the entire summary keyword, and the TF-IDF-weighted word vector average value of all entities in the news text in the second recommended news text set can be calculated as the feature vector representation of the news text. The similarity is obtained based on the cosine similarity between the feature vectors, and the news texts in the second recommended news text set are prioritized according to the similarity.

[0157] S705 , according to a preset number of recommendations, filter the news texts in the second recommended news text set after secondary sorting to obtain a third recommended news text set.

[0158] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0159] 1. Sort the first recommended news text set by the frequency of occurrence of the target keyword set, and perform a second sort based on the first sorting based on the similarity between the news title summary keywords browsed by the user in the target historical time period and the first recommended news text set. Finally, select the news text with the highest ranking as the pushed news text. Based on the user's current reading similarity and the user's historical reading tendency, the order of pushing news texts is more in line with the user's reading habits and interests, and more adapted to the user's personalized needs.

[0160] Embodiment 4

[0161] In the above embodiment, keyword expansion is performed in the knowledge graph based on the news text browsed by the user, so that more possible matches can be made in the news database. However, the matched news text is content with a high degree of similarity to the news text being browsed by the user. This may cause the news text content on the news client interface to be too monotonous, and the user may experience reading fatigue, which affects the reading effect of the news text.

[0162] Therefore, the embodiments of the present application are optimized to a certain extent based on the above embodiments.

[0163] In some embodiments, such as Figure 8 As shown in the figure, the news recommendation method based on knowledge graph also includes:

[0164] S801, determining a target summary keyword according to the similarity between the summary keyword and the news text in the third recommended news text set.

[0165] Specifically, the frequency of occurrence of each summary keyword in the third recommended news text set is obtained respectively, and the summary keyword with the highest occurrence frequency is used as the target summary keyword.

[0166] S802, according to the target summary keyword matching in the news database, obtain the frequency of occurrence of the target summary keyword in the news text, determine the supplementary recommended number of news texts according to the frequency of occurrence, and obtain a supplementary news text set.

[0167] Specifically, firstly, all news texts in the news database are screened, and those whose publishing time differs from the current time by more than 1 day are excluded, thus obtaining a screened news text set;

[0168] Obtain the hit frequencies of the target summary keywords in all news texts in the filtered news text set, sort all news texts in the filtered news text set, and obtain an initial supplementary news text set;

[0169] The number of additional recommendations is determined based on the preset number of recommendations and the target percentage. The number of additional recommendations is obtained by multiplying the target percentage by the preset number of recommendations.

[0170] According to the arrangement order of the news texts in the initial supplementary news text set, news texts are selected in sequence until the number of selections reaches the supplementary recommendation number.

[0171] S803, merging the supplementary news text set and the third recommended news text set to obtain target news text.

[0172] In some embodiments, after the target news text is pushed to the interface of the news client, such as Fig. 9 As shown, it also includes:

[0173] S901, obtaining an actual quantity value according to the number of clicks by users on the recommended target news text.

[0174] S902, within a fixed time, calculate the ratio of the actual quantity value to the quantity value of the target recommended news text to obtain the click rate.

[0175] S903: Determine whether the click rate is within a ratio range.

[0176] S904: If the click rate is greater than the upper limit of the ratio range, it means that the number of recommended news texts may be relatively small and cannot meet the needs of the user, so the preset number of recommendations is increased.

[0177] S905: If the click rate is less than the lower limit of the ratio range, it means that the number of recommended news texts is too large and the user does not need so many recommendations, so the preset number of recommendations is reduced.

[0178] S906: If the click rate is within the ratio range, the preset recommendation quantity remains unchanged.

[0179] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0180] 1. Based on the acquired target summary keywords, the news database is dynamically screened and matched with the target summary keywords in the timely news database. A certain number of supplementary recommended news texts are selected to ensure that the news text content read by users not only meets the user's reading characteristics, but also has a certain degree of diversity and freshness, thereby reducing reading fatigue, avoiding content monotony, and improving the user's reading experience.

[0181] 2. By real-time detection of the click rate of users on recommended news texts, dynamically adjusting the preset number of recommendations and the number of supplementary recommendations, it is possible to reflect the user's maximum reading amount based on the click rate, and thus adjust the number of recommended news texts on the news client interface according to the acceptance of news content by different user groups, so as to better meet user needs.

[0182] Embodiment 5

[0183] In view of the particularity of the scene, for example, a unit or learning center usually uses a centralized news client to push news information to users on site for centralized learning, and the centralized news client is usually bound to all users' personal clients, so it may cause the content browsed by individuals during collective learning to be too sensitive and affect the centralized learning effect. In order to ensure the suitability and educational nature of the pushed news text in the scene, directly pushing the determined target news text to the news client will inevitably have a certain educational and learning impact.

[0184] Therefore, the embodiments of the present application are optimized to a certain extent based on the above embodiments.

[0185] The attribution information corresponding to the news client is determined to be a special client. An audit terminal is set at the communication connection port between the special client and the central server, and the central server communicates with the special client through the audit terminal.

[0186] In some embodiments, before pushing the target news text to the news client, Fig.10As shown, it also includes:

[0187] S110, determining the attribution information corresponding to the news client, where the attribution information includes user information and IP address.

[0188] S120, determining the type of the news client terminal according to the attribution information and pre-set sensitive attribution information.

[0189] Specifically, the pre-set sensitive attribution information includes a sensitive information library and a sensitive IP address. The attribution information is matched with the pre-set sensitive information library and the sensitive IP address. If the match is successful, the corresponding news client is determined to be a special client.

[0190] S130, if the news client is a special client, it sends the target news text to the review terminal, and the review terminal searches the received target news text according to the sensitive dictionary. If the sensitive words retrieved in the window of the preset size reach the warning value, a feedback signal is triggered. Otherwise, the review is passed and the target news text is pushed to the news client.

[0191] For example, a window of a preset size may be set to the window size of several news texts to avoid several consecutive news texts involving sensitive words.

[0192] S140, receiving a feedback signal sent by the review terminal, returning to step S501, adjusting the preset weight to a weight interval, and if the matching value is within the weight interval, taking the candidate keyword corresponding to the matching value as the target keyword.

[0193] The weight interval is kept as close to 0 as possible, so that the matching value of the candidate keyword is relatively reduced, thereby reducing the possibility of the above-mentioned continuous triggering of sensitive words.

[0194] S150, according to the target keyword, determine the target news text in the news database, and repeat step S130 until the review terminal passes the review and successfully pushes it.

[0195] S160, real-time monitoring of the duration of the weight interval adjusted by the special client, if the duration is longer than the warning time, adjusting the weight interval back to the preset weight, and determining the target keyword set.

[0196] For example, if a special client exists in a terminal device in a conference room of a certain unit, the terminal device may be a display device installed in the conference room. When the target news text is pushed to the special client, the review terminal continuously retrieves sensitive words that are not related to the unit within the preset window size, triggering a feedback signal and adjusting the preset weight to a weight range. Within the warning time, news texts with a low correlation with sensitive words are pushed to the user. The warning time can be set according to the actual situation of the special place, and can be set to 2 days.

[0197] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0198] 1. Based on special clients, by establishing an audit terminal between the central server and the special client, the content of the target news text is audited before it is pushed to the news client, so as to avoid the continuous appearance of sensitive words in the news text pushed to users in special places, improve the user's reading experience and mentality, and avoid the change of user mentality due to continuous sensitive news text; by adjusting the preset weight, it can ensure that the target news text is not too sensitive while still providing users with some relevant news texts.

[0199] 2. Through the audit terminal, it is possible to prevent personal clients bound to special clients from affecting the centralized learning process, and limit the warning time for adjusting the preset weights. After the warning time, the preset weights will be adjusted back to the normal recommendation mechanism to avoid long-term impact on the user's reading experience and ensure the suitability and educational nature of the pushed content.

[0200] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for recommending news based on knowledge graph, applied to a central server, a news client installed in a user terminal, and connected to the central server, characterized in that: include: Build a news knowledge graph based on the news database; Acquire a first news text that a user is browsing, and determine a keyword set and a relationship attribute corresponding to the first news text; the keyword set includes keywords whose occurrence frequency meets a frequency threshold and sub-keywords associated with the keywords; the relationship attributes include publication time, publication area, and affiliated field; Based on the keyword set and relationship attributes corresponding to the first news text, similarity calculation is performed with the triples in the news knowledge graph to obtain matching values ​​between the first news text and the triples in the news knowledge graph; Determine the target keyword set corresponding to the first news text according to the matching value: if the matching value is greater than a preset weight, use the candidate keyword corresponding to the matching value as the target keyword; Determine a target keyword set according to the target keyword and the keyword set corresponding to the first news text; wherein the candidate keywords corresponding to the matching values ​​are determined as follows: for any keyword in the keyword set, if an entity in the news knowledge graph is found to match it, then determine keywords corresponding to other entities in the news knowledge graph connected to the entity as candidate keywords; Determining a target news text in a news database according to a target keyword set corresponding to the first news text; Pushing the target news text to the news client for user browsing; The news client includes an evaluation module, which is used for the user to evaluate the news text being browsed and generate an evaluation text; The construction of the news knowledge graph also includes: Obtain news text and corresponding evaluation text in the news database; Based on a preset sentiment dictionary, the evaluation text is queried to obtain a target score corresponding to the evaluation text; If the target score is within the threshold range, assigning a first sentiment label to the news text corresponding to the target score; If the target score is greater than the upper limit of the threshold interval, assigning a second emotion label to the news text corresponding to the target score; If the target score is not greater than the lower limit of the threshold interval, assigning a third emotion label to the news text corresponding to the target score; Wherein, the relationship attributes of the news text also include sentiment tags; The step of determining a target news text in a news database according to the target keyword set corresponding to the first news text further includes: Based on the target keyword set corresponding to the first news text and the sentiment tags in the triples corresponding to the target keyword set, matching keywords and sentiment tags in the news database is performed to obtain a first recommended news text set; According to the occurrence frequency of each keyword in the target keyword set in the first recommended news text set, the news texts in the first recommended news text set are prioritized to obtain a second recommended news text set; Get summary keywords based on the news titles clicked by users during the target time period; Calculating similarity between the summary keyword and the news text in the second recommended news text set, and prioritizing the news text in the second recommended news text set according to the similarity; Filtering news texts in the second recommended news text set according to a preset number of recommendations to obtain a third recommended news text set; The method further comprises: Determine the attribution information corresponding to the news client, the attribution information including user information and IP address; According to the attribution information and pre-set sensitive attribution information, determining whether the news client terminal is a special client terminal; Wherein, the attribution information corresponding to the news client is determined to be a special client, and an audit terminal is set at the communication connection port between the special client and the central server, and the central server communicates with the special client through the audit terminal; If the news client is a special client, the target news text is sent to the review terminal, and the review terminal searches the received target news text according to the sensitive dictionary. If sensitive words are continuously searched in a window of a preset size and reach a warning value, a feedback signal is triggered. Otherwise, the review is passed and the target news text is pushed to the news client; Receive the feedback signal sent by the review terminal, adjust the preset weight to the weight interval, and if the matching value is within the weight interval, use the candidate keyword corresponding to the matching value as the target keyword; According to the target keywords, determine the target news text in the news database until it is successfully pushed after being reviewed and approved by the review terminal; Monitor in real time the duration of the weight interval adjusted by the special client. If the duration is longer than the warning time, adjust the weight interval back to the preset weight.

2. The method for recommending news based on knowledge graph according to claim 1, characterized in that: Based on the news database, a news knowledge graph is constructed, including: According to all news texts in the news database, a number of triples are acquired in real time to obtain a first triple set; Merge the triplets corresponding to the same entity in the first triplet set to obtain a second triplet set; generating the news knowledge graph according to the second triple set; The head entity of the triple is a keyword in the news text, the tail entity is a sub-keyword associated with the keyword in the news text, and the entity relationship is a feature vector representing a relationship attribute.

3. The method for recommending news based on knowledge graph according to claim 1, characterized in that: The performing similarity calculation with the triples in the news knowledge graph to obtain matching values ​​between the first news text and the triples in the news knowledge graph includes: Obtaining a first feature vector according to the relationship attribute represented by the entity relationship of the triple corresponding to the candidate keyword in the news knowledge graph; Obtaining a second feature vector according to the relationship attribute represented by the entity relationship corresponding to the first news text; A matching value is obtained according to the first feature vector and the second feature vector.

4. The method for recommending news based on knowledge graph according to claim 3, characterized in that: The obtaining a matching value according to the first feature vector and the second feature vector further includes: Calculate the similarity between the first eigenvector and the second eigenvector by using the cosine value to obtain a similarity weight; Obtaining a time weight according to the publication time and current time of the triplet corresponding to the candidate keyword in the news knowledge graph; Perform a product operation on the time weight and the similarity weight to obtain a matching value; Among them, the time weight is obtained according to the following formula: α_i=e^(-λ×Δt), α_i is the time weight, λ is the preset decay rate, and Δt is the difference between the current time and the publication time.

5. The method for recommending news based on knowledge graph according to claim 1, characterized in that: The method further comprises: Determining target summary keywords according to the similarity between the summary keywords and the news texts in the third recommended news text set; According to the matching of the target summary keyword in the news database, the occurrence frequency of the target summary keyword in the news text is obtained, and the supplementary recommended number of news texts is determined according to the occurrence frequency to obtain a supplementary news text set; Merging the supplementary news text set and the third recommended news text set to obtain the target news text; The supplementary recommended quantity is determined based on the preset recommended quantity and the target proportion, and the supplementary recommended quantity is obtained by multiplying the target proportion by the preset recommended quantity.

Citation Information

Patent Citations

  • Method and apparatus for recommending information

    CN106570144A

  • Object recommendation method based on knowledge graph

    CN115168567A

  • Commodity recommendation method integrating comment emotion and score based on knowledge graph

    CN115170216A