A cross-domain recommendation method for information cocoons

By employing a cross-domain knowledge transfer recommendation method, combined with deep transfer learning and an unexpectedness extraction module, the problem of information cocoons in recommendation systems is solved, achieving a balance between accuracy and unexpectedness and improving user experience.

CN115525819BActive Publication Date: 2025-10-28ZHEJIANG LAB +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210337382.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-31
Publication Date
2025-10-28
Estimated Expiration
2042-03-31

AI Technical Summary

Technical Problem

Existing recommendation systems are prone to information cocoon problems when recommending highly relevant items in the long run, which gradually narrows the user experience. Furthermore, existing cross-domain recommendation methods struggle to balance accuracy and unexpectedness.

Method used

We adopt a cross-domain knowledge transfer recommendation method. By constructing a cross-domain cross network and an unexpectedness extraction module, and combining the shared knowledge matrix and MMD constraints in deep transfer learning, we optimize user preference modeling. The recommendation system improves recommendation unexpectedness while ensuring accuracy.

Benefits of technology

It effectively alleviates the information cocoon problem, improves the accuracy and unexpectedness of recommendation systems, recommends products that are both relevant and unexpected, and enhances user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115525819B_ABST
    Figure CN115525819B_ABST
Patent Text Reader

Abstract

This invention discloses a cross-domain recommendation method for information cocoons, comprising: 1. acquiring a dataset of user product ratings and performing data preprocessing; 2. constructing a cross-domain knowledge transfer module for a cross-domain knowledge transfer recommendation model; 3. constructing a target domain unexpectedness extraction module for the cross-domain knowledge transfer recommendation model; 4. training the model using training set data and adjusting and optimizing the model's hyperparameters based on test results; 5. inputting test set data into the trained model, ranking the predicted scores of all output items, and finally selecting the top N products to recommend to the user. This invention can generate product recommendations that are both relevant and unexpected for users, ensuring recommendation accuracy while increasing unexpectedness, thereby improving user satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of recommendation technology, specifically relating to a cross-domain recommendation method for information cocoons. Background Technology

[0002] With the development of web-based social media, recommender systems have become ubiquitous and an indispensable part of user interaction with the internet. Recommender systems filter out redundant information, providing consumers with personalized online experiences and offering relevant content based on users' personal interests or the historical preferences of their neighbors. Today, recommender systems are used in various types of social media platforms, such as news, books, and music. They are also a crucial marketing technology for e-commerce companies; companies like Douban, Amazon, Alibaba, and Netflix all utilize extensive recommendation-related technologies. In summary, recommender systems address the problem of information overload, effectively reducing consumers' search and decision-making costs, improving user satisfaction, and driving the development of social commerce.

[0003] Recommendation systems can accurately find relevant items for users. However, if they consistently recommend highly relevant items, over time, due to the positive reinforcement effect of the recommendation system, online users may receive less and less information or content, leading to a gradually weakened user experience. This can result in a narrowed perspective and a lack of social engagement, a phenomenon known as the information cocoon problem among information retrieval researchers. Existing recommendation algorithms typically focus more on improving recommendation accuracy and less on the potential information cocoon problem.

[0004] To address the problem of information cocoons, researchers have noted that recommending novel and diverse items can also affect user satisfaction, thus suggesting that the "accidental discovery" capability of recommendation systems can solve the problem. However, these studies, primarily based on single domains and aiming to improve the "accidental discovery" capability of recommendation systems, while mitigating the risk of users falling into information asymmetry to some extent and thus alleviating the information cocoon problem, often suffer from insufficient recommendation accuracy. Currently, cross-domain recommendation systems are rapidly developing.

[0005] Cross-domain recommender systems can transfer knowledge from the source domain to the target domain, alleviating the data sparsity problem and improving recommendation accuracy. In practical applications, weak semantic matching domains, such as those with little semantic correlation and strong semantic heterogeneity (e.g., movies and office supplies, movies and electronic products), are more common. Furthermore, the synergistic optimization of recommendation accuracy and unexpectedness can significantly improve customer satisfaction and effectively alleviate the information cocoon problem. Therefore, introducing cross-domain recommender methods to comprehensively balance recommendation accuracy and diversity / unexpectedness to alleviate the information cocoon problem is gradually becoming an important research topic. Summary of the Invention

[0006] This invention addresses the shortcomings of existing recommendation methods for information cocoons by proposing a cross-domain recommendation method for information cocoons. The aim is to improve the "accidental discovery" capability of the recommendation system while ensuring recommendation accuracy, thereby balancing recommendation accuracy and unexpectedness, and ultimately alleviating the information cocoon problem by recommending products that users find both relevant and unexpected.

