Conversation recommendation dataset construction method and device based on endpoint-based topic guidance

By constructing a knowledge graph and generating topic chains using the shortest path, the problem of topic selection in existing conversation recommendation datasets not conforming to semantic logic is solved, the accuracy and continuity of the conversation recommendation system are achieved, and the capabilities of the conversation recommendation system are improved.

CN116483958BActive Publication Date: 2025-10-03NANJING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310300115.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-26
Publication Date
2025-10-03
Estimated Expiration
2043-03-26

AI Technical Summary

Technical Problem

Existing conversation recommendation datasets fail to effectively utilize information such as timestamps, ratings, and comments when constructing them, resulting in the conversation recommendation system being unable to accurately reflect changes in user preferences. In addition, the topic selection in multi-round conversations does not conform to semantic logic, affecting the authenticity and continuity of the conversation.

Method used

A method based on endpoint-based topic guidance is adopted. By constructing a knowledge graph, graph embedding models and clustering analysis are used to analyze user preferences, generate topic chains, and walk the shortest path on the knowledge graph to generate topic chains to guide conversations. Taking into account the random variability of users, timestamps and rating information are used to improve the accuracy of the conversation recommendation system.

Benefits of technology

It achieves the continuity and smoothness of topics in the dialogue recommendation system, can more accurately predict changes in user preferences, improve the capabilities of the dialogue recommendation system, and the generated data set is more consistent with user behavior logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483958B_ABST
    Figure CN116483958B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for constructing a conversation recommendation dataset based on endpoint-based topic guidance. The method comprises: collecting user, movie, and corresponding celebrity information to construct a knowledge graph; constructing a network relationship dataset based on the knowledge graph information, and using a graph embedding model to train an embedded representation of each node in the knowledge graph; using a clustering method to divide the embedded representation into multiple classes, obtaining multiple preference information for each user as the user's different points of interest; projecting the user's different points of interest into the knowledge graph and setting them as endpoints, generating a knowledge graph containing different regions for each user based on the endpoints, and obtaining the shortest path from each point to the subgraph endpoint in each subgraph; generating different types of topic chains based on the shortest paths, and composing conversations based on the topic chains and conversation auxiliary information. The present invention considers the randomness and variability of user conversations and adopts a multi-endpoint method to guide the topic direction, making the simulated conversation more realistic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence dialogue recommendation, and specifically to a method and device for constructing a dialogue recommendation dataset based on endpoint-type topic guidance. Background Art

[0002] A conversational recommendation system captures users' dynamic preferences through conversations and takes actions based on their current needs through real-time, multi-round interactions. Traditional recommendation systems typically rely on historical user behavior, such as click history and query history. Conversational recommendation systems, on the other hand, engage in direct conversations with users, asking a variety of questions to gain a deeper, more targeted understanding of them in real time.

[0003] As we all know, deep learning models are designed around specific types of data sets. Each data set has its own characteristics and corresponding models, so different data sets will allow researchers to find different entry points for research.

[0004] Since the concept of conversational recommendation system was proposed, many types of conversational recommendation datasets have emerged.

[0005] The first paper, “Towards deep conversational recommendations.” (see reference [1] “LiR, Ebrahimi Kahou S, Schulz H, et al. Towards deep conversational recommendations [J]. Advances in neural information processing systems, 2018, 31”) is the pioneering work of the conversational recommendation system and the first real conversational recommendation dataset, which only includes the conversation part and the movie entities mentioned in the conversation. The second paper, “Towards Conversational Recommendation over Multi-Type Dialogs.” (see reference [2] “Zeming Liu, Haifeng Wang, Zheng-Yu Niu, Hua Wu, Wanxiang Che, and Ting Liu. Towards conversational recommendation over multi-type dialogs. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguist”) proposed a multi-type and multi-domain conversational recommendation dataset, which also includes some user profile information such as age, gender, and preferences. Paper 3, “Towards Topic-GuidedConversational Recommender System.” (see reference [3] “Kun Zhou, Yuanhang Zhou, Wayne Xin Zhao, Xiaoke Wang, and Ji-Rong Wen. 2020b. Towards topic-guided conversational recommender system. In Proceedings of the 28th International Conference on Computational Linguistics”) proposes a topic-guided conversation recommendation dataset, where each sentence has a corresponding topic.

[0006] Existing conversational recommendation datasets have the following drawbacks: they don't utilize information like timestamps, ratings, and reviews when constructing them. For example, buying a computer last year and buying a computer yesterday have the same impact on the current recommendation of buying a mouse, which is seriously inconsistent with reality. Secondly, the topic selection for each sentence in a multi-round conversation is based on the shortest hop path obtained using the DFS algorithm in concept-net. However, the shortest hop count does not necessarily indicate the closest semantics or product type. Due to the random and variable nature of user interests, there may be a sense of significant shifts in semantics. Summary of the Invention

