A human-computer interaction topic transfer method based on collaborative knowledge graph
Patent Information
- Application Number
- CN202210070468.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-01-21
AI Technical Summary
The prior art is difficult to transition topics naturally and coherently based on brief dialogue content, resulting in low interaction satisfaction.
By building a collaborative knowledge graph, combining the user-topic two-part graph and knowledge graph, the embedding layer, attention propagation layer and prediction layer models are used to transfer topics, and the topic with the highest matching score is selected as the transfer topic.
It realizes the natural and coherent switching of topics in human-computer interaction, and improves the conversational interest and satisfaction of topic participants.
Smart Images

Figure CN114444693B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of human-computer interaction topic transfer, and specifically relates to a human-computer interaction topic transfer method based on collaborative knowledge graph. Background Art
[0002] In recent years, artificial intelligence technology has undergone profound changes. The new generation of chat-based dialogue systems has been widely used in practical scenarios such as entertainment chat robots, personal assistants, and company intelligent customer service, becoming one of the most promising technologies in the field of artificial intelligence. The current main applications of this technology include personal assistant systems such as Apple Siri, Microsoft Xiaobing, Google Allo, and Baidu Duer, as well as Amazon's Echo smart home service system and Alibaba's Xiaomi e-commerce intelligent customer service system. These intelligent dialogue products have brought great convenience to people's daily lives and solved various problems encountered by users in life. With the development of the Internet and the emergence of social platforms, people's communication forms have gradually shifted from simple face-to-face to more diverse communication methods, and human-computer interaction has become the main communication method. Human-computer interaction technology is committed to solving the coordination problem between people and computers, aiming to eliminate the semantic understanding errors between the two parties to the greatest extent, so that the information exchange between people and machines is smoother. Therefore, how to improve the coherence and rationality of topic transfer during the dialogue process, and then improve the interaction satisfaction of participants has become a key issue in the research of human-computer dialogue systems.
[0003] In recent years, many valuable studies have been able to improve the interaction satisfaction of participants to a certain extent, including the introduction of external knowledge, consideration of the personalized characteristics of participants, and consideration of changes in emotional states during the dialogue process. One of the studies on the introduction of external knowledge in the dialogue process is to store graph information in the form of an external memory module. First, the Tri-LSTM (Triggered Long Short-Term Memory, Tri-LSTM) model is used to encode queries, replies, and common sense respectively, and then the relevant common sense is integrated into the dialogue model to solve the problem of lack of background knowledge during the interaction process; in addition, there is a novel hierarchical attention mechanism, which combines the attention of word and discourse levels to reasonably screen external knowledge, so that the dialogue model can generate information responses that are more in line with the dialogue state, effectively improving the management ability of the dialogue state. In the study of the personalized characteristics of participants, one method is to extract topics on social platforms and find topics that similar users are interested in for transfer; there is also a topic switching algorithm based on collaborative filtering that comprehensively considers the social relationships and historical behaviors of users, which considers the user's preference for a certain topic and realizes personalized topic switching; a method for calculating the user's preference for a certain topic is to model the conversation context and topic through a neural network, characterize the user's personalized characteristics, obtain the user portrait, and thus obtain the relationship between the user and the topic, and then predict the user's preference for a certain topic through the relationship between the user and the topic. In the study of the change of the robot's emotional state during the conversation, there is a multi-category commodity sentiment analysis recommendation model for time-series perception, which combines user emotional information to infer user preferences for commodities.
[0004] The above methods take into account the two major factors of participants' personalized characteristics and external knowledge in the human-computer interaction process to a certain extent, but they all consider the two independently and model the interaction data characteristics independently, which makes it difficult for them to transition topics naturally and coherently based on short conversation content. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention proposes a human-computer interaction topic transfer method based on a collaborative knowledge graph, which includes: obtaining a candidate topic set and a similar user set according to the social relationships and behavior history of topic participants; constructing a user-topic bipartite graph according to the candidate topic set and the similar user set; obtaining a knowledge graph, fusing the user-topic bipartite graph with the knowledge graph to obtain a collaborative knowledge graph; inputting the collaborative knowledge graph into a human-computer interaction topic transfer model based on the collaborative knowledge graph to obtain a transferred topic; topic participants use the transferred topic as a reply content to switch topics; wherein the human-computer interaction topic transfer model based on the collaborative knowledge graph includes an embedding layer, an attention propagation layer, and a prediction layer;
[0006] The process of processing the collaborative knowledge graph based on the human-computer interaction topic transfer model of the collaborative knowledge graph includes:
[0007] S1: Input the collaborative knowledge graph into the embedding layer, perform knowledge graph embedding operation on the collaborative knowledge graph, and obtain the triples of embedding representation;
[0008] S2: Input the embedded triples into the attention propagation layer for information propagation to obtain the updated entity representation;
[0009] S3: Input the updated entity representation into the prediction layer, concatenate the updated entity representation to obtain the topic participant vector and the topic vector; calculate the matching score between the topic participant and the topic based on the topic participant vector and the topic vector; select the topic with the highest matching score as the transfer topic.
[0010] Preferably, fusing the user-topic bipartite graph with the knowledge graph includes: constructing a topic-entity alignment set to align topics with entities in the knowledge graph; adding similar user sets to the entity set of the knowledge graph; and adding the interaction relationship between users and topics to the relationship set of the knowledge graph.
[0011] Preferably, performing a knowledge graph embedding operation on the collaborative knowledge graph includes: detecting triples in the collaborative knowledge graph, converting the triples into projection representations, and obtaining embedding representations of the triples based on the projection representations of the triples; calculating the credibility score of the triples based on the embedding representations of the triples, and obtaining the best embedding representation of the triples when the credibility score is the lowest.
[0012] Furthermore, the formula for calculating the credibility score is:
[0013]
[0014] Among them, g(h,r,t) represents the credibility score, W r Represents the transformation matrix of the relationship r, e h represents the head entity of the embedded representation, e r represents the relational entity represented by the embedding, e t Represents the tail entity of the embedded representation.
[0015] Preferably, the process of information dissemination includes: each entity calculates the information dissemination attenuation factor according to the knowledge-aware attention mechanism; calculates the ego network representation of the entity according to the previous layer entity representation and the information dissemination factor; and uses a two-way interactive aggregator to aggregate the ego network representation and entity representation of the entity to obtain an updated current entity representation.
[0016] Furthermore, the formula for calculating the information propagation attenuation factor is:
[0017] π(h,r,t)=(W r e t ) T tanh((W r e h +e r ))
[0018] Among them, π(h,r,t) represents the information propagation attenuation factor, W r Represents the transformation matrix of the relationship r, e t represents the tail entity of the embedding representation, e h represents the head entity of the embedded representation, e r Represents the relation entity of the embedded representation.
[0019] Furthermore, the formula for calculating the ego network representation of an entity is:
[0020]
[0021] in, represents the ego network representation of the entity at layer l, N h represents a triple set, π(h,r,t) represents the information propagation attenuation factor, Represents the tail entity of the embedding representation at level l-1.
[0022] Furthermore, the formula for information aggregation using a two-way interactive aggregator is:
[0023]
[0024] Among them, f Bi-Interaction represents the updated entity representation, W1 represents the first matrix weight matrix, W2 represents the second matrix weight matrix, e h represents the head entity of the embedded representation, represents the ego network representation of the entity, ⊙ represents the element-wise product, and ReLU represents the activation function.
[0025] Preferably, the formula for concatenating the updated entity representations is:
[0026]
[0027]
[0028] in, is the final vector representation of the conversation participants, is the vector representation of the conversation participants after L layers of propagation, represents the topic vector, is the representation of topic i after propagation through L layers, and || represents the concatenation operation.
[0029] Preferably, the formula for calculating the matching score between topic participants and topics is:
[0030]
[0031] in, represents the matching score between topic participants and topics, represents the topic participant vector, Represents the topic vector.
[0032] The beneficial effects of the present invention are as follows: the present invention constructs a collaborative knowledge graph based on similar users and candidate topics of topic participants, fully mines high-order relationships in the human-computer interaction process, awakens the background knowledge of topic participants, guides the machine with high-quality topics, calculates the matching scores between topic participants and topics, and selects the topic with the highest score as the switching topic; the present invention considers two factors, similar users and similar topics, introduces knowledge graphs as the background knowledge of the robot and constructs a collaborative knowledge graph, fully mines high-order relationships between conversation-related information, greatly enhances the characteristics of conversation content, and is conducive to the machine to mine topics of potential interest to participants from short conversations, thereby enabling the natural and coherent switching of conversation topics during human-computer interaction, thereby enhancing the conversation interest and satisfaction of topic participants, and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of the human-computer interaction topic transfer model framework based on collaborative knowledge graph in the present invention;
[0034] Figure 2 Schematic diagram of the collaborative knowledge graph in the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] The present invention constructs a collaborative knowledge graph (CKG), considers high-order relationship information in the dialogue, simulates the law of topic conversion when people communicate with each other, and proposes a human-computer interaction topic transfer method based on the collaborative knowledge graph. The method includes: obtaining a candidate topic set and a similar user set according to the social relationship and behavior history of topic participants; constructing a user-topic bipartite graph according to the candidate topic set and the similar user set; obtaining a knowledge graph, fusing the user-topic bipartite graph with the knowledge graph to obtain a collaborative knowledge graph; inputting the collaborative knowledge graph into a human-computer interaction topic transfer model based on the collaborative knowledge graph to obtain a transfer topic; topic participants use the transfer topic as a reply content to switch topics; wherein the human-computer interaction topic transfer model based on the collaborative knowledge graph includes an embedding layer, an attention propagation layer, and a prediction layer;
[0037] like Figure 1 As shown in FIG, the process of processing the collaborative knowledge graph by the human-computer interaction topic transfer model based on the collaborative knowledge graph includes:
[0038] S1: Input the collaborative knowledge graph into the embedding layer, perform knowledge graph embedding operation on the collaborative knowledge graph, and obtain the triples of embedding representation;
[0039] S2: Input the triplet of embedded representation into the attention propagation layer for information propagation to obtain the updated entity representation;
[0040] S3: Input the updated entity representation into the prediction layer, concatenate the updated entity representation to obtain the topic participant vector and the topic vector; calculate the matching score between the topic participant and the topic based on the topic participant vector and the topic vector; select the topic with the highest matching score as the transfer topic.
[0041] The specific process of building a collaborative knowledge graph is as follows:
[0042] The human-computer interaction process always revolves around one or several topics. As the communication deepens, there is usually exact interaction data between users and topics. These data are represented as a user-topic bipartite graph G1:
[0043] G1={(u,y ui ,i)|u∈U,i∈I}
[0044] Among them, U and I represent the similar user set and candidate topic set respectively, y ui Represents the interactive relationship between users and topics. When y ui =1, it means that there is interaction between the user and the topic, otherwise y ui =0.
[0045] As a mapping of the objective world, the knowledge graph constructs the relationship between entities in the objective world with a graph structure, forming a huge semantic network. Usually, the knowledge graph appears in the form of triples, which are divided into two types: entity-relationship-entity and entity-attribute-attribute value. Its mathematical definition is G = (H, R, T), where H = {e1, e2, e3...e N} is the entity set in the knowledge base, N is the total number of entities, R = {r1, r2, r3...r M} represents the relationship set between entities, and M is the total number of relationships.
[0046] The present invention introduces the knowledge graph as the background knowledge base of the robot and embeds the topic into the graph. The knowledge graph is represented as:
[0047] G2={(h,r,t)|h,t∈ε,r∈R}
[0048] Among them, ε represents the entity set, R represents the relationship set, and each triple describes the connection between the head entity h and the tail entity t through the relationship r.
[0049] Using high-order relationships to awaken the background knowledge of participants during the interaction process is crucial for the machine to guide topics with high quality. The process of extracting high-order relationships conforms to the underlying law of topic switching in human communication, that is, the background knowledge stored in the brains of people with similar experiences has a certain correlation, and the topic switching is essentially a process of awakening background knowledge. In order to discover high-order relationship information in the interaction process, the present invention merges the user-topic bipartite graph with the knowledge graph into a graph space to construct a collaborative knowledge graph. The specific process is as follows: Since the topics are represented differently in the two sets G1 and G2, the present invention establishes a topic-entity alignment set Align the topic set and entity set, where (i, e) means that topic i can be aligned with entity e in the graph, and entity e can be understood as the attribute value of the corresponding topic i; construct a topic-entity alignment set to align topics with entities in the knowledge graph; add similar user sets to the entity set of the knowledge graph; add the interactive relationship between users and topics to the relationship set of the knowledge graph to form a collaborative knowledge graph:
[0050] G={(h,r,t)|h,t∈ε′,r∈R′},ε′=ε∪U,R′=R∪interact
[0051] like Figure 2As shown in the figure, u1 is a conversation participant, {u2,u3,u4,u5} represents u1's neighbor user set, {i1,i2,i3,i4} represents the topic set related to the conversation, and {e1,e2,e3} represents the entity associated with the topic in the knowledge graph. Assuming that u1 and the machine are communicating around topic i1, in the prior art, if only considering the user similarity, users u4 and u5 related to topic i1 will be mined; from the perspective of topic attributes, topics with the same attribute e1 as topic i1 are more preferred; both of the above methods can be used as a supplement to the information in the topic transfer process, but the data modeling is performed independently and cannot effectively mine connectivity information, such as and There are two implicit high-order relationships. The CKG of the present invention combines the user-topic bipartite graph with the knowledge graph to model the high-order relationships in human-computer interaction, mine the high-order connectivity of information, integrate the information of similar users and topic attributes, and improve the characterization of participants' topic preferences.
[0052] The specific process of processing the collaborative knowledge graph based on the human-computer interaction topic transfer model of the collaborative knowledge graph is as follows:
[0053] Knowledge graph embedding is an effective method to parameterize entities and relations into vector representations while maintaining the structure of the original knowledge graph. The collaborative knowledge graph is input into the embedding layer, and the TransR method is used to detect the triples (h, r, t) in CKG and transform the triples into projection representations; to learn to embed each entity and relation; where e h ,e t ∈R d represents the embedding representation of h,t, e r ∈R k is the embedding representation of relation r, and They represent the projection representation of entities h and t in relation r respectively; the credibility score of the triple is calculated according to the embedded representation of the triple. When the credibility score is the lowest, the best embedded representation of the triple is obtained, that is, the collaborative knowledge graph with the best embedded representation is obtained; the formula for calculating the credibility score is:
[0054]
[0055] Among them, g(h,r,t) represents the credibility score. The lower its value, the more reliable the triplet is. r ∈R k×d The transformation matrix representing the relation r, which projects the entity from the d-dimensional space to the k-dimensional relation space; e h represents the head entity of the embedded representation, e r represents the relational entity represented by the embedding, et Represents the tail entity of the embedded representation.
[0056] The attention propagation layer simulates the process of awakening background knowledge in the process of human-to-human communication by transferring information between nodes. It propagates the information of nodes in the interaction process in a hierarchical form. Based on the graph convolutional network, it recursively propagates embedded information along high-order connectivity. In the process of human-computer information interaction, an entity can participate in multiple triples, acting as a bridge to connect two triples and propagate information. For example, Figure 2 In , the two triples involved in topic entity i2 are {e1,i2,u2} and {e2,i2,u2} respectively.
[0057] The advantage of the attention propagation layer is that it explicitly uses first-order connection information to associate users, topics, and knowledge entity representations, characterizes each entity, enriches its own information representation, simulates the process of awakening background knowledge in the conversation, considers users with the same behavior as the participants, propagates the relevant information of users, topics, and entities in the conversation in a hierarchical form, and explores topics of potential interest to the participants.
[0058] The embedded triples are input into the attention propagation layer for information propagation. The idea of graph attention network is used to generate cascade propagation attention weights to measure the importance between nodes. The weight distribution result during the information propagation process is obtained by the knowledge-aware attention mechanism, and the attention score depends on the relationship between e in the r space. h and e t The final attention score can indicate which neighbor nodes should be given more attention to capture collaborative information. This process simulates the diffusion of entity information during the interaction process. The current entity information is assigned different weights based on the distance of all its neighbor nodes according to the attention mechanism during the propagation process. This propagation method not only utilizes the neighbor structure of the graph, but also emphasizes the importance change of neighbor nodes during the propagation process. Different from the graph attention network that only uses node representation as input, the present invention uses e h and e t Model the relationship between entities, encode more information during the propagation process, and maximize the propagation of entity information.
[0059] The attention weight of the present invention is the information propagation attenuation factor; each entity in the collaborative knowledge graph calculates the information propagation attenuation factor according to the knowledge-aware attention mechanism, and the calculation formula is:
[0060] π(h,r,t)=(W r e t ) T tanh((W r e h +e r ))
[0061] Among them, π(h,r,t) represents the information propagation attenuation factor, W r Represents the transformation matrix of the relationship r, e t represents the tail entity of the embedding representation, e h represents the head entity of the embedded representation, e r Represents the relation entity of the embedded representation.
[0062] Normalize the information propagation attenuation factor:
[0063]
[0064] Among them, r′ represents the relationship between two nodes embedded in CKG, t′ represents the tail node after TransR embedding, and N h Represents all triples with h as the head node.
[0065] After each node information is propagated in CKG, each entity calculates the ego network representation of the entity based on the entity representation of the previous layer and the information propagation factor; the formula for calculating the ego network representation of the entity is:
[0066]
[0067] in, represents the ego network representation of the entity at layer l, N h represents a triple set, π(h,r,t) represents the information propagation attenuation factor, Represents the tail entity of the embedding representation at level l-1.
[0068] In order to explore high-order connection information, the present invention recursively obtains the l-layer representation of entity h, and the mathematical expression is:
[0069]
[0070] in, represents the entity representation on layer l, is the initial iteration information of the topic participant entity, Represents the ego network representation of the entity at layer l.
[0071] Considering e h and The present invention uses a two-way interactive aggregator to aggregate the ego network representation and entity representation of the entity to obtain an updated current entity representation; the two-way interactive aggregator can aggregate the ego network representation and entity representation of the entity to obtain an updated current entity representation; h and The characteristic interaction between entities is encoded, so that entities can transmit more information; the formula for information aggregation using a two-way interaction aggregator is:
[0072]
[0073] Among them, f Bi-Interaction represents the updated entity representation, W1∈R d′×d Represents the first moment weight matrix, W2∈R d′×d represents the second moment weight matrix, e h represents the head entity of the embedded representation, represents the ego network representation of the entity, ⊙ represents the element-wise product, and ReLU() represents the activation function.
[0074] Through information aggregation, the updated entity representation of each entity node is obtained; for example, Figure 2 The high-order information propagation process from u2 to u1 can be expressed as: The information of u2 that can be captured through this embedding propagation process is expressed as the explicit encoding in u1: The information captured by u2 is displayed in i1 as follows: The information captured by u2 is displayed in e1 as follows: Information dissemination seamlessly injects attribute-based collaborative information into the feature learning process, integrates the user-topic bipartite graph and knowledge graph information, fully explores the high-order connectivity between entities, and on this basis awakens the background knowledge of the participants, so that the machine can reasonably shift the topic during the interaction process and improve the coherence of the conversation.
[0075] The updated entity representation is input into the prediction layer, and the updated entity representation is concatenated to obtain the topic participant vector and the topic vector. The formula for concatenating the updated entity representation is:
[0076]
[0077]
[0078] in, is the final vector representation of the conversation participants, is the vector representation of the conversation participants after L layers of propagation, represents the topic vector, is the representation of topic i after L layers of propagation, || represents the concatenation operation. This mechanism can not only enrich the initial embedding by performing embedding propagation operations, but also control the propagation strength by adjusting l.
[0079] The matching score between topic participants and topics is calculated based on the topic participant vector and topic vector, and the inner product of the topic participant vector and topic vector is performed. The formula is:
[0080]
[0081] in, represents the matching score between topic participants and topics, represents the topic participant vector, Represents the topic vector.
[0082] The matching scores between all candidate topics and topic participants in the candidate topic set are calculated, and the topic with the highest matching score is selected as the transfer topic. The topic participants use the transfer topic as the reply content to switch the topic.
[0083] In order to verify the effect of the present invention, the evaluation process and results of the present invention are as follows:
[0084] Two evaluation methods are used, one is manual evaluation; the other is objective automatic evaluation indicators, including accuracy (P), precision (A) and F1 value. The F1 value is an important indicator for balancing precision and recall. The evaluation index formula is as follows:
[0085]
[0086] Among them, TP represents the number of topics that participants have high interest in and are accurately predicted, TN represents the number of topics that participants have low interest in but are accurately predicted, FN represents the number of topics that participants have high interest in but are predicted incorrectly, and FP represents the number of topics that participants have low interest in and are predicted incorrectly.
[0087] Table 1 Comparison of the results of three indicators of each model
[0088]
[0089] The human-computer interaction topic transfer method based on knowledge graph attention network proposed in the present invention is superior to other models in accuracy, precision and F1 value. The reason is that the present invention introduces knowledge graph as the background knowledge of the machine and constructs a collaborative knowledge graph to propagate dialogue-related information in a cascade manner and mine high-order relationships between information; secondly, the model of the present invention uses the attention mechanism to emphasize the importance of different neighbor nodes, and assigns different weights to each neighbor node according to the distance from the current node, which significantly improves the accuracy and precision of the model.
[0090] In an actual human-computer dialogue system, the machine is sometimes required to switch the topic of the dialogue in a limited number of rounds of dialogue. This requires that the designed model still has good performance on a small sample data set. In order to fully verify the effectiveness of the present invention, this experiment was simulated on data sets of different sizes. The accuracy, precision and F1 value of each model on data sets of different sizes were compared, and the results are shown in Table 2, Table 3 and Table 4 respectively.
[0091] Table 2 Comparison of the accuracy of each model in different data sets
[0092]
[0093] Table 3 Comparison of the accuracy of each model on data sets of different sizes
[0094]
[0095] Table 4 Comparison of F1 values of various models on different datasets
[0096]
[0097] It can be seen from Tables 2 to 4 that the performance of the collaborative filtering algorithm will not change with the change of data scale. This is because the collaborative filtering algorithm selects similar users for topic switching based on the historical behavior data of the topic participants, and its results have nothing to do with the size of the data sample. As the sample data set increases, the performance of the other types of models in the table continues to improve until they approach the saturation of model performance. This is because as the sample data set increases, the user's true intentions become more obvious during the conversation, and the machine can more accurately obtain the topics of interest to the participants from the conversation information, thereby completing the conversion of the conversation topic. It can be seen from Tables 2 to 4 that the present invention is also superior to other models on small sample data sets. The reason is that in small sample data sets, the conversation data between the topic participants and the machine is relatively sparse, and the data features are not obvious, which makes it difficult for the machine to obtain the true intentions of the participants based on the brief conversation content, and thus it is difficult to reasonably convert the conversation topic.
[0098] The present invention is evaluated by a three-level manual evaluation method. This type of method generally invites multiple evaluators to score the replies generated by the model, and the replies are divided into three levels according to the quality of the replies. Qualitative evaluation of each model is performed based on the subjective feelings of the participants. The present invention randomly invites 30 volunteers to interact with different model robots, and scores each model from the two perspectives of interaction duration and interaction satisfaction. Among them, the interaction satisfaction mainly considers the rationality (Rationality) and coherence (Fluency) of topic conversion during the conversation. The so-called rationality refers to whether the replies generated by the machine are logically correct, and coherence refers to whether the process of topic conversion is closely integrated with the conversation context. The specific evaluation criteria are shown in Table 5:
[0099] Table 5 Rationality and Fluency evaluation table
[0100]
[0101] In the manual evaluation, the duration of interaction between 30 volunteers and different model robots was counted, and the participants' subjective satisfaction with Rationality and Fluency was statistically scored. The results are shown in Tables 6 and 7:
[0102] Table 6 Statistics of interaction time between volunteers and each model
[0103]
[0104] Table 7 Statistics of volunteers' scores on Rationality and Fluency of each model
[0105]
[0106] As shown in Table 6, the interaction time between topic participants and the machine of the present invention is significantly better than that of other models, which shows that considering the high-order relationship between dialogue information plays a positive role in the human-computer interaction process. As shown in Table 7, the present invention has achieved good results in the rationality and coherence of topic transfer during the interaction process; the reason why the present invention and the CA-CB model perform similarly in terms of Rationality is that both introduce knowledge graphs as the background knowledge base of the robot, and the present invention further constructs a collaborative knowledge graph, extracts high-order relationships between dialogue-related information, and propagates them in a cascade manner. Therefore, compared with other models, the present invention performs better in the coherence of dialogue topic transfer.
[0107] In summary, compared with the four models of LR (Logistic Regression), K-means, traditional collaborative filtering CF (Collaborative Filtering, CF) algorithm, and CA-CB, the present invention can significantly improve the rationality and coherence of human-computer interaction topic conversion.
[0108] The present invention constructs a collaborative knowledge graph based on similar users and candidate topics of topic participants, fully mines high-order relationships in the human-computer interaction process, awakens the background knowledge of topic participants, conducts high-quality topic guidance for the machine, calculates the matching scores between topic participants and topics, and selects the topic with the highest score as the switching topic; the present invention considers two factors, similar users and similar topics, introduces knowledge graphs as the background knowledge of the robot and constructs a collaborative knowledge graph, fully mines high-order relationships between conversation-related information, greatly enhances the content features of the conversation, and is conducive to the machine to mine topics of potential interest to participants from short conversations, thereby enabling natural and coherent switching of conversation topics during human-computer interaction, thereby enhancing the conversation interest and satisfaction of topic participants, and has broad application prospects.
[0109] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A human-computer interaction topic transfer method based on collaborative knowledge graph, characterized in that: include: Obtain candidate topic sets and similar user sets based on the social relationships and behavior history of topic participants; Construct a user-topic bipartite graph based on the candidate topic set and similar user set; Obtain the knowledge graph, fuse the user-topic bipartite graph with the knowledge graph, and obtain a collaborative knowledge graph; Input the collaborative knowledge graph into the human-computer interaction topic transfer model based on the collaborative knowledge graph to obtain the transfer topic; Topic participants use the transferred topic as a reply content to switch topics; the human-computer interaction topic transfer model based on the collaborative knowledge graph includes an embedding layer, an attention propagation layer, and a prediction layer; The process of processing the collaborative knowledge graph based on the human-computer interaction topic transfer model of the collaborative knowledge graph includes: S1: Input the collaborative knowledge graph into the embedding layer, perform knowledge graph embedding operation on the collaborative knowledge graph, and obtain the triples of embedding representation; S2: Input the triplet of embedded representation into the attention propagation layer for information propagation to obtain the updated entity representation; S3: Input the updated entity representation into the prediction layer, concatenate the updated entity representation to obtain the topic participant vector and the topic vector; calculate the matching score between the topic participant and the topic based on the topic participant vector and the topic vector; select the topic with the highest matching score as the transfer topic.
2. According to claim 1, a method for human-computer interaction topic transfer based on collaborative knowledge graph is characterized in that: The fusion of the user-topic bipartite graph with the knowledge graph includes: constructing a topic-entity alignment set to align the topic with the entity in the knowledge graph; adding similar user sets to the entity set of the knowledge graph; and adding the interaction relationship between users and topics to the relationship set of the knowledge graph.
3. According to claim 1, a method for human-computer interaction topic transfer based on collaborative knowledge graph is characterized in that: The knowledge graph embedding operation on the collaborative knowledge graph includes: detecting triples in the collaborative knowledge graph, converting the triples into projection representations, and obtaining the embedded representations of the triples based on the projection representations of the triples; calculating the credibility score of the triples based on the embedded representations of the triples, and when the credibility score is the lowest, obtaining the best embedded representation of the triples.
4. According to claim 3, a method for human-computer interaction topic transfer based on collaborative knowledge graph is characterized in that: The formula for calculating the credibility score is: Among them, g(h,r,t) represents the credibility score, W r Represents the transformation matrix of the relationship r, e h represents the head entity of the embedded representation, e r represents the relational entity represented by the embedding, e t Represents the tail entity of the embedded representation.
5. According to claim 1, a method for human-computer interaction topic transfer based on collaborative knowledge graph, characterized in that: The process of information dissemination includes: each entity calculates the information dissemination attenuation factor according to the knowledge-aware attention mechanism; the ego network representation of the entity is calculated according to the entity representation of the previous layer and the information dissemination factor; the bidirectional interactive aggregator is used to aggregate the ego network representation and entity representation of the entity to obtain an updated current entity representation.
6. According to claim 5, a method for human-computer interaction topic transfer based on collaborative knowledge graph is characterized in that: The formula for calculating the information propagation attenuation factor is: π(h,r,t)=(W r e t ) T tanh((W r e h +e r )) Among them, π(h,r,t) represents the information propagation attenuation factor, W r Represents the transformation matrix of the relationship r, e t represents the tail entity of the embedding representation, e h represents the head entity of the embedded representation, e r Represents the relation entity of the embedded representation.
7. The method for human-computer interaction topic transfer based on collaborative knowledge graph according to claim 5, characterized in that: The formula for calculating the ego network representation of an entity is: in, represents the ego network representation of the entity at layer l, N h represents a triple set, π(h,r,t) represents the information propagation attenuation factor, Represents the tail entity of the embedding representation at level l-1.
8. The method for human-computer interaction topic transfer based on collaborative knowledge graph according to claim 5, characterized in that: The formula for information aggregation using a two-way interactive aggregator is: Among them, f Bi-Interaction represents the updated entity representation, W1 represents the first matrix weight matrix, W2 represents the second matrix weight matrix, e h represents the head entity of the embedded representation, represents the ego network representation of the entity, ⊙ represents the element-wise product, and ReLU represents the activation function.
9. The method for human-computer interaction topic transfer based on collaborative knowledge graph according to claim 1, characterized in that: The formula for concatenating the updated entity representations is: in, is the final vector representation of the conversation participants, is the vector representation of the conversation participants after L layers of propagation, represents the topic vector, is the representation of topic i after propagation through L layers, and || represents the concatenation operation.
10. The method for human-computer interaction topic transfer based on collaborative knowledge graph according to claim 1, characterized in that: The formula for calculating the matching score between topic participants and topics is: in, represents the matching score between topic participants and topics, represents the topic participant vector, Represents the topic vector.