[0007] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0008] The cross-domain recommendation method for information cocoons proposed in this invention is characterized by the following steps:

[0009] Step 1: Obtain user ratings for the product and perform data preprocessing:

[0010] Step 1.1: Identify two categories of items belonging to different domains and obtain the rating datasets of the public user dataset U on the items in the two domains, where the total number of public users is denoted as m;

[0011] Step 1.2: Select one of the domains as the source domain D. S Another one is the target domain D. T Target domain D T and source domain D S The item sets in the domain are denoted as P and M, and the target domain is D. T D in the source domain S The total number of items is denoted as n. T and n S ;

[0012] Step 1.3: Let the rating matrix of the public user set U on the target domain item set P be denoted as... R T Any user u in the target domain D T The rating of any item i is denoted as r. u,i If user u rated item i, then let r u,i Set r to 1; otherwise, let r be 1. u,iSimilarly, let the rating matrix of the public user set U on the source domain item set M be denoted as 0. R S Any user u in the source domain D S The rating of any item j is denoted as r. u,j If user u rated item j, then let r u,j Set r to 1; otherwise, let r be 1. u,j =0;

[0013] Step 2: Construct the cross-domain knowledge transfer module of the cross-domain knowledge transfer recommendation model:

[0014] Step 2.1: Extract the target domain D T Features of user u-item i

[0015] Step 2.1.1: For user u and target domain D T Item i is one-hot encoded and mapped to a one-hot encoded vector I. u ∈{0,1} m and In this case, each one-hot encoded vector takes a value of 1 only at the id index position, and a value of 0 at all other positions;

[0016] Step 2.1.2: Perform embedding operations on user u and item i respectively, and construct the embedding matrix of user u. Embedding matrix of item i Where d is the dimension after embedding;

[0017] Step 2.1.3: Embed the representations of user u and item i into XI. u and Y T I i Perform horizontal stitching to obtain the target domain D T Features of user u-item i and

[0018] Step 2.2: Extract the target domain D T Historical Behavior and Session Features of User u u,t :

[0019] Step 2.2.1, from the target domain D T Select K fixed-length representation vectors representing the historical clicks of any item i by any user u, and aggregate them into a user behavior sequence Λ. u , and Λ u = [λ1, λ2, ..., λ k ,...,λ K ], where λ k This represents the k-th representation vector;

[0020] Step 2.2.2: Utilize a Long Short-Term Memory (LSTM) network to analyze the user behavior sequence Λ u Perform sequence embedding to obtain the hidden state h of the LSTM output at time t. u,t ;

[0021] Step 2.2.3: Calculate the historical behavior session features O of user u according to equation (1). u,t :

[0022]

[0023] In equation (1), a t,b This represents the b-th weight coefficient calculated using the Softmax function;

[0024] Step 2.3: Extract the features of user u-item i and user u's historical behavior and session characteristics O u,t By splicing, the target domain D is obtained. T Combination features I u,i ,and

[0025] Step 2.4: Extract source domain D S Features of user u-item j u,j :

[0026] Step 2.4.1: For user u and source domain D S For item j, perform the same operations as in steps 2.1.1 to 2.1.3 to finally obtain the source domain D. S User u-item j characteristics and in, This indicates that for the source domain D S The one-hot encoded vector obtained by encoding and mapping item j in the data. The embedding matrix represents item j;

[0027] Step 2.4.2, for source domain D S User u-item j characteristics First copy and then concatenate to obtain the target domain D. T Combination features I u,i Dimensionally aligned source domain D S User u-item j embedding representation features I u,j ,and

[0028] Step 2.5: Construct the target domain D T Partial and source domain D SThe cross-domain network composed of various parts, and with combined features I u,i and embedding representation features I u,j As target domains D in cross-domain networks respectively T Partial and source domain D S Partial input, and then learn inter-domain transfer features through knowledge transfer. Then combine it with domain features By combining these methods, the output of the cross-domain network is ultimately obtained.

[0029] Step 2.5.1: Cross-domain cross-network in target domain D T In part, the neighborhood features of the (l+1)th hidden layer are obtained using equations (2) and (3). Inter-domain migration characteristics

[0030]

[0031]

[0032] In equations (2) and (3), the cross-domain network in the target domain D T The weight matrix of part of the l-th to l+1-th hidden layers is expressed as follows: The input to the l-th hidden layer is represented as follows: When l=1, initialize The bias term of the l-th hidden layer is expressed as: Cross-domain cross-networks in source domain D S The input of part of the l-th hidden layer is represented as When l=1, initialize M l For the l-th hidden layer from the source domain D S To target domain D T Shared knowledge transfer matrix;

