A conversation recommendation method based on dual view contrastive learning

Through dual view comparison learning method, the session recommendation system is improved, and the hypergraph convolution network and Transformer encoder are used to extract information between sessions and within sessions, solving the problem that existing systems fail to make full use of the high-order relationships between sessions and generalizations. The problem of poor ability has achieved higher recommendation accuracy and generalization ability.

CN118964588BActive Publication Date: 2025-02-07JIANGXI UNIVERSITY OF FINANCE AND ECONOMICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411456174.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-07
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing session recommendation systems fail to make full use of hidden higher-order relationships between sessions and have poor generalization capabilities.

Method used

Using a contrast learning method based on dual view, data augmentation is performed on non-uniform session sequences through the session enhancement module, hypergraph is constructed and information between sessions and within sessions is extracted using hypergraph convolutional network and Transformer encoder, and recommendation list is generated and performed. Comparative learning to optimize model parameters.

Benefits of technology

Improve recommendation accuracy, fully explore hidden higher-order relationships between sessions, and enhance the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118964588B_ABST
    Figure CN118964588B_ABST
Patent Text Reader

Abstract

The present invention provides a conversation recommendation method based on dual view contrastive learning. The method uses the time interval sequence of a non-uniform conversation sequence as the basis for time interval information enhancement, performs data enhancement operations on the non-uniform conversation sequence, and thus obtains an enhanced conversation sequence with uniform time intervals. The method can fully mine the information in the conversation to improve the accuracy of recommendation. The present invention constructs a dual view encoder that combines a hypergraph convolutional network encoder and a Transformer encoder, which can capture hidden high-order relations between conversations from multiple perspectives and enrich the diversity of recommendations. In addition, the present invention uses the original conversation sequence and the enhanced conversation embedding between conversations for contrastive learning, optimizes the model parameters of the contrastive recommendation module, can alleviate the influence of irrelevant items on conversation embedding, and effectively enhances the generalization of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a conversation recommendation method based on dual view contrast learning. Background Art

[0002] Session-based Recommender System (SBRS) aims to predict the next item of a user's interaction based on a series of items. Most existing session-based recommender systems do not fully utilize the time interval information between items in a session, which affects the accuracy of recommendations.

[0003] In recent years, Graph Neural Network (GNN) has been highly praised in conversational recommendation due to its powerful ability to model complex relationships. However, conversational recommendation based only on GNN ignores the hidden high-order relationships between conversations and lacks rich information. In addition, data sparsity has always been a phenomenon in recommendation systems. Contrastive learning is often used in research to improve this problem. However, most contrastive learning frameworks are single in form and have poor generalization capabilities. Summary of the invention

[0004] To this end, an embodiment of the present invention proposes a conversation recommendation method based on dual view contrastive learning to solve the problem that the prior art ignores the hidden high-order relations between conversations and has poor generalization ability.

[0005] According to an embodiment of the present invention, the conversation recommendation system includes a conversation enhancement module, a dual view encoder and a comparative recommendation module, and the dual view encoder includes a hypergraph convolutional network encoder and a Transformer encoder;

[0006] The method comprises:

[0007] In the conversation enhancement module, the original conversation sequence and the corresponding original time interval sequence are obtained, all conversations in the original conversation sequence are sorted according to the standard deviation of the time interval in the original time interval sequence, and the non-uniform conversation sequence is screened out. The time interval sequence of the non-uniform conversation sequence is used as the basis for time interval information enhancement, and the non-uniform conversation sequence is subjected to data enhancement operation, so as to obtain an enhanced conversation sequence with uniform time interval;

[0008] In the dual view encoder, a hypergraph is constructed based on the enhanced session sequence. The hypergraph convolutional network encoder is used in the hypergraph to obtain the enhanced session embedding between sessions. At the same time, the original session sequence and the enhanced session sequence are input into the Transformer encoder to obtain the original session embedding and the enhanced session embedding within the session.

[0009] In the comparative recommendation module, a recommendation list is generated based on the enhanced session embedding within a session, and comparative learning is performed using the original session sequence and the enhanced session embedding between sessions to optimize the model parameters of the comparative recommendation module.

[0010] The conversation recommendation method based on dual view contrast learning according to the embodiment of the present invention has the following beneficial effects:

[0011] (1) In order to solve the problem that most existing models do not fully utilize session information, the present invention uses the time interval sequence of non-uniform session sequences as the basis for time interval information enhancement, performs data enhancement operations on the non-uniform session sequences, and thus obtains enhanced session sequences with uniform time intervals, which can fully mine the information in the session to improve the accuracy of recommendations;

[0012] (2) The present invention constructs a dual view encoder that combines a hypergraph convolutional network encoder and a Transformer encoder. A hypergraph is constructed based on an enhanced conversation sequence. The hypergraph convolutional network encoder is then used to link different conversations, enabling information transfer between different conversations and fully mining the correlation between different conversations. At the same time, combined with the Transformer encoder, it can extract usable information from between conversations and within conversations, thereby capturing hidden high-order relationships between conversations from multiple perspectives, enriching the diversity of recommendations.

[0013] (3) The present invention generates a recommendation list based on the enhanced session embedding within a session, and uses the original session sequence and the enhanced session embedding between sessions for comparative learning to optimize the model parameters of the comparative recommendation module, which can alleviate the impact of irrelevant items on session embedding and effectively enhance the generalization of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and / or additional aspects and advantages of the embodiments of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0015] Figure 1 is a structural diagram of a conversation recommendation system according to an embodiment of the present invention;

[0016] Figure 2 4 is a flow chart of a conversation recommendation method based on dual view contrast learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0018] The embodiment of the present invention proposes a conversation recommendation method based on dual view contrast learning, which is applied to the conversation recommendation system. Figure 1 The conversation recommendation system includes a conversation enhancement module, a dual view encoder and a comparative recommendation module, and the dual view encoder includes a hypergraph convolutional network encoder and a Transformer encoder.

[0019] See also Figure 2 , the method comprises steps S1 to S3:

[0020] S1, in the conversation enhancement module, obtain the original conversation sequence and the corresponding original time interval sequence, sort all the conversations in the original conversation sequence according to the standard variance of the time interval in the original time interval sequence, screen out the non-uniform conversation sequence, use the time interval sequence of the non-uniform conversation sequence as the basis for time interval information enhancement, perform data enhancement operation on the non-uniform conversation sequence, and thus obtain an enhanced conversation sequence with uniform time interval.

[0021] Among them, data enhancement is an important means to generate the self-supervisory signal required for contrastive learning. An effective data enhancement strategy can not only generate contrastive learning signals in a targeted manner, but also mine the side information in the session, making the session embedding information richer, thereby improving the accuracy of recommendations. The present invention incorporates the time interval information between items in the session into the data enhancement strategy, and enhances the original session into a session with uniform time intervals, which can effectively improve the recommendation effect.

[0022] Assume that there is a user set U , the project set is V , U Users in u The original session of interaction in chronological order is , The corresponding time interval sequence is .

[0023] Specifically, the original conversation sequence and the corresponding original time interval sequence are obtained, all conversations in the original conversation sequence are sorted according to the standard deviation of the time interval in the original time interval sequence, and the non-uniform conversation sequence is screened out, including:

[0024] All sessions in the original session sequence are sorted in ascending order according to the standard variance of the time intervals in the original time interval sequence. The smaller the variance, the higher the ranking. The sessions with a preset proportion in the front ranking are regarded as uniform sessions, and those other than uniform sessions are non-uniform sessions, thus obtaining a non-uniform session sequence.

[0025] If there is a total x conversation sequence, then there is The sequences are non-uniform conversation sequences. is the preset ratio.

[0026] Then, the time interval sequence of the non-uniform session sequence is used as the basis for time interval information enhancement, and a data enhancement operation is performed on the non-uniform session sequence. The data enhancement operation is one of the Ti-Insert operation, Ti-Crop operation, Ti-Mask operation, and Ti-Substitute operation. During specific implementation, only one operation is performed for each non-uniform session, and the specific operation to be performed is randomly selected.

[0027] The specific process of Ti-Insert operation is as follows:

[0028] Sort the time interval sequences of the non-uniform session sequences in descending order of time interval length, and keep the first k The item corresponding to the 1-time interval sequence is taken as the first target position, , is the insertion ratio, N 1 is the length of the non-uniform conversation sequence, and a target item is inserted at each first target position in the non-uniform conversation sequence, wherein the target item has not interacted with the user yet and the target item is related to the context in the non-uniform conversation sequence.