[0007] Purpose of the invention: The present invention proposes a method and device for constructing a conversation recommendation dataset based on endpoint-based topic guidance. By applying timestamp information to the conversation recommendation system, the capabilities of the conversation recommendation system can be improved from more perspectives. In the process of guiding topics, the random variability of users is fully considered, and a multi-endpoint method is used to guide the topic direction, making the simulated conversation more realistic.

[0008] Technical solution: In order to achieve the above purpose, the present invention adopts the following technical solution:

[0009] In the first aspect, a method for constructing a conversation recommendation dataset based on endpoint-based topic guidance includes the following steps:

[0010] Step 1: Collect user information, movie information, and corresponding celebrity information, filter them, convert them into triples, and build a knowledge graph.

[0011] Step 2: Construct a network relationship dataset based on the knowledge graph information, and use the graph embedding model to train the dataset to obtain the embedded representation of each node in the knowledge graph;

[0012] Step 3: Using a clustering method to divide the embedded representation into multiple classes, obtaining multiple preference information of each user as different points of interest of the user;

[0013] Step 4: Project the user's different points of interest into the knowledge graph and set them as endpoints. Based on the endpoints, a knowledge graph containing different regions is generated for each user. The edges and nodes belonging to the same region in the knowledge graph form a subgraph of corresponding preferences, and in each subgraph, the shortest path from each point to the subgraph endpoint is obtained.

[0014] Step 5: Generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue. The following principles are met when generating the topic chains: the topic transfer direction of the dialogue is unified to the end point of the current area, and moves one step forward in the knowledge graph towards the end point.

[0015] Preferably, in step 2, the Trans-E model is used to obtain the embedded representation of each node in the knowledge graph.

[0016] Preferably, in step 3, each user is regarded as a piece of data, the user's movie viewing records are aggregated, the embedding representation corresponding to each movie is found, and the embedding representation of the user's movie viewing is divided into multiple categories using a hierarchical clustering method, and the number of samples in each subclass after clustering is not less than 5.

[0017] Preferably, an attraction function is used to determine the user's preference. The attraction function follows the following principles: the more movies in a category, the higher the attraction; the closer the viewing time of the movies in the category is to the current time, the higher the attraction; the higher the user rating of the movies in the category, the higher the attraction. The attraction function is expressed as follows:

[0018]

[0019] N m The number of clusters representing user preferences; t j Indicates the interval between the movie viewing date and the current time; r j represents the user rating of the movie; f(x) represents the density function of the standard normal distribution.

[0020] Preferably, in step 4, generating a subgraph includes: traversing each node of the knowledge graph, calculating the distance from the point to each user's preference center point using Euclidean distance, selecting the preference class with the shortest distance as the node's affiliation, and after traversing all points, restoring the edges of the knowledge graph. At this time, a user-specific regional knowledge graph is obtained, and the edges and nodes belonging to the same region in the knowledge graph constitute the subgraph of the corresponding preference.

[0021] Preferably, in step 4, obtaining the shortest path from each point to the end point of the subgraph in each subgraph includes: taking the situation in which two nodes of a triple in the knowledge graph corresponding to the user belong to different subgraphs as bridge triples, finding all bridge triples, calculating the distance between adjacent nodes in each subgraph using Euclidean distance, using the distance as the weight of the corresponding edge, traversing all nodes of the subgraph, and using the Bellman-Ford algorithm to obtain the shortest path to the node of the movie to be recommended in that category.

[0022] Preferably, the method further includes: in step 5, the conversation includes a single-category conversation in which the entire topic is within a subgraph, a two-category conversation in which the topic switches from one subgraph to another subgraph during the entire conversation, and a three-category conversation in which the topic switches from one subgraph to another subgraph twice during the entire conversation, and generating different types of topic chains based on the shortest path includes:

[0023] Single-category multi-round dialogue production: Based on the preference value of each preference, the selected preference is extracted in a probabilistic manner. All shortest paths in the subgraph are traversed, and paths with a length greater than 5 and less than 8 are selected. The scoring function is used to obtain the score of each path, and the path with the highest score is selected as the topic chain for the multi-round dialogue.

[0024] Dual-category multi-round dialogue production: Based on the preference value of each preference, two selected preferences are probabilistically extracted. All shortest paths in the first subgraph are traversed to find paths containing a bridge triplet entity and with a hop count of 4 or 5 from the starting point to the bridge entity. These paths are truncated and then joined with the shortest path from the bridge entity to the end point in the second subgraph to form a topic chain. A scoring function is used to select the path with the highest score as the topic chain for the multi-round dialogue.