[0033] Step 2.5.2: Calculate the output of the cross-domain network according to equation (4).

[0034]

[0035] In equation (4), σ(·) represents the activation function. and This represents the weight coefficients of the two features calculated using the Softmax function, and is the output of the cross-domain network. Represents feature weight coefficients and In-domain features of the (l+1)th hidden layer Inter-domain migration characteristics The activation value after weighted summation;

[0036] Step 2.5.3: Establish the loss function using equation (5).

[0037]

[0038] In equation (5), They represent The distribution of , sup denotes finding the upper bound, E denotes finding the expectation, f(·) denotes the Gaussian kernel mapping function, ||f||<1 indicates that the norm of function f in the regenerated Hilbert space should not be greater than 1;

[0039] Step 3: Construct the target domain unexpectedness extraction module for the cross-domain knowledge transfer recommendation model:

[0040] Step 3.1: Calculate user u's response to the new item i new Unexpectedness

[0041] Step 3.1.1: According to equation (6), the target domain D is... T Clustering is performed on the representation vectors of items clicked by user u in history until the density-weighted average value m(i) converges, ultimately resulting in N clusters {F1, F2, ..., F}. Z F N}, where F Z Indicates the Z-th cluster;

[0042]

[0043] In equation (6), i g Represents the target domain D T Except for any item i, the historical clicked items of user u, N(i) represents the target domain D. T The set of all neighboring items of item i, K(i) g -i) indicates the kernel function used by the mean shift algorithm;

[0044] Step 3.1.2: Use equation (7) to obtain user u's response to the new item i. new Unexpectedness

[0045]

[0046] In equation (7), d(i new F Z ) represents the new item i new up to the Zth cluster F Z The distance between the cluster edges;

[0047] Step 3.2: Extract the unexpectedness perception vector unexp_fac for user u. u :

[0048] Step 3.2.1, from the target domain D T Select K′ fixed-length representation vectors of the items clicked by user u in the past, where K′ < K, and aggregate them into a short historical behavior sequence Λ′ of the user. u Following steps 2.2.2 to 2.2.3, the same operation is performed using LSTM, and the short history behavior session features O′ of user u are finally obtained according to equation (8). u,t :

[0049]

[0050] In equation (8), a′ t,b h′ represents the b-th weight coefficient calculated using the Softmax function. u,t This indicates the use of LSTM to process short historical user behavior sequences Λ′. u The hidden state of the LSTM output at time t after sequence embedding;

[0051] Step 3.2.2, with target domain D T Short history of user u's session characteristics O′ u,t As input, the unexpectedness perception vector unexp_fac of user u is output using an L-layer fully connected network. u ;

[0052] Step 4: Use the acquired dataset to train the cross-domain knowledge transfer recommendation model, and adjust and optimize the hyperparameters of the cross-domain knowledge transfer recommendation model based on the test results;

[0053] Step 4.1: Use cross-entropy as the basic loss function, take the interaction behavior between user u and item i as the standard to distinguish between positive and negative samples, establish the objective function according to equation (9), establish the joint loss function according to equation (10), and train the cross-domain knowledge transfer recommendation model:

[0054]

[0055] In equation (9), θ represents all parameters in the cross-domain knowledge transfer recommendation model, and R + R - Let r′ be the positive and negative samples in the user u-item i rating matrix. u,i This represents the actual rating of item i by user u in the sample. The prediction score of user u for item i in the cross-domain knowledge transfer recommendation model;

[0056]

[0057] In equation (10), The target domain D is respectively T Cross-entropy loss, target domain D T Maximum mean difference constrained loss and source domain D S The cross-entropy loss makes but This represents all parameters of a cross-domain knowledge transfer recommendation model, and Users u and the knowledge transfer matrix M are shared between them;

[0058] Step 4.2: Use the Tensorflow framework and update and learn the parameters of the cross-domain knowledge transfer recommendation model according to equations (11) and (12):

[0059]

[0060]

[0061] In equations (11) and (12), μ represents the learning rate. and These represent the parameters of the cross-domain knowledge transfer recommendation model before and after updating in the source and target domains, respectively.

[0062] Step 5: Randomly sample rating data from each user according to a fixed ratio to divide the training and test sets. Input the test set data into the trained cross-domain knowledge transfer recommendation model and output the predicted score of user u for any item i. Thus, user u's relationship to target domain D is obtained. T The predicted scores of all items in item set P are sorted in descending order, and the top N products are selected to recommend to user u.