[0029] Example 1. The user bought books and pens on the first day, and stationery on the second day. It can be considered that a related item "ink" can be inserted between the shopping sequences to make the shopping sequence uniform and complete.

[0030] The specific process of Ti-Crop operation is as follows:

[0031] Choosing a cutoff position in a non-uniform sequence of sessions ,exist The director will be The continuous sequence of is truncated into a subsequence, , To truncate the proportional coefficient, select the cutoff position for the truncated sequence again to perform truncation operation until a set of sequences with the same length is generated. , calculate the standard deviation of each subsequence, and then select the subsequence with the smallest standard deviation as the new sequence after the operation.

[0032] Example 2: The user bought a book, a pen, and stationery on the first day, and a shirt and tie on the second day. This shopping sequence can be considered to be divided into two subsequences.

[0033] The specific process of Ti-Mask operation is as follows:

[0034] Sort the time interval sequence of the non-uniform session sequence in ascending order of time interval length, and delete the previous k Items corresponding to 2 time interval sequences.

[0035] Example 3: The user bought a book, a pen, and stationery in the morning of the first day, a shirt in the afternoon, and a bookmark and a bookshelf on the second day. It can be considered that "shirt" does not belong to the entire shopping sequence, and the item is deleted.

[0036] The specific process of Ti-Substitute operation is as follows:

[0037] Sort the time interval sequence of the non-uniform session sequence in ascending order of time interval length. k The items corresponding to the two time interval sequences are used as the second target position. At the second target position, the corresponding items are replaced with items that are relevant to the context and have not been interacted with by the user.

[0038] Example 4: The user purchased books, pens, stationery, and desks. You can replace "desk" with "bookshelf" to recommend items that are related to reading.

[0039] S2, in the dual view encoder, a hypergraph is constructed based on the enhanced session sequence, and a hypergraph convolutional network encoder is used in the hypergraph to obtain the enhanced session embedding between sessions. At the same time, the original session sequence and the enhanced session sequence are input into the Transformer encoder to obtain the original session embedding and the enhanced session embedding within the session.

[0040] After data enhancement, the conversation information has established a connection with similar items, and based on this connection, the hidden high-order relationship between conversations can be deeply mined. Because the hyperedges in the hypergraph can connect multiple nodes, which corresponds to the multiple items in the conversation, it has an inherent advantage in conversation embedding modeling. Therefore, the present invention adopts the hypergraph To represent the enhanced conversation sequence, capturing this relationship in the conversation, where Hypergraph The set of hypergraph nodes, Hypergraph The hyperedge set of the hypergraph. Formally, since the hypergraph is an undirected graph, the set of items in the session is represented as a hyperedge. After converting the enhanced session sequence into a hypergraph, all items in a single session are connected, which concretizes the many-to-many high-order relationship. At the same time, through the connection between the hypergraph nodes and the hyperedges, the relationship extraction between the session and its similar sessions is realized.

[0041] After the hypergraph is constructed, a hypergraph convolutional network is used to capture hidden high-order relationships at the session level. The main challenge in defining convolution operations on hypergraphs is how to propagate the embeddings of items. The present invention uses spectral hypergraph convolution to construct a hypergraph convolutional network.

[0042] Among them, the hypergraph convolutional network encoder satisfies the following conditional formula:

[0043] ;

[0044] in, It is a hypergraph convolution Layer User u Original session Medium Project Embedded, is the adjacency matrix A Middle i Row, No. The elements of the column, is the adjacency matrix A Middle j Row, No. The elements of the column, is the weight matrix W Middle Row, No. The elements of the column, It is a hypergraph convolution -1st level users u Original session Medium Project Embedded, N To increase the length of the conversation sequence, M The number of associated sessions.

[0045] The matrix of the hypergraph convolutional network with row normalization is expressed as follows:

[0046] ;

[0047] in, It is a hypergraph convolution Layer User u Original session Medium Project The embedding matrix of B is the edge degree matrix, D is the node degree matrix, Hypergraph convolution -1st level users u Original session Medium Project The embedding matrix of .

[0048] Hypergraph convolution can be viewed as a two-stage feature transformation of the hypergraph structure from “node-hyperedge-node”, i.e., information transfer from “item-session-item”. The information aggregation from node to hyperedge is obtained by multiplying the node matrix with the adjacency matrix. Completed, then multiplied by the adjacency matrix A , so that information can be passed from the hyperedge to the node. L max After the hypergraph convolution, the item embeddings obtained in each layer are averaged to obtain the final item embedding ,in L max is the total number of hypergraph convolution layers.