[0025] Three-category multi-round dialogue production: Based on the preference value of each preference, two selected preferences are extracted probabilistically. All shortest paths in the second subgraph are traversed to find the shortest path that contains both 1&2 and 2&3 bridge entities. This path is cut off at the two entities as the middle part of the topic chain. The shortest paths in the first subgraph are traversed to find a path that contains a bridge triplet entity and has a hop count of 3 or 4 from the starting point to the bridge entity. This path is then cut off and concatenated with the path just selected in the second subgraph and the shortest path from the bridge entity to the end point in the third subgraph. The path is scored using a scoring function and the path with the highest score is selected as the topic chain for the multi-round dialogue.

[0026] Among them, in two-category and three-category multi-round dialogues, the behavior of crossing from one subgraph to another through the bridge triple is completed by the user, and the last sentence of recommending a movie is completed by the recommendation system, which will reply to every sentence of the user.

[0027] In a second aspect, a device for constructing a conversation recommendation dataset based on endpoint-based topic guidance includes:

[0028] The knowledge graph construction module is used to collect user information, movie information, and corresponding celebrity information, and then convert the movie information and celebrity information into triples after screening to construct the knowledge graph;

[0029] The node embedding representation module is used to construct a network relationship dataset based on the knowledge graph information, and to obtain the embedded representation of each node in the knowledge graph by training the graph embedding model based on the dataset;

[0030] An interest point module is used to divide the embedded representation into multiple classes using a clustering method to obtain multiple preference information of each user as different interest points of the user;

[0031] The endpoint-based subgraph processing module is used to project users' different points of interest into the knowledge graph and set them as endpoints. Based on the endpoints, a knowledge graph containing different regions is generated for each user. The edges and nodes belonging to the same region in the knowledge graph form a subgraph of corresponding preferences, and in each subgraph, the shortest path from each point to the subgraph endpoint is obtained;

[0032] The dialogue writing module is used to generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue, wherein the following principles are met when generating the topic chain: the topic transfer direction of the dialogue is unified to the end point of the current area, and one step is taken towards the end point in the knowledge graph.

[0033] In a third aspect, a computer device comprises: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance as described in the first aspect of the present invention are implemented.

[0034] In a fourth aspect, a computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance as described in the first aspect of the present invention.

[0035] Beneficial effects: (1) The present invention produces a set of data sets with timestamp information, which can better explore the transfer of user preferences, more accurately predict current preferences, and improve the ability of the dialogue recommendation system. (2) In order to produce a high-quality multi-round dialogue data set, the present invention produces a set of corresponding knowledge graphs, and finally uses the weighted shortest path method to produce a logical and smooth dialogue data set. In the process of guiding the topic, the random variability of the user is fully considered, and a multi-end point method is used to guide the topic direction, making the simulated dialogue more realistic. (3) In the multi-round dialogue, the topic of each sentence of the present invention is obtained by walking on the knowledge graph, which ensures the continuity of the topic and the smoothness of the dialogue. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flow chart of the data set construction method of the present invention;

[0037] Figure 2 is a diagram showing an example of a result after the clustering process in an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram of creating a dual-category topic chain in an embodiment of the present invention;

[0039] Figure 4This is a schematic diagram of creating three-category topic chains in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The technical solution of the present invention is further described below with reference to the accompanying drawings.

[0041] Reference Figure 1 The method for constructing a conversation recommendation dataset based on endpoint-based topic guidance of the present invention comprises the following steps:

[0042] Step 1: Collect user information, movie information, and corresponding celebrity information. After filtering, convert the movie and celebrity information into triplets to construct a knowledge graph. Triplet information includes a head node, a relationship, and a tail node. For example, (Actor Z, starring, Kung Fu) and (Dying to Survive, rating, 9.0) The head and tail nodes in a triplet correspond to nodes in the knowledge graph, and the relationship represents an edge in the knowledge graph.

[0043] In one embodiment, all raw data is collected from Douban, including user information, movie information, and celebrity information. To improve data quality, the knowledge graph is constructed using a selection of data based on specific rules, not all of which is used. This information is then incorporated into the graph, along with user-defined movie tags, celebrity relationships, and collaborative partnerships.

[0044] The celebrity information mentioned in this article may also be referred to as celebrity information or cast and crew information, that is, information about relevant cast and crew including actors, directors, screenwriters, voice actors, etc.

[0045] In this embodiment of the present invention, the collected user information includes viewing history, timestamps, user ratings, user tags, and comments. Over 30,000 users were collected, but this included a significant number of unusual users, such as those with empty viewing lists or those who had viewed thousands of movies in a short period. Ultimately, after filtering out these errors, 2,693 users were selected.