[0063] Step 5.1: Calculate the relevance prediction score of user u-item i in the cross-domain knowledge transfer module according to equation (13).

[0064]

[0065] In equation (13), f(·) is the interaction function, and θ is all the parameters in the cross-domain knowledge transfer recommendation model;

[0066] Step 5.2: Calculate the target domain D according to equation (14). T Unexpectedness score of the unexpectedness extraction module

[0067]

[0068] In equation (14), f(·) represents the interaction function, unexp_fac u This represents the unexpectedness perception vector of user u. This indicates that user u has a positive view of the new item i. new The unexpectedness;

[0069] Step 5.3: Calculate the predicted score of item i according to formula (15).

[0070]

[0071] In equation (15), Represents the target domain D T The unexpectedness score of the unexpectedness extraction module. This represents the relevance prediction score between user u and item i in the cross-domain knowledge transfer module.

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] 1. The method proposed in this invention extends the traditional deep transfer learning cross-domain recommendation method. It models and optimizes the relevance and unexpectedness of user preferences in different domains, and can learn the similarity relationship between users and items in complex domains, thereby improving the recommendation accuracy and unexpectedness.

[0074] 2. This invention utilizes deep transfer learning methods, constructing a knowledge transfer network by using shared knowledge matrices, MMD constraints, and domain attention mechanisms in deep transfer learning. At the same time, it introduces an unexpectedness extraction module to ensure the unexpectedness of recommendations, thus recommending more unexpected products to users. Attached Figure Description

[0075] Figure 1 This is an overall flowchart of the cross-domain recommendation method for information cocoons according to the present invention;

[0076] Figure 2 This is a model diagram of the cross-domain knowledge transfer recommendation model in this invention;

[0077] Figure 3 This is a structural diagram of the cross-domain knowledge transfer module in the cross-domain knowledge transfer recommendation model of this invention. Detailed Implementation

[0078] In this embodiment, a cross-domain recommendation method for information cocoons can improve the unexpectedness of recommendations while ensuring accuracy, ultimately recommending products to users that feel both relevant and unexpected. For example... Figure 1As shown, this invention mainly includes the following stages: First, user rating data for products is acquired and preprocessed. Then, a cross-domain knowledge transfer recommendation system considering recommendation unexpectedness is modeled. This stage consists of a cross-domain knowledge transfer module and a target domain unexpectedness extraction module, as shown below. Figure 2 As shown. Finally, a recommendation list is generated, and the items are sorted from highest to lowest based on their predicted total scores. The top N products are then recommended to the user. Specifically, this method includes the following steps:

[0079] Step 1: Obtain user ratings for the product and perform data preprocessing:

[0080] Step 1.1: Identify two categories of items belonging to different domains, i.e., the two domains differ significantly in product type or style and have no obvious semantic connection. Then, for the common users in these two semantically heterogeneous domains, filter them by setting a minimum number of rating records for each user. Finally, obtain the rating dataset of the common user dataset U on the items in the two domains, where the total number of common users is denoted as m.

[0081] Step 1.2: Select one of the regions with higher data density as the source domain D. S Another one is the target domain D. T Target domain D T and source domain D S The item sets in the domain are denoted as P and M, and the target domain is D. T D in the source domain S The total number of items is denoted as n. T and n S ;

[0082] Step 1.3: Let the rating matrix of the public user set U on the target domain item set P be denoted as... R T Any user u in the target domain D T The rating of any item i is denoted as r. u,i If user u rated item i, then let r u,i Set r to 1; otherwise, let r be 1. u,i Similarly, let the rating matrix of the public user set U on the source domain item set M be denoted as 0. R S Any user u in the source domain D S The rating of any item j is denoted as r. u,j If user u rated item j, then let r u,j Set r to 1; otherwise, let r be 1. u,j =0;

[0083] Step 2: Construct the cross-domain knowledge transfer module of the cross-domain knowledge transfer recommendation model:

[0084] Step 2.1: Extract the target domain D T Features of user u-item i

[0085] Step 2.1.1: For user u and target domain D T Item i is one-hot encoded and mapped to a one-hot encoded vector I. u ∈{0,1} m and In this case, each one-hot encoded vector takes a value of 1 only at the id index position, and a value of 0 at all other positions;

[0086] Step 2.1.2: Perform embedding operations on user u and item i respectively, and construct the embedding matrix of user u. Embedding matrix of item i Where d is the dimension after embedding;

[0087] Step 2.1.3: Embed the representations of user u and item i into XI. u and Y T I i Perform horizontal stitching to obtain the target domain D T Features of user u-item i and