[0049] When transmitting information in space, time information cannot be ignored. In a conversation sequence, time information is often reflected in the positional relationship of items. Position embedding is an effective technology introduced in the Transformer encoder and is applied to the storage and application of item position information in many fields. This paper designs a learnable position matrix , by concatenating this matrix with the session embedding, the time information is integrated into the session embedding.

[0050] Specifically, a hypergraph is constructed based on the enhanced session sequence, and the following condition is satisfied in the process of obtaining the enhanced session embedding between sessions using the hypergraph convolutional network encoder in the hypergraph:

[0051] ;

[0052] ;

[0053] in, represents the enhanced session embedding between sessions, Is a user u Enhanced Session Middle i The embedding of the project, N To increase the length of the conversation sequence, tanh is the activation function, and b is a learnable parameter, Indicates cascade operation, is the output of the hypergraph convolutional network encoder. i The embedding of the project, Embed for position.

[0054] The session embedding obtained above by the hypergraph convolutional network encoder contains the relationship between sessions. However, accurate prediction of user interests requires extracting intra-session information.

[0055] The Transformer architecture has a powerful sequence encoding capability, has achieved great success in the application of extracting sequential information, and is widely used in the recommendation field. The present invention uses the Transformer encoder to extract intra-session information.

[0056] Specifically, each encoder layer in the Transformer encoder includes a multi-head self-attention sublayer and a feed-forward fully connected sublayer. The multi-head self-attention sublayer takes the session sequence as input to calculate the query value, key value, and attribute value, implements the attention calculation through the scaled dot product operation, and uses multiple sets of linear transformation mapping matrices to extract different representations of the session sequence; the feed-forward fully connected sublayer contains two linear transformations and a ReLU activation function to model the session sequence. Both the multi-head self-attention sublayer and the feed-forward fully connected sublayer use residual connections and layer normalization to improve performance and accelerate the convergence process. That is, for the input session sequence, first use three sets of learnable weight matrices to generate query, key, and value representations; then calculate the Attention score, perform a softmax operation to generate weight coefficients; finally, weighted sum the value to obtain the final Self-Attention representation. This process enables the model to extract the position information of items in the session sequence. The feed-forward fully connected sublayer can capture the local features of the sequence and complement the output representation of the multi-head self-attention sublayer. In this way, the enhanced session and the original session are passed through the Transformer encoder to obtain corresponding embedding representations to achieve downstream tasks.

[0057] The Transformer encoder satisfies the following condition:

[0058] ;

[0059] in, represents the original session embedding, represents an enhanced session embedding within a session, is the Transformer encoder.

[0060] S3, in the comparative recommendation module, a recommendation list is generated based on the enhanced session embedding within the session, and the original session sequence and the enhanced session embedding between sessions are used for comparative learning to optimize the model parameters of the comparative recommendation module.

[0061] The original session information and the enhanced session information are fed into the dual view encoding to obtain three session embeddings containing different information. These three session embeddings represent the same session but contain information extracted from different perspectives, and there is a one-to-one mapping relationship between the three. Therefore, in each round of iteration, the embedding representing the same session can be used as a positive sample, and the randomly selected different session embeddings can be used as negative samples. In this way, the different information in the fusion session embeddings can be compared and learned. For the fusion of information between sessions, the standard binary cross entropy loss function is used. As a learning goal, the similarity or difference of sample pairs can be intuitively measured to more effectively distinguish positive and negative samples and improve the optimization effect of the model.

[0062] However, only using data-enhanced session features for recommendation tasks will result in a single contrastive learning framework, which will cause the model to be affected by inaccurate item modeling during early training and have limitations in capturing changes in user preferences, thereby limiting the generalization ability of the model. Therefore, the present invention uses the original session embedding and the enhanced session embedding for contrastive learning to avoid the influence of irrelevant session items and improve the generalization ability of the model. For the original session information, the NT-Xent loss function is used. Extraction helps improve the feature representation ability of the model, making the learned features perform better in downstream tasks.