[0046] Movie information includes the movie's public rating, genre, director, screenwriter, actors, country, release date, awards, and movie reviews. There are a total of 15,496 movies, and 5,433 were selected for dataset compilation after popularity screening. The popularity screening method is to collect all the user's viewing records, count the number of times all movies have been viewed, and then sort them. total =Count m1 +Count m2 +…+Count mn Count represents the number of views, m1 represents the first movie (also the movie with the least number of viewers), and n represents the total number of movies. If the deletion coefficient is set to 10%, then:

[0047] Count m1 +Count m2 +…+Count mj <Count total *10%,

[0048] Count m1 +Count m2 +…+Count mj+ +Count mj+1 >Count total *10%

[0049] Then place it in m j+1 All previous movies are filtered out, and the remaining movies are finally used as a movie pool.

[0050] The dataset contains 5,943 celebrities, including their basic profiles, biographical information, representative works, awards, and partnerships. The filtering rule is that if a celebrity node in the knowledge graph has only one neighbor (Actor A, Dubbing, Zootopia), and Actor A only appears once in the entire knowledge graph, the node will be pruned. Ultimately, 2,976 celebrities were included in the dataset.

[0051] After converting the movie and celebrity information into triples, they are collected into the knowledge graph. The final statistical results are shown in Tables 1 and 2 below:

[0052] Table 1 Node data

[0053] Node Type Movie Title star Movie Type number Place Profession Number of nodes 5733 2920 31 1223 175 21 Node Type Award-winning time constellation Movie Keywords total Number of nodes 15816 8887 12 2063 36881

[0054] Table 2 Edge data

[0055] Edge Type Keywords Representative works screenwriter Main cast heat Award Winning Starring Number of edges 18369 7668 2997 14364 5733 35245 14364 Edge Type Movie Type constellation director Release Date nation Date of birth Profession Number of edges 14566 2691 2766 7862 8424 2607 8606 Edge Type Collaboration relatives place of birth score total Number of edges 1094 470 2852 5719 156397

[0056] Step 2: Build a network relationship dataset based on the knowledge graph information, and use the graph embedding model to train based on the dataset to obtain the embedded representation of each node in the knowledge graph.

[0057] In this embodiment of the present invention, the Trans-E model is used to obtain an embedded representation of each node in the knowledge graph for later use. In the process of obtaining the embedded representation of each node in the knowledge graph, the training objective is: f(h,r,t) = -||h+rt||, where h and t are nodes in the knowledge graph, and r is the relationship between the two nodes.

[0058] Step 3: Use clustering method to divide the embedding representation into multiple classes, and obtain multiple preference information of each user as different points of interest of the user, such as Figure 2 shown.

[0059] In this embodiment of the present invention, each user is treated as a piece of data. Their movie viewing history is aggregated and an embedding representation corresponding to each movie is found. Hierarchical clustering is used to divide the embedding representations of the user's movie viewings into multiple clusters. Each clustered subclass must contain at least five samples. If there are fewer than five, the class is discarded. Too few samples within a class indicates that the class does not represent the user's preferences.

[0060] Considering that each user has multiple preferences, each of which may be activated during a conversation, for example, Xiao Ming likes science fiction, horror, and comedy movies. Having learned about quantum mechanics in class yesterday, he decided to find a science fiction movie tonight. Today, feeling depressed, he wants to find a comedy to relax. Therefore, we can assign a movie recommendation to each preference (category). The specific method is as follows: Based on the embedding representation, find the center point of each category. Then, traverse all movie nodes and find the movie node closest to the center point of that category that does not appear in the user's viewing history. This movie is then assigned as a recommendation for that category. Here, we assign a recommended movie to each category to be used as a recommendation in different subsequent conversation scenarios. Specifically, this is used as the terminal node in the thread chain created below.

[0061] Users may have many preferences, but each preference has a different degree of influence on the current situation. Therefore, this paper designs an attraction function to measure the current attraction of each preference. This function follows the following principles: the more movies in a category, the higher the attraction; the closer the movies in the category are watched to the current time, the higher the attraction; and the higher the user ratings of the movies in the category, the higher the attraction. This function is used to calculate the top five categories with the highest attraction values ​​for each user as the user's five preferences.

[0062]

[0063] N m The number of clusters representing user preferences; t j Indicates the interval between the movie viewing date and the current time; r j represents the user rating of the movie; f(x) represents the density function of the standard normal distribution.

