A dialogue recommendation method based on user multi-preference fusion enhancement
Patent Information
- Application Number
- CN202411060373.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-02-28
- Filing Date
- 2024-08-05
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2044-08-05
AI Technical Summary
[0006]本发明引入外部库获取更多课程关系以提升偏好获取效果,同时解决两个外部库语义空间不一致与对话轮次偏多的问题,提出一种新的对话推荐的方式
[0027]本发明技术方案达到的效果在于:
Smart Images

Figure CN118861250B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to dialogue recommendation systems, and more particularly, to a dialogue recommendation method based on user multi-preference fusion enhancement suitable for online education scenarios. Background Technology
[0002] Online education, as the name suggests, is a teaching method that uses the internet as a medium. Through the internet, students and teachers can conduct teaching activities even if they are thousands of miles apart. Furthermore, with the help of online courseware, students can learn anytime, anywhere, truly breaking the limitations of time and space. For busy working professionals with irregular study times, online distance education is the most convenient learning method. Currently, there are many forms of online education, and the resources of various online schools vary greatly. To promote the healthy development of online education and significantly improve the level of online education infrastructure, modern information technologies such as the internet, big data, and artificial intelligence are being applied more widely in the field of education, online education models are becoming more complete, and resources and services are becoming richer.
[0003] Recommender systems offer users a range of different items to choose from. During this selection process, users interact with the system in various ways. By understanding these interactions, the system gains a representation of the user's preferences and then recommends items that best suit their needs. The journal *Journal of Software*, ISSN: 1000-9825, Publication Date: 2022, Issue: No. 12, Pages: 4616-4643, "A Review of Dialogue Recommendation Algorithms," introduces the basic functional framework of dialogue recommendation systems, such as... Figure 1 As shown.
[0004] The widespread application of dialogue recommendation systems in online education aims to acquire user (teacher or student) interests through dialogue and make appropriate recommendations. Dialogue recommendation systems need to gradually learn user preferences through multiple rounds of dialogue and make recommendations based on existing items in a database (teacher database, student database, or course database). In dialogue recommendation, external libraries (such as knowledge graphs and lexicons) are often used in the training of the dialogue recommendation system model. However, the semantic space inconsistencies often introduced by external libraries severely limit the performance of the dialogue recommendation system model.
[0005] In addition, most current dialogue recommendation systems make recommendations based on the current conversation, ignoring the user's historical dialogue data and neglecting the performance improvement of similar users' preferences. This leads to the system needing to obtain user preferences through more rounds, resulting in too many rounds of current conversation, which in turn has a negative impact on user experience. Summary of the Invention
[0006] This invention introduces an external library to obtain more course relationships to improve preference acquisition, while simultaneously addressing the issues of semantic space inconsistency and excessive dialogue turns between the two external libraries, proposing a novel dialogue recommendation method. This invention provides a dialogue recommendation system and method based on enhanced user multi-preference fusion. This system is stored in the user intent understanding module of the dialogue recommendation system and is designed to enhance user intent understanding. The method of this invention, based on the historical and current dialogue data of a given target user, as well as the similarity characteristics between users, more accurately obtains the user's intent preferences, thereby enabling the recommendation of courses most likely to meet the user's needs.
[0007] The present invention provides a dialogue recommendation system based on user multi-preference fusion enhancement, which includes a representation alignment module, an entity and word extraction module, a long-term and short-term preference acquisition module, a similar user preference acquisition module, and a representation fusion module.
[0008] The first aspect of the representation alignment module is used to receive the encoded knowledge graph. and The second aspect uses the method of maximizing mutual information to... and Node alignment in the text.
[0009] The user dialogue sequence concatenation model uses the dialogue sequences generated from interactions between users and the online education database as user history data, importing them into the current user-dialogue sequence set. middle.
[0010] For any user User m , will belong to User m User-conversation sequence set with online education database Each dialogue sequence in the dataset is extracted, and these extracted dialogue sequences are combined into a user-dialogue sequence-session set, denoted as […]. and
[0011] Belongs to User M of of The corresponding user-dialogue sequence-conversation-word set is:
[0012] The first aspect of the entity and word extraction module is from and Searching for and The related course entity representations and word node representations; the second aspect is using dialogue recommendation systems to analyze recent dialogues. The matrix consisting of the embedding representations of all context items obtained from the source The words in the user's dialogue sequence MMDC correspond to the word node representation matrix encoded by the word knowledge graph. The matrix VV representing the combination of word nodes in the matrix. (MMDC) .
[0013] The long-term and short-term preference acquisition module uses a time-gated LSTM model to obtain long-term and short-term preferences for user entities and fuses them with user word preferences, thereby acquiring user dialogue preferences learned from user conversations. Specifically: Firstly, a time-gated LSTM interest model is used to acquire user short-term course preferences (PP). 短期 Secondly, an attention-based coordination filtering model is used to obtain users' long-term course preferences (PP). 长期 Thirdly, attention-based short-term and long-term course preferences are fused to obtain a user's course preference representation (PP). 实体 Fourthly, the self-attention mechanism is used to obtain user word preferences (PP). 单词 The fifth aspect involves using gating mechanisms to obtain user dialogue preference representations (PP). 对话 .
[0014] The similar user preference acquisition module calculates the contribution scores of other users to the current user by designing contribution weights. It then incorporates the preference features of highly similar users into the user's preference features through a gating attention mechanism for course recommendations. Specifically: Firstly, it calculates the contribution score based on the preference representations of other users. Secondly, similar user representations (PP) are calculated based on the contributions of different users. 相似 .
[0015] The representation fusion module uses a gated attention mechanism to fuse similar user preference representations and user dialogue preference representations to obtain the user preference representation PP. 用户 .
[0016] This invention provides a dialogue recommendation method based on user multi-preference fusion enhancement, comprising:
[0017] Step 1: Import user historical data and concatenate user sessions to form a session set;
[0018] Before this conversation begins, the system indexes the current user's historical session data and concatenates it to form a session set.
[0019] Step 2: Introduce external knowledge graphs to obtain representations;
[0020] We introduce a course knowledge graph and a word knowledge graph, and encode both knowledge graphs. We use a graph neural network to obtain the entity representation of items in the knowledge graph and the semantic representation of the vocabulary. Then, based on the items and words mentioned by the user, we extract the corresponding representations from the entity representation and semantic representation.
[0021] Step 3: Semantic space fusion between different knowledge graphs;
[0022] The semantic space of the course knowledge graph and the word knowledge graph is aligned using the mutual information maximization method, thereby alleviating the problem of semantic space inconsistency between the course knowledge graph and the word knowledge graph.
[0023] Step 4: A method for obtaining user course preferences in long short-term memory networks based on time gating mechanisms;
[0024] To better obtain user preference representations, this study designs and merges user preferences from short-term entity preferences, long-term entity preferences, and word preferences. A time-gated LSTM model and an attention-based coordinated filtering model are designed to obtain short-term and long-term course entity preferences, respectively, and then merge these preferences into a single user entity preference. Simultaneously, words in user dialogues are modeled to obtain user word preferences. A gating mechanism is then used to merge user entity preferences and word preferences to obtain a representation of user dialogue preferences.
[0025] Step 5: Enhancement processing based on the preference representation of similar users;
[0026] By designing contribution weights, the contribution scores of other users to the current user are calculated. Some user preference features with high similarity are incorporated into the user's preference features through a gating attention mechanism and used for course recommendation.
[0027] The effect achieved by the technical solution of this invention is as follows:
[0028] (1) When acquiring user preferences, this invention divides preferences into long-term preferences and short-term preferences, effectively decoupling the user's interest patterns at different times. Compared with other models that directly calculate the user's interest preference representation, this invention can better uncover stable and dynamic interest preferences that are difficult to detect in the user's dialogue sequence.
[0029] (2) When acquiring user preferences, this invention models the words in the user's dialogue sequence to obtain the user's semantic representation. Compared with other models that directly model entities, this invention can effectively obtain the degree of user's semantic preference for that entity.
[0030] (3) When acquiring user preferences, this invention calculates similar users through a user similarity algorithm and assists users in performing preference representation modeling. When there are fewer user conversations, the effect of similar user modeling on assisting user modeling is more obvious. Attached Figure Description
[0031] Figure 1 This is a basic functional framework diagram of a dialogue recommendation system.
[0032] Figure 2 This is a block diagram of the dialogue recommendation system based on user multi-preference fusion enhancement according to the present invention.
[0033] Figure 3 This is a block diagram of the improved long-term and short-term preference acquisition module.
[0034] Figure 4 This is the execution flowchart of the dialogue recommendation system based on user multi-preference fusion enhancement of the present invention. Detailed Implementation
[0035] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The examples of the parameters listed are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0036] In this invention, in an online education dialogue recommendation system for course recommendation, the user identity can be a teacher, a student, or a student's parent. Multiple users in the online education dialogue recommendation system are denoted as a set MU, where MU = {User1, User2, ..., User...} m ,...,User M}
[0037] User1 is the first user of the online education dialogue recommendation system.
[0038] User2 is the second user in the online education dialogue recommendation system.
[0039] User m This refers to the m-th user in the online education dialogue recommendation system.
[0040] User M The last user of the online education dialogue recommendation system.
[0041] The subscript m represents the user ID, and the subscript M represents the total number of users. For ease of explanation, the User... m Also known as any user in an online education dialogue recommendation system.
[0042] In this invention, during the interaction process of the online education dialogue recommendation system, for any user... m The resulting set of user-dialogue sequences is denoted as and
[0043] Indicates that it belongs to user. m The user – the first sequence of conversations.
[0044] Indicates that it belongs to user. m The second sequence of user-dialogue.
[0045] Indicates that it belongs to user. m The user-dialogue sequence of the uth generation.
[0046] Indicates that it belongs to user. m The last sequence of user-conversation dialogues.
[0047] The subscript u represents the user-dialogue sequence identifier, and the subscript U represents the total number of user-dialogue sequences. For ease of explanation, the... Also known as any sequence of user-dialogue.
[0048] Similarly, we can derive the set of user-dialogue sequences generated by user1 as follows: The set of user-dialogue sequences generated by User2 is: User M The resulting set of user-dialogue sequences is Then, in the online education dialogue recommendation system, all users MU = {User1, User2, ..., User...} m ,...,User M The set of all user-dialogue sequences generated is denoted as the dialogue sequence set.
[0049] This represents the last sequence in the set of user-dialogue sequences generated by user1.
[0050] This represents the last sequence in the set of user-dialogue sequences generated by user2.
[0051] User M The last sequence in the generated set of user-dialogue sequences.
[0052] User-dialogue sequence u The multiple sessions contained herein are represented as a set. and
[0053] for The first session in the series.
[0054] for The second session in the series.
[0055] for The h-th session in the series.
[0056] for The last session in the series.
[0057] The subscript h is The identifier for the Chinese session, with the subscript H indicating... The total number of sessions in the middle. For ease of explanation, the... Also known as Any session.
[0058] Similarly, we can conclude that: The multiple sessions contained herein are set as The multiple sessions contained herein are set as The multiple sessions contained herein are set as Then there is a user. m of The set of conversations, denoted as User-Conversation Sequence-Session Set.
[0059] Belonging to User1 The set of conversations, denoted as User-Conversation Sequence-Session Set.
[0060] Belonging to user User2 The set of conversations, denoted as User-Conversation Sequence-Session Set.
[0061] Belongs to User M of The set of conversations, denoted as User-Conversation Sequence-Session Set.
[0062] for The set of conversational words that makes up the dialogue will be denoted as . and
[0063] For the session The first word in the text.
[0064] For the session The second word in it.
[0065] For the session The j-th word in the text.
[0066] For the session The last word in it.
[0067] The subscript j is The identifier of a Chinese word, with the subscript J as... The total number of words in the text. For ease of explanation, the... Also known as a session Any word in the text. For any conversation Each has a corresponding time step representing the session time.
[0068] Similarly, we can deduce: conversation The conversation-word set in the middle is conversation The conversation-word set in the middle is conversation The conversation-word set in the middle is Then there is a user. m of Conversation summary The corresponding user-dialogue sequence-conversation-word set is:
[0069] Belonging to User1 of The corresponding user-dialogue sequence-conversation-word set is:
[0070] Belonging to user User2 of The corresponding user-dialogue sequence-conversation-word set is:
[0071] Belongs to User M of of The corresponding user-dialogue sequence-conversation-word set is:
[0072] In this invention, for the user set MU = {User1, User2, ..., User...} m ,…,User M The user-dialogue sequence-session-word set corresponding to each user in the set is combined to form a user set. The user-dialogue sequence-session-word set is:
[0073] In this invention, the course set of the online education dialogue recommendation system is denoted as MCO, and MCO = {CO1, CO2, ..., CO}. d ,...,CO D}
[0074] CO1 is the first course in an online education dialogue recommendation system.
[0075] CO2 is the second type of course in the online education dialogue recommendation system.
[0076] CO d This is the dth type of course in the online education dialogue recommendation system.
[0077] CO D This is the last type of course in an online education dialogue recommendation system.
[0078] The subscript 'd' represents the course identifier, and the subscript 'D' represents the total number of courses. For ease of explanation, the CO... d Also known as any course in an online education dialogue recommendation system.
[0079] In this invention, any course CO in the online education dialogue recommendation system d The set of course attributes is denoted as and
[0080] For course CO d The first attribute.
[0081] For course CO d The second attribute.
[0082] For course CO d The g-th attribute.
[0083] For course CO d The last attribute.
[0084] The subscript 'g' represents the identifier of the course attribute, and the subscript 'G' represents the total number of course attributes. For ease of explanation, the following... Also known as course CO dAny one of its attributes.
[0085] Similarly, the set of course attributes belonging to course CO1 is denoted as: ,and The set of course attributes belonging to course CO2 is denoted as ,and Belongs to course CO D The set of course attributes is denoted as ,and
[0086] This represents the last attribute in the set of course attributes for course CO1.
[0087] This represents the last attribute in the set of course attributes for course CO2.
[0088] Indicates course CO D The last attribute in the course attribute set.
[0089] The total set of course attributes in an online education dialogue recommendation system is denoted as
[0090] In this invention, the node identity in the online education network includes courses, course attributes, or words split from a session.
[0091] See Figure 2 , Figure 3 , Figure 4 As shown, the present invention provides a dialogue recommendation method based on user multi-preference fusion enhancement, comprising the following steps:
[0092] Step 1: Import user historical data and concatenate user sessions to form a session set;
[0093] The user dialogue sequence splicing model uses the dialogue sequences generated by the interaction between the user and the online education database as user history data and imports them into the current user-dialogue sequence set.
[0094] For any user User m , will belong to User m User-conversation sequence set with online education database Each dialogue sequence in the dataset is extracted, and these extracted dialogue sequences are combined into a user-dialogue sequence-session set, denoted as […]. and
[0095] Step 2: Introduce external knowledge graphs to obtain representations;
[0096] We introduce external knowledge graphs related to projects and word-related lexicons. We use graph neural networks to obtain entity representations of projects in the knowledge graph and semantic representations of the lexicon. Then, we extract the corresponding representations from the entity representations and semantic representations based on the projects and words mentioned by the user.
[0097] Step 201: Encode the set of user dialogues using the course knowledge graph;
[0098] See Figure 2 As shown, the course knowledge graph in the online education database is denoted as MKG. 课程 And MKG 课程 = <ME 课程 ,MR 课程 MS 课程 >, ME 课程 For the set of nodes in the course knowledge graph, MR 课程 MS is the set of edges connecting nodes in the course knowledge graph. 课程 This is a set of triple information for the course knowledge graph. Each node in the course knowledge graph is denoted as CO, and the edges between nodes are denoted as COR, represented using triple information. <CO 头 ,COR,CO 尾 >
[0099] The relational graph neural network RGCN algorithm was used to analyze MKG. 课程 = <ME 课程 ,MR 课程 MS 课程 Perform an aggregation operation on each node to obtain the aggregated node information. ,and Course Attribute Collection The course set MCO = {CO1, CO2, ..., CO} d ,…,CO D}
[0100] Aggregated node information These are concatenated into a course entity node representation matrix encoded by the course knowledge graph, denoted as...
[0101] In this invention, the RGCN algorithm is referenced from "Modeling Relational Data with Graph Convolutional Networks" in Volume 10843 of Lecture Notes in Computer Science, published at the ESWC conference in 2018, by Schlichtkrull M, Kipf TN, Bloem P, et al.
[0102] Step 202: Encode the set of user dialogues using a word knowledge graph;
[0103] See Figure 2 As shown, the word knowledge graph in the online education database is denoted as MKG. 单词 And MKG 单词 = <ME 单词 ,MR 单词 MS 单词 >, ME 单词 For a set of nodes in a word knowledge graph, MR 单词 MS is the set of edges connecting nodes in a word knowledge graph. 单词 This is a set of triple information for a word knowledge graph. Any node in the word knowledge graph is denoted as DC, and the edges between nodes are denoted as DCR, represented using triple information. <DC 头 DCR, DC 尾 >
[0104] The Graph Convolutional Neural Network (GCN) algorithm was used in DDCC to process MKG. 单词 = <ME 单词 ,MR 单词 MS 单词 Perform an aggregation operation on each node to obtain the aggregated node information. User set – User – Dialogue sequence – Conversation – Word set
[0105] Aggregated node information These are concatenated into a word node representation matrix encoded by a word knowledge graph, denoted as...
[0106] In this invention, the GCN algorithm is referenced from "From Deep Learning to Graph Neural Networks: Models and Practices" published in June 2023, authored by Zhang Yuhong. Chapter 8 of the literature introduces graph convolutional neural networks.
[0107] Step 3: Semantic space fusion between different knowledge graphs;
[0108] In this invention, after obtaining entity representations and semantic representations, a method for maximizing mutual information is used. and Integration in semantic space.
[0109] It is the representation matrix of course entity nodes encoded by the course knowledge graph.
[0110] This is the word node representation matrix encoded by the word knowledge graph.
[0111] In acquiring and Then, a method for maximizing mutual information needs to be used to make... and Node alignment is performed using formulas (1) to (4).
[0112] Considering the large number of dialogue records and the numerous contextual words often contained within them, a super token is used to calculate the relationship between course entity nodes and word nodes to reduce the impact of meaningless words and word noise. First, the course-word-super token representation is calculated using a self-attention mechanism as follows:
[0113] EV 超级 =VV HH ·α 超级 (1)
[0114]
[0115] EV 超级 The representation of a course-word-super token.
[0116] VV HH For the session A matrix composed of the representations of context words obtained from the session. any word All can be represented from the word node matrix The GCN algorithm was used to retrieve the word representation of the corresponding word node. Session VV is obtained by combining the corresponding word representations. HH .
[0117] α 超级 The self-attention score for the super token.
[0118] BB 超级 This is a learnable parameter vector.
[0119] For BB 超级 The inversion of .
[0120] WW 超级 This is the learnable parameter matrix.
[0121] The calculation is performed using a classification function with each course entity node and a super token:
[0122]
[0123] f(·) is the classification function.
[0124] ENn For any course entity node, i.e.
[0125] EV v For any one used to construct the super token EV 超级 The word node, i.e., EV v ∈VV HH .
[0126] σ is the sigmoid activation function.
[0127] T n,v For use with MKG 课程 = <ME 课程 ,MR 课程 MS 课程 >and MKG 单词 = <ME 单词 ,MR 单词 MS 单词 The transformation matrix used to represent the semantic space of > is aligned.
[0128] The classification function is optimized to maximize mutual information, thereby maximizing the mutual information between course entities and words.
[0129]
[0130] MI represents the mutual information between the course knowledge graph and the word knowledge graph.
[0131] The expected value of the positive sample.
[0132] This represents the expected value of the negative sample.
[0133] EEN n Belonging to Any entity node in the dataset.
[0134] EEV v Belonging to Any word node in the array.
[0135] In this invention, the EN of the positive sample n With EV v The selection is made from the user's dialogue. The negative sample's EEN n With EEV v There are no entities and words that appear together.
[0136] Step 4: A method for obtaining user course preferences in long short-term memory networks based on time gating mechanisms;
[0137] In longer dialogue sequences, users' long-term preferences often differ from their short-term preferences. In models that do not consider both long-term and short-term interests, the dialogue sequence is treated as a whole to generate a representation of the user's current interests. However, this representation often shows relevance to recently interacted items, thus ignoring the user's long-term interests. Furthermore, it should be considered that user preferences are repeatable within a certain time frame; that is, the preference at the next moment may be the same as the preference at the previous moment, and the time interval between these repetitions is not fixed.
[0138] Step 401: Use time-gated LSTM interest to obtain users' short-term course preferences;
[0139] In acquiring users' preferences for short-term courses, time interval and time span features are incorporated into the LSTM model. For the k-th time step, the cell states in the LSTM model are updated.
[0140]
[0141] LC k This represents the cell state of the LSTM model at the k-th time step.
[0142] LI k This is the input gate for the LSTM model at the k-th time step.
[0143] LTS k The time gate is controlled by the time interval feature of the k-th time step.
[0144] This represents the candidate cell state of the LSTM model at the k-th time step.
[0145] LF k This is the forget gate for the LSTM model at the k-th time step.
[0146] LTI k The time gate is controlled by the time span feature of the k-th time step.
[0147] The corrected cell state of the LSTM model at time step k-1.
[0148] ⊙ represents the product of each element.
[0149] for The update method is as follows:
[0150]
[0151]
[0152]
[0153] WW LC To compute the learnable parameter matrix related to the input in the candidate cell state.
[0154] UU LC To compute the learnable parameter matrix related to the hidden state in the candidate cell state.
[0155] BB LC To calculate the bias in candidate cell states.
[0156] EN k,选定 This represents the course entity input at the k-th time step in the LSTM model. For the session at the k-th time step... Course entity node representation matrix encoded by the RGCN algorithm Extract the entity representation EN corresponding to the mentioned entity. k,选定 .
[0157] This represents the modified hidden state of the LSTM model at time step k-1.
[0158] WW LI To compute the learnable parameter matrix related to the input in the input gate.
[0159] UU LI To compute the learnable parameter matrix in the input gate that is related to the hidden state.
[0160] BB LI To calculate the deviation in the input gate.
[0161] σ is the sigmoid activation function.
[0162] WW LF To compute the learnable parameter matrix related to the input in the forget gate.
[0163] UU LF To compute the learnable parameter matrix related to the hidden state in the forget gate.
[0164] BB LF To calculate the deviation in the forgetting gate.
[0165] For the time interval feature control of the k-th time step, the time gate LTS is used. k Time gate LTI with time span feature control k The calculation method is as follows:
[0166] TI k =tanh(WW) TI log(t k -tk-1 )+BB TI (9)
[0167] TS k =tanh(WW) TS log(t k -t k-1 )+BB TS (10)
[0168] LTI k =σ(WW) LTI ·EN k,选定 +UU LTI TI k +BB LTI (11)
[0169] LTS k =σ(WW) LTS ·EN k,选定 +UU LTS ·TS k +BB LTS (12)
[0170] TI k This represents the time span feature at the k-th time step.
[0171] t k This is the time corresponding to the k-th time step.
[0172] t k-1 This is the time corresponding to the (k-1)th time step.
[0173] WW TI To calculate TI k The learnable parameter matrix in.
[0174] BB TI To calculate TI k Deviation in.
[0175] TS k The time interval feature is the k-th time step.
[0176] WW TS To calculate TS k The learnable parameter matrix in.
[0177] BB TS To calculate TS k Deviation in.
[0178] WW LTI To calculate LTI k The learnable parameter matrix that is time-dependent on the input.
[0179] UU LTI To calculate LTI k The learnable parameter matrix related to time span characteristics.
[0180] BB LTI To calculate LTI k The deviation in time.
[0181] WW LTS To calculate LTS k The learnable parameter matrix that is time-dependent on the input.
[0182] UU LTS To calculate LTS k The learnable parameter matrix related to time span characteristics.
[0183] BB LTS To calculate LTS k The deviation in time.
[0184] The calculation method for the LSTM hidden state and the LSTM output gate at the k-th time step is as follows:
[0185]
[0186] LH k =LO k ⊙tanh(LC k (14)
[0187] LO k is the output gate of the LSTM model at the k-th time step.
[0188] WW LO To compute the learnable parameter matrix related to the input in the output gate.
[0189] UU LO To compute the learnable parameter matrix related to the hidden state in the output gate.
[0190] BB LO To calculate the deviation in the input gate.
[0191] LH k Let be the hidden state of the LSTM model at the k-th time step.
[0192] At this point, the cell state LC in the LSTM model k With hidden state LH k There will be semantic irregularities. An attention mechanism is used to correct these irregularities, resulting in the corrected cell state and the corrected hidden state:
[0193]
[0194]
[0195] This represents the corrected cell state at the k-th time step.
[0196] α k Let be the attention score at the k-th time step in the attention mechanism.
[0197] LC k-1 This represents the cell state at time step k-1.
[0198] This is the hidden state of the correction at the k-th time step.
[0199] LH k-1 This represents the hidden state at the (k-1)th time step.
[0200] In this invention, the attention score α at the k-th time step in the attention mechanism k The calculation method is as follows:
[0201]
[0202] EN k,选定 This represents the entity at the k-th time step in the LSTM model.
[0203] WW α This is the learnable parameter matrix for calculating attention scores.
[0204] EN 预测 The entity representation of the course to be predicted.
[0205] p is the sum of the total number of course entities and course attributes mentioned in the session, i.e., p = D HH +G HH D HH For the session
[0206] The total number of courses mentioned in the online education dialogue recommendation system, G HH This represents the total number of course attributes of the online education dialogue recommendation system mentioned in the conversation.
[0207] β is any summation index in the attention score, EN β It represents a course entity or course attribute at any time step in the session.
[0208] Unlike the LSTM model, the LSTM model used in this invention outputs a weighted average of the modified hidden states of the LSTM, calculated as follows:
[0209]
[0210]
[0211] The weighting coefficients are for short-term weighted averages.
[0212] WW 短期 To compute the learnable parameter matrix in the weighted average
[0213] PP 短期 This represents the user's preference for short-term course entities.
[0214] This is the hidden state of the correction at the k-th time step.
[0215] Let be the hidden state of the LSTM model at any time step.
[0216] Step 402: Use an attention-based coordination filtering model to obtain users' long-term course preferences;
[0217] When the user's short-term course entity preference representation is obtained (PP) 短期 Then, a long-term course entity preference representation is introduced to balance the output of long-term and short-term preferences.
[0218] This invention takes into account that users' long-term preferences are inherent preferences formed by users over a long period of life. Therefore, long-term preferences are assumed to be the slow-changing or static part of users' preferences, and there is no need to introduce a time gating mechanism to obtain users' long-term preferences.
[0219] This invention uses an attention-based collaborative filtering model to obtain users' long-term course entity preferences, calculated as follows:
[0220]
[0221] PP 长期 This represents the user's long-term course entity preferences.
[0222] , where is the weight coefficient of the long-term behavior corresponding to the k-th course entity.
[0223] Considering that each user action has a different level of importance, a weight is needed to regulate the importance of that action. Therefore, this weight coefficient is defined as:
[0224]
[0225] EL k =tanh(WW) 长期 ·EN k +BB EL ) (twenty two)
[0226] EL k This is the representation of the course entity at the k-th time step after passing through a fully connected layer.
[0227] BB 长期 This is used to calculate the learnable parameter vector in the long-term behavior weight coefficients.
[0228] WW 长期 This is the learnable parameter matrix of the fully connected layer.
[0229] BB EL This represents the deviation of the fully connected layer.
[0230] In this invention, the LSTM method is referenced from "TensorFlow Deep Learning: A Deeper Understanding of Artificial Intelligence Algorithm Design", published in May 2020, by author Liangqu Long, Chapter 11 of which introduces the LSTM method.
[0231] Step 403: Use attention-based short-term course preferences and long-term course preferences to obtain a representation of the user's course preferences;
[0232] When the user's short-term course entity preference representation is obtained (PP) 短期 and long-term course entity preference representation PP 长期 Next, the two entity preference representations need to be fused. Since both preference representations represent their respective time domains and each has its own limitations, an attention-based dynamic approach is used to fuse them. The fusion method is as follows:
[0233] PP 实体 =α 实体 ·PP 短期 +(1-α 实体 )·PP 长期 (twenty three)
[0234] α 实体 =σ(WW) 实体 [PP 短期 ;PP 长期 ;x c ]+BB 实体 ) (twenty four)
[0235] PP 实体 This represents the user's course entity preferences.
[0236] α 实体 Attention scores are calculated in the course entity preference fusion computation.
[0237] σ is the sigmoid function.
[0238] WW 实体 This is the learnable parameter matrix.
[0239] BB 实体 This is a learnable parameter vector.
[0240] x c The representation matrix of course entity nodes encoded from the course knowledge graph The entity context information extracted is represented as follows:
[0241]
[0242]
[0243] For dialogue recommendation systems, learn from recent conversations The matrix is composed of the embedding representations of all context items obtained in the process.
[0244] α c The score represents the context information.
[0245] BB c This is a learnable parameter vector.
[0246] WW c This is the learnable parameter matrix.
[0247] Step 404: Use the self-attention mechanism to obtain user word preferences;
[0248] PP that obtains the user's course entity preference representation 实体 Simultaneously, it is also necessary to obtain the user's word preferences in order to better model the user's interests. This invention uses a self-attention mechanism to obtain the user's word preferences, which are represented as follows:
[0249] PP 单词 =VV (MMDC) ·α 单词 (27)
[0250]
[0251] PP 单词 This represents the user's word preferences.
[0252] VV (MMDC) For each word in the user's dialogue sequence in MMDC, the corresponding word node representation matrix is encoded using a word knowledge graph. A matrix representing the combination of word nodes in the text.
[0253] α 单词 To calculate the attention weights in word preferences.
[0254] BB 单词 This is a learnable parameter vector.
[0255] WW 单词 This is the learnable parameter matrix.
[0256] Step 405: Use a gating mechanism to obtain a representation of user dialogue preferences;
[0257] PP representing the user's course entity preferences 实体 PP represents the user's word preferences 单词 A gating mechanism is used to fuse and obtain a representation of the user's overall dialogue preferences. The calculation method for the overall dialogue preference representation is as follows:
[0258] PP 对话 =α 对话 ·PP 单词 +(1-α 对话 )·PP 实体 (29)
[0259] α 对话 =σ(WW) 对话 [PP 单词 ;PP 实体 ]) (30)
[0260] PP 对话 This represents the user's overall conversational preferences.
[0261] α 对话 The weights in the gating mechanism.
[0262] σ is the sigmoid function.
[0263] WW 对话 This is the learnable parameter matrix in the gating mechanism.
[0264] Step 5: Enhancement processing based on the preference representation of similar users;
[0265] This invention calculates the contribution score of other users to the current user by designing contribution weights; the higher the contribution score, the stronger the similarity between the users. By setting hyperparameters, some user preference features with high similarity can be incorporated into the user's preference features.
[0266] In recommender systems, a user's historical behavior often reflects their potential preferences and interests, and users with similar historical behavior patterns are likely to share common preferences in certain areas. In this context, analyzing the similarity between users can serve as a supplementary method, helping the recommender system build a more accurate representation of user preferences based on limited information, thereby enabling better recommendations.
[0267] Therefore, this invention introduces the concept of similar users, leveraging the relationships between different users and entities to enhance the understanding of individual user preferences. Simultaneously, a dynamic update mechanism is designed so that the user's preference representation can continuously evolve as the conversation progresses. This dynamic user preference modeling method not only better adapts to the dynamic changes in user preferences but also provides richer and more detailed personalized recommendations.
[0268] Step 501: Calculate the contribution based on the preference representations of other users;
[0269] For any user User m There are other users in the dialogue recommendation system, User′ m ∈MU\{User m Other users (User′) m For User m The contribution of course entity preferences is represented as follows:
[0270]
[0271]
[0272] This is the truncation function corresponding to the entity.
[0273] For other users User′ m For User m The contribution vector of course entity preferences.
[0274] For other users User′ m For User m The contribution of course entity preferences.
[0275] For other users User′ m Course entity preference representation.
[0276] sim is the similarity function, and this invention uses cosine similarity as the similarity function.
[0277] δ(x) is the current truncation function, used to prevent excessive user participation in the current user preference representation modeling, which could introduce noise. The values of the current truncation function δ(x) are:
[0278] δ(x)=max(0,x-δ s (33)
[0279] x is the current value of the truncation function.
[0280] δs The threshold of the truncation function.
[0281] For any user User m There are other users in the dialogue recommendation system, User′ m ∈MU\{User m Other users (User′) m For User m The word preference representation of the contribution is as follows:
[0282]
[0283]
[0284] This is the truncation function corresponding to a word.
[0285] For other users User′ m For User m The contribution vector of word preferences.
[0286] For other users User′ m For User m The contribution of word preference.
[0287] For other users User′ m Word preference representation.
[0288] Step 502: Calculate similar user representations based on the contribution levels of different users;
[0289] For other users User' in the dialogue recommendation system m ∈MU\{User m The overall representation of similar users' course entity preferences is as follows:
[0290]
[0291] ER 实体 For User m Similar user course entity preference representation.
[0292] For other users User' in the dialogue recommendation system m ∈MU\{User m The overall representation of word preferences among similar users is as follows:
[0293]
[0294] ER单词 For User m Similar user word preference representation.
[0295] User m This invention fuses similar user course entity preference representations and similar user word preference representations to obtain similar user dialogue representations. A gating mechanism is used to fuse these two preference representations into:
[0296] PP 相似 =α 相似 ·ER 单词 +(1-α 相似 )·ER 实体 (38)
[0297] α 相似 =σ(WW) 相似 [ER 单词 ;ER 实体 (39)
[0298] PP 相似 Representation of conversations between similar users.
[0299] α 相似 The weights in the gating mechanism.
[0300] σ is the sigmoid function.
[0301] WW 相似 This is the learnable parameter matrix in the gating mechanism.
[0302] Step 503: Use a gated attention mechanism to fuse similar user preference representations and user dialogue preference representations to obtain user preference representations;
[0303] To better represent similar user dialogues PP 相似 PP's overall dialogue preference representation with users 对话 The data is then fused using a gated attention mechanism to selectively generate the final user preference representation. The gated attention mechanism is represented as follows:
[0304] τ 用户 =φ 用户 (XX 用户 ·W τ (41)
[0305] υ 用户 =φ 用户 (XX 用户 ·WW υ (42)
[0306] XXu =[PP 对话 ;PP 相似 (43)
[0307] PP 用户 This represents the final expression of user preferences.
[0308] BB 用户 To compute the learnable parameter vector for the final user preference representation.
[0309] WW 用户 To compute the learnable parameter matrix for the final user preference representation.
[0310] τ 用户 This is the first affine transformation of the gated attention unit after the activation function.
[0311] υ 用户 This is the second affine transformation of the gated attention unit after the activation function.
[0312] φ 用户 For the activation function, this invention uses the SiLu activation function.
[0313] XX 用户 is the input matrix for the gated attention unit.
[0314] WW τ To calculate τ 用户 The learnable parameter matrix at that time.
[0315] WW υ To calculate υ 用户 The learnable parameter matrix at that time.
[0316] In this invention, the attention matrix AA of the gated attention unit 用户 for:
[0317]
[0318]
[0319] Q(y) = WW Q ·y+BB Q (46)
[0320] K(y) = WW K ·y+BB K (47)
[0321] w represents the dimension of the head of the multi-head attention in the gated attention unit; in this invention, w = 128.
[0322] For gated attention units, affine transformations of user dialogue preferences and similarity preference inputs are used.
[0323] Q(y) represents the pair of gated attention units. The first affine transformation.
[0324] K(y) represents the pair of gated attention units. The second affine transformation.
[0325] For calculation The learnable parameter matrix at that time.
[0326] WW Q Let be the learnable parameter matrix for calculating Q(y).
[0327] WW K Let K(y) be the learnable parameter matrix when calculating K(y).
[0328] BB Q This is the learnable parameter vector used to compute Q(y).
[0329] BB K Let K(y) be the learnable parameter vector.
[0330] In this invention, the gating attention mechanism refers to the gating attention unit in the paper "Transformer Quality in LinearTime" in Volume 162 of the Proceedings of Machine Learning Research published at the PMLR conference in July 2022, authored by Weizhe Hua, Zihang Dai, Hanxiao Liu, and Quoc Le.
[0331] Step 504: Recommend courses based on user preference representations;
[0332] After obtaining the final user preference representation PP 用户 Then, recommendations are made based on the course entities in the course entity knowledge graph. For any course entity CO d ∈MCO, calculate the value given to user User m The probability of recommendation is:
[0333]
[0334] P 推荐 (CO d ) is the course entity CO d The probability of recommendation.
[0335] For course entity COd The corresponding course entity knowledge graph is represented by the RGCN algorithm.
[0336] By iterating through the course set MCO of the online education dialogue recommendation system and sorting it according to the recommendation probability, we can obtain the course set for recommending to users. m A collection of recommended courses.
[0337] See Figure 1 The diagram illustrates the basic functional framework of a dialogue recommendation system. The user intent understanding module, acting as the direct information exchanger with the user, processes user data and encodes it. This invention is based on a dialogue recommendation system enhanced by user multi-preference fusion (e.g.,...). Figure 2 , Figure 3 The value shown is stored in the user intent understanding module of the dialogue recommendation system and is set up to enhance user intent understanding.
[0338] See Figure 2 , Figure 3 , Figure 4 As shown, the dialogue recommendation system based on user multi-preference fusion enhancement proposed in this invention includes a representation alignment module, an entity and word extraction module, a long-term and short-term preference acquisition module, a similar user preference acquisition module, and a representation fusion module.
[0339] Characterization Alignment Module
[0340] The first aspect of the representation alignment module is used to receive the encoded knowledge graph. and The second aspect uses the method of maximizing mutual information to... and Node alignment in the text.
[0341] Entity and word extraction module
[0342] The user dialogue sequence concatenation model uses the dialogue sequences generated from interactions between users and the online education database as user history data, importing them into the current user-dialogue sequence set. middle.
[0343] For any user User m , will belong to User m User-conversation sequence set with online education database Each dialogue sequence in the dataset is extracted, and these extracted dialogue sequences are combined into a user-dialogue sequence-session set, denoted as […]. and
[0344] Belongs to User M of of The corresponding user-dialogue sequence-conversation-word set is:
[0345] The first aspect of the entity and word extraction module is from and Searching for and The related course entity representations and word node representations; the second aspect is using dialogue recommendation systems to analyze recent dialogues. The matrix consisting of the embedding representations of all context items obtained from the source The words in the user's dialogue sequence MMDC correspond to the word node representation matrix encoded by the word knowledge graph. The matrix VV representing the combination of word nodes in the matrix. MMDC ).
[0346] Long-term and short-term preference acquisition module
[0347] See Figure 3 As shown, the long-term and short-term preference acquisition module uses a time-gated LSTM model to acquire user entity long-term and short-term preferences and fuses them with user word preferences, thereby obtaining user dialogue preferences learned from user conversations. Specifically: the first aspect uses a time-gated LSTM interest model to acquire user short-term course preferences (PP). 短期 Secondly, an attention-based coordination filtering model is used to obtain users' long-term course preferences (PP). 长期 Thirdly, attention-based short-term and long-term course preferences are fused to obtain a user's course preference representation (PP). 实体 Fourthly, the self-attention mechanism is used to obtain user word preferences (PP). 单词 The fifth aspect involves using gating mechanisms to obtain user dialogue preference representations (PP). 对话 .
[0348] Similar User Preference Acquisition Module
[0349] The similar user preference acquisition module calculates the contribution scores of other users to the current user by designing contribution weights. It then incorporates the preference features of highly similar users into the user's preference features through a gating attention mechanism for course recommendations. Specifically: Firstly, it calculates the contribution score based on the preference representations of other users. Secondly, similar user representations (PP) are calculated based on the contributions of different users. 相似 .
[0350] Characterization fusion module
[0351] The representation fusion module uses a gated attention mechanism to fuse similar user preference representations and user dialogue preference representations to obtain the user preference representation PP.用户 .
[0352] Example 1
[0353] The method of this invention is simulated on the ReDail and TG-ReDial datasets. Hit@1 refers to the hit rate of the first item in the recommendation list, Hit@10 refers to the hit rate of the top 10 items in the recommendation list, MRR@10 refers to the average reciprocal rank of the top 10 items in the recommendation list, and NDCG@10 refers to the normalized discount cumulative gain of the top 10 items in the recommendation list.
[0354] (a) The experimental results on the ReDail dataset are shown in Table 1.
[0355] Table 1. Experimental results on the ReDial dataset.
[0356] ReDial 0.001 0.014 0.003 0.005 KBRD 0.034 0.177 0.069 0.094 KGSF 0.038 0.181 0.073 0.098 TG-ReDial 0.036 0.165 0.069 0.091 C2-CRS 0.050 0.228 0.097 0.128 Popularity 0.012 0.057 0.024 0.029 GRU4Rec 0.001 0.007 0.003 0.003 SASRec 0.026 0.056 0.049 0.069 TextCNN 0.017 0.064 0.025 0.030 BERT 0.001 0.009 0.002 0.004 UMC-CRS 0.054 0.243 0.106 0.135
[0357] The ReDail model is the baseline model for the ReDail dataset itself. This model includes an RNN-based dialogue system module and uses an autoencoder for recommendation.
[0358] The KBRD model uses only the item knowledge graph to enhance the semantics of entities in the user's dialogue and improve the recommendation results, while using a Transformer-based model to generate the response text in the dialogue.
[0359] The KGSF model uses both item knowledge graphs and word knowledge graphs to enhance user representations and employs contrastive learning to obtain node representations of corresponding entities in the dialogue.
[0360] The TG-ReDial model is the baseline model for the TG-ReDial dataset itself. This model mainly includes a recommendation module based on the BERT model and a GPT-2 dialogue module for generating dialogues.
[0361] The C2-CRS model uses an item knowledge graph to enhance the node representations of corresponding entities in user dialogues, and employs a coarse-to-fine fine-grained pre-training method based on contrastive learning to enhance the representation of user preferences in the dialogue context.
[0362] The Popularity model makes recommendations based directly on the historical recommendation frequency of items. In other words, the model counts the number of times each item appears in a conversation and considers items with higher frequencies as popular items, and then prioritizes recommending them to users.
[0363] The GRU4Rec model is a gated recurrent unit-based model for sequence recommendation. It uses gated recurrent units to capture temporal dependencies in the user's interaction sequence to recommend the next item.
[0364] The SASRec model uses a Transformer model to encode the user's interaction sequence, thereby capturing the user's long-term interests and preferences, and recommending the next item based on those preferences.
[0365] The TextCNN model uses a convolutional neural network-based approach to extract textual features from dialogues and perform recommendation actions.
[0366] The BERT model uses BERT-encoded dialogue context to obtain dialogue representations, and uses fully connected layers to classify and recommend these representations.
[0367] The method of this invention is abbreviated as UMC-CRS.
[0368] As shown in Table 1, on the ReDial dataset, ReDial, as the baseline model for the ReDial dataset itself, performs poorly, even worse than the Popularity model, which recommends items based on high overall user interaction, i.e., the most mentioned movies. The performance of the baseline models directly used for recommendation is inferior to the four dialogue recommendation models: KBRD, KGSF, TG-ReDial, and C2-CRS. This is because these four dialogue models can effectively model the relationship between entities and user text semantics and generate better user representations for recommendation. Among the baseline models directly used for recommendation, if the contextual information cannot be well understood, such as in GRU4Rec and BERT models, training directly on the dialogue text sequence sometimes yields results even worse than the Popularity model based on popularity. In dialogue recommendation models, KBRD performs better than ReDial because KBRD introduces an entity knowledge graph for user modeling; while KGSF performs better than KBRD because KGSF incorporates both entity knowledge graphs and word knowledge graphs. C2-CRS performs best among the baseline models because it uses a contrastive learning pre-training method to enhance user preference representations.
[0369] The model in this invention uses similar user information to enhance user preference representation and employs a user representation enhancement method that integrates multiple sequence preferences. Compared to other baseline models, this invention achieves superior performance on four metrics: Hit@1, Hit@10, MRR@10, and NDCG@10. Compared to the best baseline model, C2-CRS, these four metrics show improvements of 8.0%, 6.6%, 9.2%, and 5.4%, respectively. The magnitude of these improvements indicates that the UMC-CRS model incorporates more standard facts in its recommendations, and these standard facts are ranked higher in the recommendation list.
[0370] (ii) The experimental results on the TG-ReDial dataset are shown in Table 2.
[0371] Table 2 Experimental results on the TG-ReDial dataset
[0372] ReDial 0.0005 0.0023 0.0009 0.0013 KBRD 0.0022 0.0218 0.0069 0.0103 KGSF 0.0062 0.0218 0.0106 0.0132 TG-ReDial 0.0077 0.0289 0.0121 0.0154 C2-CRS 0.0058 0.0316 0.0121 0.0162 Popularity 0.0007 0.0032 0.0011 0.0016 TextCNN 0.0024 0.0090 0.0046 0.0051 BERT 0.0049 0.0075 0.0102 0.0137 UMC-CRS 0.0081 0.0327 0.0126 0.0170
[0373] As shown in Table 2, most models perform worse on the TG-ReDial dataset than on the ReDial dataset. Analysis of the datasets reveals that the TG-ReDial dataset has a larger number of items (i.e., the number of movies that can be recommended) than the ReDial dataset, thus requiring a better representation of user preferences to compensate for the larger search space. Furthermore, conversations on the TG-ReDial dataset do not begin with the intention of finding movies, while conversations on the ReDial dataset start by asking movie-related questions. This makes it relatively more difficult for the dialogue recommendation system to obtain a representation of user preferences.
[0374] Furthermore, looking at the experimental results on the TG-ReDial dataset, it can be seen that the TG-ReDial model itself performs well. The TG-ReDial dataset has high requirements for Chinese language comprehension; some recommendation models with good language understanding, such as BERT, even outperform the KBRD model, because KBRD only incorporates entity knowledge graphs. Dialogue recommendation models incorporating both entity and word knowledge graphs show good experimental results. The UMC-CRS model of this invention outperforms other baseline models in four metrics: Hit@1, Hit@10, MRR@10, and NDCG@10. Compared to the best metrics of other baseline models, these four metrics show improvements of 5.2%, 3.4%, 4.1%, and 4.9%, respectively. The UMC-CRS model's recommendations include more standard facts, and these standard facts are ranked higher in the recommendation list.
[0375] Experimental results show that by incorporating a preference acquisition method that integrates multiple user sequences and a preference representation enhancement method based on similar users, the UMC-CRS model can generate more accurate results than the baseline model to achieve user item recommendations, further demonstrating the effectiveness of the model and the superiority of the recommendation results.
[0376] (III) Ablation Test
[0377] This invention will explore the roles and effects of each component in the UMC-CRS model. Compared to other baseline models, the main contribution of this invention's UMC-CRS model is the introduction of long-term and short-term preference acquisition methods into user item preference modeling, and the establishment of a similar user screening mechanism to generate a user preference enhancement model for enhancing user dialogue preferences.
[0378] Therefore, this invention sets up three variants: UMC-CRS / ls, UMC-CRS / ss, and UMC-CRS / mi. UMC-CRS / ls removes the long-short-term preference acquisition method, directly replacing it with a self-attention mechanism to acquire the user's item preference representation. UMC-CRS / ss removes the similar user representation enhancement method, directly using similar user preference representations to enhance the user dialogue preference representation Pc obtained in the model, representing the final user preference representation, and using this preference representation to obtain the recommendation list. UMC-CRS / mi removes the mutual information maximization method; in this variant, it is not necessary to use mutual information maximization during pre-training to align the semantic spaces of the two knowledge graphs. Experiments on these three variants were conducted on the ReDial and TG-ReDial datasets, and the experimental results are shown in Table 3.
[0379] Table 3 Ablation Experiment Results
[0380]
[0381] In Table 3, M@10 and N@10 refer to MRR@10 and NDCG@10, respectively. Table 3 shows that long-short-term preference acquisition, similar user preference enhancement, and mutual information representation alignment all contribute to the model's performance. Among these, the mutual information removal representation alignment method has a greater impact on the model because it prevents the semantic space between the item knowledge graph and the word knowledge graph from bridging, directly leading to biases in related entity representations and thus affecting the final user preference representation. The removal of long-short-term preference acquisition, compared to the original model, demonstrates that self-attention alone is insufficient to effectively model user entity preference embeddings, while introducing long-short-term preferences effectively improves model performance. The similar user representation enhancement method has a smaller impact on the model compared to the other two modules, but it still positively affects model performance.
[0382] (iv) Cold start performance evaluation of the model
[0383] In the UMC-CRS model, the similarity user representation enhancement is introduced, which uses the preference representations of users who are similar to the current user to strengthen the current user's preference representation. This method is more useful for users under cold-start conditions; therefore, this section will discuss the cold-start recommendation effect of the UMC-CRS model.
[0384] Considering that users need to exclude historical dialogue text during cold start, and given that the TG-ReDail dataset stores user dialogue IDs and associates them with user IDs, and each user has an average of 6.7 historical dialogue records, it is a suitable dataset to study the impact of cold start on the model. Specifically, when splitting the dataset, when a user's dialogue records are selected for the test set, their historical dialogue records are proportionally removed, i.e., proportionally concatenated during dialogue splicing, to study the performance of the UMC-CRS model under different retention ratios.
[0385] In this experiment, the retention rate of historical dialogue records was set to 75%, 50%, 25%, and 0%, respectively, which represents the percentage chosen when splicing dialogues. 100% indicates that the original model retains all historical dialogue records to generate user preference representations, while 0% indicates that historical dialogue records are not used when obtaining user preferences, and only the current dialogue record is used to obtain user preference representations. The experimental results are shown in Table 4.
[0386] Table 4 shows the cold start performance evaluation on the TG-ReDial dataset.
[0387]
[0388] As shown in Table 4, removing users' conversation history at different ratios impacted the model's performance, but the retention ratio was not positively correlated with performance. Sometimes, increasing the retention ratio actually led to a slight decrease in performance, but the model's performance remained close to or even exceeded that of the TG-ReDail model. In this case, the model can be considered to still perform well under cold-start conditions, thus providing better recommendations for new users.
Claims
1. A dialogue recommendation method based on user multi-preference fusion enhancement, characterized in that... It includes the following steps: Step 1: Import user historical data and concatenate user sessions to form a session set; The user dialogue sequence splicing model uses the dialogue sequences generated by the interaction between the user and the online education database as user history data and imports them into the current user-dialogue sequence set. For any user , will belong User-conversation sequence set with online education database Each dialogue sequence in the dataset is extracted, and these extracted dialogue sequences are combined into a user-dialogue sequence-session set, denoted as […]. ,and ; Step 2: Introduce external knowledge graphs to obtain representations; Step 201: Encode the set of user dialogues using the course knowledge graph; The course knowledge graph in the online education database is denoted as ,and , This refers to the set of nodes in the course knowledge graph. This is the set of edges connecting nodes in the course knowledge graph. Let be the set of triples of information in the course knowledge graph; where any node in the course knowledge graph is denoted as . The edges connecting nodes are denoted as . The information is represented using triples. ; Using the RGCN algorithm of the relational graph neural network to... Perform an aggregation operation on each node to obtain the aggregated node information. ,and Course Attribute Collection Course Collection ; Aggregated node information These are concatenated into a course entity node representation matrix encoded by the course knowledge graph, denoted as... ; Step 202: Encode the set of user dialogues using a word knowledge graph; The word knowledge graph in the online education database is denoted as ,and , This refers to the set of nodes in a word knowledge graph. This is the set of edges connecting nodes in a word knowledge graph. Let be the set of triples in the word knowledge graph; where any node in the word knowledge graph is denoted as . The edges connecting nodes are denoted as . The information is represented using triples. ; exist The graph convolutional neural network (GCN) algorithm is used to... Perform an aggregation operation on each node to obtain the aggregated node information. User set – User – Dialogue sequence – Conversation – Word set ; Aggregated node information These are concatenated into a word node representation matrix encoded by a word knowledge graph, denoted as... ; Step 3: Semantic space fusion between different knowledge graphs; After obtaining entity representations and semantic representations, the method of maximizing mutual information is used to achieve this. and Integration in semantic space; This is the representation matrix of course entity nodes encoded by the course knowledge graph; This is the word node representation matrix encoded using a word knowledge graph; In acquiring and Then, a method for maximizing mutual information needs to be used to make... and Node alignment in the text; Node alignment is handled using formulas (1) to (4); The representation of the course-word-super token, calculated using the self-attention mechanism, is as follows: ; ; The representation of a course – word – super token; For the session The matrix composed of the representations of context words obtained from the session; for the session any word All can be represented from the word node matrix. The GCN algorithm was used to retrieve the word representation of the corresponding word node. , will the session The corresponding word representations are combined to obtain ; The self-attention score for the super token; A learnable parameter vector; for The inversion; The learnable parameter matrix; The calculation is performed using a classification function with each course entity node and a super token: ; For classification functions; For any course entity node, that is ; For any one used to construct the super token The word node, i.e. ; It is the sigmoid activation function; For use and The transformation matrix used to represent and align the semantic space; The classification function is optimized to maximize mutual information, thereby maximizing the mutual information between course entities and words. ; To represent the mutual information between the course knowledge graph and the word knowledge graph; The expected value of the positive sample; The expected value of the negative sample; Belonging to Any entity node in the list; Belonging to Any word node in the; Step 4: A method for obtaining user course preferences in long short-term memory networks based on time gating mechanisms; Step 401: Use time-gated LSTM interest to obtain users' short-term course preferences; In acquiring user preferences for short-term courses, time interval features and time span features are introduced into the LSTM model; for the first... Each time step updates the cell state in the LSTM model; ; For the first Cell states of the LSTM model at each time step; For the first Input gates of the LSTM model at each time step; For the first Time gates controlled by time interval characteristics of each time step; For the first Candidate cell states of the LSTM model at each time step; For the first Forget gates for LSTM models at each time step; For the first Time gates controlled by the time span characteristics of each time step; For the first The corrected cell states of the LSTM model at each time step; It is a product of each element; for The update method is as follows: ; ; ; To compute the input-related learnable parameter matrix in the candidate cell states; To compute the learnable parameter matrix related to the hidden state in the candidate cell state; To calculate the bias in candidate cell states; In the LSTM model, the first The course entity input at the first time step; for the first... A session at each time step The course entity node representation matrix encoded by the course knowledge graph using the RGCN algorithm Extract the entity representation corresponding to the mentioned entity. ; For the first The corrected hidden states of the LSTM model at each time step; To compute the learnable parameter matrix related to the input in the input gate; To compute the learnable parameter matrix in the input gate that is related to the hidden state; To calculate the deviation in the input gate; It is the sigmoid activation function; To compute the learnable parameter matrix related to the input in the forget gate; To compute the learnable parameter matrix related to the hidden state in the forget gate; To calculate the deviation in the forgetting gate; For the The time interval feature controls the time gate. Time gates controlled by time span characteristics The calculation method is as follows: ; ; ; ; For the first The time span characteristics of each time step; For the first The time corresponding to each time step; For the first The time corresponding to each time step; For calculation The learnable parameter matrix in; For calculation Deviation in; For the first The time interval characteristics of each time step; For calculation The learnable parameter matrix in; For calculation Deviation in; For calculation The learnable parameter matrix that is time-dependent on the input; For calculation Learnable parameter matrix related to time span characteristics; For calculation Time deviation; For calculation The learnable parameter matrix that is time-dependent on the input; For calculation Learnable parameter matrix related to time span characteristics; For calculation Time deviation; For the The LSTM hidden state and LSTM output gate at each time step are calculated as follows: ; ; For the first The output gates of the LSTM model at each time step; To compute the input-dependent learnable parameter matrix in the output gate; To compute the learnable parameter matrix related to the hidden state in the output gate; To calculate the deviation in the input gate; For the first The hidden states of the LSTM model at each time step; Cell state in the LSTM model at this time With hidden state There will be semantic irregularities. An attention mechanism is used to correct these irregularities, resulting in the corrected cell state and the corrected hidden state: ; ; For the first The corrected cell state at each time step; The first in the attention mechanism Attention score at each time step; For the first Cellular state at each time step; For the first The hidden state of the correction at each time step; For the first The hidden state at each time step; The first in the attention mechanism Attention score at each time step The calculation method is as follows: ; In the LSTM model, the first Entity representation at each time step; This is the learnable parameter matrix for calculating attention scores; The entity representation of the course to be predicted; The sum of the total number of course entities and course attributes mentioned in the conversation, i.e. ; The total number of courses from the online education dialogue recommendation system mentioned in the conversation. The total number of course attributes of the online education dialogue recommendation system mentioned in the conversation; Let be any summation index in the attention score. It represents a course entity or course attribute at any time step in the session; Unlike the LSTM model, the output of the LSTM model used is a weighted average of the modified hidden states of the LSTM, calculated as follows: ; ; The weighting coefficients are for short-term weighted averages. To compute the learnable parameter matrix in the weighted average This represents the user's preference for short-term course entities. For the first The hidden state of the correction at each time step; Let be the hidden state of the LSTM model at any time step; Step 402: Use an attention-based coordination filtering model to obtain users' long-term course preferences; When the user's short-term course entity preference is obtained Then, a long-term course entity preference representation is introduced to balance the output of long-term and short-term preferences; A collaborative filtering model based on an attention mechanism is used to obtain users' long-term course entity preferences. The calculation method is as follows: ; This represents the user's long-term course entity preferences. For the first Weight coefficients for the long-term behavior corresponding to each course entity; The weighting coefficient is defined as: ; ; For the first The representation of a course entity at each time step after passing through a fully connected layer; To calculate the learnable parameter vector in the long-term behavior weight coefficients; The learnable parameter matrix of the fully connected layer; For deviations in fully connected layers; Step 403: Use attention-based short-term course preferences and long-term course preferences to obtain a representation of the user's course preferences; When the user's short-term course entity preference is obtained and long-term course entity preference representation Next, the two entity preference representations need to be fused; an attention-based dynamic approach is used to fuse these two preferences, and the fusion method is as follows: ; ; This represents the user's course entity preferences. Attention score in the calculation of course entity preference fusion; It is the sigmoid function; The learnable parameter matrix; A learnable parameter vector; The representation matrix of course entity nodes encoded from the course knowledge graph The extracted entity context information is represented as follows: ; ; For dialogue recommendation systems, learn from recent conversations The matrix consisting of the embedding representations of all context items obtained in the process; The score represents the context information; A learnable parameter vector; The learnable parameter matrix; Step 404: Use the self-attention mechanism to obtain user word preferences; In obtaining the user's course entity preference representation Simultaneously, it is necessary to obtain the user's word preferences in order to better model the user's interests; a self-attention mechanism is used to obtain the user's word preferences, which are represented as follows: ; ; This represents the user's word preferences. For the user's dialogue sequence The words in the text correspond to the word node representation matrix encoded by the word knowledge graph. A matrix representing the combination of word nodes in the text; To calculate attention weights in word preferences; A learnable parameter vector; The learnable parameter matrix; Step 405: Use a gating mechanism to obtain a representation of user dialogue preferences; Representing users' course entity preferences Representation of user word preferences A gating mechanism is used to fuse data to obtain a representation of the user's overall dialogue preferences. The calculation method for the overall dialogue preference representation is as follows: ; ; To represent the user's overall conversational preferences; Weights in the gating mechanism; It is the sigmoid function; This is the learnable parameter matrix in the gating mechanism; Step 5: Enhancement processing based on the preference representation of similar users; Step 501: Calculate the contribution based on the preference representations of other users; For any user There are other users in the dialogue recommendation system. Other users For users The contribution of course entity preferences is represented as follows: ; ; This is the truncation function corresponding to the entity; For other users For users The contribution vector of course entity preferences; For other users For users The contribution of course entity preferences; For other users Course entity preference representation; It is a similarity function; This is the current truncation function, used to prevent excessive user participation in the current user preference representation modeling, which could introduce noise. The value can be: ; This is the current value of the truncation function; The threshold for the truncation function; For any user There are other users in the dialogue recommendation system. Other users For users The word preference representation of the contribution is as follows: ; ; This is the truncation function corresponding to a word; For other users For users The contribution vector of word preferences; For other users For users The contribution of word preference; For other users Word preference representation; Step 502: Calculate similar user representations based on the contribution levels of different users; For other users within the dialogue recommendation system The overall representation of similar users' course entity preferences is as follows: ; For users Similar user course entity preference representation; For other users within the dialogue recommendation system The overall representation of word preferences among similar users is as follows: ; For users Similar user word preference representation; users The similar user course entity preference representation and the similar user word preference representation are fused to obtain the similar user dialogue representation. A gating mechanism is then used to fuse the two preference representations into: ; ; Representation of similar user conversations; Weights in the gating mechanism; It is the sigmoid function; This is the learnable parameter matrix in the gating mechanism; Step 503: Use a gated attention mechanism to fuse similar user preference representations and user dialogue preference representations to obtain user preference representations; The gating attention mechanism is represented as follows: ; ; ; ; This represents the final user preference. To compute the learnable parameter vector for the final representation of user preferences; To compute the learnable parameter matrix for the final user preference representation; This is the first affine transformation of the gated attention unit after the activation function; This is the second affine transformation of the gated attention unit after the activation function; For activation functions; This is the input matrix for the gated attention unit; For calculation The learnable parameter matrix at time; For calculation The learnable parameter matrix at time; Attention matrix of gated attention unit for: ; ; ; ; The dimension of the head in the multi-head attention within the gated attention unit; For gated attention units, affine transformations of user dialogue preferences and similarity preference inputs are used. For gating attention units The first affine transformation; For gating attention units The second affine transformation; For calculation The learnable parameter matrix at time; For calculation The learnable parameter matrix at time; For calculation The learnable parameter matrix at time; For calculation The learnable parameter vector at that time; For calculation The learnable parameter vector at that time; Step 504: Recommend courses based on user preference representations; After obtaining the final user preference representation Then, recommendations are made based on the course entities in the course entity knowledge graph; for any given course entity... Calculate for users The probability of recommendation is: ; For course entities The probability of recommendation; For course entities The corresponding course entity knowledge graph representation after applying the RGCN algorithm; Course collection for online education dialogue recommendation system By iterating through the list and sorting the results according to their recommendation probabilities, we can obtain the data to recommend to users. A collection of recommended courses.
2. The dialogue recommendation method based on user multi-preference fusion enhancement according to claim 1, characterized in that: In online education networks, node identities can include courses, course attributes, or words broken down in a conversation.
3. A dialogue recommendation system based on user multi-preference fusion enhancement, wherein the system is used to implement the dialogue recommendation method of claim 1 or 2; characterized in that... It includes a representation alignment module, an entity and word extraction module, a long-term and short-term preference acquisition module, a similar user preference acquisition module, and a representation fusion module; The first aspect of the representation alignment module is used to receive the encoded knowledge graph. and ; The second aspect uses the method of maximizing mutual information to... and Node alignment in the text; The user dialogue sequence concatenation model uses the dialogue sequences generated from interactions between users and the online education database as user history data, importing them into the current user-dialogue sequence set. middle; For any user , will belong User-conversation sequence set with online education database Each dialogue sequence in the dataset is extracted, and these extracted dialogue sequences are combined into a user-dialogue sequence-session set, denoted as […]. ,and ; Belongs to the user of of The corresponding user-dialogue sequence-conversation-word set is: ; The first aspect of the entity and word extraction module is from and Searching for and The related course entity representations and word node representations; the second aspect is using dialogue recommendation systems to analyze recent dialogues. The matrix consisting of the embedding representations of all context items obtained from the source Based on the user's dialogue sequence The words in the text correspond to the word node representation matrix encoded by the word knowledge graph. The matrix representing the combination of word nodes in the text ; The long-term and short-term preference acquisition module obtains the long-term and short-term preferences of user entities by designing a time-gated LSTM model and integrates them with the user's word preferences, thereby obtaining the user's dialogue preferences learned from the user's conversation. Specifically: Firstly, LSTM interest based on time gating is used to obtain users' short-term course preferences. ; The second aspect involves using an attention coordination filtering model to obtain users' long-term course preferences. ; Thirdly, attention-based short-term and long-term course preferences are fused to obtain a representation of users' course preferences. ; Fourthly, the self-attention mechanism is used to obtain user word preferences. ; The fifth aspect involves using gating mechanisms to obtain user dialogue preference representations. ; The similar user preference acquisition module calculates the contribution scores of other users to the current user by designing contribution weights. It then incorporates the preference features of highly similar users into the user's preference features through a gating attention mechanism for course recommendations. Specifically: Firstly, it calculates the contribution score based on the preference representations of other users. , ; The second aspect involves calculating similar user characteristics based on the contribution levels of different users. ; The representation fusion module uses a gated attention mechanism to fuse similar user preference representations and user dialogue preference representations to obtain user preference representations. .
Citation Information
Patent Citations
Neural time gate adaptive fusion session recommendation method based on graph neural network
CN116662532A
Information service providing method and apparatus, electronic device, and storage medium
WO2022116536A1