[0063] Since the data-enhanced session contains time interval duration information, and the output embedding from the Transformer encoder contains position information, the enhanced session embedding after the Transformer encoder will integrate the relationship between items in the multi-angle session, and this paper takes it as the main body of the recommendation task. The log-likelihood loss function is used here Make recommendations and optimize the encoder.

[0064] The loss functions obtained in the recommendation task and the contrastive learning task can be used to optimize the model. In order to improve the recommendation performance through contrastive learning, the loss function of the contrastive recommendation module is L The following conditions are met:

[0065] ;

[0066] ;

[0067] ;

[0068] ;

[0069] in, represents the log-likelihood loss function, is the standard binary cross entropy loss function, is the NT-Xent loss function, for The weight coefficient of for The weight coefficient of is a nonlinear activation function, For users c Enhanced session embedding between sessions, sim represents the dot product operation of the similarity measure between two session embeddings, Is a user c The original session embedding, for Medium Project The embedding For users c Item embedding.

[0070] According to the above-mentioned conversation recommendation method based on dual view contrast learning, the following beneficial effects are achieved:

[0071] (1) In order to solve the problem that most existing models do not fully utilize session information, the present invention uses the time interval sequence of non-uniform session sequences as the basis for time interval information enhancement, performs data enhancement operations on the non-uniform session sequences, and thus obtains enhanced session sequences with uniform time intervals, which can fully mine the information in the session to improve the accuracy of recommendations;

[0072] (2) The present invention constructs a dual view encoder that combines a hypergraph convolutional network encoder and a Transformer encoder. A hypergraph is constructed based on an enhanced conversation sequence. The hypergraph convolutional network encoder is then used to link different conversations, enabling information transfer between different conversations and fully mining the correlation between different conversations. At the same time, combined with the Transformer encoder, it can extract usable information from between conversations and within conversations, thereby capturing hidden high-order relationships between conversations from multiple perspectives, enriching the diversity of recommendations.

[0073] (3) The present invention generates a recommendation list based on the enhanced session embedding within a session, and uses the original session sequence and the enhanced session embedding between sessions for comparative learning to optimize the model parameters of the comparative recommendation module, which can alleviate the impact of irrelevant items on session embedding and effectively enhance the generalization of the model.

[0074] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0075] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A conversation recommendation method based on dual view contrastive learning, characterized in that: Applied to a conversation recommendation system, the conversation recommendation system includes a conversation enhancement module, a dual view encoder and a comparative recommendation module, the dual view encoder includes a hypergraph convolutional network encoder and a Transformer encoder; The method comprises: In the conversation enhancement module, the original conversation sequence and the corresponding original time interval sequence are obtained, all conversations in the original conversation sequence are sorted according to the standard deviation of the time interval in the original time interval sequence, and the non-uniform conversation sequence is screened out. The time interval sequence of the non-uniform conversation sequence is used as the basis for time interval information enhancement, and the non-uniform conversation sequence is subjected to data enhancement operation, so as to obtain an enhanced conversation sequence with uniform time interval; In the dual view encoder, a hypergraph is constructed based on the enhanced session sequence. The hypergraph convolutional network encoder is used in the hypergraph to obtain the enhanced session embedding between sessions. At the same time, the original session sequence and the enhanced session sequence are input into the Transformer encoder to obtain the original session embedding and the enhanced session embedding within the session. In the comparative recommendation module, a recommendation list is generated based on the enhanced session embedding within a session. The standard binary cross entropy loss function is calculated using the enhanced session embedding within a session and the enhanced session embedding between sessions. The original session sequence and the enhanced session embedding within a session are used for comparative learning to optimize the model parameters of the comparative recommendation module.