[0064] Step 4: Project the user's different points of interest into the knowledge graph and set them as the end point. Generate a knowledge graph containing different areas for each user based on the end point. The edges and nodes belonging to the same area in the knowledge graph constitute the corresponding preference subgraph, and obtain the shortest path from each point to the end point of the subgraph in each subgraph.

[0065] The purpose of creating a subgraph is to define a region for each user's preference within the entire knowledge graph. The specific method for constructing a subgraph is as follows: traverse each node in the knowledge graph, calculate the distance from that point to the user's five preference centers using Euclidean distance, and select the preference category with the shortest distance as the node's affiliation. After traversing all points, restore the edges of the knowledge graph. At this point, a specific region of the knowledge graph has been created for each user. The edges and nodes in the knowledge graph belonging to the same region constitute the subgraph for that preference.

[0066] Use Euclidean distance to calculate the distance between adjacent nodes in each subgraph and use this distance as the weight of the corresponding edge. Traverse all nodes in the subgraph and use the Bellman-Ford algorithm to obtain the shortest path from all points in the subgraph to the node to be recommended for subsequent use.

[0067] The present invention defines a concept based on the subgraph, the bridge triple: in the knowledge graph corresponding to the user, the two nodes of the triple (node ​​1, relationship 1, node 2) belong to different subgraphs, which is a bridge triple. Using bridge triples to simulate the user's behavior of crossing between different preferences not only reflects the user's variability, but also satisfies the fluency of the conversation. For example, the topic of the conversation with the user has always been a topic related to "Actor C", but the user suddenly talked about "horror" movies during the conversation. This depends on the bridge triple (actor C, starring, Shinjuku incident) as a springboard to simulate the occurrence of such events. It is necessary to find all bridge triples. For example Figure 3 As shown in Figure 2, Bridge entity pairs represent bridge triples.

[0068] Step 5: Generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue. The following principles are met when generating the topic chains: the topic transfer direction of the dialogue is unified to the end point of the current area, and moves one step forward in the knowledge graph towards the end point.

[0069] Because guided conversations are completed in multiple rounds, due to user uncertainty, there will inevitably be situations where the user switches between several different preferences. For example, Xiao Ming likes three types of movies: science fiction, horror, and comedy. However, after several rounds of conversation, the topic may change from the original science fiction to comedy. Therefore, the present invention designs single-category conversations, double-category conversations, and triple-category conversations. Single-category means that the entire topic appears in one subgraph (one preference). Double-category means that as the conversation progresses, the topic switches from one subgraph to another. Triple-category means that the topic switches from one subgraph to another twice in the entire conversation.

[0070] First, define the scoring function:

[0071]

[0072] N c Indicates the length of the clue chain, dist i,i+1 Indicates the Euclidean distance between adjacent topics in the knowledge graph embedding. In this invention, clue chain and topic chain are the same concept and can be used interchangeably.

[0073] Create a single-category, multi-turn conversation. Using the preference values ​​for each preference obtained in step 3, extract the selected preference probabilistically. Traverse all shortest paths in the subgraph, select paths with a length greater than 5 and less than 8, and use a scoring function to calculate the score for each path. The path with the highest score is selected as the thread chain for the multi-turn conversation. As a preferred implementation, the probabilistic extraction method extracts a preference probabilistically based on the attractiveness score of each preference.

[0074] Production of dual-category multi-turn dialogue. Using the preference value of each preference obtained in step 3, two selected preferences are extracted in a probabilistic manner. Traverse all the shortest paths in the first subgraph, find the path containing the bridge triple entity and the number of hops from the starting point to the bridge entity is equal to 4 or 5, and truncate it. Then, use the shortest path from the bridge entity to the end point in the second subgraph to splice it together to form a clue chain, such as Figure 3 As shown in the figure, the scoring function is used to select the path with the highest score as the clue chain for multi-round dialogue.

[0075] Production of three-category multi-round dialogue. Using the preference value of each preference obtained in step 3, three selected preferences are extracted in a probabilistic form (Note: Category 1 and Category 3 can be the same). Traverse all the shortest paths of the second subgraph, find the shortest path that contains both 1&2 (i.e., the bridge entity between the first subgraph and the second subgraph) and 2&3 (i.e., the bridge entity between the second subgraph and the third subgraph) bridge entities, and cut it off at the two entities as the middle part of the clue chain, traverse the shortest paths in the first subgraph, find the path that contains the bridge triple entity and the number of hops from the starting point to the bridge entity is equal to 3 or 4, cut it off, and then splice it with the path just selected in the second subgraph, and splice it with the shortest path from the bridge entity to the end point in the third subgraph, such as Figure 4 As shown in Figure 2, a scoring function is used to obtain the score of the path, and the path with the highest score is selected as the clue chain for multi-round dialogue.