[0088] Step 2.2: Extract the target domain D T Historical Behavior and Session Features of User u u,t :

[0089] Step 2.2.1, from the target domain D T Select K fixed-length representation vectors representing the historical clicks of any item i by any user u, and aggregate them into a user behavior sequence Λ. u , and Λ u = [λ1, λ2, ..., λ k ,...,λ K ], where λ k This represents the k-th representation vector;

[0090] Step 2.2.2: Utilize a Long Short-Term Memory (LSTM) network to analyze the user behavior sequence Λ u Perform sequence embedding to obtain the hidden state h of the LSTM output at time t. u,t ;

[0091] Step 2.2.3: Calculate the historical behavior session features O of user u according to equation (1). u,t :

[0092]

[0093] In equation (1), a t,b This represents the b-th weight coefficient calculated using the Softmax function;

[0094] Step 2.3: Extract the features of user u-item i User u's historical behavior and session characteristics O u,t By splicing, the target domain D is obtained. T Combination features I u,i ,and

[0095] Step 2.4: Extract source domain D S Features of user u-item j u,j :

[0096] Step 2.4.1: For user u and source domain D S For item j, perform the same operations as in steps 2.1.1 to 2.1.3 to finally obtain the source domain D. S User u-item j characteristics and in, This indicates that for the source domain D S The one-hot encoded vector obtained by encoding and mapping item j in the data. The embedding matrix represents item j;

[0097] Step 2.4.2, for source domain D S User u-item j characteristics First copy and then concatenate to obtain the target domain D. T Combination features I u,i Dimensionally aligned source domain D S User u-item j embedding representation features I u,j ,and

[0098] Step 2.5: Construct the target domain D T Partial and source domain D S The cross-disciplinary network formed by the joint efforts of some parts, such as Figure 3 As shown, and with combined feature I u,i and embedding representation features I u,j As target domains D in cross-domain networks respectively T Partial and source domain D S Partial input, and then learn inter-domain transfer features through knowledge transfer. Then combine it with domain features By combining these methods, the output of the cross-domain network is ultimately obtained.

[0099] Step 2.5.1: Cross-domain cross-network in target domain D T In part, the neighborhood features of the (l+1)th hidden layer are obtained using equations (2) and (3). Inter-domain migration characteristics

[0100]

[0101]

[0102] In equations (2) and (3), the cross-domain network in the target domain D T The weight matrix of part of the l-th to l+1-th hidden layers is expressed as follows: The input to the l-th hidden layer is represented as follows: When l=1, initialize The bias term of the l-th hidden layer is expressed as: Cross-domain cross-networks in source domain D S The input of part of the l-th hidden layer is represented as Specifically, when l=1, initialization... M l For the l-th hidden layer from the source domain D S To target domain D T The shared knowledge transfer matrix, corresponding to the linear projection of the cross-connection, controls the flow from the source domain D. S To target domain D T The input is that each layer of the cross-domain network can be divided into two parts: domain-specific and inter-domain cross-network.

[0103] Step 2.5.2: Calculate the output of the cross-domain network according to equation (4).

[0104]

[0105] In equation (4), σ(·) represents the activation function. and This represents the weight coefficients of the two features learned using a domain-level attention mechanism, calculated via the Softmax function, and the output of the cross-domain network. Represents feature weight coefficients and In-domain features of the (l+1)th hidden layer Inter-domain migration characteristics The activation value after weighted summation;

[0106] Step 2.5.3: Establish the loss function using equation (5).

[0107]

[0108] In equation (5), They represent The distribution of the source domain D is given by: sup denotes finding the upper bound, E denotes finding the expectation, and f(·) denotes the Gaussian kernel mapping function. S Migrate to target domain D T Inter-domain migration characteristics With target domain D T Existing domain characteristics Mapping to a high-dimensional regenerated Hilbert space, and then using the maximum mean difference to constrain these two features, ||f||<1 indicates that the norm of the function f in the regenerated Hilbert space should not be greater than 1;

[0109] Step 3: Construct the target domain unexpectedness extraction module for the cross-domain knowledge transfer recommendation model:

[0110] Step 3.1: Calculate user u's response to the new item i new Unexpectedness

[0111] Step 3.1.1: Using the unsupervised MeanShift clustering algorithm according to equation (6), cluster the target domain D. T Clustering is performed on the representation vectors of items clicked by user u in history until the density-weighted average value m(i) converges, ultimately resulting in N clusters {F1, F2, ..., F}. Z F N}, where F Z Indicates the Z-th cluster;

[0112]

