Event recommendation method, apparatus and device
By constructing an event graph and utilizing the similarity clustering and association relationships of natural language text, the problems of slow speed and low accuracy in the recommendation of related events in existing technologies are solved, and fast and accurate recommendation of related events is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA GROUP HOLDING LTD
- Filing Date
- 2020-07-27
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, the recommendation speed of related events is slow and the accuracy is not high.
By acquiring natural language text, clustering based on the similarity between natural language texts, constructing an event graph, and recommending related events based on the relationships in the event graph.
It improves the speed and accuracy of related event recommendations, enabling quick and accurate recommendations of relevant events.
Smart Images

Figure CN114003799B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to an event recommendation method, apparatus, electronic device, and storage device. This application also relates to another event recommendation method. Background Technology
[0002] Numerous news events occur daily, often interconnected. For instance, if celebrity A gets married, many similar celebrity weddings might follow, such as those of celebrity B and celebrity C. When a news event occurs, a large number of users search for related events on search engines. After reading the current news event, users also hope to receive recommendations for related events.
[0003] In existing technologies, the recommendation of related events mainly includes three methods: 1. Recommending events viewed by users with similar interests to the current user; 2. If a user who viewed the current event also viewed other events, these other events can be recommended; 3. Recommending articles with similar content based on content similarity.
[0004] However, the recommendation methods for these related events suffer from slow recommendation speed and low recommendation accuracy. Summary of the Invention
[0005] This application provides an event recommendation method, apparatus, electronic device, and storage device to solve the problems of slow recommendation speed and low recommendation accuracy in the prior art.
[0006] This application provides an event recommendation method, including:
[0007] Obtain natural language text;
[0008] Based on the similarity between the natural language texts, the natural language texts are clustered, and an event graph is constructed based on the clustering results; the event graph contains the association relationships between events;
[0009] Obtain the query request for the event;
[0010] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0011] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0012] As one implementation method, the step of clustering the natural language texts based on the similarity between them and constructing an event graph based on the clustering results includes:
[0013] Based on at least one of the following: similarity between titles, similarity between paragraphs, and similarity between keywords, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0014] As one implementation method, the step of clustering the natural language text based on at least one of the similarity between the titles of any two natural language texts, the similarity between paragraphs, and the similarity between keywords, and constructing an event graph based on the clustering results, includes:
[0015] Based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, as well as the weight of each similarity in the similarity comparison, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0016] As one implementation method, the clustering of the natural language texts based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, and the weight of each similarity in the similarity comparison, includes:
[0017] The similarity between two natural language texts is obtained by considering the similarity between their titles, paragraphs, and keywords, as well as the weight of each similarity factor in the similarity comparison.
[0018] Determine whether the similarity between two natural language texts is greater than or equal to a preset similarity threshold;
[0019] If so, the two natural language texts will be clustered into one category.
[0020] As one implementation method, constructing an event graph based on the clustering results includes:
[0021] Extract keywords from the first natural language text within a specified cluster category from the clustering results;
[0022] Based on the keywords in the first natural language text, obtain each common keyword that appears in the first natural language text;
[0023] Based on the public keywords, determine the event corresponding to the specified cluster category;
[0024] Construct an event graph based on the events corresponding to the specified clustering categories.
[0025] As one implementation, the step of querying the event graph based on the keywords in the query request and obtaining events matching the keywords from the event graph includes:
[0026] Retrieve keywords from the query request;
[0027] The keywords in the query request are queried in the event graph to obtain events that have the same common keywords as the keywords.
[0028] As one implementation method, recommending related events of the matched event to the user based on the association relationships between events contained in the event graph includes:
[0029] Based on the relationships between events contained in the event graph, candidate related events of the matched event are obtained;
[0030] The candidate related events are sorted, and the sorted results are recommended to the user.
[0031] As one implementation, obtaining candidate associated events that match the event based on the association relationships between events contained in the event graph includes:
[0032] Obtain the keywords of the matched event;
[0033] Based on the relationships between events contained in the event graph, a query is performed in the event graph to obtain events that share common keywords with the matched events;
[0034] The event is used as a candidate associated event of the matched event.
[0035] As one implementation method, ranking the candidate related events and recommending the ranked results to the user includes:
[0036] Obtain the event popularity of candidate related events;
[0037] Based on the popularity of the candidate related events, the candidate related events are sorted, and the sorted results are recommended to the user.
[0038] As one implementation method, obtaining the event popularity of candidate related events includes:
[0039] Obtain the clustering categories corresponding to candidate association events;
[0040] From the clustering categories corresponding to the candidate associated events, obtain the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts;
[0041] The event popularity of candidate related events is obtained based on at least one of the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts.
[0042] This application also provides an event recommendation device, comprising:
[0043] The text acquisition unit is used to acquire natural language text;
[0044] A text clustering unit is used to cluster the natural language texts according to the similarity between them and to construct an event graph based on the clustering results; the event graph contains the association relationships between events;
[0045] The request retrieval unit is used to obtain query requests for an event;
[0046] An event acquisition unit is configured to query the event graph based on the keywords in the query request, and obtain events that match the keywords from the event graph;
[0047] The event recommendation unit is used to recommend related events of the matched event to the user based on the relationship between events contained in the event graph.
[0048] As one implementation method, the text clustering unit is specifically used for:
[0049] Based on at least one of the following: similarity between titles, similarity between paragraphs, and similarity between keywords, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0050] As one implementation method, the text clustering unit is specifically used for:
[0051] Based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, as well as the weight of each similarity in the similarity comparison, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0052] As one implementation method, the text clustering unit is specifically used for:
[0053] The similarity between two natural language texts is obtained by considering the similarity between their titles, paragraphs, and keywords, as well as the weight of each similarity factor in the similarity comparison.
[0054] Determine whether the similarity between two natural language texts is greater than or equal to a preset similarity threshold;
[0055] If so, the two natural language texts will be clustered into one category.
[0056] As one implementation method, the text clustering unit is specifically used for:
[0057] Extract keywords from the first natural language text within a specified cluster category from the clustering results;
[0058] Based on the keywords in the first natural language text, obtain each common keyword that appears in the first natural language text;
[0059] Based on the public keywords, determine the event corresponding to the specified cluster category;
[0060] Construct an event graph based on the events corresponding to the specified clustering categories.
[0061] As one implementation method, the text clustering unit is specifically used for:
[0062] Retrieve keywords from the query request;
[0063] The keywords in the query request are queried in the event graph to obtain events that have the same common keywords as the keywords.
[0064] As one implementation method, the event recommendation unit is specifically used for:
[0065] Based on the relationships between events contained in the event graph, candidate related events of the matched event are obtained;
[0066] The candidate related events are sorted, and the sorted results are recommended to the user.
[0067] As one implementation method, the event recommendation unit is specifically used for:
[0068] Obtain the keywords of the matched event;
[0069] Based on the relationships between events contained in the event graph, a query is performed in the event graph to obtain events that share common keywords with the matched events;
[0070] The event is used as a candidate associated event of the matched event.
[0071] As one implementation method, the event recommendation unit is specifically used for:
[0072] Obtain the event popularity of candidate related events;
[0073] Based on the popularity of the candidate related events, the candidate related events are sorted, and the sorted results are recommended to the user.
[0074] As one implementation method, the event recommendation unit is specifically used for:
[0075] Obtain the clustering categories corresponding to candidate association events;
[0076] From the clustering categories corresponding to the candidate associated events, obtain the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts;
[0077] The event popularity of candidate related events is obtained based on at least one of the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts.
[0078] This application also provides an electronic device, including:
[0079] Processor; and
[0080] The memory stores the program for the event recommendation method. After the device is powered on and the program for the event recommendation method is run by the processor, the following steps are performed:
[0081] Obtain natural language text;
[0082] Based on the similarity between the natural language texts, the natural language texts are clustered, and an event graph is constructed based on the clustering results; the event graph contains the association relationships between events;
[0083] Obtain the query request for the event;
[0084] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0085] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0086] This application also provides a storage device storing a program for an event recommendation method, which is executed by a processor to perform the following steps:
[0087] Obtain natural language text;
[0088] Based on the similarity between the natural language texts, the natural language texts are clustered, and an event graph is constructed based on the clustering results; the event graph contains the association relationships between events;
[0089] Obtain the query request for the event;
[0090] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0091] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0092] This application provides an event recommendation method, including:
[0093] Retrieve news web pages from the Internet;
[0094] Based on the similarity between the news web pages, the news web pages are clustered, and an event graph is constructed based on the clustering results; the event graph contains the relationships between events;
[0095] Obtain the query request for the event;
[0096] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0097] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0098] Compared with the prior art, this application has the following advantages:
[0099] The event recommendation method provided in this application involves: acquiring natural language text; clustering the natural language text based on the similarity between them and constructing an event graph based on the clustering results; the event graph containing the relationships between events; obtaining a query request for an event; querying the event graph based on keywords in the query request and obtaining events matching the keywords from the event graph; and recommending related events of the matched events to the user based on the relationships between events contained in the event graph. By employing the event recommendation method provided in this application, clustering natural language text based on the similarity between them and constructing an event graph based on the clustering results, obtaining an event graph composed of events from the natural language text, and recommending related events of the matched events to the user based on the relationships between events contained in the event graph, the method improves the speed and accuracy of related event recommendation. Attached Figure Description
[0100] Figure 1 This is a flowchart illustrating the application scenario involved in the first embodiment of this application.
[0101] Figure 2 This is a flowchart of an event recommendation method provided in the first embodiment of this application.
[0102] Figure 3 This is a schematic diagram of an event recommendation involved in the first embodiment of this application.
[0103] Figure 4 This is a schematic diagram of an event recommendation device according to the second embodiment of this application. Detailed Implementation
[0104] Numerous specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0105] To enable those skilled in the art to better understand the present application, a specific application scenario embodiment of the present application will first be described in detail. Please refer to... Figure 1 This is a flowchart illustrating a specific application scenario of this application. For example, the unexpected death of sports star A becomes a major news event on the internet. To efficiently and accurately recommend related events to users, the search engine can employ the following steps: First, on the data side, crawl web pages related to the unexpected death of sports star A from the internet, obtaining a large number of related news articles. Please refer to... Figure 1 The data collection process involves several steps. First, based on the similarity between related news articles, these articles are clustered, and an event graph is constructed using the clustering results. For example, the similarity between news articles about the unexpected death of sports star A can be calculated. News articles with similarity values greater than a threshold are clustered to obtain multiple cluster categories. For example, cluster categories could be: sports star A's retirement, sports star A's MVP award, star B's death, etc. For each specified cluster category, corresponding events are obtained; for example, the events could be star A's retirement event, star A's MVP event, star B's death event, etc., and these events are then used to construct an event graph. Please refer to [reference needed]. Figure 1 The steps for constructing an event graph, Figure 1 Event 1 could be the death of celebrity A, and Event 2 could be celebrity A's MVP event; both are significant events related to celebrity A. Next, we obtain search engine user queries for these events, such as "celebrity A died." Please refer to [reference needed]. Figure 1 The user query steps are as follows. Then, based on the keywords in the query request, the event graph is queried, and events matching the keywords are obtained from the event graph. For example, events related to the death of celebrity A that match the keywords "celebrity A" and "death" are obtained from the event graph. Please refer to... Figure 1The steps for querying the event graph are as follows. Finally, related events of the matched events are recommended to the user, for example, recommending the MVP event of celebrity A as a related event to the customer. Please refer to [link / reference]. Figure 1 Recommended steps for related events.
[0106] The first embodiment of this application provides an event recommendation method, the execution subject of which is a server or a client. The following is in conjunction with... Figure 2 Please provide an explanation.
[0107] like Figure 2 As shown, in step S201, natural language text is obtained.
[0108] The natural language text can be news articles from the internet or other unstructured data.
[0109] Please refer to Figure 1 This is a flowchart of an application system using the event recommendation method provided in the first embodiment. Figure 1 In this process, data can be collected from the Web (internet web pages) to obtain natural language text. Specifically, news articles can be obtained by crawling news web pages on the internet. These news articles can be trending news such as the unexpected death of sports star A, as mentioned earlier.
[0110] like Figure 2 As shown, in step S202, the natural language texts are clustered according to the similarity between them, and an event graph is constructed based on the clustering results; the event graph contains the association between events.
[0111] The step of clustering the natural language texts based on their similarity and constructing an event graph based on the clustering results includes:
[0112] Based on at least one of the following: similarity between titles, similarity between paragraphs, and similarity between keywords, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0113] The step of clustering the natural language texts based on at least one of the following: similarity between titles, paragraphs, and keywords, and constructing an event graph based on the clustering results, includes:
[0114] Based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, as well as the weight of each similarity in the similarity comparison, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0115] The clustering of the natural language texts based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, and the weight of each similarity in the similarity comparison, includes:
[0116] The similarity between two natural language texts is obtained by considering the similarity between their titles, paragraphs, and keywords, as well as the weight of each similarity factor in the similarity comparison.
[0117] Determine whether the similarity between two natural language texts is greater than or equal to a preset similarity threshold;
[0118] If so, the two natural language texts will be clustered into one category.
[0119] The similarity between natural language texts, such as the similarity between news articles, can be calculated as follows.
[0120] First, the title similarity between any two natural language texts is obtained using the following title similarity calculation formula.
[0121] sim(title) = f(title1, title2)
[0122] Here, f is a function that calculates the similarity between title1 (title 1) and title2 (title 2), and the cosine similarity between title1 and title2 can be used.
[0123] For example, using the title similarity calculation formula mentioned above, the similarity between the title of natural language text 1 and the title of natural language text 2 can be calculated as 0.1, the similarity between the title of natural language text 1 and the title of natural language text 3 as 0.5, and the similarity between the title of natural language text 1 and the title of natural language text 4 as 0.9. Then, using the paragraph similarity calculation formula below, the paragraph similarity between any two natural language texts can be obtained.
[0124] sim(paragraph)=w1*f(p1,p1')+...+wi*f(pi,pi')+...+wn*f(pn,pn')
[0125] Where pi represents the i-th paragraph of the first natural language text, pi' represents the i-th paragraph of the second natural language text, f is the similarity function for calculating the similarity between the two paragraphs pi and pi', which can be cosine similarity, and wi is the weight value for the similarity of the i-th paragraph, which can be set manually.
[0126] For example, using the paragraph similarity calculation formula mentioned above, the similarity between paragraph 1 and paragraph 2 of natural language text can be calculated as 0.2, the similarity between paragraph 1 and paragraph 3 of natural language text can be calculated as 0.6, and the similarity between paragraph 1 and paragraph 4 of natural language text can be calculated as 0.96.
[0127] Next, the keyword similarity between any two natural language texts is obtained using the following keyword similarity calculation formula.
[0128] sim(key_words)=f(key_words1,key_words2)
[0129] Here, key_words1 and key_words2 represent the keywords of two natural language texts. The keywords of the two articles can be calculated using tf-idf (term frequency – inverse document frequency). f represents the function for calculating the keyword similarity between the two natural language texts, which can be calculated using cosine similarity.
[0130] For example, using the keyword similarity calculation formula above, the similarity between the keywords of natural language text 1 and the keywords of natural language text 2 is calculated to be 0.15, the similarity between the keywords of natural language text 1 and the keywords of natural language text 3 is 0.58, and the similarity between the keywords of natural language text 1 and the keywords of natural language text 4 is 0.92. Finally, the similarity between two natural language texts is calculated using the following formula.
[0131] sim=w1*sim(title)+w2*sim(paragraph)+w3*sim(key_words)
[0132] Among them, w1, w2, and w3 are the weights of title similarity, paragraph similarity, and keyword similarity, respectively, which can be manually set.
[0133] Continuing with the above example, if w1 is 0.2, w2 is 0.3, and w3 is 0.5, then using the above calculation formula, the similarity between natural language text 1 and natural language text 2 can be calculated as 0.2*0.1+0.3*0.2+0.5*0.15=0.155, the similarity between natural language text 1 and natural language text 3 is 0.2*0.5+0.3*0.6+0.5*0.58=0.57, and the similarity between natural language text 1 and natural language text 4 is 0.2*0.9+0.3*0.96+0.5*0.92=0.928.
[0134] When the similarity (sim) between two natural language texts is greater than a preset similarity threshold, the two articles are judged to be similar and are grouped into the same category.
[0135] Using the example above, if the preset similarity threshold is 60%, and the similarity between natural language text 1 and natural language text 4 is 0.928, which is greater than the preset similarity threshold of 60%, then natural language text 1 and natural language text 4 can be clustered into the same category.
[0136] The construction of the event graph based on the clustering results includes:
[0137] Extract keywords from the first natural language text within a specified cluster category from the clustering results;
[0138] Based on the keywords in the first natural language text, obtain each common keyword that appears in the first natural language text;
[0139] Based on the public keywords, determine the event corresponding to the specified cluster category;
[0140] Construct an event graph based on the events corresponding to the specified clustering categories.
[0141] For example, after clustering is completed, keywords for each news article are obtained from the current cluster category. Then, common keywords K1...Ki...Kn that appear in every news article within that cluster category are extracted from the keywords of each news article. These common keywords K1...Ki...Kn are used as events for that cluster category. Furthermore, an event graph is constructed based on the events corresponding to the specified cluster category.
[0142] For the application scenario of the unexpected death of sports star A, the keywords of each news article are obtained from the cluster category containing this event. Then, common keywords such as "sports star A" and "death" that appear in every news article within the cluster category are extracted from the keywords of each news article. Since "sports star A" and "death" appear in all news articles of this cluster category, the death of sports star A can be regarded as the event corresponding to this cluster category.
[0143] like Figure 1 In this diagram, events 1 and 2, and the relationship between them, constitute an event graph. For example, event 1 could be the death of sports star A, and event 2 could be sports star A winning the Most Valuable Player (MVP) award. The relationship between events 1 and 2 is that both are related events to sports star A.
[0144] like Figure 2 As shown, in step S203, a query request for the event is obtained.
[0145] The query request for the event can be a search query entered by a user in a search engine, such as searching for "sports star A has passed away." Figure 1 In this context, this step corresponds to a user query.
[0146] like Figure 2 As shown, in step S204, the event graph is queried according to the keywords in the query request, and events matching the keywords are obtained from the event graph.
[0147] The step of querying the event graph based on the keywords in the query request, and obtaining the events matching the keywords from the event graph, includes:
[0148] Retrieve keywords from the query request;
[0149] The keywords in the query request are queried in the event graph to obtain events that have the same common keywords as the keywords.
[0150] like Figure 1 As shown, the first step is to identify the keywords in the user query, which are identified as K1..Ki...Kn. This can be done using the same method as the keyword identification of the natural language text in step S202, namely, using TF-IDF for identification. For example, the keywords in the user query are "sports star A" and "passed away".
[0151] like Figure 1As shown, the event graph query is then performed to identify the user's query keywords K1...Ki...Kn. Event clustering is then performed using these keywords. If all K1...Ki...Kn completely match the event keywords in a given cluster, then the event corresponding to the user's query is found. For example, if the user's query keywords "sports star A" and "deceased" completely match the event keywords "sports star A" and "deceased" in the cluster, then the event corresponding to the user's query is found.
[0152] like Figure 2 As shown, in step S205, based on the relationships between events contained in the event graph, the associated events of the matched events are recommended to the user.
[0153] The step of recommending related events of the matched events to the user based on the relationships between events contained in the event graph includes:
[0154] Based on the relationships between events contained in the event graph, candidate related events of the matched event are obtained;
[0155] The candidate related events are sorted, and the sorted results are recommended to the user.
[0156] The step of obtaining candidate associated events of the matched event based on the relationships between events contained in the event graph includes:
[0157] Obtain the keywords of the matched event;
[0158] Based on the relationships between events contained in the event graph, a query is performed in the event graph to obtain events that share common keywords with the matched events;
[0159] The event is used as a candidate associated event of the matched event.
[0160] The step of sorting the candidate related events and recommending the sorted results to the user includes:
[0161] Obtain the event popularity of candidate related events;
[0162] Based on the popularity of the candidate related events, the candidate related events are sorted, and the sorted results are recommended to the user.
[0163] The process of obtaining the event popularity of candidate related events includes:
[0164] Obtain the clustering categories corresponding to candidate association events;
[0165] From the clustering categories corresponding to the candidate associated events, obtain the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts;
[0166] The event popularity of candidate related events is obtained based on at least one of the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts.
[0167] like Figure 1 As shown, the related event recommendation includes two parts: recalling related candidate events and event ranking and recommendation. Based on event E found in step S204, events E1...Ei...En with common keywords are found using keywords K1...Ki...Kn in E. The candidate Ei are ranked based on the popularity of each Ei, and the ranked results are recommended to the user. For example, event E1 found in step 204 is the death of sports star A, and the keywords for event E1 are "sports star A" and "death". The keywords for event E2 are "sports star A" and "MVP". Events E1 and E2 share the keyword "sports star A". The keywords for event E3 are "sports star B" and "death". Events E1 and E3 share the keyword "death". Therefore, events E2 and E3 can be considered as related candidate events for event E1.
[0168] The popularity of an event is calculated using the following formula:
[0169] hot=sum(articles) / (end_time-start_time)
[0170] Where `sum(articles)` represents the number of news articles in the cluster, `end_time` represents the time of the latest news article in the cluster, and `start_time` represents the time of the earliest news article in the cluster. For example, in the cluster "Sports Star A's Death," the number of news articles is 1000, `start_time` is 10:00 AM on January 26, 2020, and `end_time` is 11:00 AM on January 26, 2020. Therefore, `hot` = 1000 / (end_time - start_time) = 1000 / 1 = 1000. Similarly, the heat value of event E2 is 900, and the heat value of event E3 is 800.
[0171] Based on event popularity, events E2 and E3 are ranked as candidate events related to event E1. For example, the ranking result after sorting by popularity from highest to lowest would be: Event E2 > Event E3. After ranking, the ranked results, namely events E2 and E3, are recommended to the user.
[0172] Using the event recommendation method provided in the first embodiment of this application, when an event breaks out, articles are clustered into events in real time. Similar events can be found quickly through events and event relationships and recommended. It is real-time in terms of speed and timeliness.
[0173] In addition, regarding recommended content, it produces event-based recommendations, suggesting similar events for users to browse, such as... Figure 3 As shown, when celebrity A passes away, multiple news articles similar to "Celebrity A retires," "Celebrity A wins his first MVP," and "Celebrity B passes away" can be recommended.
[0174] Corresponding to the event recommendation method provided in the first embodiment of this application, the second embodiment of this application also provides an event recommendation device.
[0175] like Figure 4 As shown, the event recommendation device includes:
[0176] The text acquisition unit 401 is used to acquire natural language text;
[0177] The text clustering unit 402 is used to cluster the natural language texts according to the similarity between them and to construct an event graph based on the clustering results; the event graph contains the association relationships between events.
[0178] Request retrieval unit 403 is used to obtain a query request for the event;
[0179] The event acquisition unit 404 is used to query the event graph according to the keywords in the query request, and obtain the event that matches the keywords from the event graph;
[0180] The event recommendation unit 405 is used to recommend related events of the matched event to the user based on the relationship between events contained in the event graph.
[0181] As one implementation method, the text clustering unit is specifically used for:
[0182] Based on at least one of the following: similarity between titles, similarity between paragraphs, and similarity between keywords, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0183] As one implementation method, the text clustering unit is specifically used for:
[0184] Based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, as well as the weight of each similarity in the similarity comparison, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
[0185] As one implementation method, the text clustering unit is specifically used for:
[0186] The similarity between two natural language texts is obtained by considering the similarity between their titles, paragraphs, and keywords, as well as the weight of each similarity factor in the similarity comparison.
[0187] Determine whether the similarity between two natural language texts is greater than or equal to a preset similarity threshold;
[0188] If so, the two natural language texts will be clustered into one category.
[0189] As one implementation method, the text clustering unit is specifically used for:
[0190] Extract keywords from the first natural language text within a specified cluster category from the clustering results;
[0191] Based on the keywords in the first natural language text, obtain each common keyword that appears in the first natural language text;
[0192] Based on the public keywords, determine the event corresponding to the specified cluster category;
[0193] Construct an event graph based on the events corresponding to the specified clustering categories.
[0194] As one implementation method, the text clustering unit is specifically used for:
[0195] Retrieve keywords from the query request;
[0196] The keywords in the query request are queried in the event graph to obtain events that have the same common keywords as the keywords.
[0197] As one implementation method, the event recommendation unit is specifically used for:
[0198] Based on the relationships between events contained in the event graph, candidate related events of the matched event are obtained;
[0199] The candidate related events are sorted, and the sorted results are recommended to the user.
[0200] As one implementation method, the event recommendation unit is specifically used for:
[0201] Obtain the keywords of the matched event;
[0202] Based on the relationships between events contained in the event graph, a query is performed in the event graph to obtain events that share common keywords with the matched events;
[0203] The event is used as a candidate associated event of the matched event.
[0204] As one implementation method, the event recommendation unit is specifically used for:
[0205] Obtain the event popularity of candidate related events;
[0206] Based on the popularity of the candidate related events, the candidate related events are sorted, and the sorted results are recommended to the user.
[0207] As one implementation method, the event recommendation unit is specifically used for:
[0208] Obtain the clustering categories corresponding to candidate association events;
[0209] From the clustering categories corresponding to the candidate associated events, obtain the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts;
[0210] The event popularity of candidate related events is obtained based on at least one of the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts.
[0211] It should be noted that for a detailed description of the event recommendation device provided in the second embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0212] Corresponding to the event recommendation method provided in the first embodiment of this application, the third embodiment of this application provides an electronic device, including:
[0213] Processor; and
[0214] The memory stores the program for the event recommendation method. After the device is powered on and the program for the event recommendation method is run by the processor, the following steps are performed:
[0215] Obtain natural language text;
[0216] Based on the similarity between the natural language texts, the natural language texts are clustered, and an event graph is constructed based on the clustering results; the event graph contains the association relationships between events;
[0217] Obtain the query request for the event;
[0218] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0219] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0220] It should be noted that for a detailed description of the electronic device provided in the third embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0221] Corresponding to the event recommendation method provided in the first embodiment of this application, the fourth embodiment of this application provides a storage device storing a program for the event recommendation method. This program is executed by a processor to perform the following steps:
[0222] Obtain natural language text;
[0223] Based on the similarity between the natural language texts, the natural language texts are clustered, and an event graph is constructed based on the clustering results; the event graph contains the association relationships between events;
[0224] Obtain the query request for the event;
[0225] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0226] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0227] It should be noted that for a detailed description of the storage device provided in the fourth embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0228] The fifth embodiment of this application provides an event recommendation method, including:
[0229] Retrieve news web pages from the Internet;
[0230] Based on the similarity between the news web pages, the news web pages are clustered, and an event graph is constructed based on the clustering results; the event graph contains the relationships between events;
[0231] Obtain the query request for the event;
[0232] The event graph is queried based on the keywords in the query request, and events matching the keywords are obtained from the event graph;
[0233] Based on the relationships between events contained in the event graph, related events of the matched events are recommended to the user.
[0234] It should be noted that for a detailed description of the event recommendation method provided in the fifth embodiment of this application, please refer to the relevant description of the first embodiment of this application, which will not be repeated here.
[0235] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0236] In a typical configuration, a computing device includes one or more processors (CPUs), memory-mapped input / output interfaces, network interfaces, and memory.
[0237] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0238] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0239] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. An event recommendation method, characterized by, include: Acquiring natural language text, including: acquiring news articles related to an internet event when it occurs; Based on the similarity between the natural language texts, the natural language texts are clustered to obtain multiple cluster categories. For each cluster category, corresponding events are obtained, including internet events. An event graph is constructed using the events corresponding to the specified cluster categories. The event graph contains the associations between the internet events and other events in the events corresponding to the specified cluster categories. The step of obtaining corresponding events for each cluster category and constructing an event graph using the events corresponding to the specified cluster categories includes: obtaining keywords from the first natural language texts in the specified cluster categories from the clustering results; obtaining common keywords that appear in every first natural language text based on the keywords in the first natural language texts; determining the events corresponding to the specified cluster categories based on the common keywords; and constructing an event graph based on the events corresponding to the specified cluster categories. Obtain the query request for the event; The event graph is queried according to the keywords in the query request, and the events that match the keywords are obtained from the event graph, wherein the events that match the keywords are the Internet events; Based on the relationships between events contained in the event graph, related events of events matching the keywords are recommended to the user.
2. The method of claim 1, wherein, The step of clustering the natural language texts based on their similarity and constructing an event graph based on the clustering results includes: Based on at least one of the following: similarity between titles, similarity between paragraphs, and similarity between keywords, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
3. The method of claim 2, wherein, The step of clustering the natural language texts based on at least one of the following: similarity between titles, paragraphs, and keywords, and constructing an event graph based on the clustering results, includes: Based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, as well as the weight of each similarity in the similarity comparison, the natural language texts are clustered, and an event graph is constructed based on the clustering results.
4. The method according to claim 3, characterized in that, The clustering of the natural language texts based on the similarity between the titles, paragraphs, and keywords of any two natural language texts, and the weight of each similarity in the similarity comparison, includes: The similarity between two natural language texts is obtained by considering the similarity between their titles, paragraphs, and keywords, as well as the weight of each similarity factor in the similarity comparison. Determine whether the similarity between two natural language texts is greater than or equal to a preset similarity threshold; If so, the two natural language texts will be clustered into one category.
5. The method according to claim 1, characterized in that, The step of querying the event graph based on the keywords in the query request, and obtaining the events matching the keywords from the event graph, includes: Retrieve keywords from the query request; The keywords in the query request are queried in the event graph to obtain events that have the same common keywords as the keywords.
6. The method according to claim 1, characterized in that, The step of recommending related events of events matching the keywords to the user based on the relationships between events contained in the event graph includes: Based on the relationships between events contained in the event graph, candidate related events of the matched event are obtained; The candidate related events are sorted, and the sorted results are recommended to the user.
7. The method according to claim 6, characterized in that, The step of obtaining candidate associated events of the matched event based on the relationships between events contained in the event graph includes: Obtain the keywords of the matched event; Based on the relationships between events contained in the event graph, a query is performed in the event graph to obtain events that share common keywords with the matched events; The event is used as a candidate associated event of the matched event.
8. The method according to claim 6, characterized in that, The step of sorting the candidate related events and recommending the sorted results to the user includes: Obtain the event popularity of candidate related events; Based on the popularity of the candidate related events, the candidate related events are sorted, and the sorted results are recommended to the user.
9. The method according to claim 8, characterized in that, The process of obtaining the event popularity of candidate related events includes: Obtain the clustering categories corresponding to candidate association events; From the clustering categories corresponding to the candidate associated events, obtain the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts; The event popularity of candidate related events is obtained based on at least one of the number of natural language texts, the earliest occurrence time of the natural language texts, and the latest occurrence time of the natural language texts.
10. An event recommendation device, characterized in that, include: The text acquisition unit is used to acquire natural language text, including: acquiring relevant news articles about an internet event when it breaks out; A text clustering unit is used to cluster natural language texts based on the similarity between them, obtaining multiple cluster categories. For each cluster category, corresponding events are obtained, including internet events. An event graph is constructed using the events corresponding to the specified cluster categories. The event graph contains the associations between the internet events and other corresponding events in the events corresponding to the specified cluster categories. The step of obtaining corresponding events for each cluster category and constructing an event graph using the events corresponding to the specified cluster categories includes: obtaining keywords from the first natural language texts in the specified cluster categories from the clustering results; obtaining common keywords that appear in every first natural language text based on the keywords in the first natural language texts; determining the events corresponding to the specified cluster categories based on the common keywords; and constructing an event graph based on the events corresponding to the specified cluster categories. The request retrieval unit is used to obtain query requests for an event; An event acquisition unit is configured to query the event graph based on the keywords in the query request, and obtain events that match the keywords from the event graph, wherein the events that match the keywords are the Internet events; The event recommendation unit is used to recommend related events of events that match the keywords to the user based on the relationships between events contained in the event graph.
11. An electronic device, characterized in that, include: processor; as well as The memory stores the program for the event recommendation method. After the device is powered on and the program for the event recommendation method is run by the processor, the following steps are performed: Acquiring natural language text, including: acquiring news articles related to an internet event when it occurs; Based on the similarity between the natural language texts, the natural language texts are clustered to obtain multiple cluster categories. For each cluster category, corresponding events are obtained, including internet events. An event graph is constructed using the events corresponding to the specified cluster categories. The event graph contains the associations between the internet events and other corresponding events in the events corresponding to the specified cluster categories. The step of obtaining corresponding events for each cluster category and constructing an event graph using the events corresponding to the specified cluster categories includes: obtaining keywords from the first natural language texts in the specified cluster categories from the clustering results; obtaining common keywords that appear in every first natural language text based on the keywords in the first natural language texts; determining the events corresponding to the specified cluster categories based on the common keywords; and constructing an event graph based on the events corresponding to the specified cluster categories. Obtain the query request for the event; The event graph is queried according to the keywords in the query request, and the events that match the keywords are obtained from the event graph, wherein the events that match the keywords are the Internet events; Based on the relationships between events contained in the event graph, related events of events matching the keywords are recommended to the user.
12. A storage device, characterized in that, A program that stores event recommendation methods is executed by the processor, performing the following steps: Acquiring natural language text, including: acquiring news articles related to an internet event when it occurs; Based on the similarity between the natural language texts, the natural language texts are clustered to obtain multiple cluster categories. For each cluster category, corresponding events are obtained, including internet events. An event graph is constructed using the events corresponding to the specified cluster categories. The event graph contains the associations between the internet events and other corresponding events in the events corresponding to the specified cluster categories. The step of obtaining corresponding events for each cluster category and constructing an event graph using the events corresponding to the specified cluster categories includes: obtaining keywords from the first natural language texts in the specified cluster categories from the clustering results; obtaining common keywords that appear in every first natural language text based on the keywords in the first natural language texts; determining the events corresponding to the specified cluster categories based on the common keywords; and constructing an event graph based on the events corresponding to the specified cluster categories. Obtain the query request for the event; The event graph is queried according to the keywords in the query request, and the events that match the keywords are obtained from the event graph, wherein the events that match the keywords are the Internet events; Based on the relationships between events contained in the event graph, related events of events matching the keywords are recommended to the user.
13. An event recommendation method, characterized in that, include: Retrieving news web pages from the Internet, including: retrieving relevant news articles about an Internet event when it breaks out; Based on the similarity between the news web pages, the news web pages are clustered to obtain multiple cluster categories. For each cluster category, corresponding events are obtained, including internet events. An event graph is constructed using the events corresponding to the specified cluster categories. The event graph contains the associations between the internet events and other corresponding events in the events corresponding to the specified cluster categories. The step of obtaining corresponding events for each cluster category and constructing an event graph using the events corresponding to the specified cluster categories includes: obtaining keywords for each news article in the specified cluster category from the clustering results; obtaining common keywords that appear in each news article based on the keywords; determining the events corresponding to the specified cluster category based on the common keywords; and constructing an event graph based on the events corresponding to the specified cluster categories. Obtain the query request for the event; The event graph is queried according to the keywords in the query request, and the events that match the keywords are obtained from the event graph, wherein the events that match the keywords are the Internet events; Based on the relationships between events contained in the event graph, related events of events matching the keywords are recommended to the user.
Citation Information
Patent Citations
Text semantic relativity based network public opinion information analysis method
CN103544255A
Real-time related event news recommending method and system
CN106202563A
Event searching method and device and electronic equipment
CN111414531A