[0076] The present invention sets roles for topic chains. In two-category and three-category multi-round conversations, it is stipulated that the behavior of crossing from one subgraph to another subgraph through a bridge triplet must be completed by the user, because this is in line with the user's randomness and polygons. The system role will only guide the conversation to the end point of the current subgraph, and the last sentence of recommending a movie must be completed by the system, and the system will reply to every sentence of the user.

[0077] Next, we simulate a movie recommendation dialogue scenario and write an interactive dialogue between the user and the system. The user's goal is to select their favorite movie based on multiple rounds of dialogue. The system's goal is to guide the conversation to the recommended movie based on the user's feedback. To create a cohesive and smooth dialogue, this embodiment of the present invention implements a front-end and integrates several auxiliary modules to provide dialogue-related information to aid in dialogue writing.

[0078] Auxiliary module 1, keyword search module, displays the search results of the previous topic and the current topic on the Microsoft search engine Bing website within the web page. This allows writers to quickly find relevant information even in unfamiliar situations, greatly improving writing efficiency.

[0079] Auxiliary module 2, information module. If the current topic is a movie or a person, the writing page will display the corresponding information for the writer to understand.

[0080] Auxiliary module 3, knowledge module, in order to make the written sentences have certain relevant knowledge, the writing web page integrates the knowledge graph. This module will display the relevant triples of the previous topic and the current topic as well as their common neighbors for the use of the writer.

[0081] Auxiliary module 4, related sentence module, if the current topic is a movie, it will display the movie's reviews. If the current topic is a person, it will display the person's background information.

[0082] As an optional implementation, the method of the present invention also improves the capability of the dialogue recommendation system by evaluating the dialogue quality, and defines two evaluation scores:

[0083] Evaluation method 1, topic transition score: Because a conversation topic chain is composed of a series of nodes in the knowledge graph, the topics of two consecutive sentences are adjacent on the knowledge graph, so there is a triple (topic 1, relationship 1, topic 2) between the topics. Here, the current sentence must include the current topic 2 and, if possible, the previous topic 1 and relationship 1. Each included element is scored one point. If the score is 0, the conversation is rewritten. This ensures smooth flow and interpretability between sentences.

[0084] Evaluation method 2, keyword score: In order to make the central word of each sentence stand out, the evaluator will read each sentence to see whether the central word he thinks matches the actual central word. If it matches, 1 point will be given, and if it does not match, 0 point will be given.

[0085] The final average score for topic transition was 2.64, and the average score for keywords was 0.88. The final conversation dataset is shown in Table 3 below:

[0086] Table 3 Constructed dialogue dataset

[0087] Number of users 2693 Average number of words in a sentence 44.94 Number of movies 5733 Average number of recommended sentences per conversation 1.44 Number of conversations 5520 Average number of movies watched per user 31.17 Number of sentences 51919

[0088] To produce a high-quality multi-round conversation dataset, the present invention creates a corresponding knowledge graph and ultimately employs a weighted shortest path approach to create a coherent and smooth conversation dataset. The topic guidance process fully considers the random variability of users, employing a multi-endpoint approach to guide the topic, making the simulated conversations more realistic. The present invention's method for constructing a conversation recommendation dataset can produce a dataset with timestamp information, enabling better exploration of user preference shifts, more accurately predicting current preferences, and improving the capabilities of the conversation recommendation system. Furthermore, in multi-round conversations, the present invention obtains the topic of each sentence by navigating the knowledge graph, ensuring topic continuity and conversational fluency.

[0089] The present invention also provides a device for constructing a conversation recommendation dataset based on endpoint-based topic guidance, comprising:

[0090] The knowledge graph construction module is used to collect user information, movie information, and corresponding celebrity information, and then convert the movie information and celebrity information into triples after screening to construct the knowledge graph;

[0091] The node embedding representation module is used to construct a network relationship dataset based on the knowledge graph information, and to obtain the embedded representation of each node in the knowledge graph by training the graph embedding model based on the dataset;

[0092] An interest point module is used to divide the embedded representation into multiple classes using a clustering method to obtain multiple preference information of each user as different interest points of the user;

[0093] The endpoint-based subgraph processing module is used to project users' different points of interest into the knowledge graph and set them as endpoints. Based on the endpoints, a knowledge graph containing different regions is generated for each user. The edges and nodes belonging to the same region in the knowledge graph form a subgraph of corresponding preferences, and in each subgraph, the shortest path from each point to the subgraph endpoint is obtained;

[0094] The dialogue writing module is used to generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue, wherein the following principles are met when generating the topic chain: the topic transfer direction of the dialogue is unified to the end point of the current area, and one step is taken towards the end point in the knowledge graph.