[0113] In equation (6), i g Represents the target domain D T Except for any item i, the historical clicked items of user u, N(i) represents the target domain D. T The set of all neighboring items of item i, K(i) g -i) indicates the kernel function used by the mean shift algorithm;

[0114] Step 3.1.2: Use equation (7) to obtain user u's response to the new item i. new Unexpectedness

[0115]

[0116] In equation (7), d(i new F Z ) represents the new item i new up to the Zth cluster FZ The distance between cluster edges, to prevent accidental... Reaching a certain threshold causes a significant loss of correlation, which is addressed by using y(x) = x·e -x For activation functions, Perform single-peak activation so that when unexpected events occur... Once a certain threshold is reached, the correlation will not continue to rise, thus ensuring a stable correlation. Therefore, for a new item i... new For the unexpectedness of user u This new item i can be defined as new The sum of weighted distances to the cluster edges of user u;

[0117] Step 3.2: Extract the unexpectedness perception vector unexp_fac for user u. u :

[0118] Step 3.2.1, from the target domain D T Select K′ fixed-length representation vectors of the items clicked by user u in the past, where K′ < K, and aggregate them into a short historical behavior sequence Λ′ of the user. u Following steps 2.2.2 to 2.2.3, the same operation is performed using LSTM, and the short history behavior session features O′ of user u are finally obtained according to equation (8). u,t :

[0119]

[0120] In equation (8), a′ t,b h′ represents the b-th weight coefficient calculated using the Softmax function. u,t This indicates the use of LSTM to process short historical user behavior sequences Λ′. u The hidden state of the LSTM output at time t is obtained by performing sequence embedding;

[0121] Step 3.2.2, with target domain D T Short history of user u's session characteristics O′ u,t As input, an L-layer fully connected network is used to output the unexpectedness perception vector unexp_fac for user u. u ;

[0122] Step 4: Use the acquired dataset to train the cross-domain knowledge transfer recommendation model, and adjust and optimize the hyperparameters of the cross-domain knowledge transfer recommendation model based on the test results;

[0123] Step 4.1: Use cross-entropy as the basic loss function, take the interaction behavior between user u and item i as the standard to distinguish between positive and negative samples, and establish the objective function according to equation (9), and establish the joint loss function according to equation (10) to train the cross-domain knowledge transfer recommendation model:

[0124]

[0125] In equation (9), θ represents all parameters in the cross-domain knowledge transfer recommendation model, and R + R - Let r′ be the positive and negative samples in the user u-item i rating matrix. u,i This represents the actual rating of item i by user u in the sample. To provide a recommendation model for cross-domain knowledge transfer, the predicted score of user u for item i is given.

[0126]

[0127] In equation (10), The target domain D is respectively T Cross-entropy loss, target domain D T Maximum mean difference constrained loss and source domain D S The cross-entropy loss makes but This represents all parameters of a cross-domain knowledge transfer recommendation model, and Users u and knowledge transfer matrix M are shared between them, and the objective function can be optimized by stochastic gradient descent;

[0128] Step 4.2: Using the Tensorflow framework, update and learn the parameters of the cross-domain knowledge transfer recommendation model according to equations (11) and (12):

[0129]

[0130]

[0131] In equations (11) and (12), μ represents the learning rate. and These represent the parameters of the cross-domain knowledge transfer recommendation model before and after updating in the source and target domains, respectively.

[0132] Step 5: Randomly sample rating data from each user according to a fixed ratio to divide the training and test sets. Input the test set data into the trained cross-domain knowledge transfer recommendation model and output the predicted score of user u for any item i. Then obtain user u for target domain D TThe predicted scores of all items in item set P are calculated, sorted in descending order, and the top N products are selected to recommend to user u.

[0133] Step 5.1: Calculate the relevance prediction score of user u-item i in the cross-domain knowledge transfer module according to equation (13).

[0134]

[0135] In equation (13), f(·) is the interaction function, and θ is all the parameters in the cross-domain knowledge transfer recommendation model;

[0136] Step 5.2: Calculate the target domain D according to equation (14). T Unexpectedness score of the unexpectedness extraction module

[0137]

[0138] In equation (14), f(·) represents the interaction function, unexp_fac u This represents the unexpectedness perception vector of user u. This indicates that user u has a positive view of the new item i. new The unexpectedness;

[0139] Step 5.3: Calculate the predicted score of item i according to formula (15).

[0140]

[0141] In equation (15), Represents the target domain D T The unexpectedness score of the unexpectedness extraction module. This represents the relevance prediction score between user u and item i in the cross-domain knowledge transfer module.

Claims

