A Human-Machine Conversation Interest Perception Method Based on Temporal Knowledge Graph
Through the human-computer dialogue interest perception method based on the timing knowledge graph, the problem of lack of robot background knowledge and low user interest is solved, and more natural human-computer dialogue is achieved, and users' dialogue interest and richness are enhanced.
Patent Information
- Application Number
- CN202210030263.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-01-12
AI Technical Summary
In the existing human-computer interaction system, there is a lack of background knowledge of robots and low user interest during the conversation.
The human-computer dialogue interest perception method based on the timing knowledge graph is adopted, and the user's interest seed entities are extracted from the timing knowledge graph through entity linking and preference propagation, and numerical processing is performed based on the relationship friendliness and time freshness, and the user's probability of interest in candidate replies is calculated, and the reply with the highest probability is selected as the robot's response.
It improves the naturalness of human-computer dialogue, enhances user interest, makes robot responses closer to user interests, and improves the richness and coherence of dialogue.
Smart Images

Figure CN114357141B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of human-computer interaction dialogue systems, and particularly relates to a human-computer dialogue interest perception method based on a temporal knowledge graph. Background Art
[0002] In the 21st century, the world has entered the era of mobile Internet. The development of science and technology is increasingly changing people's lifestyles, and people's communication methods have become more diversified from single face-to-face communication. Nowadays, among many communication methods, human-computer interaction has become the main way. Human-computer interaction technology is committed to improving the coordination between humans and computers, making the information exchange between humans and machines more convenient and smooth. The rapid development of information technology has enabled human-computer interaction technology to develop step by step towards a more natural direction, from single mouse clicks to multi-touch, and then to body sensing technology. With the progress of human-computer interaction technology, topics such as "Ambient Intelligence" more emphasize user-friendliness and intelligent interactivity. In order to ensure more natural intelligent interaction, it is necessary to develop safe and reliable interaction technologies to achieve more natural communication between humans and machines.
[0003] In the past few decades, many studies have been dedicated to mimicking the human-human interaction mode to build a human-computer interaction system, which is called a dialogue system (Spoken Dialogue Systems, SDSs). Currently, dialogue systems are mainly divided into task-driven restricted domain dialogue systems and open domain dialogue systems without specific tasks. The former is for completing specific tasks, and the latter, also known as chatbots, is mainly developed for pure chatting or entertainment, aiming to generate meaningful and contextually relevant responses. In recent years, with the rapid growth of social data on the Internet and the continuous improvement of deep learning technology, data-driven non-task-based open domain dialogue systems have gradually become the research focus, and non-task-based dialogue systems can be further divided into generative and retrieval-based.
[0004] The generative-based dialogue system first collects a large-scale dialogue corpus as training data and constructs an end-to-end dialogue model based on a deep neural network to learn the corresponding patterns between the input and the response. The retrieval-based dialogue system first constructs a dialogue corpus for retrieval, treats the user's input utterance as a query to the indexing system, and selects a response from it. Specifically, the retrieval-based dialogue system retrieves the dialogue library according to the input message and returns several candidate responses, and then re-ranks the candidate responses through a deep matching model between the dialogue and the response to obtain a better response. There are many retrieval-based dialogue systems in the prior art, and many methods use the user's interest or topic to re-rank the candidate responses to obtain responses related to the user's interest. Among them, a method stores the commonsense knowledge graph in an external memory module, which uses a Tri-LSTM model to encode the query, response, and commonsense respectively, and integrates the relevant commonsense into the matching model of the retrieval-based dialogue. To capture the user's interest, one method uses a topic model based on Latent Dirichlet Allocation (LDA) to obtain the user's latent interest based on the user's input content; one method extracts content words from the dialogue text as the user's interest preference information, and then represents it as a quadruple (predicate argument, entity, attribute category, topic) to depict the user's interest from different perspectives.
[0005] Human experiences such as learning, living, and working are stored in the brain as information in an associated manner, and these information can be regarded as personal background knowledge. In the actual dialogue process, in addition to basic language knowledge, both parties of the dialogue will also use background knowledge related to the dialogue content, aiming to arouse the interest of the other party in the response content so that the dialogue can continue. Although the above research results consider the two factors of external knowledge and user interest preference to a certain extent in the process of human-computer interaction, some only consider the impact of external knowledge on the accuracy of the robot's response and ignore the user's interest degree in the dialogue process, or only consider capturing the user's interest preference from the current dialogue content and ignore the rich information in the background knowledge.
[0006] In summary, there is an urgent need for a method to solve the problems of the lack of the robot's background knowledge and the low user interest degree in the current human-computer interaction system. Summary of the Invention
[0007] Aiming at the deficiencies of the prior art, the present invention proposes a method for human-computer dialogue interest perception based on a temporal knowledge graph, and the method includes: obtaining the user's input content and the robot's dialogue library data; obtaining at least two candidate responses according to the user's input content and the dialogue library data; inputting the user's input content and the candidate responses into the human-computer dialogue interest perception model based on the temporal knowledge graph to obtain the probability that the user is interested in all candidate responses, and selecting the candidate response with the highest probability as the response content of the robot;
[0008] The process of processing the user input content and candidate responses using a human-computer dialogue interest perception model based on a temporal knowledge graph includes:
[0009] S1: Entity extraction and disambiguation are performed on the user input content using entity linking in the temporal knowledge graph to obtain the user's interest seed entity set;
[0010] S2: The interest seed entities in the interest seed entity set are propagated along the relationship paths of the temporal knowledge graph to obtain the entities of the temporal knowledge graph;
[0011] S3: Numerical processing is performed on the entities of the temporal knowledge graph to obtain the sampled domain vector representation of the entities;
[0012] S4: The entity vector representation is updated according to the sampled domain vector representation of the entities to obtain the updated entity vector representation;
[0013] S5: The updated entity vector representations are aggregated to obtain the user's interest preference representation;
[0014] S6: According to the user's interest preference representation and the candidate response vector representation, a prediction function is used to obtain the probability that the user is interested in all candidate responses.
[0015] Preferably, the process of preference propagation of interest seed entities includes:
[0016] S21: Set the sampling size T, and use the first-layer interest seed entities as the first-layer entities of the temporal knowledge graph;
[0017] S22: Obtain the neighbor entity set of the current-layer interest seed entities. If the number of neighbor entities in the neighbor entity set is less than the neighbor entity number threshold, then repeat the selection of T neighbor entities in the neighbor entity set as the sampling domain. If the number of neighbor entities in the neighbor entity set is greater than the neighbor entity number threshold, then calculate the tightness between all neighbor entities in the neighbor entity set and the interest seed entities respectively;
[0018] S23: Sort the tightness between all neighbor entities in the neighbor entity set and the interest seed entities in descending order, and select the first T neighbor entities corresponding to the tightness as the sampling domain of the interest seed entities;
[0019] S24: Take the union of all sampling domains to obtain the next-layer entities of the temporal knowledge graph, use the next-layer entities as the new interest seed entities, and return to step S22 until the complete entities of the temporal knowledge graph are obtained.
[0020] Preferably, the numerical processing of entities in the temporal knowledge graph includes: calculating the relationship friendliness of the user according to the candidate response; calculating the time freshness of the user according to the forgetting curve theory; constructing a weight function according to the relationship friendliness and time freshness; and numerically processing the entities in the temporal knowledge graph according to the weight function.
[0021] Further, the formula for calculating the relationship friendliness is:
[0022]
[0023] where v represents the vector representation of the candidate response, represents the vector representation of the relationship between entities in the quadruple.
[0024] Further, the formula for calculating the time freshness is:
[0025]
[0026] where w represents the weight threshold, t represents the current time, and t s represents the time when the relationship in the quadruple was established.
[0027] Further, the weight function is:
[0028]
[0029] where α represents the weight coefficient, represents the normalized representation of the relationship friendliness, represents the normalized representation of the time freshness.
[0030] Preferably, the vector representation of the sampling domain of the entity is:
[0031]
[0032] where e i represents the vector representation of the i-th neighbor entity in the sampling domain, S(e) represents the set of sampling domain entities of the entity, and g(e i ) represents the weight function.
[0033] Preferably, the formula for updating the vector representation of the entity is:
[0034] e agg = σ(W·(e + V S(e) ) + b)
[0035] where e agg represents the updated vector representation of the entity, σ represents the non-linear function, W represents the transformation weight, e represents the vector representation of the entity before update, V S(e) represents the vector representation of the sampling domain of the entity, and b represents the bias.
[0036] Preferably, the user's interest preference is represented as:
[0037]
[0038] where represents the vector representation of the i-th interest seed entity in the innermost layer after update, and S represents the total number of interest seed entities in the innermost layer.
[0039] Preferably, the prediction function is:
[0040] y uv = f(u T v)
[0041] where y uv represents the interest score, u represents the user's interest preference, v represents the candidate response, and f represents the sigmoid function.
[0042] The beneficial effects of the present invention are as follows: The present invention first takes extracting the entity of the user's current conversation content as the starting point, and searches for multi-layer neighbor entities related to this entity in the temporal knowledge graph based on the idea of preference propagation; then assigns corresponding weights to each layer of entities according to the relationship friendliness and time freshness, and gradually fuses the entity's own information with the information of its sampling domain entities from the outside to the inside to calculate the user's interest preference; finally, according to the user's interest preference obtained by aggregating multi-layer neighbor information and the candidate response obtained by the retrieval-based conversation, uses the prediction function to calculate the probability that the user is interested in this candidate response, and selects the candidate response with the highest probability as the response of the robot; The present invention introduces the temporal knowledge graph as the background knowledge of the robot, simulates the communication process between people in real life, takes into account both the external knowledge in the human-computer interaction process and the user's interest preference, solves the problems of the lack of background knowledge of the robot and the low interest of users during the conversation in the current human-computer interaction system, makes the human-computer conversation more natural, and has broad application prospects. Description of the Drawings
[0043] Figure 1 is a schematic diagram of the framework of the human-computer conversation interest perception model based on the temporal knowledge graph in the present invention;
[0044] Figure 2 is a schematic diagram of the influence of the α weight coefficient on the indicators MRR and MAP in the present invention. Detailed Embodiments
[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0046] The present invention proposes a human-computer dialogue interest perception method based on a temporal knowledge graph. As Figure 1 shown, the method includes: obtaining user input content and robot dialogue library data; obtaining at least two candidate responses according to the user input content and the dialogue library data; inputting the user input content and the candidate responses into a human-computer dialogue interest perception model based on a temporal knowledge graph to obtain the probabilities that the user is interested in all the candidate responses, and selecting the candidate response with the highest probability as the response content of the robot;
[0047] The process of using the human-computer dialogue interest perception model based on a temporal knowledge graph to process the user input content and the candidate responses includes:
[0048] S1: Using entity linking in the temporal knowledge graph to perform entity extraction and disambiguation on the user input content to obtain the user's interest seed entity set;
[0049] S2: Propagating the interest seed entities in the interest seed entity set along the relationship paths of the temporal knowledge graph to obtain the entities of the temporal knowledge graph;
[0050] S3: Performing numerical processing on the entities of the temporal knowledge graph to obtain the sampled domain vector representation of the entities;
[0051] S4: Updating the entity vector representation according to the sampled domain vector representation of the entities to obtain the updated entity vector representation;
[0052] S5: Aggregating the updated entity vector representation to obtain the user's interest preference representation;
[0053] S6: According to the user's interest preference representation and the candidate response vector representation, using a prediction function to obtain the probabilities that the user is interested in all the candidate responses.
[0054] A preferred embodiment of the present invention is as follows:
[0055] Obtain the user input content and the data in the robot dialogue library. First, segment the user input and the questions in the dialogue library. Then, use the word2Vec and Embedding Average vector mean methods to obtain the representation vector of the user input content and the question representation vector corresponding to the question-answer in the dialogue library. After that, use the cosine similarity to calculate the confidence level (matching degree) between the user input content and the questions in the dialogue library. Set a confidence threshold, and select the answer corresponding to the question in the dialogue library as the candidate reply according to the confidence threshold.
[0056] A temporal knowledge graph is a natural extension of a static knowledge graph in the time dimension, that is, the time dimension is introduced into the original triple representation form. A temporal knowledge graph consists of quadruples (h, r, t, [τ s , τ e ), where h, t ∈ E, r ∈ R represent the head entity, the tail entity, and the relationship between them respectively. Here, E = {e1,..., e N} represents the set of entities in the graph, and N is the number of entities; R = {r1,..., r M} represents the set of relationships in the graph, and M is the number of relationships; [τ s , τ e represents the valid time period of the fact (h, r, t) in the temporal knowledge graph, τ s represents the start time of the fact, and τ e represents the end time of the fact.
[0057] A temporal knowledge graph contains a large amount of information such as entities, relationships between entities, and time sequences, providing rich information for characterizing user interests. However, for users, many entities in the graph are irrelevant to the user, and these entities will introduce noise effects when calculating user interest preferences. To filter out the computational noise caused by irrelevant entities, the present invention propagates the entities in the current conversation content layer by layer along the relationship path of the temporal knowledge graph, so that each entity involved is directly or indirectly related to the user. These outer-layer entities can be regarded as the user's potential interest preferences. For the user's current conversation content, entity extraction and disambiguation are performed on the user input content through entity linking. The specific process is as follows: First, the NLPIR-ICTCLAS Chinese word segmentation system is used to extract entities from the user input content. Entity extraction mainly obtains relevant entities from the input content, and then links the relevant entities of the input content to the entities in the given knowledge graph; the process of linking the relevant entities of the input content to the entities in the given knowledge graph includes two parts: candidate entity generation and candidate entity disambiguation; among them, candidate entity generation is to coarsely obtain potential entity candidates based on a dictionary, and candidate entity disambiguation is to calculate the similarity between the relevant entities of the input content and the candidate entities, and select the candidate entity with the highest similarity as the linked entity to complete the linking of the relevant entities of the input content and the entities in the given knowledge graph, and obtain the set of interest seed entities of the user in the knowledge graph; the set of interest seed entities of the user is expressed as:
[0058]
[0059] where G is the temporal knowledge graph, is the i-th interest seed entity in the graph.
[0060] By propagating the interest seed entities in the set of interest seed entities along the relationship path of the temporal knowledge graph, more relevant entities can be obtained. The entity set of the k-th layer is defined as:
[0061]
[0062] where H is the maximum number of propagations. Since an overly large number of layers H will dilute useful entity information during the aggregation process, preferably, H is taken as 2; after H propagations, an entity set of H + 1 layers can be obtained
[0063] In the temporal knowledge graph, the number of neighbor entities of each entity is different, which results in the size of the entity set of each layer being unknown. When k is large The number of entities may be very large. Although rich neighbor entities help to accurately characterize the user's interest preferences, too many entities will cause the model to have too much computational storage overhead and fail to converge. Therefore, in the process of preference propagation, the present invention calculates the tightness between all neighbor entities in the neighbor entity set and the interest seed entity, and samples a fixed number of entities as the next-layer entity set according to the magnitude of the tightness. Among them, the tightness of a neighbor entity is the number of common neighbor entities between a given interest seed entity and this neighbor entity. The more common neighbor entities there are, the closer the relationship between the nodes, indicating that this neighbor entity is more important.
[0064] Define N(h) = {t|(h, r, t) ∈ G} to represent the set of neighbor entities directly connected to entity h, S(h) = {t|t ∈ N(h)}, and |S(h)| = T to represent the sampling domain of entity h, which is a set of neighbor entities sampled in a fixed number; the entity set of the k-th layer can be redefined as:
[0065]
[0066] where h k-1 represents the head entity of the (k - 1)-th layer, r k represents the relationship between the entities of the k-th layer, t k represents the tail entity of the k-th layer, and S(h k-1 ) represents the sampling domain of entity h k-1 .
[0067] The specific process of preference propagation for the interest seed entity is as follows:
[0068] Set the sampling size T, and take all the interest seed entities in the first-layer interest seed entity set as the first-layer entities of the temporal knowledge graph;
[0069] For entity find its neighbor entity set If then repeatedly select T entities in as the sampling domain If then traverse each neighbor entity e in the set and find its neighbor entity set N(e), and record the tightness l(e) between the neighbor entity e and the given entity ;
[0070]
[0071] Sort the tightness between each neighbor entity in and the interest seed entity from largest to smallest, and select the top T neighbor entities corresponding to the tightness as the sampling domain of entity ;
[0072] Repeat the above process to obtain the sampling domains of each interest seed entity, which are respectively:
[0073]
[0074] Take the union of all sampling domains to obtain the second-layer entities of the sequential knowledge graph:
[0075]
[0076] Take the second-layer entities as new interest seed entities and repeat the above process to obtain the third-layer entities of the sequential knowledge graph; similarly, repeat the above process until the complete sequential knowledge graph entities are obtained.
[0077] After obtaining the entity set after H times of preference propagation, to calculate the user's interest preference, the model starts from the (H - 1)-th layer from the outside to the inside, and aggregates the entity information of this layer with its sampling domain entity information in turn to update the entity representation of this layer; according to the updated entity representation, perform the next-layer aggregation, and continuously perform the above process until the innermost layer is aggregated to obtain the updated interest seed entity of the innermost layer; after aggregating the sampling domain entity information layer by layer, the updated interest seed entity vector of the innermost layer contains its own and all the entity information of the outer layer; add up the interest seed entity vector representations that have aggregated the neighbor information of H layers to obtain the user interest preference representation; the specific process is as follows:
[0078] For each entity in the entity set of the k-th (k = H - 1, …, 1, 0) layer The present invention uses the sampling domain vector representation V S(e) to numerically represent the sampling domain entity information of entity e; the sampling domain vector representation V S(e) is the weighted linear sum of the vector representations of each neighbor entity in the sampling domain of entity e, and the formula is:
[0079]
[0080] where g(e i ) is the weight function for calculating entity e i in the sampling domain, V S(e) , e i ∈K d , d is the vector dimension, S(e) represents the set of sampling domain entities of entity e, and e i is the vector representation of entity e i , t r ) obtained based on HyTE for the quadruple (e, r, e i ).
[0081] Numerical processing of entities in the temporal knowledge graph includes: calculating the relationship friendliness of the user according to the candidate response; calculating the time freshness of the user according to the forgetting curve theory; constructing a weight function according to the relationship friendliness and time freshness; and numerically processing the entities in the temporal knowledge graph according to the weight function.
[0082] The formula for calculating the relationship friendliness is:
[0083]
[0084] where v represents the vector representation of the candidate response, represents the vector representation of the relationship between entities in the quadruple.
[0085] The formula for calculating the time freshness is:
[0086]
[0087] where w represents the weight threshold, t represents the current time, and t s represents the time when the relationship in the quadruple is established.
[0088] The weight function is:
[0089]
[0090]
[0091]
[0092] where represents the normalized representation of the relationship friendliness, represents the normalized representation of the time freshness; α is the weight coefficient for weighing the relationship friendliness and time freshness, and the value it takes affects the overall performance of the model.
[0093] Preferably, α = 0.4 is selected; the value of α is analyzed. In the simulation experiment, the initial value of the α weight coefficient is set to 0.1 and increased by 0.1 step by step until 0.9. The two information retrieval evaluation indicators of MRR (Mean Reciprocal Rank) and MAP (Mean Average Precision) are used to measure the accuracy of the ranking of the model candidate response set (n = 10) under different weight coefficients α to analyze its impact on the performance of the model; as Figure 2As shown in the figure, the overall changing trends of the MRR and MAP of the model first rise and then fall as the value of the α weight coefficient increases, and both reach their maximum values when α = 0.4. When α < 0.4, the present invention mainly takes into account the temporal freshness between entities, models the user's interest preference based on the chronological order, which ignores the importance of the relationship between entities in depicting the user's interest, and thus results in a large error in depicting the user's interest. On the contrary, when α > 0.4, the present invention mainly takes into account the importance of the relationship between entities, while ignoring the influence of the temporal information on the user's preference, thereby making the response content of the robot too single.
[0094] In each layer, the final vector representation of an entity is jointly determined by itself and its sampling domain. For the entity set of the k-th (k = H - 1, …, 1, 0) layer of entities The self-vector representation e ∈ K calculated based on HyTE d and its sampling domain vector representation V S(e) ∈ K d are aggregated through an aggregator to obtain the updated entity vector representation of this entity; the formula for updating the entity vector representation is:
[0095] e agg = σ(W · (e + V S(e) ) + b)
[0096] where, e agg represents the updated entity vector representation, σ represents a non-linear function, W represents the transformation weight, e represents the entity vector representation before update, V S(e) represents the sampling domain vector representation of the entity, and b represents the bias.
[0097] Based on the updated entity vector representation, further aggregation is performed. After H times of aggregation, the vector representation of the innermost interest seed entity integrates itself and the vector representations of its H-layer neighbor entities; according to the vector representations of all interest seed entities after update, the interest preference representation of user u relative to candidate response v can be obtained; the interest preference representation of the user is:
[0098]
[0099] where, represents the updated vector representation of the i-th interest seed entity in the innermost layer by continuously aggregating the information of the sampling domain entities from the outside to the inside, and S represents the total number of interest seed entities in the innermost layer.
[0100] A prediction function is adopted to predict the user's interest in this candidate response by combining the user interest preference vector representation u and the candidate response vector representation v; the prediction function is:
[0101] yuv =f(u T v)
[0102] Among them, y uv represents the interest score, i.e., the probability that the user is interested in the candidate reply, u represents the user's interest preference vector representation, v represents the candidate reply vector representation, and f is a sigmoid function, and the formula is:
[0103]
[0104] The present invention was evaluated and the results are as follows:
[0105] Two information retrieval evaluation indicators, MRR (Mean Reciprocal Rank) and MAP (Mean Average Precision), are used to measure the accuracy of ranking candidate response sets (n=10) of different models. 50 sentences are randomly selected from the test set for testing, and the average ranking accuracy is taken as the final result of the experiment; the results are shown in Table 1.
[0106] Table 1 Statistics of sorting accuracy of different models
[0107]
[0108] As can be seen from Table 1, the reason why the EBDM and Tri-LSTM models have higher scores in MAP and MRR than the STC and Chatterbot models is that EBDM considers the entities and their types in the user's input discourse when ranking candidate replies, while Tri-LSTM introduces an external knowledge graph to integrate common sense related to the current conversation into the ranking of candidate replies. STC is based on the framework of retrieval-matching-reranking, and integrates traditional ranking features and deep neural networks in the reranking process, so it has a higher score than Chatterbot; compared with the other four models, the present invention achieves better results because the model proposed in the present invention can use the rich entity information in the temporal knowledge graph through the idea of preference propagation to characterize the user's current interests, so that when ranking the candidate reply set, the candidate reply with higher relevance to the user's current input is ranked higher.
[0109] In order to effectively evaluate the effectiveness of the human-computer interaction of the model, the present invention invited 36 users to test the present invention and the comparison model, where the users consisted of 18 males and 18 females from different backgrounds, with an age distribution of 18 to 29 years old; in each test, a sentence was randomly selected from the test set as the initial input for the participants in each model to conduct an interactive conversation, and the number of conversation rounds and interaction time of each model for each human-computer interaction were counted; the statistical results of the average number of conversation rounds and average interaction time under different models obtained from the experiment are shown in Table 2.
[0110] Table 2 Statistics of the number of interaction rounds and time between users and the model
[0111]
[0112] As can be seen from Table 2, the average number of interaction rounds and the average interaction time between users and the present invention are higher than those of other models, indicating that the present invention can conduct conversations with users more effectively. This is because the present invention can accurately capture the entities that users are interested in from the user's conversation content, and mine the potential user interests of users with the help of the temporal knowledge graph, so that the robot's reply can not only be close to the current conversation topic but also expand the richness of the conversation content according to the potential interests of users.
[0113] In order to further effectively evaluate the model satisfaction, the present invention starts from the subjective perspective of the participants and asks the above 36 users to evaluate each model from three indicators: positivity, interestingness, and acceptability; at the same time, all indicators are evaluated using a three-point scale (0, 1, 2): 0 indicates a lower degree, 1 indicates a general degree, and 2 indicates a higher degree; the final statistical result takes the average value, and the higher the score, the higher the model satisfaction; the results of the single-round model satisfaction survey are shown in Table 3.
[0114] Table 3 Scoring statistics of users for different models
[0115]
[0116] As can be seen from Table 3, the present invention is superior to other models in terms of conversation positivity, interestingness, and acceptability, especially achieving good results in the interestingness of the reply. This is because the present invention introduces the temporal knowledge graph as the background knowledge of the robot, and combines the two factors of relationship friendliness and time freshness to accurately depict the user interest preferences using the rich entity information in the graph. Therefore, when selecting candidate replies, it can specifically select the replies that users are interested in. The results show that the present invention can effectively improve the model satisfaction in many aspects.
[0117] The present invention first takes extracting the entity of the user's current conversation content as the starting point, and searches for multi-layer neighbor entities related to this entity in the temporal knowledge graph based on the idea of preference propagation; then assigns corresponding weights to each layer of entities according to the relationship friendliness and time freshness, and layer by layer fuses the entity's own information with its entity information to calculate the user's interest preference; finally, according to the user's interest preference obtained by aggregating the multi-layer neighbor information and the candidate response obtained based on the retrieval-based conversation, uses a prediction function to calculate the probability that the user is interested in this candidate response, and selects the candidate response with the highest probability as the response of the robot; the present invention introduces a temporal knowledge graph as the background knowledge of the robot, simulates the communication process between people in real life, takes into account both the external knowledge in the human-computer interaction process and the user's interest preference, solves the problems of the current human-computer interaction system such as the lack of the robot's background knowledge and the low interest of the user during the conversation process, makes the human-computer conversation more natural, and has broad application prospects.
[0118] The above embodiments further elaborate on the purpose, technical solution and advantages of the present invention. It should be understood that the above embodiments are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made to the present invention within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A human-computer dialogue interest perception method based on a temporal knowledge graph, characterized in that, including: Obtain the user input content and the data in the robot dialogue library; Obtain at least two candidate responses based on the user input content and the dialogue library data; Input the user input content and the candidate responses into the human-machine dialogue interest perception model based on the temporal knowledge graph, obtain the probabilities that the user is interested in all the candidate responses, and select the candidate response with the highest probability as the response content of the robot; The process of using the human-machine dialogue interest perception model based on the temporal knowledge graph to process the user input content and the candidate responses includes: S1: Use entity linking in the temporal knowledge graph to perform entity extraction and disambiguation on the user input content to obtain the user's interest seed entity set; S2: Propagate the preference of the interest seed entities in the interest seed entity set along the relationship paths of the temporal knowledge graph to obtain the entities of the temporal knowledge graph. The process of propagating the preference of the interest seed entities includes: S21: Set the sampling size T, and use the first-layer interest seed entities as the first-layer entities of the temporal knowledge graph; S22: Obtain the neighbor entity set of the current-layer interest seed entities. If the number of neighbor entities in the neighbor entity set is less than the neighbor entity number threshold, repeat to select T neighbor entities in the neighbor entity set as the sampling domain. If the number of neighbor entities in the neighbor entity set is greater than the neighbor entity number threshold, calculate the tightness between all neighbor entities in the neighbor entity set and the interest seed entities respectively; S23: Sort the tightness between all neighbor entities in the neighbor entity set and the interest seed entities in descending order, and select the first T neighbor entities corresponding to the tightness as the sampling domain of the interest seed entities; S24: Take the union of all the sampling domains to obtain the next-layer entities of the temporal knowledge graph, use the next-layer entities as the new interest seed entities, and return to step S22 until the complete entities of the temporal knowledge graph are obtained; S3: Perform numerical processing on the entities of the temporal knowledge graph to obtain the vector representation of the sampling domain of the entities. Performing numerical processing on the entities of the temporal knowledge graph includes: calculating the relationship friendliness of the user according to the candidate responses; calculating the time freshness of the user according to the forgetting curve theory; constructing a weight function according to the relationship friendliness and the time freshness; performing numericalization on the entities of the temporal knowledge graph according to the weight function; S4: Update the entity vector representation according to the vector representation of the sampling domain of the entities to obtain the updated entity vector representation. The vector representation of the sampling domain of the entities is: Among them, e i represents the vector representation of the i-th neighbor entity in the sampling domain, S(e) represents the set of sampling domain entities of the entity, and g(e i ) represents the weight function; The formula for updating the entity vector representation is: e agg = σ(W·(e + V S(e) )) + b Among them, e agg represents the updated entity vector representation, σ represents the non-linear function, W represents the transformation weight, e represents the entity vector representation before update, and V S(e) represents the sampled domain vector representation of the entity, and b represents the bias; S5: Aggregate the updated entity vector representation to obtain the user's interest preference representation. The user's interest preference representation is: Among them, represents the vector representation of the i-th interest seed entity in the innermost layer after update, and S represents the total number of interest seed entities in the innermost layer; S6: According to the user's interest preference representation and the candidate response vector representation, use the prediction function to obtain the probabilities that the user is interested in all the candidate responses.
2. The human-computer dialogue interest perception method based on a temporal knowledge graph according to claim 1, characterized in that, The formula for calculating the relationship friendliness is: Among them, v represents the candidate response vector representation, which represents the vector representation of the relationship between entities in the quadruple.
3. A method for human-computer dialogue interest perception based on a temporal knowledge graph according to claim 1, characterized in that, The formula for calculating the time freshness is: Among them, w represents the weight threshold, t represents the current time, and t s represents the time when the relationship in the quadruple is established.
4. A method for human-computer dialogue interest perception based on a temporal knowledge graph according to claim 1, characterized in that, The weight function is: where α represents the weight coefficient, represents the normalized representation of the relationship friendliness, represents the normalized representation of the time freshness.
5. A method for human-computer dialogue interest perception based on a temporal knowledge graph according to claim 1, characterized in that The prediction function is: y uv = f(u T v) Among them, y uv represents the interest score, u represents the user's interest preference, v represents the candidate response, and f represents the sigmoid function.