[0095] It should be understood that the conversation recommendation dataset construction device based on endpoint-based topic guidance in the embodiment of the present invention can implement all the technical solutions in the above-mentioned method embodiment, and the functions of its various functional modules can be specifically implemented according to the method in the above-mentioned method embodiment. The specific implementation process can refer to the relevant description in the above-mentioned embodiment, and will not be repeated here.

[0096] The present invention also provides a computer device comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance as described above are implemented.

[0097] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance as described above.

[0098] It will be understood by those skilled in the art that all or part of the steps to implement the above embodiments may be accomplished by hardware or by a program to instruct the relevant hardware to accomplish the steps, and the program may be stored in a computer-readable storage medium. In the context of the present invention, the computer-readable medium may be considered to be tangible and non-transitory. Non-limiting examples of non-transitory tangible computer-readable media include non-volatile memory circuits (e.g., flash memory circuits, erasable programmable read-only memory circuits, or mask read-only memory circuits), volatile memory circuits (e.g., static random access memory circuits or dynamic random access memory circuits), magnetic storage media (e.g., analog or digital tapes or hard disk drives), and optical storage media (e.g., CDs, DVDs, or Blu-ray discs), etc.

[0099] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0100] In addition, although adopting specific order to describe each operation, this should be understood as requiring such operation to be carried out in the specific order shown or in sequential order, or requiring all illustrated operations to be carried out to obtain desired result.Under certain environment, multitasking and parallel processing may be advantageous.Similarly, although comprising some specific implementation details in the above discussion, these should not be construed as limiting the scope of the present invention.Some features described in the context of independent embodiment can also be realized in single realization in combination.On the contrary, the various features described in the context of independent realization also can be realized in multiple realizations individually or in the mode of any suitable subcombination.

[0101] The preferred embodiments of the present invention are described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the scope of protection of the present invention.

Claims

1. A method for constructing a conversation recommendation dataset based on endpoint-based topic guidance, characterized in that: The following steps are involved: Step 1: Collect user information, movie information, and corresponding celebrity information, filter them, convert them into triples, and build a knowledge graph. Step 2: Construct a network relationship dataset based on the knowledge graph information, and use the graph embedding model to train the dataset to obtain the embedded representation of each node in the knowledge graph; Step 3: Use a clustering method to divide the embedded representation into multiple classes, and obtain multiple preference information of each user as different points of interest of the user; wherein, an attraction function is used to determine the user's preference, and the attraction function follows the following principles: the more movies in a category, the higher the attraction; the closer the viewing time of the movies in the category is to the current time, the higher the attraction; the higher the user rating of the movies in the category, the higher the attraction. The attraction function is expressed as follows: N m The number of clusters representing user preferences; t j Indicates the interval between the movie viewing date and the current time; r j represents the user rating of the movie; f(x) represents the density function of the standard normal distribution; Step 4: Project the user's different points of interest into the knowledge graph and set them as endpoints. Based on the endpoints, a knowledge graph containing different regions is generated for each user. The edges and nodes belonging to the same region in the knowledge graph constitute a subgraph of corresponding preferences, and the shortest path from each point to the subgraph endpoint is obtained in each subgraph. Obtaining the shortest path from each point to the subgraph endpoint in each subgraph includes: using the case where two nodes of a triple in the knowledge graph corresponding to the user belong to different subgraphs as bridge triples, finding all bridge triples, calculating the distance between adjacent nodes in each subgraph using Euclidean distance, using the distance as the weight of the corresponding edge, traversing all nodes in the subgraph, and using the Bellman-Ford algorithm to obtain the shortest path to the node of the movie to be recommended in that category; Step 5: Generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue. The following principles are met when generating the topic chains: the topic transfer direction of the dialogue is unified to the end point of the current area, and moves one step forward in the knowledge graph towards the end point.

2. The method according to claim 1, characterized in that In step 2, the Trans-E model is used to obtain the embedded representation of each node in the knowledge graph.

3. The method according to claim 1, characterized in that In step 3, each user is regarded as a piece of data, the user's movie viewing records are aggregated, and the embedding representation corresponding to each movie is found. The embedding representation of the user's movie viewing is divided into multiple categories using a hierarchical clustering method, and the number of samples in each subclass after clustering is no less than 5.

4. The method according to claim 1, wherein In step 4, generating a subgraph includes: traversing each node of the knowledge graph, calculating the distance from the point to each user's preference center point using Euclidean distance, selecting the preference class with the shortest distance as the node's affiliation, and after traversing all points, restoring the edges of the knowledge graph. At this time, a user-specific regional knowledge graph is obtained. The edges and nodes belonging to the same region in the knowledge graph constitute the subgraph of the corresponding preference.

