User behavior decoupling and intention learning recommendation method and system
Through user behavior decoupling and intent learning, unexpected items in the conversation are identified, and combined with topic modeling and hypergraph learning, the problem of underestimating unexpected items by existing recommendation methods is solved, and the accuracy of the recommendation system and user adhesion is improved.
Patent Information
- Application Number
- CN202411201138.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
AI Technical Summary
Existing intent-based recommendation methods usually ignore unexpected items that deviate from most of the time in the session, resulting in an underestimation of user intentions and failing to effectively capture the user's key intentions to explore new items.
Through decoupling of user behavior, the ‘central shopping’ and ‘roaming shopping’ behaviors in the conversation are identified, the topic modeling and hypergraph learning are used to optimize the recommendation system, and combined with the probability distribution of unexpected items, a more accurate user intent representation is generated.
It improves the accuracy and user adhesion of the recommendation system, can capture user intentions more accurately, meet user needs and bring economic benefits.
Smart Images

Figure CN119090592A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet service technology, and specifically, relates to a recommendation method and system for user behavior decoupling and intention learning. Background Art
[0002] Recommender Systems, or RSs, locate the items that users need from a huge list of candidates by analyzing the historical interactions between users and items. In order to meet the immediate needs of users, the next item recommendation algorithm limits the scope of interaction to the current session and then predicts the items they are about to interact with. User intent is a key factor affecting the user's interaction with the next item. When users have clear intent, they are more inclined to choose items related to their intent. Understanding and utilizing user intent is crucial to designing and optimizing recommendation systems and providing personalized user experience. Therefore, modeling user intent for next item recommendation has recently become a hot research topic.
[0003] Currently, existing intent-based recommendation methods usually identify the user's inherent intent from the most representative items in the session. However, these methods often ignore the existence of "unexpected items" that deviate from the majority in various contexts. In contrast, many multi-intent-based recommendation methods assume that users' decisions may be affected by multiple intents. Although these multi-intent-based recommendation models consider "unexpected items" as secondary intents, they still tend to underestimate the importance of these rare behaviors when generating recommendations. However, these "unexpected items" always appear in the session and can serve as a key indicator of the user's tendency to explore new items. They indicate new intentions that deserve high attention from the current user.
[0004] Therefore, it is necessary to decouple user behaviors to distinguish between users’ inherent intent and emerging intent. This distinction potentially supports a more targeted approach to model emerging intent and enhance its effectiveness. Summary of the invention
[0005] In view of the defects in the prior art, the purpose of the present invention is to provide a recommendation method and system for user behavior decoupling and intention learning.
[0006] A recommendation method for user behavior decoupling and intention learning provided by the present invention includes:
[0007] Step S1: construct an item title set based on items and conversations;
[0008] Step S2: Based on the item title set, the information entropy of the topics involved in the current session is calculated to obtain the topic dispersion of each item; based on the topic dispersion, the shopping item set is divided;
[0009] Step S3: according to the shopping item set, obtaining the dominant item of the current session and the similarity vectors between other items and the dominant item;
[0010] Step S4: based on the similarity vector, deriving the probability distribution of the shopping item set;
[0011] Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph;
[0012] According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning;
[0013] Step S5: Comparatively learn the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtain the contrastive learning loss;
[0014] weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session;
[0015] Step S6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set;
[0016] The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
[0017] Preferably, in step S1:
[0018] Step S1.1: construct an item title set based on items and conversations;
[0019] Step S1.2: Send the item title set to the BERTopic topic model to obtain the global item-topic relationship matrix M and the corresponding 0-1 mask matrix N;
[0020] The global item-topic relationship matrix M is mathematically expressed as:
[0021]
[0022] Where M∈R N×K , is the obtained item-topic relationship matrix, N represents the number of items, and K represents the number of topics; Represents the title set of all items. BERTopic is a pre-trained topic model.
[0023] The global item-topic relationship matrix M corresponds to the 0-1 mask matrix N. When the value in the global item-topic relationship matrix M is greater than the mean of the total value of the row, the value of the corresponding position in the 0-1 mask matrix N is set to 1, otherwise the value of the corresponding position in the 0-1 mask matrix N is set to 0.
[0024] Preferably, in step S2:
[0025] Step S2.1: Based on the 0-1 mask matrix N, a slice sub-matrix N is formed i ;
[0026] Step S2.2: The slice sub-matrix N i , get the topic dispersion of the conversation;
[0027] Step S2.3: Based on the theme dispersion, divide the shopping item set into a divergent shopping item set With centralized shopping item collection
[0028] Determine whether the theme dispersion of the item is greater than a set threshold, and if yes, classify the item into the divergent shopping item set If the result is no, the item is divided into the centralized shopping item set.
[0029] The slice sub-matrix |S i | represents the number of items in the current session, and K represents the number of topics;
[0030] The mathematical expression of the topic dispersion is:
[0031]
[0032] Among them, IE i represents the topic dispersion of the current session, c k The proportion of items in the total number of items in the session; The mathematical expression is:
[0033]
[0034] in, Indicates a topic, c k The ratio of the number of items in the total number of items in the session, In the matrix N i In the kth column of k ; * represents the matrix N i All rows of ; Represents the current session.
[0035] Preferably, in step S3:
[0036] Step S3.1: Based on the divergent shopping item set and centralized shopping collections Construct item-item global map;
[0037] Step S3.2: Calculate the eigenvector centrality value of each item node in the item-item global graph;
[0038] Step S3.3: Select the item with the largest feature vector centrality value as the dominant item of the current session;
[0039] Step S3.4: Calculate the cosine similarity between other items in the conversation and the dominant item to form a similarity vector;
[0040] The mathematical expression of the eigenvector centrality value is:
[0041]
[0042] Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k;
[0043] The cosine similarity, mathematical expression is:
[0044]
[0045] in, represents the cosine similarity between an item and a dominant item; the superscript T represents a transposition operation; |||| represents normalization; the symbol · represents a dot product; A vector representing the items in the session, A vector representing the dominant item in the session;
[0046] The similarity vector is expressed mathematically as follows:
[0047]
[0048] Among them, α i is the similarity vector formed by concatenating all cosine similarities;
[0049] In step S4:
[0050] splicing the similarity vector and the topic dispersion to obtain the probability distribution of the shopping item set, that is, the probability distribution of concentrated shopping and divergent shopping;
[0051] According to the centralized shopping item collection Construct a topic hypergraph, form each topic into a hyperplane with related items; and for the concentrated shopping item set Learning object representations based on hypergraphs;
[0052] According to the divergent shopping item collection Retrieving a neighbor session set, and constructing a neighbor session graph based on the neighbor session set, and obtaining a representation of the neighbor session of the current session and a representation of the session after hypergraph convolution learning;
[0053] The probability distribution of concentrated shopping and divergent shopping is expressed mathematically as follows:
[0054]
[0055] Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function; Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping;
[0056] The neighbor session set is the top-k sessions with the largest similarity scores. The mathematical expression of the similarity score is:
[0057]
[0058] in, Represents the current session representation, s j represents the representation of the session, and T represents the transposition operation;
[0059] The j The mathematical expression is:
[0060] s j =mean(E j )
[0061] Among them, mean represents the mean aggregation function, E j A vector matrix representing all items in a session;
[0062] The representation of the session after hypergraph convolution learning is mathematically expressed as:
[0063] s′ j =mean((HGConv(Gsession ,E j ))
[0064] Among them, HGConv represents the hypergraph convolutional network, G session represents the neighbor session hypergraph, E j Represents the vector matrix of all items in the session, mean represents the mean aggregation function, s′ j Represents the session S after the hypergraph network update j representation.
[0065] Preferably, in step S5, the contrastive learning loss is expressed as:
[0066]
[0067] Among them, L m represents the contrastive learning loss, s′ j Represents the representation of the session after the hypergraph network update, s″ j represents the representation of the session after the graph convolution network is updated, σ represents the softmax activation function, T represents the transposition operation, and j - Represented as a negative sample of the current session, Represents the session representation of the sampled negative sample session after being updated by the graph convolutional network;
[0068] The final mixed representation, mathematical expression is:
[0069]
[0070] in, Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping, Represents the representation of the current session in the centralized shopping space, represents the representation of the current session in the divergent shopping space, Represents the final mixed representation of the current session;
[0071] The mathematical expression of the attention weight of the weighted fusion is:
[0072]
[0073] Among them, w j represents the attention weight, is the mean vector of all item representations in the current session, h, W1, W2, and b are a learnable parameter, another learnable parameter, another learnable parameter, and another learnable parameter, respectively. σ represents the softmax activation function, and h Trepresents a learnable parameter, i.e., the transposed vector of the learnable vector h; the symbol · represents the dot product;
[0074] In step S6, the cross entropy loss function is expressed as follows:
[0075]
[0076] in, Represents the predicted user i for positive sample j + ; Represents the predicted user i for negative sample j - ; L r represents the cross entropy loss of the project; The mathematical expression is:
[0077]
[0078] in, Predicted user i for negative sample j;
[0079] The total loss, i.e. the learning objective, is mathematically expressed as:
[0080] L=L r +βL m
[0081] Among them, L represents the total loss, that is, the learning target; L r represents the cross entropy loss function for predicting recommended items, L m represents contrastive learning loss; β represents a balancing factor used to control the weight of the contrastive learning loss function.
[0082] A recommendation system for user behavior decoupling and intention learning provided by the present invention includes:
[0083] Module M1: Construct a set of item titles based on items and conversations;
[0084] Module M2: Based on the item title set, calculate the information entropy of the topics involved in the current session to obtain the topic dispersion of each item; based on the topic dispersion, divide the shopping item set;
[0085] Module M3: deriving the dominant item of the current session and the similarity vectors between other items and the dominant item according to the shopping item set;
[0086] Module M4: deriving a probability distribution of the shopping item set based on the similarity vector;
[0087] Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph;
[0088] According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning;
[0089] Module M5: comparatively learning the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtaining the comparative learning loss;
[0090] weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session;
[0091] Module M6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set;
[0092] The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
[0093] Preferably, in the module M1:
[0094] Module M1.1: Construct a collection of item titles based on items and conversations;
[0095] Module M1.2: Send the item title set to the BERTopic topic model to obtain the global item-topic relationship matrix M and the corresponding 0-1 mask matrix N;
[0096] The global item-topic relationship matrix M is mathematically expressed as:
[0097]
[0098] Among them, M∈R N×K , is the obtained item-topic relationship matrix, N represents the number of items, and K represents the number of topics; Represents the title set of all items. BERTopic is a pre-trained topic model.
[0099] The global item-topic relationship matrix M corresponds to the 0-1 mask matrix N. When the value in the global item-topic relationship matrix M is greater than the mean of the total value of the row, the value of the corresponding position in the 0-1 mask matrix N is set to 1, otherwise the value of the corresponding position in the 0-1 mask matrix N is set to 0.
[0100] Preferably, in the module M2:
[0101] Module M2.1: Based on the 0-1 mask matrix N, form a slice sub-matrix N i ;
[0102] Module M2.2: The slice sub-matrix N i , get the topic dispersion of the conversation;
[0103] Module M2.3: Based on the theme dispersion, divide the shopping item set into a divergent shopping item set With centralized shopping item collection
[0104] Determine whether the theme dispersion of the item is greater than a set threshold, and if yes, classify the item into the divergent shopping item set If the result is no, the item is divided into the centralized shopping item set.
[0105] The slice sub-matrix |S i | represents the number of items in the current session, and K represents the number of topics;
[0106] The mathematical expression of the topic dispersion is:
[0107]
[0108] Among them, IE i represents the topic dispersion of the current session, c k The proportion of items in the total number of items in the session; The mathematical expression is:
[0109]
[0110] in, Indicates a topic, c k The ratio of the number of items in the total number of items in the session, Represented in the matrix N i In the kth column of k ; * represents matrix N i All rows of ; Represents the current session.
[0111] Preferably, in the module M3:
[0112] Module M3.1: Based on divergent shopping item collection and centralized shopping collections Construct item-item global map;
[0113] Module M3.2: Calculate the eigenvector centrality value of each item node in the item-item global graph;
[0114] Module M3.3: Select the item with the largest feature vector centrality value as the dominant item of the current session;
[0115] Module M3.4: Calculate the cosine similarity between other items in the conversation and the dominant item to form a similarity vector;
[0116] The mathematical expression of the eigenvector centrality value is:
[0117]
[0118] Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k;
[0119] The cosine similarity, mathematical expression is:
[0120]
[0121] in, represents the cosine similarity between an item and a dominant item; the superscript T represents a transposition operation; |||| represents normalization; the symbol · represents a dot product; A vector representing the items in the session, A vector representing the dominant item in the session;
[0122] The similarity vector is expressed mathematically as follows:
[0123]
[0124] Among them, α i is the similarity vector formed by concatenating all cosine similarities;
[0125] In the module M4:
[0126] splicing the similarity vector and the topic dispersion to obtain the probability distribution of the shopping item set, that is, the probability distribution of concentrated shopping and divergent shopping;
[0127] According to the centralized shopping item collection Construct a topic hypergraph, form each topic into a hyperplane with related items; and for the concentrated shopping item set Learning object representations based on hypergraphs;
[0128] According to the divergent shopping item collection Retrieving a neighbor session set, and constructing a neighbor session graph based on the neighbor session set, and obtaining a representation of the neighbor session of the current session and a representation of the session after hypergraph convolution learning;
[0129] The probability distribution of concentrated shopping and divergent shopping is expressed mathematically as follows:
[0130]
[0131] Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function; Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping;
[0132] The neighbor session set is the top-k sessions with the largest similarity scores. The mathematical expression of the similarity score is:
[0133]
[0134] in, Represents the current session representation, s j represents the representation of the session, and T represents the transposition operation;
[0135] The j The mathematical expression is:
[0136] s j =meann((E j )
[0137] Among them, mean represents the mean aggregation function, E j A vector matrix representing all items in a session;
[0138] The representation of the session after hypergraph convolution learning is mathematically expressed as:
[0139]
[0140] Among them, HGConv represents the hypergraph convolutional network, G session represents the neighbor session hypergraph, E j Represents the vector matrix of all items in the session, mean represents the mean aggregation function, s′ j Represents the session S after the hypergraph network update j representation.
[0141] Preferably, in the module M5, the contrastive learning loss is expressed as:
[0142]
[0143] Among them, L m represents the contrastive learning loss, s′ j Represents the representation of the session after the hypergraph network update, s″ j represents the representation of the session after the graph convolution network is updated, σ represents the softmax activation function, T represents the transposition operation, and j - Represented as a negative sample of the current session, Represents the session representation of the sampled negative sample session after being updated by the graph convolutional network;
[0144] The final mixed representation, mathematical expression is:
[0145]
[0146] in, Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping, Represents the representation of the current session in the centralized shopping space, represents the representation of the current session in the divergent shopping space, Represents the final mixed representation of the current session;
[0147] The mathematical expression of the attention weight of the weighted fusion is:
[0148]
[0149] Among them, w j represents the attention weight, is the mean vector of all item representations in the current session, h, W1, W2, and b are respectively a learnable parameter, another learnable parameter, another learnable parameter, and another learnable parameter, σ represents the softmax activation function, represents a learnable parameter, i.e., the transposed vector of the learnable vector h; the symbol · represents the dot product;
[0150] In the module M6, the cross entropy loss function is expressed as follows:
[0151]
[0152] in, Represents the predicted user i for positive sample j + ; Represents the predicted user i for negative sample j - ; L r represents the cross entropy loss of the project; The mathematical expression is:
[0153]
[0154] in, Predicted user i for negative sample j;
[0155] The total loss, i.e. the learning objective, is mathematically expressed as:
[0156] L=L r +βL m
[0157] Among them, L represents the total loss, that is, the learning target; L r represents the cross entropy loss function for predicting recommended items, L m represents contrastive learning loss; β represents a balancing factor used to control the weight of the contrastive learning loss function.
[0158] Compared with the prior art, the present invention has the following beneficial effects:
[0159] 1. The present invention breaks through the problem that most existing recommendation systems based on user intent usually only identify the user's inherent intent from the most representative items in the conversation, while ignoring the existence of unexpected items that deviate from the majority in terms of context. It then uses unexpected items as a key indicator of the user's tendency to explore new items, thereby improving the accuracy of the recommendation system.
[0160] 2. When recommending items to users, the present invention can help merchants capture more accurate user intentions by decoupling user behaviors and comprehensively considering the user's inherent intentions and stimulated intentions, thereby further improving the accuracy of recommendations and user stickiness.
[0161] 3. The present invention improves the accuracy of the recommendation system, better meets the needs of users, and brings higher economic benefits to merchants. BRIEF DESCRIPTION OF THE DRAWINGS
[0162] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0163] Figure 1 A schematic diagram of the process provided by the present invention. DETAILED DESCRIPTION
[0164] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0165] The existing recommendations based on user intent only consider the inherent intent of the user, while ignoring the attention to the user's stimulated intent. To this end, the present invention will design a recommendation system that decouples user behavior and intent learning. By identifying two types of user behaviors in user sessions: "centralized shopping" and "roaming shopping", the exploration-exploration mechanism is used to determine the behavioral probability distribution of upcoming items, and then the centralized shopping is analyzed through topic modeling and hypergraph learning, and the roaming shopping is explored through session neighbor retrieval. Finally, according to the behavioral probability distribution, the two shopping behaviors are comprehensively considered to obtain the user's intent representation, and then more accurately predict the next item that should be recommended to the user. The present invention has practical significance and good application prospects in considering the complex behavior types of users and modeling the user's intentions.
[0166] In other words, the present invention mainly relates to the field of recommendation systems. In order to identify "unexpected items" that deviate from the majority of items in a session in terms of context and model the user's motivating intention, the present invention proposes a recommendation system that decouples user behavior and learns intention. First, the present invention identifies two types of user behaviors in user sessions: "centralized shopping" and "roaming shopping", the former of which conforms to the user's inherent intention and the latter of which conforms to the user's motivating intention, and uses an exploration-exploration mechanism to determine the behavioral probability distribution of upcoming items. Then, the centralized shopping pattern is analyzed through topic modeling and hypergraph learning, and the divergent shopping pattern is explored through session neighbor retrieval. Finally, according to the behavioral probability distribution, the two shopping behaviors are comprehensively considered to obtain a comprehensive representation of the session, thereby estimating the probability of an item becoming the next visited item. This model can not only capture the user's inherent intention, but also detect the user's motivating intention to explore new items by considering the "unexpected items" that deviate from the majority in various contexts.
[0167] Since the user behavior pattern is relatively complex, in order to decouple user behavior and consider the user's centralized shopping behavior and roaming shopping behavior, the challenges that this solution needs to overcome are reflected in the following points:
[0168] 1. Unlabeled and ambiguous user behaviors and the diversity of item information make it difficult to effectively decouple user behaviors.
[0169] 2. Due to the lack of contextual information in the conversation, it is difficult to distinguish between the motivating intent and the inherent intent.
[0170] 3. Balance different strategies for exploration-inherent intentions and exploration-stimulating intentions.
[0171] Specifically, due to the lack of contextual information in the conversation, it is difficult to distinguish between the stimulating intention and the inherent intention. In order to solve this technical problem, this solution uses the ID information and language information of the items in the conversation to identify the differences between the items. Among them, the feature vector centrality of the items in the conversation is modeled by the ID information of the conversation items, and the information entropy of the topic distribution of the items is modeled by the title information of the items in the conversation, so as to fully identify the differences between the items and divide the conversation items into two behaviors: concentrated shopping and roaming shopping.
[0172] Embodiment 1 A recommendation method for user behavior decoupling and intention learning provided by the present invention includes:
[0173] Step S1: construct an item title set based on items and conversations;
[0174] Step S2: Based on the item title set, the information entropy of the topics involved in the current session is calculated to obtain the topic dispersion of each item; based on the topic dispersion, the shopping item set is divided;
[0175] Step S3: according to the shopping item set, obtain the dominant item of the current session and the similarity vector between other items and the dominant item;
[0176] Step S4: based on the similarity vector, deriving the probability distribution of the shopping item set;
[0177] Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph;
[0178] According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning;
[0179] Step S5: Comparatively learn the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtain the contrastive learning loss;
[0180] weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session;
[0181] Step S6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set;
[0182] The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
[0183] Specifically, in step S1:
[0184] Step S1.1: construct an item title set based on items and conversations;
[0185] Step S1.2: Send the item title set to the BERTopic topic model to obtain the global item-topic relationship matrix M and the corresponding 0-1 mask matrix N;
[0186] The global item-topic relationship matrix M corresponds to the 0-1 mask matrix N. When the value in the global item-topic relationship matrix M is greater than the mean of the total value of the row, the value of the corresponding position in the 0-1 mask matrix N is set to 1, otherwise the value of the corresponding position in the 0-1 mask matrix N is set to 0.
[0187] Specifically, in step S2:
[0188] Step S2.1: Based on the 0-1 mask matrix N, a slice sub-matrix N is formed i ;
[0189] Step S2.2: The slice sub-matrix N i , get the topic dispersion of the conversation;
[0190] Step S2.3: Based on the theme dispersion, divide the shopping item set into a divergent shopping item set With centralized shopping item collection
[0191] Determine whether the theme dispersion of the item is greater than a set threshold, and if yes, classify the item into the divergent shopping item set If the result is no, the item is divided into the centralized shopping item set.
[0192] The slice sub-matrix |S i | represents the number of items in the current session, and K represents the number of topics.
[0193] Specifically, in step S3:
[0194] Step S3.1: Based on the divergent shopping item set and centralized shopping collections Construct item-item global map;
[0195] Step S3.2: Calculate the eigenvector centrality value of each item node in the item-item global graph;
[0196] Step S3.3: Select the item with the largest feature vector centrality value as the dominant item of the current session;
[0197] Step S3.4: Calculate the cosine similarity between other items in the conversation and the dominant item to form a similarity vector;
[0198] The mathematical expression of the eigenvector centrality value is:
[0199]
[0200] Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k;
[0201] The cosine similarity, mathematical expression is:
[0202]
[0203] in, represents the cosine similarity between an item and a dominant item; the superscript T represents a transposition operation; |||| represents normalization; the symbol · represents a dot product; A vector representing the items in the session, A vector representing the dominant item in the session;
[0204] The similarity vector is expressed mathematically as follows:
[0205]
[0206] Among them, α i It is the similarity vector formed by concatenating all cosine similarities.
[0207] In step S4:
[0208] splicing the similarity vector and the topic dispersion to obtain the probability distribution of the shopping item set, that is, the probability distribution of concentrated shopping and divergent shopping;
[0209] According to the centralized shopping item collection Construct a topic hypergraph, form each topic into a hyperplane with related items; and for the concentrated shopping item set Learning object representations based on hypergraphs;
[0210] According to the divergent shopping item collection Retrieving a neighbor session set, and constructing a neighbor session graph based on the neighbor session set, and obtaining a representation of the neighbor session of the current session and a representation of the session after hypergraph convolution learning;
[0211] The probability distribution of concentrated shopping and divergent shopping is expressed mathematically as follows:
[0212]
[0213] Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function; Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping.
[0214] Example 2 is to apply Example 1 to the situation in Table 1. Assume that the set of items is I = {e1, e2, ..., e j ,…,e N}, each item e j With an initial random embedding e j and a title containing several keywords Get all project titles Assume that there is a set of anonymous session sets, namely anonymous session sequences, where Represents a session, which consists of a set of items interacted in time order. Represents a collection of titles of items contained in the current session.
[0215] According to a recommendation method for user behavior decoupling and intention learning provided by the present invention, given an anonymous session sequence S i , and a collection of titles of items in the session By decoupling user behaviors, we predict the probability distribution of the user's next interaction behavior type, and consider concentrated shopping and divergent shopping patterns respectively to model the user's inherent intention and stimulated intention, and then predict the next item that the user is most likely to interact with, including:
[0216] Step 1: Send all item title sets to the BERTopic topic model;
[0217] Each of the item titles is regarded as a document, and a global item-topic relationship matrix M is obtained, and a corresponding 0-1 matrix N is obtained.
[0218] The global item-topic relationship matrix M is mathematically expressed as:
[0219]
[0220] Among them, M∈R N×K , is the obtained item-topic relationship matrix, N represents the number of items, K represents the number of topics, Represents the title set of all items. BERTopic is a pre-trained topic model.
[0221] The global item-topic relationship matrix M can be further converted into a 0-1 matrix N: when the value of a position in the global item-topic relationship matrix M is greater than the mean of the row, the value of the corresponding position in the 0-1 matrix N is set to 1, otherwise it is set to 0.
[0222] Step 2: For the current session S i , extract the rows corresponding to the items contained in the item-topic relationship mask matrix obtained in step 1, that is, the 0-1 matrix N, to form a slice submatrix, that is,
[0223] Among them, |S i | represents the number of items in the current session, and K represents the number of topics.
[0224] According to the slice sub-matrix N i , determine the session, that is, S i How many topics are included in , these topics can be regarded as intentions. Based on this, the information entropy of the topics involved in the current session is calculated to obtain the topic dispersion of the session, and the mathematical expression is:
[0225]
[0226] Among them, IE i represents the topic dispersion of the current session, c k The ratio of the number of items in the session to the total number of items.
[0227]
[0228] in, Indicates belonging to a certain topic, c k The ratio of the number of items in the total number of items in the session, Represented in the matrix N i In the kth column of k . * represents the matrix N i All rows of ; Represents the current session.
[0229] Step 3: Calculate the information entropy of the topics involved in each item in the current session to obtain the topic dispersion of each item itself.
[0230]
[0231] in, Indicates item e j The topic information entropy, c k Represents a topic to which the current item belongs, N jk Represents the slice submatrix N obtained in step 2 i Items in j With theme c k Is there any correlation? jk Representative item j With theme c k Specific correlation scores.
[0232] After obtaining the topic dispersion of each item in the session, the items with a topic dispersion greater than the set threshold are divided into the divergent shopping item set The remaining items in the session, i.e., items whose topic dispersion is less than or equal to the set threshold, are divided into the centralized shopping item set In Items with a theme dispersion greater than a set threshold are classified into the divergent shopping item set Among them, It indicates a concentrated collection of shopping items; the superscript fo is the abbreviation of focused; the superscript wa is the abbreviation of wandering.
[0233] Step 4: Based on the divergent shopping item collection and centralized shopping collections Construct an item-item global graph, calculate the eigenvector centrality value of each item node in the item-item global graph, and select the item with the largest value as the dominant item of the current session.
[0234] A×x=λx
[0235] The formula describes a linear transformation. The linear transformation is defined by a matrix A, which transforms a vector x into another vector that is exactly a scalar multiple of x, namely λx.
[0236] Among them, A∈R N×N is the adjacency matrix of the graph. If item i and item j appear in the same session at the same time, then A ij = 1. x∈R N is the eigenvector corresponding to the maximum eigenvalue λ, and each dimension records the weight of the corresponding item. Initially, x=1, that is, the weights of all vertices are equal. λx represents a scalar multiple of the vector x, which is determined by the eigenvalue λ of the matrix A.
[0237]
[0238] Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k;
[0239] Then, through power iteration, the maximum eigenvalue and its eigenvector are estimated.
[0240] After training, items with larger vertex degrees and larger adjacent vertex degrees will receive larger weights.
[0241] Step 5: Select the eigenvector centrality value, ie x j The largest item, namely e j As the dominant item of the current session, it is represented as And calculate the cosine similarity between other items in the session and the dominant item, that is, Construct a similarity vector, namely α i , the mathematical expression is:
[0242]
[0243] in, represents the cosine similarity between an item and a dominant item; the superscript T represents the transposition operation, and the symbol · represents the dot product.
[0244]
[0245] Among them, ||·|| represents L2 normalization, Indicates a session, i.e. S i The item in e j The vector of Indicates a session, i.e. S i The dominant item in The vector of i is the cosine similarity of all, that is The concatenated similarity vector.
[0246] Step 6: The similarity vector obtained in step 5, i.e., α i The topic dispersion of the session obtained in step 2, IE i After splicing, through a fully connected network, we get the probability distribution of the behavior type of the user's next interactive behavior, that is, the probability distribution of concentrated shopping and divergent shopping.
[0247]
[0248] Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function. Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping.
[0249] Step 7: Construct a topic hypergraph G based on the global item-topic relationship mask matrix N obtained in step 1 topic , each subject c k A hypergraph G will be generated topic A hyperplane in ; for example, for the kth column of the global item-topic relationship mask matrix N, if N jk =1, then the item, that is, e j Included with theme c k In the associated hyperplane, such as N jk ≠1, then it means the item, that is, e j Not subject c k , so topic c is not considered k .
[0250] For the concentrated set of shopping items obtained in step 3, the subject information learned by hypergraph learning is used to enrich the representation of these items.
[0251] In other words, according to the global item-topic relationship matrix, a topic hypergraph G is constructed. topic , each topic is formed into a hyperplane with related items. For the concentrated shopping item set, based on the hypergraph G topic Learn representations of these items.
[0252] Specifically, for the centralized shopping item set, they have an initialized random representation Then based on the hypergraph G topic Learn to enrich the representations of these items with topic information.
[0253]
[0254] in, The matrix representing the centralized shopping items is initialized to a set of random vectors, and HGConv represents the hypergraph convolutional network. The fusion representation of users in the centralized shopping space is obtained through weighted combination. The mathematical expression is:
[0255]
[0256] in, represents the fusion representation of users in the centralized shopping space, yes The jth column of represents item ej representation.
[0257]
[0258] Among them, W j represents the attention weight, is the mean vector of all item representations in the current session, h, W1, W2, and b are a learnable parameter, another learnable parameter, another learnable parameter, and another learnable parameter, respectively. σ represents the softmax activation function, and h T represents a learnable parameter, i.e., the transposed vector of the learnable vector h; the symbol · represents the dot product.
[0259] Step 8: Use the divergent shopping item set obtained in step 3 to retrieve a similar neighbor session set Thus introducing new items with various themes.
[0260] First, we get the average representation of each session, which is expressed mathematically as:
[0261] s j =mean(Ej)
[0262] Among them, s j Indicates session S j The representation of; mean represents the mean aggregation function, E j Represents a session, that is, S j Calculate the similarity score between the current session representation and the candidate neighbor session:
[0263]
[0264] in, Represents the current session representation, s j Indicates a session, i.e. S j The representation of , T represents the transpose operation.
[0265] The top-k sessions with the largest similarity scores are selected as the neighbor session set of the current session.
[0266] Step 9: According to the neighbor session set obtained in step 8, that is Construct a neighbor session hypergraph, G session , where each session is in the hypergraph, G session belong to the same hyperplane. The representation s′ of the session is learned through hypergraph convolution j , the mathematical expression is:
[0267] s′ j =mean((HGConv(G session, E j ))
[0268] Among them, HGConv represents the hypergraph convolutional network, G session represents the neighbor session hypergraph, E j Indicates session S j The vector matrix of all items in , mean represents the mean aggregation function, s′ j Represents the session S after the hypergraph network update j representation.
[0269] Step 10: Neighbor session set obtained from step 8 Construct an additional neighbor session graph Among them, each neighbor session of the current session, that is, S j , is represented as a node in the graph, and the weight of the edge between the nodes is represented as the ratio of the overlapping items of the two sessions to the total number of items in the two sessions.
[0270]
[0271] in, Represents the current session s i The constructed neighbor conversation graph, Initialized as a neighbor session set The average representation matrix of all sessions in is obtained from step 8. GCN stands for graph convolutional network. Represents the representation matrix of the neighbor session after being updated by the graph convolutional network.
[0272] Step 11: Contrastive learning is performed on the mutual information between the session representations learned in step 9 and step 10 to obtain the contrastive learning loss. In other words, this step uses the contrastive learning framework to quantify the extent to which the session representations learned in step 9 and step 10 share the same information about the session, as well as the unique information that may exist between them.
[0273]
[0274] Among them, L m represents the contrastive learning loss, s′ j Represents the session S after the hypergraph network update j The representation of s″ j Represents the session S after the graph convolution network update j The representation of σ represents the softmax activation function, T represents the transposition operation, and j - Represented as a negative sample of the current session, Represents the session representation of the sampled negative sample session after being updated by the graph convolutional network.
[0275] Step 12: Weighted fusion of the two behavior type probability distributions obtained in step 6 and the representations of the corresponding items obtained in the two spaces of step 7 and step 8 to obtain the final mixed representation of the current session.
[0276]
[0277] in, Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping, Represents the representation of the current session in the centralized shopping space, Representation of the current session in a divergent shopping space. Represents the final mixed representation of the current session.
[0278] Step 13: Use the final mixed representation of the session obtained in step 12 and the candidate item representation to predict the recommendation score of each candidate item and obtain the cross entropy loss function for predicting the recommended item. The candidate item representation is the initialization item representation matrix provided by the item set in Table 1.
[0279]
[0280] in, Represents the predicted user i for positive sample j + , which is the preference score of the items that the user actually likes or interacts with; Represents the predicted user i for negative sample j - , which is the preference score of items that the user has not liked or interacted with. This loss function is a form of cross entropy loss function, which encourages the model to give high prediction values for positive samples and low prediction values for negative samples.
[0281] The cross entropy loss L of the final joint recommendation items r And contrastive learning loss are used to train the learnable parameter models involved in all steps, which constitute the final learning goal.
[0282] The learning goal is an abstract concept in the model training process. It guides the optimization direction of the model. By continuously iteratively adjusting the model parameters to minimize the total loss L, the model continuously learns and improves during the training process, so that the user's true intention can be more accurately captured when making recommendations.
[0283] The recommendation list is a specific manifestation of the model optimization in practical applications. It is the result of the model calculating and sorting the item recommendation scores based on the user's comprehensive intent representation.
[0284] By continuously optimizing learning objectives, we expect the model to generate more accurate and personalized recommendation lists," thereby improving user satisfaction and experience.
[0285] Specifically, after the model is trained, for a user u, the model obtains a comprehensive intention representation of the current user through behavior decoupling and modeling of his inherent intentions and stimulated intentions. The comprehensive intention representation is then used to calculate the recommendation score of each item, and the top-k items with the highest predicted scores are selected to form a recommendation list generated for user u to complete the recommendation work.
[0286] The learning objective, i.e. the total loss L, is mathematically expressed as:
[0287] L=L r +βL m
[0288] Among them, L represents the learning target, that is, the total loss; L r represents the cross entropy loss function for predicting recommended items, L m Represents contrastive learning loss, and β represents a balancing factor that controls the weight of the contrastive learning loss function.
[0289]
[0290] Table 1 Problem definition symbol description table
[0291] The present invention also provides a recommendation system for user behavior decoupling and intent learning. The recommendation system for user behavior decoupling and intent learning can be implemented by executing the process steps of the recommendation method for user behavior decoupling and intent learning. That is, those skilled in the art can understand the recommendation method for user behavior decoupling and intent learning as a preferred implementation of the recommendation system for user behavior decoupling and intent learning.
[0292] A recommendation system for user behavior decoupling and intention learning provided by the present invention includes:
[0293] Module M1: Construct a set of item titles based on items and conversations;
[0294] Module M2: Based on the item title set, calculate the information entropy of the topics involved in the current session to obtain the topic dispersion of each item; based on the topic dispersion, divide the shopping item set;
[0295] Module M3: deriving the dominant item of the current session and the similarity vectors between other items and the dominant item according to the shopping item set;
[0296] Module M4: deriving a probability distribution of the shopping item set based on the similarity vector;
[0297] Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph;
[0298] According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning;
[0299] Module M5: comparatively learning the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtaining the comparative learning loss;
[0300] weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session;
[0301] Module M6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set;
[0302] The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
[0303] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.
[0304] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A recommendation method for user behavior decoupling and intention learning, characterized in that: include: Step S1: construct an item title set based on items and conversations; Step S2: Based on the item title set, the information entropy of the topics involved in the current session is calculated to obtain the topic dispersion of each item; based on the topic dispersion, the shopping item set is divided; Step S3: according to the shopping item set, obtaining the dominant item of the current session and the similarity vectors between other items and the dominant item; Step S4: based on the similarity vector, deriving the probability distribution of the shopping item set; Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph; According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning; Step S5: Comparatively learn the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtain the contrastive learning loss; weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session; Step S6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set; The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
2. The recommendation method for user behavior decoupling and intention learning according to claim 1, characterized in that: In step S1: Step S1.1: construct an item title set based on items and conversations; Step S1.2: Send the item title set to the BERTopic topic model to obtain the global item-topic relationship matrix M and the corresponding 0-1 mask matrix N; The global item-topic relationship matrix M is mathematically expressed as: Where M∈R N×K , is the obtained item-topic relationship matrix, N represents the number of items, and K represents the number of topics; Represents the title set of all items. BERTopic is a pre-trained topic model. The global item-topic relationship matrix M corresponds to the 0-1 mask matrix N. When the value in the global item-topic relationship matrix M is greater than the mean of the total value of the row, the value of the corresponding position in the 0-1 mask matrix N is set to 1, otherwise the value of the corresponding position in the 0-1 mask matrix N is set to 0.
3. The recommendation method for user behavior decoupling and intention learning according to claim 2, characterized in that: In step S2: Step S2.1: Based on the 0-1 mask matrix N, a slice sub-matrix N is formed i ; Step S2.2: The slice sub-matrix N i , get the topic dispersion of the conversation; Step S2.3: Based on the theme dispersion, divide the shopping item set into a divergent shopping item set With centralized shopping item collection Determine whether the theme dispersion of the item is greater than a set threshold, and if yes, classify the item into the divergent shopping item set If the result is no, the item is divided into the centralized shopping item set. The slice sub-matrix |S i | represents the number of items in the current session, and K represents the number of topics; The mathematical expression of the topic dispersion is: Among them, IE i represents the topic dispersion of the current session, c k The proportion of items in the total number of items in the session; The mathematical expression is: in, Indicates a topic, c k The ratio of the number of items in the total number of items in the session, In the matrix N i In the kth column of k ; * represents matrix N i All rows of ; Represents the current session.
4. The recommendation method for user behavior decoupling and intention learning according to claim 3 is characterized in that: In step S3: Step S3.1: Based on the divergent shopping item set and centralized shopping collections Construct item-item global map; Step S3.2: Calculate the eigenvector centrality value of each item node in the item-item global graph; Step S3.3: Select the item with the largest feature vector centrality value as the dominant item of the current session; Step S3.4: Calculate the cosine similarity between other items in the conversation and the dominant item to form a similarity vector; The mathematical expression of the eigenvector centrality value is: Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k; The cosine similarity, mathematical expression is: in, represents the cosine similarity between an item and a dominant item; the superscript T represents a transposition operation; |||| represents normalization; the symbol · represents a dot product; A vector representing the items in the session, A vector representing the dominant item in the session; The similarity vector is expressed mathematically as follows: Among them, α i is the similarity vector formed by concatenating all cosine similarities; In step S4: splicing the similarity vector and the topic dispersion to obtain the probability distribution of the shopping item set, that is, the probability distribution of concentrated shopping and divergent shopping; According to the centralized shopping item collection Construct a topic hypergraph, form each topic into a hyperplane with related items; and for the concentrated shopping item set Learning object representations based on hypergraphs; According to the divergent shopping item collection Retrieving a neighbor session set, and constructing a neighbor session graph based on the neighbor session set, and obtaining a representation of the neighbor session of the current session and a representation of the session after hypergraph convolution learning; The probability distribution of concentrated shopping and divergent shopping is expressed mathematically as follows: Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function; Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping; The neighbor session set is the top-k sessions with the largest similarity scores. The mathematical expression of the similarity score is: in, Represents the current session representation, s j represents the representation of the session, and T represents the transposition operation; The j The mathematical expression is: s j =mean(E j ) Among them, mean represents the mean aggregation function, E j A vector matrix representing all items in a session; The representation of the session after hypergraph convolution learning is mathematically expressed as: s′ j =mean(HGConv(G session ,E j )) Among them, HGConv represents the hypergraph convolutional network, G session represents the neighbor session hypergraph, E j Represents the vector matrix of all items in the session, mean represents the mean aggregation function, s′ j Represents the session S after the hypergraph network update j representation.
5. The recommendation method for user behavior decoupling and intention learning according to claim 4 is characterized in that: In step S5, the contrastive learning loss is expressed as: Among them, L m represents the contrastive learning loss, s′ j Represents the representation of the session after the hypergraph network update, s″ j represents the representation of the session after the graph convolution network is updated, σ represents the softmax activation function, T represents the transposition operation, and j - Represented as a negative sample of the current session, Represents the session representation of the sampled negative sample session after being updated by the graph convolutional network; The final mixed representation is expressed mathematically as follows: in, Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping, Represents the representation of the current session in the centralized shopping space, represents the representation of the current session in the divergent shopping space, represents the final mixed representation of the current session; The mathematical expression of the attention weight of the weighted fusion is: Among them, w j represents the attention weight, is the mean vector of all item representations in the current session, h, W1, W2, and b are respectively a learnable parameter, another learnable parameter, another learnable parameter, and another learnable parameter, σ represents the softmax activation function, represents a learnable parameter, i.e., the transposed vector of the learnable vector h; the symbol · represents the dot product; In step S6, the cross entropy loss function is expressed as follows: in, Represents the predicted user i for positive sample j + ; Represents the predicted user i for negative sample j - ; L r represents the cross entropy loss of the project; The mathematical expression is: in, Predicted user i for negative sample j; The total loss, i.e. the learning objective, is mathematically expressed as: L=L r +βL m Among them, L represents the total loss, that is, the learning target; L r represents the cross entropy loss function for predicting recommended items, L m represents contrastive learning loss; β represents a balancing factor used to control the weight of the contrastive learning loss function.
6. A recommendation system for user behavior decoupling and intention learning, characterized in that: include: Module M1: Construct a set of item titles based on items and conversations; Module M2: Based on the item title set, calculate the information entropy of the topics involved in the current session to obtain the topic dispersion of each item; based on the topic dispersion, divide the shopping item set; Module M3: deriving the dominant item of the current session and the similarity vectors between other items and the dominant item according to the shopping item set; Module M4: deriving a probability distribution of the shopping item set based on the similarity vector; Constructing a topic hypergraph according to the item title set, and optimizing the representation of the shopping item set based on the learning of the topic hypergraph; According to the item title set, a neighbor conversation set is retrieved, and based on the neighbor conversation set, a neighbor conversation graph is constructed to obtain a representation of the neighbor conversation of the current conversation and a representation of the conversation after hypergraph convolution learning; Module M5: comparatively learning the mutual information between the representation of the neighboring session of the current session and the representation of the session after the hypergraph convolution learning, and obtaining the comparative learning loss; weighted fusion of the probability distribution of the shopping item set, the representation of the shopping item set, and the average representation of the neighboring session set to obtain a final mixed representation of the current session; Module M6: Obtaining the recommendation score of the candidate item and the cross entropy loss function of the item to be recommended through the final mixed representation and the candidate item representation provided by the item title set; The target parameters are trained by the cross entropy loss function and the contrastive learning loss, the total loss is minimized, the recommendation score is optimized, and a recommendation list is obtained.
7. The user behavior decoupling and intention learning recommendation system according to claim 6, characterized in that: In the module M1: Module M1.1: Construct a collection of item titles based on items and conversations; Module M1.2: Send the item title set to the BERTopic topic model to obtain the global item-topic relationship matrix M and the corresponding 0-1 mask matrix N; The global item-topic relationship matrix M is mathematically expressed as: Where M∈R N×K , is the obtained item-topic relationship matrix, N represents the number of items, and K represents the number of topics; Represents the title set of all items. BERTopic is a pre-trained topic model. The global item-topic relationship matrix M corresponds to the 0-1 mask matrix N. When the value in the global item-topic relationship matrix M is greater than the mean of the total value of the row, the value of the corresponding position in the 0-1 mask matrix N is set to 1, otherwise the value of the corresponding position in the 0-1 mask matrix N is set to 0.
8. The user behavior decoupling and intention learning recommendation system according to claim 7, characterized in that: In the module M2: Module M2.1: Based on the 0-1 mask matrix N, form a slice sub-matrix N i ; Module M2.2: The slice sub-matrix N i , get the topic dispersion of the conversation; Module M2.3: Based on the theme dispersion, divide the shopping item set into a divergent shopping item set With centralized shopping item collection Determine whether the theme dispersion of the item is greater than a set threshold, and if yes, classify the item into the divergent shopping item set If the result is no, the item is divided into the centralized shopping item set. The slice sub-matrix |S i | represents the number of items in the current session, and K represents the number of topics; The mathematical expression of the topic dispersion is: Among them, IE i represents the topic dispersion of the current session, c k The proportion of items in the total number of items in the session; The mathematical expression is: in, Indicates a topic, c k The ratio of the number of items in the total number of items in the session, In the matrix N i In the kth column of k ; * represents matrix N i All rows of ; Represents the current session.
9. The user behavior decoupling and intention learning recommendation system according to claim 8, characterized in that: In the module M3: Module M3.1: Based on divergent shopping item collection and centralized shopping collections Construct item-item global map; Module M3.2: Calculate the eigenvector centrality value of each item node in the item-item global graph; Module M3.3: Select the item with the largest feature vector centrality value as the dominant item of the current session; Module M3.4: Calculate the cosine similarity between other items in the conversation and the dominant item to form a similarity vector; The mathematical expression of the eigenvector centrality value is: Among them, x j represents the eigenvector centrality value; λ represents the maximum eigenvalue; A jk represents the value corresponding to the jth row and the kth column in the adjacency matrix A, indicating the adjacency relationship between item j and item k; x k Represents the eigenvector centrality of item k; The cosine similarity, mathematical expression is: in, represents the cosine similarity between an item and a dominant item; the superscript T represents a transposition operation; |||| represents normalization; the symbol · represents a dot product; A vector representing the items in the session, A vector representing the dominant item in the session; The similarity vector is expressed mathematically as follows: Among them, α i is the similarity vector formed by concatenating all cosine similarities; In the module M4: splicing the similarity vector and the topic dispersion to obtain the probability distribution of the shopping item set, that is, the probability distribution of concentrated shopping and divergent shopping; According to the centralized shopping item collection Construct a topic hypergraph, form each topic into a hyperplane with related items; and for the concentrated shopping item set Learning object representations based on hypergraphs; According to the divergent shopping item collection Retrieving a neighbor session set, and constructing a neighbor session graph based on the neighbor session set, and obtaining a representation of the neighbor session of the current session and a representation of the session after hypergraph convolution learning; The probability distribution of concentrated shopping and divergent shopping is expressed mathematically as follows: Among them, concat represents a concatenation operation, fc is a three-layer fully connected neural network, and σ is a softmax activation function; Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping; The neighbor session set is the top-k sessions with the largest similarity scores. The mathematical expression of the similarity score is: in, Represents the current session representation, s j A representation of a conversation, Represents a transpose operation; The j The mathematical expression is: s j =mean(E j ) Among them, mean represents the mean aggregation function, E j A vector matrix representing all items in a session; The representation of the session after hypergraph convolution learning is mathematically expressed as: s′ j =mean(HGConv(G session ,E j )) Among them, HGConv represents the hypergraph convolutional network, G session represents the neighbor session hypergraph, E j Represents the vector matrix of all items in the session, mean represents the mean aggregation function, s′ j Represents the session S after the hypergraph network update j representation.
10. The recommendation system for user behavior decoupling and intention learning according to claim 9, characterized in that: In the module M5, the contrastive learning loss is expressed as: Among them, L m represents the contrastive learning loss, s′ j Represents the representation of the session after the hypergraph network update, s″ j represents the representation of the session after the graph convolution network is updated, σ represents the softmax activation function, T represents the transposition operation, and j - Represented as a negative sample of the current session, Represents the session representation of the sampled negative sample session after being updated by the graph convolutional network; The final mixed representation is expressed mathematically as follows: in, Indicates the probability that the next behavior type of user interaction is centralized shopping, Indicates the probability that the next behavior type of the user interaction is divergent shopping, Represents the representation of the current session in the centralized shopping space, represents the representation of the current session in the divergent shopping space, represents the final mixed representation of the current session; The mathematical expression of the attention weight of the weighted fusion is: Among them, w j represents the attention weight, is the mean vector of all item representations in the current session, h, W1, W2, and b are a learnable parameter, another learnable parameter, another learnable parameter, and another learnable parameter, respectively. σ represents the softmax activation function, and h T represents a learnable parameter, i.e., the transposed vector of the learnable vector h; the symbol · represents the dot product; In the module M6, the cross entropy loss function is expressed as follows: in, Represents the predicted user i for positive sample j + ; Represents the predicted user i for negative sample j - ; L r represents the cross entropy loss of the project; The mathematical expression is: in, Predicted user i for negative sample j; The total loss, i.e. the learning objective, is mathematically expressed as: L=L r +βL m Among them, L represents the total loss, that is, the learning target; L r represents the cross entropy loss function for predicting recommended items, L m represents contrastive learning loss; β represents a balancing factor used to control the weight of the contrastive learning loss function.
Citation Information
Cited By
Intelligent information recommendation method driven by user intention recognition
CN122220619A
An information intelligent recommendation method driven by user intention recognition
CN122220619B
