A dual-target domain personalized item recommendation method and device based on multi-view conversion
The method employs RGCN and HAN to transform user embeddings across domains, addressing data sparsity and multiple objective optimization in recommendation systems, thereby improving recommendation accuracy and robustness by integrating diverse user preferences and behaviors.
Patent Information
- Application Number
- CN202410883074.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Traditional recommendation systems face challenges in providing personalized recommendations across multiple domains due to data sparsity and the inability to effectively integrate and optimize multiple objectives, leading to suboptimal user experience as user demands become more diverse and information crosses domains.
A method utilizing multiple view transformations through the construction of relationship graph convolutional networks (RGCN) and heterogeneous graph attention networks (HAN) to bridge user embeddings across domains, enabling more accurate and personalized recommendations by merging user direct, relationship, and meta-path embeddings, and using a unified loss function for training.
This approach enhances recommendation accuracy and robustness by integrating diverse user preferences and behaviors, reducing the impact of data sparsity and single-perspective biases, resulting in more personalized and reliable recommendations.
Smart Images

Figure CN118673218B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a method and device for recommending personalized items in dual target domains based on multi-view conversion. Background Art
[0002] A recommendation system is a technology that uses user behavior data, item features, and user features to recommend items of interest to users. Common recommendation system methods include content-based recommendation, collaborative filtering, and hybrid methods. Cross-domain recommendation refers to using data collected in one domain to improve the recommendation effect in another domain. This method is particularly suitable for data sparsity problems, that is, user-item interaction data in some domains is not sufficient to train a high-quality recommendation model. In a recommendation system, multi-objective optimization refers to considering multiple objectives simultaneously when making recommendations. Dual-objective cross-domain recommendation is to optimize the recommendation accuracy of two target domains simultaneously under the framework of cross-domain recommendation.
[0003] However, there is still room for further improvement in dual-objective cross-domain recommendation. Traditional recommendation systems are usually optimized within a single domain, aiming to provide users with personalized recommendations. However, with the diversification of user needs and the cross-domain dissemination of information, single-domain recommendation systems have been unable to meet the complex needs of users.
[0004] Dual-objective cross-domain recommendation requires not only effective integration of information between different domains, but also simultaneous optimization of multiple recommendation objectives. This multi-dimensional optimization requires the system to understand and predict user preferences and behaviors in different domains, thereby providing more accurate and diverse recommendation results.
[0005] Dual-target cross-domain recommendation requires not only information transfer and fusion between different domains, but also the consideration of user behavior and preference differences in different domains. Therefore, how to effectively design a dual-target cross-domain recommendation system has become an important direction in current recommendation system research. Summary of the invention
[0006] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a dual-target domain personalized item recommendation method and device based on multi-view transformation, which can provide more personalized and accurate recommendation content, effectively reduce the deviation and data sparsity problems caused by a single perspective, and improve the robustness and reliability of the overall recommendation system.
[0007] According to one aspect of the present invention, the present invention provides a dual-target domain personalized item recommendation method based on multi-view conversion, the method comprising the following steps:
[0008] S1: construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains respectively, train the RGCN model and the HAN model, and obtain user relation embedding and user meta-path-based embedding for each target domain respectively;
[0009] S2: For each target domain, use the encoder of this target domain to encode the user's interaction behavior in this target domain to obtain the user direct embedding of this target domain;
[0010] S3: for each target domain, construct personalized bridging functions for user direct embedding, user relationship embedding, and user meta-path-based embedding, respectively, and transform the user direct embedding, user relationship embedding, and user meta-path-based embedding of the target domain to another target domain through the personalized bridging function;
[0011] S4: For each target domain, merge the user direct embedding, user relationship embedding, and user meta-path-based embedding converted from another target domain to obtain the multi-view transformed embedding converted to this target domain;
[0012] S5: For each target domain, use the decoder of the target domain to decode the user direct embedding to obtain the item recommendation result predicted within the domain; use the decoder of the target domain to decode the multi-view transformation embedding to obtain the item recommendation result predicted across domains;
[0013] S6: Use the joint loss function to train the entire model.
[0014] Preferably, the training of the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain respectively comprises:
[0015] User relations are embedded as:
[0016] The meta-path based embedding of the user is:
[0017] in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node u; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, Denotes the meta-path ρ j The attention weight.
[0018] Preferably, encoding the user's interactive behavior in the target domain using the encoder of the target domain to obtain the user's direct embedding in the target domain includes:
[0019] Use the encoder to encode the user's specific hobby behavior in the target domain to obtain user-specific embedding; use the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain user-shared embedding;
[0020] The specific embedding and the shared embedding are merged to obtain the user direct embedding of the target domain.
[0021] Preferably, the converting of the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function comprises:
[0022] To embed the users in domain X directly into domain Y:
[0023]
[0024] Transforming the user relationship embedding of domain X to domain Y is:
[0025]
[0026] Translating the meta-path-based embedding of users in domain X to domain Y is:
[0027]
[0028] Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
[0029] Preferably, the step of merging the user direct embedding, the user relationship embedding and the user meta-path based embedding converted from another target domain to obtain the multi-view conversion embedding converted to the target domain comprises:
[0030] The embedding u of the user from domain X to domain Y x_y for:
[0031]
[0032] is the attention weight of the transformed embedding, l represents different embeddings, l = 1 represents user direct embedding, l = 2 represents user relationship embedding, l = 3 represents user meta-path-based embedding, is the transformed embedding.
[0033] Preferably, for each target domain, using a decoder of the target domain to decode the user direct embedding to obtain an intra-domain predicted item recommendation result; using a decoder of the target domain to decode the multi-view conversion embedding to obtain a cross-domain predicted item recommendation result, includes:
[0034] To predict the items a user likes, a decoder is used to decode the user’s direct embedding as follows:
[0035]
[0036] in, is a two-layer linear network decoder, z x That is the prediction result of the X-domain user obtained after decoding;
[0037]
[0038] in, is a two-layer linear network decoder, z y That is the prediction result of the Y domain user obtained after decoding;
[0039] The obtained multi-view converted embedding contains the user's preference from one domain to another domain, and this embedding is used to substitute into the decoder for prediction;
[0040]
[0041] in, and is the same decoder, which is a two-layer linear feedback neural network. The z obtained by the decoder is x_y That is, the cross-domain prediction result of the user in domain Y;
[0042]
[0043] in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder isy_x That is, the cross-domain prediction result of the user in domain X.
[0044] Preferably, the method further comprises: training the entire model using a joint loss function:
[0045]
[0046] in, represents the total loss, represents the loss function for user embedding, represents the loss function of the cross-domain part, represents the loss function of the part within the domain, represents the prior distribution loss function, α, β, and γ are weights used to balance different loss terms.
[0047] According to another aspect of the present invention, the present invention also provides a dual-target domain personalized item recommendation device based on multi-view conversion, the device comprising:
[0048] A construction module is used to respectively construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains, train the RGCN model and the HAN model, and obtain a user relation embedding and a user meta-path-based embedding for each target domain;
[0049] The encoding module is used to encode the user's interactive behavior in each target domain using the encoder of the target domain to obtain the user direct embedding of the target domain;
[0050] A conversion module is used to construct personalized bridge functions of user direct embedding, user relationship embedding and user meta-path based embedding for each target domain, and convert the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function;
[0051] A merging module is used to merge the user direct embedding, user relationship embedding and user meta-path-based embedding converted from another target domain for each target domain to obtain a multi-view transformed embedding converted to the current target domain;
[0052] The recommendation module is used to decode the user direct embedding for each target domain using the decoder of the target domain to obtain the item recommendation result predicted within the domain; and decode the multi-view transformation embedding using the decoder of the target domain to obtain the item recommendation result predicted across domains.
[0053] The training module is used to train the entire model using the joint loss function.
[0054] Preferably, the construction module trains the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain, respectively, including:
[0055] User relations are embedded as:
[0056] The meta-path based embedding of the user is:
[0057] in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node u; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, Denotes the meta-path ρ j The attention weight.
[0058] Preferably, the encoding module uses an encoder of the target domain to encode the user's interactive behavior in the target domain, and obtaining the user direct embedding of the target domain includes:
[0059] Use the encoder to encode the user's specific hobby behavior in the target domain to obtain user-specific embedding; use the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain user-shared embedding;
[0060] The specific embedding and the shared embedding are merged to obtain the user direct embedding of the target domain.
[0061] Preferably, the conversion module converts the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function, including:
[0062] To embed the users in domain X directly into domain Y:
[0063]
[0064] Transforming the user relationship embedding of domain X to domain Y is:
[0065]
[0066] Translating the meta-path-based embedding of users in domain X to domain Y is:
[0067]
[0068] Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
[0069] Preferably, the recommendation module decodes the user direct embedding for each target domain using a decoder of the target domain to obtain an intra-domain predicted item recommendation result; and decodes the multi-view conversion embedding using a decoder of the target domain to obtain a cross-domain predicted item recommendation result, including:
[0070] To predict the items a user likes, a decoder is used to decode the user’s direct embedding as follows:
[0071]
[0072] in, is a two-layer linear network decoder, z x That is the prediction result of the X-domain user obtained after decoding;
[0073]
[0074] in, is a two-layer linear network decoder, z y That is the prediction result of the Y domain user obtained after decoding;
[0075] The obtained multi-view converted embedding contains the user's preference from one domain to another domain, and this embedding is used to substitute into the decoder for prediction;
[0076]
[0077] in, and is the same decoder, which is a two-layer linear feedback neural network. The z obtained by the decoder is x_yThat is, the cross-domain prediction result of the user in domain Y;
[0078]
[0079] in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is y_x That is, the cross-domain prediction result of the user in domain X.
[0080] Beneficial effects: The present invention utilizes a multi-view conversion method to integrate information from multiple perspectives, such as user behavior data, semantic-level features, etc., and embed, fuse and analyze from multiple dimensions, so as to more comprehensively understand the interests and needs of users. This fusion of multiple views can improve the accuracy and relevance of recommendation results, and provide more personalized and accurate recommendation content. Through multi-view conversion, the system can effectively reduce the deviation and data sparsity problems caused by a single perspective. For example, if the data from a certain perspective is less or of lower quality, the data from other perspectives can be supplemented and corrected, thereby improving the robustness and reliability of the overall recommendation system.
[0081] The features and advantages of the present invention will become clear through reference to the following drawings and detailed description of specific embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 This is a flow chart of a dual-target domain personalized item recommendation method based on multi-view conversion;
[0083] Figure 2 RGCN model framework for personalized recommendation in dual-target domains based on multi-view transformation;
[0084] Figure 3 HAN model framework for personalized recommendation in dual-target domains based on multi-view transformation;
[0085] Figure 4 A detailed diagram showing the dual-objective cross-domain recommendation method for multi-view conversion;
[0086] Figure 5 This is a schematic diagram of a dual-target domain personalized item recommendation device based on multi-view conversion. DETAILED DESCRIPTION
[0087] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0088] Example 1
[0089] Figure 1 This is a flow chart of a dual-target domain personalized item recommendation method based on multi-view conversion. Figure 1 As shown, this embodiment provides a dual-target domain personalized item recommendation method based on multi-view conversion, and the method includes the following steps:
[0090] S1: construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains respectively, train the RGCN model and the HAN model, and obtain user relation embedding and user meta-path-based embedding for each target domain respectively;
[0091] S2: For each target domain, use the encoder of this target domain to encode the user's interaction behavior in this target domain to obtain the user direct embedding of this target domain;
[0092] S3: for each target domain, construct personalized bridging functions for user direct embedding, user relationship embedding, and user meta-path-based embedding, respectively, and transform the user direct embedding, user relationship embedding, and user meta-path-based embedding of the target domain to another target domain through the personalized bridging function;
[0093] S4: For each target domain, merge the user direct embedding, user relationship embedding, and user meta-path-based embedding converted from another target domain to obtain the multi-view transformed embedding converted to this target domain;
[0094] S5: For each target domain, use the decoder of the target domain to decode the user direct embedding to obtain the item recommendation result predicted within the domain; use the decoder of the target domain to decode the multi-view transformation embedding to obtain the item recommendation result predicted across domains;
[0095] S6: Use the joint loss function to train the entire model.
[0096] Specifically, the two target domains are marked as domain X and domain Y, and users have interactive behaviors in these two domains, while the items in these two domains are completely different; that is, the users in them overlap, but the items in the two domains do not overlap. The data of the two domains are preprocessed separately, and the heterogeneous graphs of the two domains are constructed respectively. The relational graph convolutional network (RGCN) and heterogeneous graph attention network (HAN) models of the two domains are trained respectively to obtain the user relation embedding and user meta-path-based embedding of the two domains respectively. The RGCN and HAN models of each domain are trained using the binary cross entropy function;
[0097] Use the X-domain encoder to encode the user's interaction behavior in the X-domain to obtain the user's direct embedding in the X-domain, and use the Y-domain encoder to encode the user's interaction behavior in the Y-domain to obtain the user's direct embedding in the Y-domain;
[0098] In order to transfer the user's preference in domain X to domain Y to enhance the recommendation effect in domain Y, the user's interaction behavior in domain X is used to construct a personalized bridge function for transferring the user from domain X to domain Y. Personalized bridge functions are constructed for the user's direct embedding in domain X (the embedding obtained by the user's interaction in domain X through the domain encoder, i.e., the embedding obtained in the previous step), the user's relational embedding (i.e., the user embedding obtained through the pre-trained RGCN model in domain X), and the user's meta-path-based embedding (i.e., the user embedding obtained through the pre-trained HAN model in domain X). The same operation is performed for domain Y.
[0099] Merge the different view embeddings converted from domain X to domain Y to obtain the multi-view conversion embedding of domain Y; Merge the different view embeddings converted from domain Y to domain X to obtain the multi-view conversion embedding of domain X;
[0100] The X-domain decoder is used to decode the user's direct embedding in the X-domain and the user's multi-view conversion embedding from the Y-domain to the X-domain; the Y-domain decoder is used to decode the user's direct embedding in the Y-domain and the user's multi-view conversion embedding from the X-domain to the Y-domain to obtain the predicted recommendation result.
[0101] This method can provide more personalized and accurate recommendations, effectively reduce the bias and data sparsity problems caused by a single perspective, and improve the robustness and reliability of the overall recommendation system.
[0102] Preferably, the training of the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain respectively comprises:
[0103] User relations are embedded as:
[0104] The meta-path based embedding of the user is:
[0105] in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node u; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, Denotes the meta-path ρ j The attention weight.
[0106] Specifically, the embedding of different types of nodes of the heterogeneous graph G = (V, ε) is initialized, where V represents a node set, ε represents an edge set, different node types correspond to different dimensions, and the user node u is initialized to be embedded as The item node v is initially embedded as The goal of this pre-trained model is to predict whether users and items interact, that is, to predict the user and item edges in the heterogeneous graph;
[0107] Using the projection matrix P r , project different types of neighbor nodes of the target node to the same dimension of the target node;
[0108] The attention weights of the target node and other neighboring nodes of the target node are calculated, and the formula is expressed as:
[0109]
[0110] Where N1(u) represents all one-hop neighbor nodes of node u; f r (·,·) is a deep neural network representing the attention relationship between two nodes;
[0111] The one-hop neighbor aggregation of the target node is performed according to the calculated attention weight, which is expressed as: represents the embedding of any user's one-hop neighbor; the relational embedding of items can also be obtained
[0112] Use the inner product of user embedding and item embedding as the prediction result:
[0113]
[0114] The RGCN model is trained using the binary cross entropy loss function:
[0115] Y t For all (user, item) node pairs, y uv is the existence of the real edge, 1 if it exists and 0 if it does not exist.
[0116] Two nodes can be connected through the meta-path, and the attention weights of neighbor nodes based on the meta-path are calculated, and the formula is expressed as:
[0117]
[0118] Among them, N ρ (u) represents the set of all neighbor nodes of node u on meta-path p; f ρ (·,·) is a deep neural network representing node-level attention;
[0119] The attention mechanism is used to aggregate the information of neighbor nodes based on the meta-path ρ, which is expressed as:
[0120]
[0121] Calculate the attention score of each meta-path, the formula is expressed as:
[0122]
[0123] Among them, q represents the semantic level attention vector, W represents the weight matrix, It represents the aggregate information of the neighboring nodes of a meta-path, b represents the deviation vector, N represents the number of meta-paths, V is the set of all nodes; (1:N) represents 1-N different meta-paths; T represents transposition.
[0124] After obtaining the attention score of each meta-path, the attention score of each meta-path is normalized by the softmax function, which is expressed as:
[0125]
[0126] in, Denotes the meta-path ρ j The attention weight of
[0127] The learned weights are used as coefficients to fuse the semantic-specific embeddings to obtain the final meta-path-based embedding of user node u, expressed as:
[0128]
[0129] You can also get the meta-path-based embedding of items
[0130] Use the inner product of user embedding and item embedding as the prediction result:
[0131]
[0132] The RGCN model is trained using the binary cross entropy loss function:
[0133] Y t For all (user, item) node pairs, y uv is the existence of the real edge, 1 if it exists and 0 if it does not exist.
[0134] Preferably, encoding the user's interactive behavior in the target domain using the encoder of the target domain to obtain the user's direct embedding in the target domain includes:
[0135] Use the encoder to encode the user's specific hobby behavior in the target domain to obtain user-specific embedding; use the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain user-shared embedding;
[0136] The specific embedding and the shared embedding are merged to obtain the user direct embedding of the target domain.
[0137] Specifically, in order to better recommend users in this domain, an encoder is used to encode the user's behavior first, and then a decoder is used to predict it. Considering that users have domain-specific hobbies and shared hobbies, a specific embedding and a shared embedding are used respectively. For example, for domain X, the encoder is used Behavior towards users i Encode to get the user's specific embedding in domain X Using the Encoder User behavior y on domain y i Encode to get the user's specific embedding in domain Y The formula is as follows:
[0138]
[0139] in is an encoder consisting of two linear layers.
[0140]
[0141] in is an encoder consisting of two linear layers.
[0142] Merge the user's domain-specific embedding and shared embedding to get the user's direct embedding. The formula is as follows:
[0143]
[0144] in is the shared embedding of the user, and f(;) is an additive function.
[0145]
[0146] Thus, we can get the user's Domain and Domain users are directly embedded, and
[0147] Preferably, the converting of the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function comprises:
[0148] To embed the users in domain X directly into domain Y:
[0149]
[0150] Transforming the user relationship embedding of domain X to domain Y is:
[0151]
[0152] Translating the meta-path-based embedding of users in domain X to domain Y is:
[0153]
[0154] Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
[0155] Specifically, the user's interactive behavior in domain X is used to construct a personalized bridge function for users to transfer from domain X to domain Y. Personalized bridge functions are constructed for the user's direct embedding, the user's relational embedding, and the user's meta-path-based embedding respectively. The same operation is performed for domain Y, including:
[0156] The first is the embedding transformation under the user's direct view. For each user, there is a set of items S that are interacted with v (u) = {v 1 , v 2 , ..., v n}, for each v in the set j , they all contribute differently to the personalized bridge function, so an attention function is used to aggregate item embeddings. Specifically, for a given set S v (u), where the pre-trained embedding of each item is j∈[1,n], using the embedding of items, calculate the correlation between each item, the formula is as follows:
[0157]
[0158] Among them, v k ∈S v (u) represents the set of items that user u interacts with in domain X, s(;) is an attention scoring function, and σ1 is a learnable parameter.
[0159] Then, we can get the aggregated embedding of the items that the user has interacted with. The weight of each embedding is calculated by the above formula: The specific calculation formula is as follows:
[0160]
[0161] In order to make the bridging function of each user different, that is, personalized, the p obtained based on the different interactive items of each user in the above formula is u 1 As input, generate the parameters of the personalized bridge function. The specific parameter generation process is shown in the following formula:
[0162] w u 1 =f(p u 1 ; μ1),
[0163] Among them, f(;) is the meta-network, which is a two-layer linear feedback neural network, μ1 is a learnable parameter, and w u 1The size of is determined by the bridge function. In order to facilitate the calculation of the transformed embedding, the transformation here directly uses matrix multiplication. Therefore,
[0164]
[0165] in, For direct embedding by the user, F u 1 (;) is the personalized bridge function for the user’s first view. Direct embedding for users of the Y domain after the first view conversion.
[0166] Next, the user relationship neighbor view embedding is transformed. The specific operation process is basically the same as the user direct embedding transformation. For this view, each user also has a personalized bridge function for this view. The bridge function is the same as above, and the calculation formula is as follows:
[0167]
[0168] Among them, s(;) is an attention scoring function and σ2 is a learnable parameter.
[0169] Aggregate the embeddings of these items:
[0170]
[0171] in, Indicates the contribution value of the item to the user in the relationship neighbor view.
[0172] Calculate the parameters of the bridge function:
[0173]
[0174] Where f(;) represents a two-layer linear feedback neural network, μ2 represents a learnable parameter,
[0175] Calculate the embedding of the user's relational neighbors in domain Y after the personalized bridge function. After using the RGCN network on the user-item heterogeneous graph and aggregating the nodes, the relational neighbor embedding of each user can be obtained. Then Substitute the personalized bridge function to get the transformed relational neighbor embedding, the formula is as follows:
[0176]
[0177] Next, we calculate the embedding transformation under the user meta-path view. The principle of building a personalized bridge function is the same as the above two views. Figure 1The calculation formula is as follows.
[0178]
[0179] Among them, s(;) represents the scoring function and σ3 is a learnable parameter.
[0180] According to the calculated attention weight, the embedding of each item is aggregated, and the calculation formula is as follows:
[0181]
[0182] Then calculate the parameters of the personalized bridge function:
[0183] w u 3 =f(p u 3 ; μ3),
[0184] Among them, f(;) is a two-layer linear feedback neural network, μ3 is a learnable parameter,
[0185] The obtained w u 3 Substitute as a parameter into F u (;), and then substitute the embedding obtained by the user based on meta-path aggregation into the bridge function to obtain the converted embedding:
[0186]
[0187] in, It is the embedding of the user node after HAN aggregation.
[0188] After cross-domain conversion, we can get the embeddings of three different views of users switching from domain X to domain Y respectively: And the embeddings under three different views of users switching from domain Y to domain X
[0189] Preferably, the step of merging the user direct embedding, the user relationship embedding and the user meta-path based embedding converted from another target domain to obtain the multi-view conversion embedding converted to the target domain comprises:
[0190] The embedding u of the user from domain X to domain Y x_y for:
[0191]
[0192] is the attention weight of the transformed embedding, l represents different embeddings, l = 1 represents user direct embedding, l = 2 represents user relationship embedding, l = 3 represents user meta-path-based embedding, is the transformed embedding.
[0193] Specifically, different view embeddings converted from domain X to domain Y are merged to obtain a multi-view conversion embedding of domain Y; different view embeddings converted from domain Y to domain X are merged to obtain a multi-view conversion embedding of domain X, including:
[0194] Aggregate the transformed user direct embedding, the transformed user relationship view embedding, and the transformed user meta-path view embedding. Since the contribution of each view is different, the attention mechanism is used for aggregation. Here we take the X domain as an example.
[0195] First, the attention weights of each view-transformed embedding are calculated.
[0196]
[0197] Among them, l represents different views, l = 1 represents the user direct view, l = 2 represents the relationship neighbor view, and l = 3 represents the meta-path view. represents the query vector, which is a learnable parameter. is the transformed embedding under view l, and T represents transposition.
[0198] Then, according to the obtained attention weights, the user embeddings under multiple views are aggregated. The formula is as follows:
[0199]
[0200] Finally, we get the embedding u of the user from domain X to domain Y x-y Similarly, we can get the embedding u of the user from domain Y to domain X y-x .
[0201] Preferably, using an X-domain decoder to decode a user's direct embedding in the X-domain and a user's multi-view conversion embedding from the Y-domain to the X-domain; using a Y-domain decoder to decode a user's direct embedding in the Y-domain and a user's multi-view conversion embedding from the X-domain to the Y-domain, comprises:
[0202] In order to predict the items that a user likes, a decoder is used to decode the user's direct embedding. The formula is as follows:
[0203]
[0204] in, is a two-layer linear network decoder, z xThat is the prediction result of the X-domain user obtained after decoding.
[0205]
[0206] in, is a two-layer linear network decoder, z y That is the prediction result of the Y domain user obtained after decoding.
[0207] The obtained multi-view converted embedding contains the user’s preference from one domain to another, which is used to feed the decoder for prediction.
[0208]
[0209] in, and is the same decoder, which is a two-layer linear feedback neural network. The z obtained by the decoder is x-y That is the cross-domain prediction result of the user in domain Y.
[0210]
[0211] in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is y_x That is, the cross-domain prediction result of the user in domain X.
[0212] Thus, we get the user’s z predicted by the domain x and z y , and the user's z after cross-domain prediction x_y and z y_x .
[0213] Preferably, the method further comprises:
[0214] The entire model is trained using the joint loss function:
[0215]
[0216] in, represents the total loss, represents the loss function for user embedding, represents the loss function of the cross-domain part, represents the loss function of the part within the domain, represents the prior distribution loss function, α, β, and γ are weights used to balance different loss terms.
[0217] Specifically, adversarial distribution matching is used, which can impose arbitrary prior distributions on potential codes without hard derivation, that is, through adversarial training methods to match the distribution of data rather than through rigorous mathematical derivation:
[0218]
[0219]
[0220] in, are the discriminators of domain X and domain Y respectively, are the parameters of the encoder, They are and The prior distribution of are the posterior distributions respectively. E represents the expectation, Represents a random variable Obey probability distribution In the case of The expected value of Represents a random variable Obey probability distribution In the case of The expected value of represents the prior distribution loss function, x i represents the user's interaction in domain X, y i Represents the interaction between the user and domain Y.
[0221] The loss function of the intra-domain prediction aims to ensure that the prediction result after decoding by the encoder and decoder is as close as possible to the user's original interaction behavior. Specifically, the loss function aims to minimize the prediction result z x Actual interaction behavior with users x i The design of this loss function enables the model to be continuously optimized during the training process, making the prediction results more consistent with the user's behavior pattern, thereby improving the model's performance and recommendation accuracy:
[0222]
[0223] represents the loss function of the part within the domain, z y represents the intra-domain prediction result of domain Y, M represents the number of items in domain Y, and N represents the number of items in domain X. The inter-domain loss function consists of two parts: one is the loss function for user embedding, and the other is the loss function for the prediction result after multi-view conversion:
[0224] Since the intra-domain decoder and the inter-domain decoder use the same decoder, it is necessary to make the user's embedding in the domain close to the embedding after the user's inter-domain conversion. In addition, this design ensures that the model can make the conversion of the user's embedding between different domains as smooth as possible during the learning process, thereby maintaining the consistency of the user's characteristics and preferences:
[0225]
[0226] It represents the loss function for user embedding and the loss function for the prediction result after multi-view conversion. The user embedding after multi-view conversion is used to predict the item through the decoder, so that the prediction result is close to the original interaction of the user: represents the loss function of the cross-domain part, z y_x It represents the prediction result of the Y domain embedding in the X domain after transformation, where α, β, and γ are weights used to balance different loss terms.
[0227]
[0228] Total loss function:
[0229]
[0230] This embodiment uses a multi-view conversion method to integrate information from multiple perspectives, such as user behavior data, semantic-level features, etc., and embeds, fuses and analyzes from multiple dimensions, so as to more comprehensively understand the interests and needs of users. This fusion of multiple views can improve the accuracy and relevance of recommendation results and provide more personalized and accurate recommendation content. Through multi-view conversion, the system can effectively reduce the deviation and data sparsity problems caused by a single perspective. For example, if the data from a certain perspective is less or of lower quality, the data from other perspectives can be supplemented and corrected, thereby improving the robustness and reliability of the overall recommendation system.
[0231] In order to more fully understand the present invention, another example is given below.
[0232] Reference Figure 2 , Figure 3 and Figure 4 , a dual-target domain personalized recommendation method based on multi-view transformation, including:
[0233] Collect the interaction behaviors of users in two different domains. The interaction behavior of a user in domain X is recorded as x. i , the interaction behavior in domain Y is denoted as y i ;
[0234] Structuring the collected user data and item data, mapping the strings in the structured data into numerical values, and then constructing a heterogeneous graph based on the processed data, and designing the node types and names, and edge types and names of the heterogeneous graph;
[0235] The interaction between users and items in different domains can be regarded as a user-item heterogeneous graph. We can obtain a user-item heterogeneous graph in domain X and a user-item heterogeneous graph in domain Y. Then, we introduce this heterogeneous graph into the RGCN and HAN pre-trained models. The specific model details of the RGCN and HAN models are as follows: Figure 2 , 3 As shown, the user’s relational embedding and the user’s meta-path-based embedding are obtained.
[0236] In addition, the leave-one-out (L00) method is adopted for the dataset, that is, two items are randomly reserved for each user, one as a verification item and one as a test item. For each user, 99 items that have not been interacted with by the user are randomly selected as negative samples, and these non-interacted negative items are used to evaluate the recommendation model's ability to sort verification and test items.
[0237] The encoder of this embodiment is divided into one for the X domain and one for the Y domain. The encoder of the X domain is responsible for converting x i Convert to Similarly, the Y domain encoder is responsible for converting y i Convert to It is important to note that the encoder here adopts a two-layer linear layer design, aiming to better capture the complex characteristics of the input data through nonlinear transformation.
[0238] For the three views, three personalized bridge functions are used respectively. The first is the personalized bridge function directly embedded by the user. First, it is necessary to obtain the parameters of each user's personalized bridge function, which are obtained by the user's interaction in domain X. It should be noted here that since the method of crossing from domain X to domain Y is the same as that of crossing from domain Y to domain X, here we specifically say that the method of crossing from domain X to domain Y is the same.
[0239] For a user, his interaction set in domain X is S v (u) = {v 1 , v 2 , ..., v n}, using the embeddings of these interactive items, based on an attention mechanism, these item embeddings are aggregated, and then passed through a meta-network to obtain the parameters of the personalized bridge function, and then a personalized bridge function is used to obtain the corresponding embedding of the user converted to the Y domain. The specific dimension sizes are shown in Table 1:
[0240] Table 1
[0241] Constituent units of the present invention Output size User's item collection embedding (batch_size, G, d) Aggregated item embedding size (batch_size, k) Meta Network (batch_size, k, k) Custom bridge function (batch_size, k)
[0242] Wherein, G is the number of items in the item set, d is the embedding size of the item, and k is the embedding size initially set by the framework of the present invention.
[0243] The same operation can be performed on the user’s relational embedding and the user’s meta-path-based embedding. After passing through the meta-network and a personalized bridging function, the user’s transformed embedding in the Y domain can be obtained.
[0244] Table 2 lists in detail the specific conversion size of each dimension, further illustrating the advantages and effects of the method of this embodiment when processing multi-view data.
[0245] Table 2
[0246] Constituent units of the present invention Output size See Figure 1 Embed (batch_size, k) See Figure 2 Embed (batch_size, k) See Figure 3 Embed (batch_size, k) Multi-view embedding merging based on attention mechanism (batch_size, k)
[0247] Substitute the user embedding obtained by the X-domain encoder into the decoder to obtain the prediction result, that is, the first K items recommended for the user are obtained. Here K can be customized. In this example, 5 and 10 are used. That is to say, 5 and 10 items are recommended for each user. Similarly, the multi-view embedding after the user conversion is also put into the decoder for decoding to obtain the cross-domain prediction result.
[0248] The decoder here uses a two-layer linear neural network, and the specific dimensions are shown in Table 3:
[0249] Table 3
[0250] Constituent units of the present invention Output size X domain users directly embed (batch_size, k) X domain user multi-view embedding (batch_size, k) X-Domain Decoder (batch_size, M)
[0251] Similarly, the Y domain uses the same structure as the X domain, except that the Y domain uses a Y domain decoder, which is also a two-layer linear neural network. The specific embedding dimensions are shown in Table 4:
[0252] Table 4
[0253] Constituent units of the present invention Output size Y domain users directly embed (batch_size, k) Multi-view embedding of users in domain Y (batch_size, k) Y-domain decoder (batch_size, N)
[0254] Among them, M is the total number of items in the X domain, and N is the total number of items in the Y domain.
[0255] Example 2
[0256] Figure 5 This is a schematic diagram of a dual-target domain personalized item recommendation device based on multi-view conversion. Figure 5 As shown, this embodiment provides a dual-target domain personalized item recommendation device based on multi-view conversion, and the device includes:
[0257] A construction module 501 is used to respectively construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains, train the RGCN model and the HAN model, and obtain a user relationship embedding and a user meta-path-based embedding for each target domain;
[0258] An encoding module 502 is used to encode the user's interactive behavior in each target domain using an encoder of the target domain to obtain a user direct embedding of the target domain;
[0259] The conversion module 503 is used to construct personalized bridging functions of user direct embedding, user relationship embedding and user meta-path based embedding for each target domain, and convert the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridging function;
[0260] A merging module 504 is used to merge, for each target domain, the user direct embedding, the user relationship embedding, and the user meta-path-based embedding converted from another target domain to obtain a multi-view transformed embedding converted to the target domain;
[0261] The recommendation module 505 is used to decode the user direct embedding for each target domain using the decoder of the target domain to obtain the item recommendation result predicted within the domain; and decode the multi-view transformation embedding using the decoder of the target domain to obtain the item recommendation result predicted across domains;
[0262] The training module 506 is used to train the entire model using the joint loss function.
[0263] Preferably, the construction module 501 trains the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain, respectively, including:
[0264] User relations are embedded as:
[0265] The meta-path based embedding of the user is:
[0266] in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node u; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, Denotes the meta-path ρ j The attention weight.
[0267] Preferably, the encoding module 502 uses an encoder of the target domain to encode the user's interactive behavior in the target domain, and obtaining the user direct embedding of the target domain includes:
[0268] Use the encoder to encode the user's specific hobby behavior in the target domain to obtain user-specific embedding; use the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain user-shared embedding;
[0269] The specific embedding and the shared embedding are merged to obtain the user direct embedding of the target domain.
[0270] Preferably, the conversion module 503 converts the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function, including:
[0271] To embed the users in domain X directly into domain Y:
[0272]
[0273] Transforming the user relationship embedding of domain X to domain Y is:
[0274]
[0275] Translating the meta-path-based embedding of users in domain X to domain Y is:
[0276]
[0277] Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
[0278] The specific implementation process of the functions realized by each module in this embodiment 2 is the same as the implementation process in embodiment 1, and will not be repeated here.
[0279] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A dual-target domain personalized item recommendation method based on multi-view conversion, characterized in that: The method comprises the following steps: S1: construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains respectively, train the RGCN model and the HAN model, and obtain user relation embedding and user meta-path-based embedding for each target domain respectively; S2: For each target domain, use the encoder of the target domain to encode the user's interactive behavior in the target domain to obtain the user's direct embedding of the target domain, specifically including: using the encoder to encode the user's specific hobby behavior in the target domain to obtain user-specific embedding; using the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain user-shared embedding; The specific embedding and the shared embedding are combined to obtain the user direct embedding of the target domain. S3: for each target domain, construct personalized bridging functions for user direct embedding, user relationship embedding, and user meta-path-based embedding, respectively, and transform the user direct embedding, user relationship embedding, and user meta-path-based embedding of the target domain to another target domain through the personalized bridging function; S4: For each target domain, merge the user direct embedding, user relationship embedding, and user meta-path-based embedding converted from another target domain to obtain the multi-view transformed embedding converted to this target domain; S5: For each target domain, the user direct embedding is decoded by using the decoder of the target domain to obtain the item recommendation result predicted within the domain; the multi-view conversion embedding is decoded by using the decoder of the target domain to obtain the item recommendation result predicted across domains, specifically including: To predict the items a user likes, a decoder is used to decode the user’s direct embedding as follows: in, is a two-layer linear network decoder, z x That is the prediction result of the X-domain user obtained after decoding; in, is a two-layer linear network decoder, z y That is the prediction result of the Y domain user obtained after decoding; The obtained multi-view converted embedding contains the user's preference from one domain to another domain, and this embedding is used to substitute into the decoder for prediction; in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is x_y That is, the cross-domain prediction result of the user in domain Y; in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is y_x That is, the cross-domain prediction result of the user in domain X; Thus, we get the user’s z predicted by the domain x and z y , and the user's z after cross-domain prediction x_y and z y_x ; S6: Use the joint loss function to train the entire model.
2. The method according to claim 1, characterized in that The training of the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain includes: User relations are embedded as: The meta-path based embedding of the user is: in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node i; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, γ ρj Represents the meta-path P j The attention weight.
3. The method according to claim 1, characterized in that The converting of the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function includes: To embed the users in domain X directly into domain Y: Transforming the user relationship embedding of domain X to domain Y is: Translating the meta-path-based embedding of users in domain X to domain Y is: Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
4. The method according to claim 1, characterized in that: The method of merging the user direct embedding, user relationship embedding and user meta-path based embedding converted from another target domain to obtain the multi-view conversion embedding converted to the target domain includes: The embedding u of the user from domain X to domain Y x _ y for: is the attention weight of the transformed embedding, l represents different embeddings, l = 1 represents user direct embedding, l = 2 represents user relationship embedding, l = 3 represents user meta-path-based embedding, is the transformed embedding.
5. The method according to claim 1, characterized in that: The method further comprises: The entire model is trained using the joint loss function: in, represents the total loss, represents the loss function for user embedding, represents the loss function of the cross-domain part, represents the loss function of the part within the domain, represents the prior distribution loss function, α, β, and γ are weights used to balance different loss terms.
6. A dual-target domain personalized item recommendation device based on multi-view conversion, characterized in that: The device comprises: A construction module is used to respectively construct a relational graph convolutional network RGCN model and a heterogeneous graph attention network HAN model for two target domains, train the RGCN model and the HAN model, and obtain a user relation embedding and a user meta-path-based embedding for each target domain; The encoding module is used to encode the user's interactive behavior in each target domain using the encoder of the target domain to obtain the user's direct embedding of the target domain; specifically, the encoding module includes: using the encoder to encode the user's specific hobby behavior in the target domain to obtain the user's specific embedding; using the encoder to encode the user's hobby behavior shared by the target domain and another target domain to obtain the user's shared embedding; The specific embedding and the shared embedding are combined to obtain the user direct embedding of the target domain. A conversion module is used to construct personalized bridge functions of user direct embedding, user relationship embedding and user meta-path based embedding for each target domain, and convert the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function; A merging module is used to merge the user direct embedding, user relationship embedding and user meta-path-based embedding converted from another target domain for each target domain to obtain a multi-view transformed embedding converted to the current target domain; The recommendation module is used to decode the user direct embedding for each target domain using the decoder of the target domain to obtain the item recommendation result predicted within the domain; and decode the multi-view transformation embedding using the decoder of the target domain to obtain the item recommendation result predicted across domains. Specifically, it includes: To predict the items a user likes, a decoder is used to decode the user’s direct embedding as follows: in, is a two-layer linear network decoder, z x That is the prediction result of the X-domain user obtained after decoding; in, is a two-layer linear network decoder, z y That is the prediction result of the Y domain user obtained after decoding; The obtained multi-view converted embedding contains the user's preference from one domain to another domain, and this embedding is used to substitute into the decoder for prediction; in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is x _ y That is, the cross-domain prediction result of the user in domain Y; in, and The same decoder is a two-layer linear feedback neural network. The z obtained by the decoder is y _ x That is, the cross-domain prediction result of the user in domain X; Thus, we get the user’s z predicted by the domain x and z y , and the user's z after cross-domain prediction x_y and z y_x ; The training module is used to train the entire model using the joint loss function.
7. The device according to claim 6, characterized in that The construction module trains the RGCN model and the HAN model to obtain user relationship embedding and user meta-path-based embedding of each target domain, respectively, including: User relations are embedded as: The meta-path based embedding of the user is: in, represents user relationship embedding, σ is the embedding function, N1(u) represents all one-hop neighbor nodes of node u; α uv is the attention weight of the target node and its neighboring nodes, represents the embedding of any user’s one-hop neighbors; represents the user’s meta-path based embedding, Represents the aggregate information of neighbor nodes of a meta-path, Denotes the meta-path ρ j The attention weight.
8. The device according to claim 6, characterized in that The conversion module converts the user direct embedding, user relationship embedding and user meta-path based embedding of the target domain to another target domain through the personalized bridge function, including: To embed the users in domain X directly into domain Y: Transforming the user relationship embedding of domain X to domain Y is: Translating the meta-path-based embedding of users in domain X to domain Y is: Among them, F u 1 、F u 2 、F u 3 is a personalized bridge function, w u 1 、w u 2 、w u 3 The parameters of the personalized bridge function. They represent the user direct embedding, user relationship embedding and user meta-path-based embedding of domain X respectively. The transformed user direct embedding, user relation embedding and user meta-path based embedding of the Y domain.
Citation Information
Patent Citations
Multi-layer transfer learning cross-domain recommendation method and system based on graph node feature enhancement
CN117743694A