5. The method according to claim 1, wherein The method also includes: in step 5, the conversation includes a single-category conversation in which the entire topic is within a subgraph, a two-category conversation in which the topic switches from one subgraph to another subgraph during the entire conversation, and a three-category conversation in which the topic switches from one subgraph to another subgraph twice during the entire conversation, and generating different types of topic chains based on the shortest path includes: Single-category multi-round dialogue production: Based on the preference value of each preference, the selected preference is extracted in a probabilistic manner. All shortest paths in the subgraph are traversed, and paths with a length greater than 5 and less than 8 are selected. The scoring function is used to obtain the score of each path, and the path with the highest score is selected as the topic chain for the multi-round dialogue. Dual-category multi-round dialogue production: Based on the preference value of each preference, two selected preferences are probabilistically extracted. All shortest paths in the first subgraph are traversed to find paths containing a bridge triplet entity and with a hop count of 4 or 5 from the starting point to the bridge triplet entity. These paths are truncated and then joined with the shortest path from the bridge triplet entity to the end point in the second subgraph to form a topic chain. A scoring function is used to select the path with the highest score as the topic chain for the multi-round dialogue. Production of three-category multi-round dialogue: Based on the preference value of each preference, two selected preferences are extracted in a probabilistic form. All shortest paths in the second subgraph are traversed to find the shortest path that contains both 1&2 and 2&3 bridge triple entities. The shortest path is cut off at the two entities as the middle part of the topic chain, where the 1&2 bridge triple entity is the bridge triple entity between the first and second subgraphs, and the 2&3 bridge triple entity is the bridge triple entity between the second and third subgraphs. The shortest paths in the first subgraph are traversed to find the path that contains the bridge triple entity and the number of hops from the starting point to the bridge triple entity is equal to 3 or 4, and the path is cut off. Then, it is spliced ​​with the path just selected in the second subgraph and with the shortest path from the bridge triple entity to the end point in the third subgraph. The scoring function is used to obtain the score of the path, and the path with the highest score is selected as the topic chain of the multi-round dialogue. Among them, in two-category and three-category multi-round dialogues, the behavior of crossing from one subgraph to another through the bridge triple is completed by the user, and the last sentence of recommending a movie is completed by the recommendation system, which will reply to every sentence of the user.

6. A device for constructing a conversation recommendation dataset based on endpoint-based topic guidance, characterized in that: include: The knowledge graph construction module is used to collect user information, movie information, and corresponding celebrity information, and then convert the movie information and celebrity information into triples after screening to construct the knowledge graph; The node embedding representation module is used to construct a network relationship dataset based on the knowledge graph information, and to obtain the embedded representation of each node in the knowledge graph by training the graph embedding model based on the dataset; The interest point module is used to divide the embedded representation into multiple categories using a clustering method, and obtain multiple preference information of each user as the user's different interest points; wherein, the user's preference is determined by an attraction function, and the attraction function follows the following principles: the more movies in a category, the higher the attraction; the closer the movie viewing time in the category is to the current time, the higher the attraction; the higher the user rating of the movie in the category, the higher the attraction. The attraction function is expressed as follows: N m The number of clusters representing user preferences; t j Indicates the interval between the movie viewing date and the current time; r j represents the user rating of the movie; f(x) represents the density function of the standard normal distribution; The end-point-based subgraph processing module is used to project the user's different points of interest into the knowledge graph and set them as end points. Based on the end points, a knowledge graph containing different regions is generated for each user. The edges and nodes belonging to the same region in the knowledge graph constitute the corresponding preference subgraph, and the shortest path from each point to the end point of the subgraph is obtained in each subgraph. The shortest path from each point to the end point of the subgraph is obtained in each subgraph. The method includes: using the case where two nodes of the triple in the knowledge graph corresponding to the user belong to different subgraphs as bridge triplets, finding all bridge triplets, calculating the distance between adjacent nodes in each subgraph using Euclidean distance, using the distance as the weight of the corresponding edge, traversing all nodes of the subgraph, and using the Bellman-Ford algorithm to obtain the shortest path to the node of the movie to be recommended in that category; The dialogue writing module is used to generate different types of topic chains based on the shortest path, and then use the obtained topic chains and dialogue auxiliary information to write the dialogue, wherein the following principles are met when generating the topic chain: the topic transfer direction of the dialogue is unified to the end point of the current area, and one step is taken towards the end point in the knowledge graph.

7. A computer device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the programs are executed by the processors, the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a conversation recommendation dataset based on endpoint-based topic guidance are implemented as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Collaborative recommendation model construction method based on knowledge graph preference propagation

    CN113158033A