A session-based item recommendation method, medium, device
By constructing a hypergraph neural network and a multi-head self-attention mechanism, the item representation is optimized, which solves the problems of a small number of items within a session and a lack of semantic information across sessions, and achieves efficient item recommendation results.
Patent Information
- Application Number
- CN202411827996.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing session-based item recommendation methods perform poorly when the number of items within a session is small and the items are short, and they cannot effectively learn semantic information across session items.
We construct a hypergraph neural network, which optimizes item representations by embedding hypergraph nodes and hyperedges, combining multi-head self-attention mechanism and contrastive learning, to achieve cross-session information propagation and clustering, and calculates item similarity scores for recommendation.
By effectively integrating the relevance of items within a conversation, the understanding of user interests and the perception of item similarity are enhanced, thereby improving the accuracy and effectiveness of cross-conversation recommendations.
Smart Images

Figure CN119848333B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of project recommendation, and in particular to a conversation-based project recommendation method, medium, and device. Background Art
[0002] With the advent of the big data era, the amount of information about users and items is enormous, posing a challenge to recommending items of interest to users. Recommendation systems have become particularly important in this process. However, recommendation models based on long-term user behavior are ineffective when users are not logged in or for privacy reasons. In these cases, recommendation systems can only rely on short-term behavior sequences of anonymous users, a model known as session-based recommendation. In this case, extracting user interests from session data is crucial for model building.
[0003] Current conversational recommendation models are primarily built using recurrent neural networks or graph neural networks. These utilize various neural network algorithms to optimize the learning of item representations, but they still suffer from the following drawbacks:
[0004] Methods based on recurrent neural networks treat items in a conversation as sequences and use them to predict the next item to be clicked. However, in real-world scenarios, the number of items in a conversation is small and the conversation length is relatively short, which leads to poor recommendation performance of recurrent neural network-based models.
[0005] Graph neural network-based methods build local conversation graphs and use them to learn item representations. However, these methods can only learn the structural representations of adjacent nodes and cannot explicitly learn the representations of two structurally non-adjacent but semantically similar items, i.e., the semantic information of the items. They also fail to consider item representation learning from the perspective of cross-session information propagation. Summary of the Invention
[0006] The purpose of the present invention is to solve the problems of a small number of items in a session, poor item recommendation results in the prior art, and inability to recommend items across sessions. A session-based item recommendation method is proposed, comprising the following steps:
[0007] S1. Get the project information including project ID, project price and project category in the session;
[0008] S2, construct a hypergraph for each session with item ID, item price and item category as nodes;
[0009] S3. Build a hypergraph neural network, obtain the embedded representation of the hypergraph nodes as the embedded representation of the nodes in the first layer of the hypergraph neural network, and learn the embedded representation of the hyperedges in the same layer based on the embedded representation of the nodes; obtain the embedded representation of the nodes in the next layer based on the embedded representation of the nodes and hyperedges in the same layer, and continuously update the embedded representation of the nodes in the last layer to obtain the embedded representation of the updated nodes;
[0010] S4. Cluster the project IDs of all sessions and divide them into multiple clusters. Through comparative learning, maximize the similarity of project IDs within the same cluster and minimize the similarity between project IDs in different clusters.
[0011] S5. Based on the updated embedding representation of the item price node, obtain the price preference through the multi-head self-attention mechanism;
[0012] S6. Based on the embedded representation of the updated item ID, position encoding is introduced to calculate interest preferences;
[0013] S7. Calculate the similarity scores of the projects based on price preferences and interest preferences, recommend projects based on the similarity scores, and construct the loss of contrastive learning and the loss of project recommendation to optimize the project recommendation results.
[0014] Furthermore, the hypergraph contains three types of nodes: ID nodes, category nodes, and price nodes; the hypergraph contains three types of hyperedges: session hyperedges, feature hyperedges, and price hyperedges. The session hyperedges connect the project ID nodes within the session, the price hyperedges connect the project price nodes within the session, and the feature hyperedges connect the project ID nodes, project category nodes, and project price nodes of the projects.
[0015] Furthermore, the embedding representation of the hypergraph nodes is learned based on the embedding representation of the hypergraph nodes. The embedding representation of the hyperedges at the same layer is expressed as follows:
[0016]
[0017] Among them, e (l-1) represents the embedding representation of the l-1th layer hyperedge, represents the coefficient related to the i-th node in the l-1th layer, represents the embedding representation of the i-th node in the l-1th layer, L represents the number of layers of the hypergraph, q is the attention vector, and N represents the set of embedding representations of the nodes.
[0018] Furthermore, based on the embedding representation of the hypergraph nodes and the embedding representation of the hyperedges at the same layer, the embedding representation of the nodes at the next layer is obtained, which is expressed as:
[0019]
[0020] Among them, v(l) represents the embedding representation of the l-th layer node, v (l-1) represents the embedding representation of the l-1th layer node, represents the l-1th layer session hyperedge, represents the l-1th layer feature hyperedge, W1, W2, W3 are learnable parameter matrices, [;] represents the splicing operation, σ() is the sigmoid function, represents the element-wise product, and L represents the number of layers of the hypergraph.
[0021] Furthermore, based on the embedded representation of the updated price node, the price preference is obtained through the multi-head self-attention mechanism, which is expressed as:
[0022]
[0023] I p =[head1;head2;…;head h ]
[0024] Among them, V p represents the updated embedding representation of the price node, m represents the number of price nodes, head i represents the price preference obtained by the i-th attention head in the self-attention module, I represents the parameter matrix of the learnable query vector, key vector, and value vector for the i-th attention head. p represents price preference, and h represents the number of attention heads in the self-attention module.
[0025] Furthermore, based on the updated embedding representation of the item ID, position encoding is introduced to calculate the interest preference, which is expressed as:
[0026]
[0027] in, The embedded representation of the updated project ID node and its corresponding position information pos i The generated comprehensive representation, A1, A2∈R d×d 、b f ,W f ∈R d×2d represents the learnable parameters, represents the embedded representation of the item ID node of the i-th item after the update, pos i represents the position information embedding representation of the i-th item, β i represents the attention score of the i-th item, m represents the number of item IDs, and I s represents interest preference, u represents attention vector, represents the average of all item embeddings, b represents the bias coefficient, and σ() represents the sigmoid function.
[0028] Furthermore, based on price preference and interest preference, the similarity score of the items is calculated, which is expressed as:
[0029]
[0030] in, represents the score of the i-th item, represents the similarity score of the i-th item, represents the score of the jth item, n represents the number of items, I s Indicates interest preference, I p Indicates price preference, represents the embedding representation of the item ID node of the i-th item after the update, represents the embedding representation of the i-th price node after update.
[0031] Furthermore, the loss of contrastive learning is expressed as:
[0032]
[0033] Among them, L s represents the loss function of contrastive learning, I represents the item set, The embedding representation of the item ID node of the i-th item, o k represents the cluster center, τ is the temperature coefficient, C represents the cluster size, o t represents the t-th cluster center;
[0034] The loss for item recommendation is expressed as:
[0035]
[0036] in, represents the loss function of item recommendation, y i represents the true label of the i-th item, Indicates that x i The probability prediction of the next item in the interaction, n represents the number of items;
[0037] The total loss consisting of the contrastive learning loss and the item recommendation loss is expressed as:
[0038]
[0039] Among them, L represents the total loss function and γ represents the hyperparameter.
[0040] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned session-based item recommendation method is implemented.
[0041] The present invention also proposes an electronic device, comprising a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned session-based item recommendation method.
[0042] The beneficial effects brought about by the technical solution provided by the present invention are:
[0043] The present invention captures the relevance of items in the same session by constructing a session-level hypergraph, and optimizes the representation of these items through information propagation, thereby achieving effective fusion between items within the session; considering the semantic similarity between items, the cross-session item embedding representations are clustered, which enhances the model's understanding of user interests and perception of item similarity, learns the relevance of similar items between different sessions, and can mine more information from items in the session. It uses contrastive learning to model the relationship between similar items, which enhances the model's understanding of item semantics and interest preferences. The present invention fully explores the items of interest to users in the session from two perspectives: between the same session and within different sessions, and can also achieve cross-session recommendations for sessions with a small number of items. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a flow chart of a conversation-based item recommendation method according to an embodiment of the present invention;
[0045] Figure 2 It is a block diagram of an electronic device in an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0046] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0047] The flowchart of the session-based item recommendation method according to an embodiment of the present invention is as follows: Figure 1 , specifically including the following steps:
[0048] S1. Get the project information in the session, including the project ID, project price, and project category.
[0049] S2. Construct a hypergraph for each session, using item ID, item price, and item category as nodes. This hypergraph contains three types of nodes: item ID nodes, item category nodes, and item price nodes. It also contains three types of hyperedges: session hyperedges, feature hyperedges, and price hyperedges. Session hyperedges connect all item ID nodes within a session, price hyperedges connect all item price nodes within a session, and feature hyperedges connect all item features (i.e., connecting item ID nodes, item category nodes, and item price nodes).
[0050] Let v be the embedded representation of a node in the hypergraph, which includes three types: v id 、v p and v c They correspond to the embedding representations of project ID, project price and project category respectively. Let e be the embedding representation of hyperedge, which includes three types: e s 、e p and e f , corresponding to the embedding representations of conversation hyperedges, price hyperedges, and feature hyperedges, respectively.
[0051] S3. Construct a hypergraph neural network, obtain the embedding representation of the hypergraph nodes as the embedding representation of the nodes in the first layer of the hypergraph neural network, and learn the embedding representation of the hyperedges in the same layer based on the embedding representation of the nodes; obtain the embedding representation of the nodes in the next layer based on the embedding representation of the nodes and hyperedges in the same layer, and continuously update the embedding representation of the nodes in the last layer as the embedded representation of the updated nodes.
[0052] In a preferred embodiment of the present invention, the embedded representation of the hypergraph nodes is first used as the embedded representation of the nodes in the first layer of the hypergraph neural network, and the embedded representation of the first layer hyperedges is learned according to the following formula:
[0053]
[0054] Among them, e 1 represents the embedding representation of the first layer hyperedge, represents the coefficient related to the i-th node in the first layer, represents the embedding representation of the i-th node in the first layer, q is the attention vector, and N represents the set of embedding representations of the nodes.
[0055] According to the embedding representation of the first-layer nodes and hyperedges, the embedding representation of the second-layer nodes is obtained, and the formula is expressed as:
[0056]
[0057] Among them, v 2 represents the embedding representation of the second layer node, v 1 represents the embedding representation of the first layer nodes, represents a layer 1 session hyperedge, Represents the first layer feature hyperedge, W1, W2, W3 are learnable parameter matrices, [;] represents the splicing operation, σ() is the sigmoid function, Represents element-wise product.
[0058] Similarly, the embedding representation of the hyperedges at the same layer is learned based on the embedding representation of the nodes at the same layer.
[0059]
[0060] Among them, e (l-1) represents the embedding representation of the l-1th layer hyperedge, represents the coefficient related to the i-th node in the l-1th layer, represents the embedding representation of the i-th node in the l-1th layer, L represents the number of layers of the hypergraph, and q∈R d is the attention vector, and different types of nodes apply different attention vectors (i.e., item ID nodes, item category nodes, and item price nodes correspond to attention vectors q respectively). id ,q p ,q c ), N represents the set of embedded representations of nodes.
[0061] According to the embedding representation of nodes and hyperedges in the same layer, the embedding representation of nodes in the next layer is obtained.
[0062]
[0063] Among them, v (l) represents the embedding representation of the l-th layer node, v (l-1) represents the embedding representation of the l-1th layer node, represents the l-1th layer session hyperedge, represents the l-1th layer feature hyperedge, σ() is the sigmoid function, is a learnable parameter matrix, [;] represents the concatenation operation, represents the element-wise product, and L represents the number of layers of the hypergraph.
[0064] The embedded representation of the nodes in the last layer (i.e., layer L) is continuously updated as the embedded representation of the updated nodes. The updated embedding representation of the project price node is The updated item ID node embedding is represented as m represents the number of items, which is also the number of item price nodes and the number of item ID nodes.
[0065] S4. Cluster the project IDs of all sessions and divide them into multiple clusters. Through comparative learning, maximize the similarity of project IDs within the same cluster and minimize the similarity between project IDs in different clusters.
[0066] Specifically, all items across sessions are divided into K clusters, and items are assigned to the nearest cluster based on their distance from the center of each cluster. The nearest distance between an item and the cluster center is calculated according to the following formula:
[0067]
[0068] Among them, ‖‖ represents the Euclidean distance, The embedding representation of the item ID node of the i-th item, o k represents the center of the k-th cluster.
[0069]
[0070] Among them, n k represents the number of items in the k-th cluster.
[0071] Minimize the squared distance between each item and its cluster center. The sum of squared distances is expressed as:
[0072]
[0073] Through contrastive learning, the similarity of item IDs within the same cluster is maximized, and the similarity between item IDs in different clusters is minimized. The cluster center is iteratively updated to achieve information propagation across session items. The loss of contrastive learning is expressed as:
[0074]
[0075] Among them, L s represents the loss function of contrastive learning, I represents the item set, The embedding representation of the item ID node of the i-th item, o k represents the center of the kth cluster, which is also the center of the cluster to which the i-th item belongs, τ is the temperature coefficient, C represents the cluster set, o t represents the t-th cluster center.
[0076] S5. Based on the updated embedding representation of the item price node, the price preference is obtained through the multi-head self-attention mechanism, which is expressed as:
[0077]
[0078] I p =[head1;head2;…;head h ]
[0079] Among them, V p represents the updated embedding representation of the price node, m represents the number of price nodes, head irepresents the price preference obtained by the i-th attention head in the self-attention module, I represents the parameter matrix of the learnable query vector, key vector, and value vector for the i-th attention head. p represents price preference, and h represents the number of attention heads in the self-attention module.
[0080] S6. Based on the embedded representation of the updated item ID, position encoding is introduced to calculate the interest preference, which is expressed as:
[0081]
[0082] in, The embedded representation of the updated project ID node and the comprehensive representation generated by its corresponding position information pos_i, represents the learnable parameters, represents the embedded representation of the item ID node of the i-th item after the update, pos i represents the position information embedding representation of the i-th item, β i represents the attention score of the i-th item, m represents the number of item IDs, and I s represents interest preference, u represents attention vector, represents the average of all item embeddings, b represents the bias coefficient, and σ() represents the sigmoid function.
[0083] S7. Calculate the similarity scores of the projects based on price preferences and interest preferences, recommend projects based on the similarity scores, and construct the loss of contrastive learning and the loss of project recommendation to optimize the project recommendation results.
[0084] The similarity score is expressed as:
[0085]
[0086]
[0087] in, represents the score of the i-th item, represents the similarity score of the i-th item, represents the score of the jth item, n represents the number of items, I s Indicates interest preference, I p Indicates price preference, represents the embedding representation of the item ID node of the i-th item after the update, represents the embedding representation of the i-th price node after update.
[0088] The loss for item recommendation is expressed as:
[0089]
[0090] in, represents the loss function of item recommendation, y i represents the true label of the i-th item, Indicates that x i The probability prediction of the next item in the interaction, n represents the number of items;
[0091] The total loss consisting of the contrastive learning loss and the item recommendation loss is expressed as:
[0092]
[0093] Where L represents the total loss function and γ represents the hyperparameter used to balance the weights.
[0094] The item recommendation result is optimized based on the total loss consisting of the contrastive learning loss and the item recommendation loss, and the top a items with high similarity scores are recommended to customers.
[0095] In an exemplary embodiment, a computer-readable storage medium is included, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned session-based item recommendation method is implemented.
[0096] See also Figure 2 In an exemplary embodiment, an electronic device is also included, including at least one processor, at least one memory, and at least one communication bus.
[0097] The memory stores a computer program including computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through a communication bus to execute the above-mentioned session-based item recommendation method.
[0098] In order to verify the effectiveness of the method of the present invention, the method proposed in the present invention (abbreviated as CluHNN) is compared with NARM, SR-GNN, LESSR, GCE-GNN, SHARE, DHCN, COTREC, HIDE, and CoHHN.
[0099] NARM (Neural Attentive Session-Based Recommendation) is a session recommendation method based on the encoder-decoder structure. It uses a global encoder and a local encoder to model the user's sequential behavior and purpose, as well as the relevance of items.
[0100] SR-GNN (Session-based Recommendation with Graph Neural Networks) models session sequences as graph-structured data. GNN can capture the complex transformations of items, and then uses an attention network to represent each session as a combination of global preferences and the current interests of the session.
[0101] LESSR (Lossless Edge-order preserving aggregation and Shortcut graph attention for Session-based Recommendation) proposes a shortcut graph attention layer to effectively capture long-range dependencies by propagating trust along shortcut connections.
[0102] GCE-GNN (Global Context Enhanced Graph Neural Networks for Session-based Recommendation) is a global context-enhanced graph neural network sequence recommendation method that can learn item representations from two levels, including global-level and session-level.
[0103] SHARE(Session-based Hypergraph Attention Recommendation ) A hypergraph attention network is used to learn information within the context window in each individual session.
[0104] DHCN (Self-Supervised Hypergraph Convolutional Networks for Session-based Recommendation) constructs line graphs and hypergraphs through self-supervised learning to improve performance.
[0105] COTREC (Self-Supervised Graph Co-Training for Session-based Recommendation) proposes a self-supervised conversation model that uses graph neural networks and contrastive learning to alleviate the data sparsity problem.
[0106] The main idea of HIDE (from the paper "Enhancing Hypergraph Neural Networks with IntentDisentanglement for Session-based Recommendation") is to map an item to multiple embeddings, each of which corresponds to an intent. By decoupling intents from both micro and macro perspectives, session-based recommendations are achieved.
[0107] CoHHN (Price DOES Matter! Modeling Price and Interest Preferences in Session-based Recommendation) introduces price features into session recommendations, extracts interest preferences and price preferences, and these two preferences interact with each other to make recommendations.
[0108] We tuned the hyperparameters of each model and tested these methods on two widely used conversational real-world datasets: Cosmetics and Diginetica. Table 1 describes the main features of these two datasets in detail. The specific data can be downloaded from the Kaggle and Codalab websites.
[0109] Table 1
[0110] Dataset Number of projects Number of sessions Average session length Number of interactions Price tier Number of categories Cosmetics 23,194 156,922 6.74 1,058,263 10 301 Diginetica 24,889 187,540 4.56 855,070 100 721
[0111] Tables 2 and 3 show the recommendation effects of various methods on the Cosmetics and Diginetica datasets under various indicators.
[0112] Table 2
[0113]
[0114]
[0115] Table 3
[0116]
[0117] From the experimental results in Tables 2 and 3, we can draw the following conclusions:
[0118] On the real-world Cosmetics dataset, the CluHNN method proposed in this paper significantly outperforms all comparison methods in terms of experimentally selected metrics. Taking NDCG@20 as an example, CluHNN achieves 41.11, compared to NARM's NDCG@20 of 32.9, SR-GNN's NDCG@20 of 37.99, LESSR's NDCG@20 of 27.46, GCE-GNN's NDCG@20 of 40.05, SHARE's NDCG@20 of 39.63, DHCN's NDCG@20 of 31.77, COTREC's NDCG@20 of 36.21, HIDE's NDCG@20 of 39.45, and CoHHN's NDCG@20 of 40.58.
[0119] On the real-world Diginetica dataset, the CluHNN method proposed in this paper significantly outperforms all comparison methods in terms of experimentally selected metrics. Taking NDCG@20 as an example, CluHNN achieves 34.69, while NARM achieves 23.44, SR-GNN achieves 31.33, LESSR achieves 32, GCE-GNN achieves 33.76, SHARE achieves 32.21, DHCN achieves 20.8, COTREC achieves 31.14, HIDE achieves 33.21, and CoHHN achieves 34.17.
[0120] Our proposed method outperforms all baseline models across all evaluation metrics across all datasets. This improvement is attributed to the explicit cross-session information propagation incorporated by clustering-based contrastive learning. This cross-session information propagation module makes semantically similar nodes more similar in representation and helps the model accurately extract the interests of anonymous users.
[0121] In summary, the method proposed in the present invention is simple and easy to implement and has the best effect on all recommended indicators of all comparison methods. It is believed that it will have a good application prospect.
[0122] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A conversation-based item recommendation method, characterized in that: The following steps are involved: S1. Get the project information including project ID, project price and project category in the session; S2, construct a hypergraph for each session with item ID, item price and item category as nodes; S3. Build a hypergraph neural network, obtain the embedded representation of the hypergraph nodes as the embedded representation of the nodes in the first layer of the hypergraph neural network, and learn the embedded representation of the hyperedges in the same layer based on the embedded representation of the nodes; obtain the embedded representation of the nodes in the next layer based on the embedded representation of the nodes and hyperedges in the same layer, and continuously update the embedded representation of the nodes in the last layer to obtain the embedded representation of the updated nodes; S4. Cluster the project IDs of all sessions and divide them into multiple clusters. Through comparative learning, maximize the similarity of project IDs within the same cluster and minimize the similarity between project IDs in different clusters. S5. Based on the updated embedding representation of the item price node, obtain the price preference through the multi-head self-attention mechanism; S6. Based on the embedded representation of the updated item ID, position encoding is introduced to calculate interest preferences; S7. Calculate the similarity scores of the items based on price preferences and interest preferences, recommend items based on the similarity scores, and construct the loss of contrastive learning and the loss of item recommendation to optimize the item recommendation results. According to the embedding representation of hypergraph nodes, the embedding representation of hypergraph nodes is learned. The embedding representation of hyperedges at the same layer is expressed as follows: in, represents the embedding representation of the l-1th layer hyperedge, represents the coefficient related to the i-th node in the l-1th layer, represents the embedding representation of the i-th node in the l-1th layer, L represents the number of layers of the hypergraph, q is the attention vector, and N represents the set of embedding representations of the nodes; According to the embedding representation of the hypergraph nodes and the embedding representation of the hyperedges at the same layer, the embedding representation of the nodes at the next layer is obtained, which is expressed as: in, represents the embedding representation of the l-th layer node, represents the embedding representation of the l-1th layer node, represents the l-1th layer session hyperedge, represents the l-1th layer feature hyperedge, 、 、 is the learnable parameter matrix, Represents a splicing operation, is the sigmoid function, represents the element-wise product, and L represents the number of layers of the hypergraph.
2. The method for recommending items based on a conversation according to claim 1, wherein: The hypergraph contains three types of nodes: ID nodes, category nodes, and price nodes; the hypergraph contains three types of hyperedges: session hyperedges, feature hyperedges, and price hyperedges. The session hyperedges connect the project ID nodes within the session, the price hyperedges connect the project price nodes within the session, and the feature hyperedges connect the project ID nodes, project category nodes, and project price nodes of the project.
3. The conversation-based item recommendation method according to claim 1, characterized in that: According to the embedded representation of the updated price node, the price preference is obtained through the multi-head self-attention mechanism, which is expressed as: in, represents the updated embedding representation of the price node, m represents the number of price nodes, represents the price preference obtained by the i-th attention head in the self-attention module, represents the parameter matrix of the learnable query vector, key vector, and value vector for the i-th attention head, represents price preference, h represents the number of attention heads in the self-attention module, Represents a splicing operation.
4. The method for recommending items based on a conversation according to claim 1, wherein: Based on the embedded representation of the updated item ID, position encoding is introduced to calculate the interest preference, which is expressed as: in, The embedding of the updated project ID node represents its corresponding position information The generated comprehensive representation, 、 represents the learnable parameters, represents the embedding representation of the item ID node of the i-th item after the update, represents the position information embedding representation of the i-th item, represents the attention score of the i-th item, m represents the number of item IDs, Express interest preferences, represents the attention vector, represents the average value of all item embeddings, b represents the bias coefficient, Represents the sigmoid function.
5. The method for recommending items based on a conversation according to claim 1, wherein: Based on price preference and interest preference, the similarity score of the items is calculated and expressed as: in, represents the score of the i-th item, represents the similarity score of the i-th item, represents the score of the jth item, n represents the number of items, Express interest preferences, Indicates price preference, represents the embedding representation of the item ID node of the i-th item after the update, represents the embedding representation of the i-th price node after update.
6. The method for recommending items based on a conversation according to claim 1, wherein: The loss of contrastive learning is expressed as: in, represents the loss function of contrastive learning, I represents the item set, represents the embedding representation of the item ID node of the i-th item, represents the kth cluster center, is the temperature coefficient, C represents clustering, represents the t-th cluster center; The loss for item recommendation is expressed as: in, represents the loss function for item recommendation, represents the true label of the i-th item, Represents The probability prediction of the next item in the interaction, n represents the number of items; The total loss consisting of the contrastive learning loss and the item recommendation loss is expressed as: Among them, L represents the total loss function, represents a hyperparameter.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Session recommendation method and device based on hypergraph learning, electronic equipment and medium
CN117076763A
Session recommendation method and system based on heterogeneous hypergraph neural network
CN118427450A