1. A cross-domain recommendation method for information cocoons, characterized in that, Includes the following steps: Step 1: Obtain user ratings for the product and perform data preprocessing: Step 1.1: Identify two categories of items belonging to different domains and obtain the rating datasets of the public user dataset U on the items in the two domains, where the total number of public users is denoted as m; Step 1.2: Select one of the domains as the source domain D. S Another one is the target domain D. T Target domain D T and source domain D S The item sets in the domain are denoted as P and M, and the target domain is D. T D in the source domain S The total number of items is denoted as n. T and n S ; Step 1.3: Let the rating matrix of the public user set U on the target domain item set P be denoted as... R T Any user u in the target domain D T The rating of any item i is denoted as r. u,i If user u rated item i, then let r u,i Set r to 1; otherwise, let r be 1. u,i Similarly, let the rating matrix of the public user set U on the source domain item set M be denoted as 0. R S Any user u in the source domain D S The rating of any item j is denoted as r. u,j If user u rated item j, then let r u,j Set r to 1; otherwise, let r be 1. u,j =0; Step 2: Construct the cross-domain knowledge transfer module of the cross-domain knowledge transfer recommendation model: Step 2.1: Extract the target domain D T Features of user u-item i Step 2.1.1: For user u and target domain D T Item i is one-hot encoded and mapped to a one-hot encoded vector I. u ∈{0,1} m and In this case, each one-hot encoded vector takes a value of 1 only at the id index position, and a value of 0 at all other positions; Step 2.1.2: Perform embedding operations on user u and item i respectively, and construct the embedding matrix of user u. Embedding matrix of item i Where d is the dimension after embedding; Step 2.1.3: Embed the representations of user u and item i into XI. u and Y T I i Perform horizontal stitching to obtain the target domain D T Features of user u-item i and Step 2.2: Extract the target domain D T Historical Behavior and Session Features of User u u,t : Step 2.2.1, from the target domain D T Select K fixed-length representation vectors representing the historical clicks of any item i by any user u, and aggregate them into a user behavior sequence Λ. u , and Λ u = [λ1, λ2, ..., λ k ,...,λ K ], where λ k This represents the k-th representation vector; Step 2.2.2: Utilize a Long Short-Term Memory (LSTM) network to analyze the user behavior sequence Λ u Perform sequence embedding to obtain the hidden state h of the LSTM output at time t. u,t ; Step 2.2.3: Calculate the historical behavior session features O of user u according to equation (1). u,t : In equation (1), a t,b This represents the b-th weight coefficient calculated using the Softmax function; Step 2.3: Extract the features of user u-item i and user u's historical behavior and session characteristics O u,t By splicing, the target domain D is obtained. T Combination features I u,i ,and Step 2.4: Extract source domain D S Features of user u-item j u,j : Step 2.4.1: For user u and source domain D S For item j, perform the same operations as in steps 2.1.1 to 2.1.3 to finally obtain the source domain D. S User u-item j characteristics and in, This indicates that for the source domain D S The one-hot encoded vector obtained by encoding and mapping item j in the data. The embedding matrix represents item j; Step 2.4.2, for source domain D S User u-item j characteristics First copy and then concatenate to obtain the target domain D. T Combination features I u,i Dimensionally aligned source domain D S User u-item j embedding representation features I u,j ,and Step 2.5: Construct the target domain D T Partial and source domain D S The cross-domain network composed of various parts, and with combined features I u,i and embedding representation features I u,j As target domains D in cross-domain networks respectively T Partial and source domain D S Partial input, and then learn inter-domain transfer features through knowledge transfer. Then combine it with domain features By combining these methods, the output of the cross-domain network is ultimately obtained. Step 2.5.1: Cross-domain cross-network in target domain D T In part, the neighborhood features of the (l+1)th hidden layer are obtained using equations (2) and (3). Inter-domain migration characteristics In equations (2) and (3), the cross-domain network in the target domain D T The weight matrix of part of the l-th to l+1-th hidden layers is expressed as follows: The input to the l-th hidden layer is represented as follows: When l=1, initialize The bias term of the l-th hidden layer is expressed as: Cross-domain cross-networks in source domain D S The input of part of the l-th hidden layer is represented as When l=1, initialize M l For the l-th hidden layer from the source domain D S To target domain D T Shared knowledge transfer matrix; Step 2.5.2: Calculate the output of the cross-domain network according to equation (4). In equation (4), σ(·) represents the activation function. and This represents the weight coefficients of the two features calculated using the Softmax function, and is the output of the cross-domain network. Represents feature weight coefficients and In-domain features of the (l+1)th hidden layer Inter-domain migration characteristics The activation value after weighted summation; Step 2.5.3: Establish the loss function using equation (5). In equation (5), They represent The distribution of , sup denotes finding the upper bound, E denotes finding the expectation, f(·) denotes the Gaussian kernel mapping function, ||f||<1 indicates that the norm of function f in the regenerated Hilbert space should not be greater than 1; Step 3: Construct the target domain unexpectedness extraction module for the cross-domain knowledge transfer recommendation model: Step 3.1: Calculate user u's response to the new item i new Unexpectedness Step 3.1.1: According to equation (6), the target domain D is... T Clustering is performed on the representation vectors of items clicked by user u in history until the density-weighted average value m(i) converges, ultimately resulting in N clusters {F1, F2, ..., F}. Z F N }, where F Z Indicates the Z-th cluster; In equation (6), i g Represents the target domain D T Except for any item i, the historical clicked items of user u, N(i) represents the target domain D. T The set of all neighboring items of item i, K(i) g -i) indicates the kernel function used by the mean shift algorithm; Step 3.1.2: Use equation (7) to obtain user u's response to the new item i. new Unexpectedness In equation (7), d(i new F Z ) represents the new item i new up to the Zth cluster F Z The distance between the cluster edges; Step 3.2: Extract the unexpectedness perception vector unexp_fac for user u. u : Step 3.2.1, from the target domain D T Select K′ fixed-length representation vectors of the items clicked by user u in the past, where K′ < K, and aggregate them into a short historical behavior sequence Λ′ of the user. u Following steps 2.2.2 to 2.2.3, the same operation is performed using LSTM, and the short history behavior session features O′ of user u are finally obtained according to equation (8). u,t : In equation (8), a′ t,b h′ represents the b-th weight coefficient calculated using the Softmax function. u,t This indicates the use of LSTM to process short historical user behavior sequences Λ′. u The hidden state of the LSTM output at time t after sequence embedding; Step 3.2.2, with target domain D T Short history of user u's session characteristics O′ u,t As input, the unexpectedness-aware vector unexp-fac of user u is output using an L-layer fully connected network. u ; Step 4: Use the acquired dataset to train the cross-domain knowledge transfer recommendation model, and adjust and optimize the hyperparameters of the cross-domain knowledge transfer recommendation model based on the test results; Step 4.1: Use cross-entropy as the basic loss function, take the interaction behavior between user u and item i as the standard to distinguish between positive and negative samples, establish the objective function according to equation (9), establish the joint loss function according to equation (10), and train the cross-domain knowledge transfer recommendation model: In equation (9), θ represents all parameters in the cross-domain knowledge transfer recommendation model, and R + R - Let r′ be the positive and negative samples in the user u-item i rating matrix. u,i This represents the actual rating of item i by user u in the sample. The prediction score of user u for item i in the cross-domain knowledge transfer recommendation model; In equation (10), The target domain D is respectively T Cross-entropy loss, target domain D T Maximum mean difference constrained loss and source domain D S The cross-entropy loss makes but This represents all parameters of a cross-domain knowledge transfer recommendation model, and Users u and the knowledge transfer matrix M are shared between them; Step 4.2: Use the Tensorflow framework and update and learn the parameters of the cross-domain knowledge transfer recommendation model according to equations (11) and (12): In equations (11) and (12), μ represents the learning rate. and These represent the parameters of the cross-domain knowledge transfer recommendation model before and after updating in the source and target domains, respectively. Step 5: Randomly sample rating data from each user according to a fixed ratio to divide the training and test sets. Input the test set data into the trained cross-domain knowledge transfer recommendation model and output the predicted score of user u for any item i. Thus, user u's relationship to target domain D is obtained. T The predicted scores of all items in item set P are sorted in descending order, and the top N products are selected to recommend to user u. Step 5.1: Calculate the relevance prediction score of user u-item i in the cross-domain knowledge transfer module according to equation (13). In equation (13), f(·) is the interaction function, and θ is all the parameters in the cross-domain knowledge transfer recommendation model; Step 5.2: Calculate the target domain D according to equation (14). T Unexpectedness score of the unexpectedness extraction module In equation (14), f(·) represents the interaction function, unexp_fac u This represents the unexpectedness perception vector of user u. This indicates that user u has a positive view of the new item i. new The unexpectedness; Step 5.3: Calculate the predicted score of item i according to formula (15). In equation (15), Represents the target domain D T The unexpectedness score of the unexpectedness extraction module. This represents the relevance prediction score between user u and item i in the cross-domain knowledge transfer module.

Citation Information

Patent Citations

  • Cross-domain recommendation method based on label migration

    CN111708937A

  • Training method of information recommendation model and related device

    CN111931062A