2. The conversation recommendation method based on dual view contrastive learning according to claim 1, characterized in that: The original conversation sequence and the corresponding original time interval sequence are obtained, and all conversations in the original conversation sequence are sorted according to the standard deviation of the time interval in the original time interval sequence, and the non-uniform conversation sequence is screened out. The time interval sequence of the non-uniform conversation sequence is used as the basis for time interval information enhancement, and the non-uniform conversation sequence is subjected to data enhancement operations, specifically including: All sessions in the original session sequence are sorted in ascending order according to the standard deviation of the time interval in the original time interval sequence, and the sessions with a preset proportion in the first sorting are regarded as uniform sessions, and the sessions other than the uniform sessions are non-uniform sessions, so as to obtain a non-uniform session sequence, and the time interval sequence of the non-uniform session sequence is used as the basis for time interval information enhancement, and a data enhancement operation is performed on the non-uniform session sequence, wherein the data enhancement operation is one of a Ti-Insert operation, a Ti-Crop operation, a Ti-Mask operation, and a Ti-Substitute operation; The specific process of Ti-Insert operation is as follows: Sort the time interval sequences of the non-uniform session sequences in descending order of time interval length, and keep the first k The item corresponding to the 1-time interval sequence is taken as the first target position, , is the insertion ratio, N 1 is the length of the non-uniform conversation sequence, a target item is inserted at each first target position in the non-uniform conversation sequence, the target item has not been interacted with by the user, and the target item is related to the context in the non-uniform conversation sequence; The specific process of Ti-Crop operation is as follows: Choosing a cutoff position in a non-uniform sequence of sessions ,exist The director will be The continuous sequence of is truncated into a subsequence, , To truncate the proportional coefficient, select the cutoff position for the truncated sequence again to perform truncation operation until a set of sequences with the same length is generated. Calculate the standard deviation of each subsequence, and then select the subsequence with the smallest standard deviation as the new sequence after the operation; The specific process of Ti-Mask operation is as follows: Sort the time interval sequence of the non-uniform session sequence in ascending order of time interval length, and delete the previous k 2 items corresponding to the time interval sequence; The specific process of Ti-Substitute operation is as follows: Sort the time interval sequence of the non-uniform session sequence in ascending order of time interval length. k The items corresponding to the two time interval sequences are used as the second target position. At the second target position, the corresponding items are replaced with items that are relevant to the context and have not been interacted with by the user.

3. The conversation recommendation method based on dual view contrastive learning according to claim 2, characterized in that: The hypergraph convolutional network encoder satisfies the following conditional formula: ; in, It is a hypergraph convolution Layer User u Original session Medium Project The embedding is the adjacency matrix A Middle i Row, No. The elements of the column, is the adjacency matrix A Middle j Row, No. The elements of the column, is the weight matrix W Middle Row, No. The elements of the column, It is a hypergraph convolution -1st level users u Original session Medium Project The embedding N To increase the length of the conversation sequence, M is the number of associated sessions; In the process of building a hypergraph based on the enhanced conversation sequence and using the hypergraph convolutional network encoder to obtain the enhanced conversation embedding between conversations in the hypergraph, the following conditional formula is satisfied: ; ; in, represents the enhanced session embedding between sessions, Is a user u Enhanced Session Medium Project Embedded, N To increase the length of the conversation sequence, tanh is the activation function, and b is a learnable parameter, Indicates cascade operation, is the output of the hypergraph convolutional network encoder The embedding Embed for position.

4. The conversation recommendation method based on dual view contrastive learning according to claim 3, characterized in that: Each encoder layer in the Transformer encoder includes a multi-head self-attention sublayer and a feed-forward fully connected sublayer. The multi-head self-attention sublayer takes the session sequence as input to calculate the query value, key value and attribute value, realizes the attention calculation through the scaled dot product operation, and uses multiple sets of linear transformation mapping matrices to extract different representations of the session sequence; the feed-forward fully connected sublayer contains two linear transformations and a ReLU activation function to model the session sequence. Both the multi-head self-attention sublayer and the feed-forward fully connected sublayer use residual connection and layer normalization.

5. The conversation recommendation method based on dual view contrastive learning according to claim 4, characterized in that: The Transformer encoder satisfies the following condition: ; in, represents the original session embedding, represents an enhanced session embedding within a session, is the Transformer encoder.

6. The conversation recommendation method based on dual view contrastive learning according to claim 5, characterized in that: The loss function of the comparison recommendation module L The following conditions are met: ; ; ; ; in, represents the log-likelihood loss function, is the standard binary cross entropy loss function, is the NT-Xent loss function, for The weight coefficient of for The weight coefficient of is a nonlinear activation function, For users c Enhanced session embedding between sessions, sim represents the dot product operation of the similarity measure between two session embeddings, Is a user c The original session embedding, for Medium Project The embedding For users c Project Embed.

Citation Information

Patent Citations

  • Interest-aware dual-channel graph contrast learning session recommendation method

    CN117194765A

  • Session type recommendation method and system applying multi-channel dynamic hypergraph

    CN117788119A