Cross-domain recommendation method, device, electronic device and storage medium
By integrating intra-domain and cross-domain preference features with the knowledge graph and graph attention model, and using the cross-domain Bayesian mechanism for recommendation, the problem of low cross-domain recommendation efficiency in the existing technology is solved, and the efficiency and accuracy of the recommendation system are improved.
Patent Information
- Application Number
- CN202210614778.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-05-30
AI Technical Summary
Due to the small overlap of entities, existing cross-domain recommendation systems are difficult to effectively utilize the knowledge of the source domain and the target domain, resulting in low recommendation efficiency.
By obtaining the knowledge graph and source domain entities, the target domain and source domain entity vectors are obtained based on graph attention model conversion, integrating intra-domain and cross-domain preference features, and using the cross-domain Bayesian mechanism for recommendation ranking.
The recommendation efficiency and accuracy of product entity recommendation for user entities to be recommended are improved, and the effective transfer of entity knowledge between the target domain and the source domain is achieved.
Smart Images

Figure CN115098692B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cross-domain recommendation, and in particular to a cross-domain recommendation method, device, electronic device and storage medium. Background Art
[0002] Cross-domain recommendation is rooted in the daily online life of users, providing them with a variety of product push services. It aims to transfer rich knowledge in the source domain or auxiliary domain to the target recommendation system, and use sufficient source domain or auxiliary domain knowledge to assist entity recommendation in the sparse target system. However, the hundreds of millions of knowledge resources emerging on the Internet every day pose a severe challenge to the performance of cross-domain recommendation systems.
[0003] From the relevant technology, we know that the traditional cross-domain recommendation method mainly uses entity-related content attributes (tags, comment logs, semantic associations, social relations, etc.) to establish the connection between the source domain and the target domain, so as to transfer the source domain knowledge to the target domain recommendation system and assist it in generating the final recommendation results.
[0004] However, current cross-domain recommendation systems usually contain only a small number of overlapping entities. Traditional methods find it difficult to use these few overlapping entities to obtain more preference knowledge of entities in the source and target domains, resulting in inefficient recommendation. Summary of the invention
[0005] The present invention provides a cross-domain recommendation method, device, electronic device and storage medium to solve the defect of low recommendation efficiency of recommendation systems in the prior art, realize the effectiveness of entity knowledge migration between target domain and source domain, thereby improving the recommendation efficiency and recommendation accuracy of commodity entity recommendation for recommended user entities.
[0006] The present invention provides a cross-domain recommendation method, which is applied to a target domain with sparse data. The target domain entities of the target domain include a user entity to be recommended and a commodity entity to be recommended. The method includes: obtaining a knowledge graph and a source domain, wherein the source domain entities in the source domain include a source domain user entity and a source domain commodity entity; based on the knowledge graph, converting the target domain entity and the source domain entity to obtain a target domain entity vector and a source domain entity vector; based on the target domain entity vector and the source domain entity vector, obtaining a fusion preference feature of the user entity to be recommended through a graph attention model, wherein the graph attention model is obtained through pre-training; based on the fusion preference feature of the user entity to be recommended, recommending through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0007] According to a cross-domain recommendation method provided by the present invention, based on the knowledge graph, the target domain entity and the source domain entity are converted to obtain a target domain entity vector and a source domain entity vector, which specifically includes: based on the knowledge graph, the target domain entity and the source domain entity, a collaborative knowledge graph is obtained, wherein the collaborative knowledge graph includes data of the target domain entity and data of the source domain entity; based on the collaborative knowledge graph, the target domain entity and the source domain entity are converted through a knowledge representation model to obtain a target domain entity vector and a source domain entity vector, wherein the knowledge representation model is obtained through pre-training.
[0008] According to a cross-domain recommendation method provided by the present invention, the fused preference features of the user entity to be recommended are obtained through a graph attention model based on the target domain entity vector and the source domain entity vector, specifically including: based on the target domain entity vector, obtaining the intra-domain preference features of the user entity to be recommended in the target domain through the graph attention model; based on the source domain entity vector, obtaining the cross-domain preference features of the user entity to be recommended with respect to the source domain through the graph attention model; based on the intra-domain preference features and the cross-domain preference features, obtaining the fused preference features of the user entity to be recommended.
[0009] According to a cross-domain recommendation method provided by the present invention, based on the target domain entity vector, the in-domain preference feature of the user entity to be recommended in the target domain is obtained through the graph attention model, specifically including: based on the target domain entity vector, determining multiple in-domain similar neighbors of the user entity to be recommended in the target domain through a multi-hop reasoning mechanism; determining the attention weights of the similar neighbors in the domain through the graph attention model; normalizing the attention weights of the similar neighbors in the domain to obtain the preference attention coefficients of the similar neighbors in the domain; and obtaining the in-domain preference feature of the user entity to be recommended in the target domain based on the weighted sum of the preference attention coefficients of each of the similar neighbors in the domain.
[0010] According to a cross-domain recommendation method provided by the present invention, based on the source domain entity vector, the cross-domain preference features of the user entity to be recommended with respect to the source domain are obtained through the graph attention model, specifically including: based on the source domain entity vector, determining the cross-domain similar neighbors of the user entity to be recommended in the source domain through a random walk mechanism; determining the attention weights of the cross-domain similar neighbors through the graph attention model; based on the target domain entity vector, determining the original attention vector weight of the user entity to be recommended; performing full connection processing on the attention weights of the cross-domain similar neighbors and the original attention vector weight of the user entity to be recommended, to obtain the cross-domain preference features of the user entity to be recommended with respect to the source domain.
[0011] According to a cross-domain recommendation method provided by the present invention, the fusion preference feature of the user entity to be recommended is obtained based on the intra-domain preference feature and the cross-domain preference feature, and is determined by the following formula:
[0012]
[0013] in, represents the fusion preference feature of the user entity to be recommended; LeahkReLU[.] represents the LeahkReLU activation function processing; ξ represents the balance parameter of the preference representation, which is used to control the participation degree of the cross-domain preference feature; representing the preference characteristics within the domain; Indicates the cross-domain preference feature.
[0014] According to a cross-domain recommendation method provided by the present invention, the recommendation is performed through a cross-domain Bayesian mechanism based on the fused preference features of the user entity to be recommended to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended, specifically comprising: based on the fused preference features of the user entity to be recommended, obtaining a target domain user node layer representation of the user entity to be recommended and a target domain commodity node layer representation of the commodity entity to be recommended in the target domain, as well as a source domain user node layer representation of the source domain user entity and a source domain commodity node layer representation of the source domain commodity entity in the source domain respectively through the cross-domain Bayesian mechanism; performing an inner product on the target domain user node layer representation and the target domain commodity node layer representation in the target domain to obtain a first matching value of the user entity to be recommended with respect to the commodity entity to be recommended; performing an inner product on the source domain user node layer representation and the source domain commodity node layer representation in the source domain to obtain a second matching value of the source domain user entity with respect to the source domain commodity entity; performing cross-domain regularization term processing on the first matching value and the second matching value to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0015] According to a cross-domain recommendation method provided by the present invention, the cross-domain regularization term processing is performed on the first matching value and the second matching value to obtain the recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity using the following formula:
[0016]
[0017] Among them, L CBPR represents the recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity; κ and κ' represent the training samples in the source domain and the target domain respectively; σ(·) represents the Sigmoid function; λ represents the regularization parameter that controls the degree of cross-domain similarity preference fusion; Represents the user entity u to be recommended t About the recommended product entity i t The first matching value of Represents the user entity u to be recommended t About the recommended product entity j t The first matching value of Represents the source domain user entity u s About source domain product entity i s The second matching value of Represents the source domain user entity u s About source domain commodity entity j s The second matching value.
[0018] The present invention also provides a cross-domain recommendation device, which is applied to a target domain with sparse data, and the target domain entities of the target domain include a user entity to be recommended and a commodity entity to be recommended. The device includes: an acquisition module, which is used to acquire a knowledge graph and a source domain, wherein the source domain entities in the source domain include a source domain user entity and a source domain commodity entity; a conversion module, which is used to convert the target domain entity and the source domain entity based on the knowledge graph to obtain a target domain entity vector and a source domain entity vector; a processing module, which is used to obtain a fused preference feature of the user entity to be recommended through a graph attention model based on the target domain entity vector and the source domain entity vector, wherein the graph attention model is obtained through pre-training; a generation module, which is used to recommend through a cross-domain Bayesian mechanism based on the fused preference feature of the user entity to be recommended to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0019] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the cross-domain recommendation method as described above is implemented.
[0020] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the cross-domain recommendation method as described above is implemented.
[0021] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the cross-domain recommendation method as described above is implemented.
[0022] The cross-domain recommendation method, device, electronic device and storage medium provided by the present invention obtain target domain entity vectors and source domain entity vectors through the semantic information of entities and relationships in the knowledge graph, and obtain the fused preference features of the user entity to be recommended based on the graph attention model, thereby realizing the cross-domain fusion of the preference features of the user entity to be recommended, and based on the fused preference features of the user entity to be recommended, recommend through a cross-domain Bayesian mechanism to obtain the recommended ranking of the user entity to be recommended regarding the commodity entity to be recommended, thereby realizing the effectiveness of entity knowledge transfer between the target domain and the source domain, thereby improving the recommendation efficiency and recommendation accuracy of commodity entity recommendation for the user entity to be recommended. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of the cross-domain recommendation method provided by the present invention;
[0025] Figure 2 It is a schematic diagram of a process of converting target domain entities and source domain entities based on a knowledge graph to obtain target domain entity vectors and source domain entity vectors provided by the present invention;
[0026] Figure 3 It is a schematic diagram of a process of obtaining the fusion preference features of the user entity to be recommended through the graph attention model based on the target domain entity vector and the source domain entity vector provided by the present invention;
[0027] Figure 4 It is a flow chart of obtaining the in-domain preference features of the user entity to be recommended in the target domain through the graph attention model based on the target domain entity vector provided by the present invention;
[0028] Figure 5 It is a flow chart of obtaining the cross-domain preference features of the user entity to be recommended about the source domain through the graph attention model based on the source domain entity vector provided by the present invention;
[0029] Figure 6 It is a flowchart of obtaining a recommendation ranking of a to-be-recommended user entity with respect to a to-be-recommended commodity entity by performing recommendation based on the fusion preference features of the to-be-recommended user entity provided by the present invention through a cross-domain Bayesian mechanism;
[0030] Figure 7 is a schematic diagram of the structure of the cross-domain recommendation device provided by the present invention;
[0031] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] Knowledge graph is a heterogeneous information network that describes concepts, entities and their relationships in the objective world in the form of structured data, providing a way to better organize, manage and understand the massive amount of information on the Internet. In the recommendation system, the knowledge graph can integrate the entity knowledge in the system with the entities and relationships in the traditional graph to form a complex information network of multiple types of entities and relationships, where nodes represent entities or items and edges represent relationships. It can not only reveal the semantic preference characteristics between entities in the network, but also generate efficient entity representations for the training of graph neural network models.
[0034] The representation of entities and relationships in the knowledge graph can reveal the preference characteristics between entities. The preference knowledge of similar entities can be fused across domains through overlapping entities. However, the existing cross-domain recommendation models fail to fully utilize the preference signals in the knowledge graph for efficient rating prediction. Therefore, the cross-domain recommendation method provided by the present invention aggregates the preference knowledge of similar entities across domains through a preference-aware graph attention network model, and then fuses the preference characteristics of similar entities within the domain, based on the proposed cross-domain Bayesian personalized ranking method to predict the items that entities in the target system may like. In the application process, a dense source domain matrix, a sparse target domain matrix and a knowledge graph can be given. The present invention can be used to predict the probability of some items that entities in the target recommendation system may prefer based on the known rating matrices and knowledge graphs in the source domain and the target domain.
[0035] In order to further introduce the cross-domain recommendation method provided by the present invention, Figure 1 Provide explanation.
[0036] Figure 1 It is a flowchart of the cross-domain recommendation method provided by the present invention.
[0037] In an exemplary embodiment of the present invention, the cross-domain recommendation method can be applied to a target domain with sparse data. The target domain entity of the target domain may include a user entity to be recommended and a commodity entity to be recommended. Figure 1It can be seen that the cross-domain recommendation method may include steps 110 to 140, and each step will be introduced below.
[0038] In step 110, a knowledge graph and a source domain are obtained, wherein source domain entities in the source domain include source domain user entities and source domain product entities.
[0039] It can be understood that the target domain and the source domain are connected through overlapping entities between the two domains, which may be entities related to users or entities related to commodities. In one example, the user entity to be recommended may be one or more.
[0040] In step 120, based on the knowledge graph, the target domain entities and the source domain entities are transformed to obtain the target domain entity vector and the source domain entity vector.
[0041] In one embodiment, the target domain entity and the source domain entity can be integrated into the knowledge graph in combination with the knowledge graph to obtain a collaborative knowledge graph, and the target domain entity vector corresponding to the target domain entity and the source domain entity vector corresponding to the source domain entity can be obtained based on the collaborative knowledge graph. Through this embodiment, the dimensionality reduction processing of the target domain entity and the source domain entity is realized, laying a foundation for obtaining the intra-domain preference features of the user entity to be recommended in the target domain and the cross-domain preference features of the user entity to be recommended with respect to the source domain.
[0042] In step 130, based on the target domain entity vector and the source domain entity vector, a fusion preference feature of the user entity to be recommended is obtained through a graph attention model, wherein the graph attention model is obtained through pre-training.
[0043] In one embodiment, based on the target domain entity vector and the source domain entity vector, the preference features of similar entities within and across domains can be aggregated through a graph attention model to obtain the fused preference features of the user entity to be recommended, thereby improving the effectiveness of knowledge transfer and laying a foundation for improving the recommendation efficiency and accuracy of commodity entity recommendations for the user entity to be recommended.
[0044] In step 140 , based on the fused preference features of the to-be-recommended user entity, a recommendation is performed through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity.
[0045] In one embodiment, recommendations can be made through a cross-domain Bayesian mechanism based on the fused preference features of the user entity to be recommended, thereby making full use of the fused preference features for cross-domain fusion to perform recommendation ranking, and then obtaining the recommendation ranking of the user entity to be recommended regarding the commodity entity to be recommended, thereby improving the recommendation efficiency and accuracy of commodity entity recommendations for the user entity to be recommended.
[0046] The cross-domain recommendation method provided by the present invention obtains the target domain entity vector and the source domain entity vector through the semantic information of entities and relationships in the knowledge graph, and obtains the fused preference features of the user entity to be recommended based on the graph attention model, thereby realizing the cross-domain fusion of the preference features of the user entity to be recommended, and based on the fused preference features of the user entity to be recommended, recommends through a cross-domain Bayesian mechanism to obtain the recommended ranking of the user entity to be recommended regarding the commodity entity to be recommended, thereby realizing the effectiveness of the entity knowledge transfer between the target domain and the source domain, thereby improving the recommendation efficiency and recommendation accuracy of commodity entity recommendation for the user entity to be recommended.
[0047] In order to further introduce the cross-domain recommendation method provided by the present invention, the process of converting the target domain entities and the source domain entities based on the knowledge graph to obtain the target domain entity vector and the source domain entity vector will be explained below.
[0048] Figure 2 It is a flow chart of converting target domain entities and source domain entities based on knowledge graph provided by the present invention to obtain target domain entity vectors and source domain entity vectors.
[0049] In an exemplary embodiment of the present invention, Figure 2 It can be seen that based on the knowledge graph, converting the target domain entity and the source domain entity to obtain the target domain entity vector and the source domain entity vector may include step 210 and step 220, and each step will be introduced below.
[0050] In step 210, a collaborative knowledge graph is obtained based on the knowledge graph, the target domain entities and the source domain entities, wherein the collaborative knowledge graph includes data of the target domain entities and data of the source domain entities.
[0051] In one embodiment, the target domain entity and the source domain entity can be subjected to dimensionality reduction processing and integrated into the knowledge graph to obtain a collaborative knowledge graph. It is understandable that the data of the target domain entity and the source domain entity can be included in the collaborative knowledge graph at the same time, so as to facilitate the integration of the intra-domain and cross-domain preference features of the user entity to be recommended, improve the effectiveness of knowledge transfer, and further improve the recommendation efficiency and accuracy of commodity entity recommendation for the user entity to be recommended.
[0052] In step 220, based on the collaborative knowledge graph, the target domain entities and the source domain entities are transformed through the knowledge representation model to obtain the target domain entity vector and the source domain entity vector, wherein the knowledge representation model is obtained through pre-training.
[0053] In one embodiment, the graph representation model (corresponding to the knowledge representation model) can provide users with cross-domain semantic preference information while retaining the graph structure. According to the concept of knowledge graph, different attributes of entities in the graph reveal different preference characteristics of users. In one example, the TransD knowledge representation model can be used to characterize user preferences. During the application process, the target domain entities and the source domain entities can be transformed through the knowledge representation model according to the collaborative knowledge graph to obtain the target domain entity vector and the source domain entity vector.
[0054] It should be noted that based on the vector conversion principle If and only if there is such a triple in the knowledge graph (a triplet that satisfies the vector transformation principle), the multi-type attributes and relations of the entity can be learned through the proposed scoring function f(h, r, t). The scoring function for a given triple is defined as follows:
[0055]
[0056] Among them, W rh and W rt represents two mapping matrices that can project entities from entity space to relation space; e h , e r and e t They represent the preference representations of the head entity h, relation r and tail entity t respectively. Combined with formula (1), it can be seen that a lower loss function value is more likely to be a true triple, and vice versa.
[0057] In order to obtain realistic training results, the TransD model encodes all available triples in the knowledge graph, including real triples and negative triples. In the present invention, the target training function based on edge sorting is used to train all triples, and it is added to the final training model as a regularization term of the loss function, thereby improving the accuracy of the target domain entity vector and the source domain entity vector output by the TransD model. The loss function mentioned above can be expressed by the following formula:
[0058]
[0059] where τ and τ' are true and negative triple samples, respectively, θ is the margin between true triple samples and negative triple samples, and f(·) represents the scoring function.
[0060] In the present invention, preference representation can be used as the input of the graph attention model to guide the generation of user preferences within and across domains, and the user preferences within and across domains can be used as regularization terms to constrain the training of entities and relationships to accelerate convergence and avoid overfitting, thereby improving the recommendation efficiency and accuracy of product entity recommendations for recommended user entities.
[0061] It should be noted that the present invention uses TransD as a graph representation method to capture multi-type relationships of entities and uses only a few training parameters. Therefore, this makes it possible to apply knowledge graphs in large-scale cross-domain recommendation systems.
[0062] In the process of modeling entity preference features, inspired by the training advantages of the Transformer architecture, the present invention uses preference feature representation and adopts a graph attention mechanism to learn the preference weights of entities in the collaborative knowledge graph. Among them, the entity preference features can include intra-domain preference features and cross-domain preference features. The following will explain the process of obtaining the fused preference features including intra-domain preference features and cross-domain preference features.
[0063] The present invention will combine Figure 3 The process of obtaining the fused preference features of the user entities to be recommended through the graph attention model based on the target domain entity vector and the source domain entity vector is explained.
[0064] Figure 3 It is a flow chart of obtaining the fusion preference features of the user entity to be recommended through the graph attention model based on the target domain entity vector and the source domain entity vector provided by the present invention.
[0065] In an exemplary embodiment of the present invention, Figure 3 It can be seen that obtaining the fusion preference features of the user entity to be recommended through the graph attention model based on the target domain entity vector and the source domain entity vector may include steps 310 to 330, and each step will be introduced below.
[0066] In step 310, based on the target domain entity vector, the in-domain preference features of the user entity to be recommended in the target domain are obtained through a graph attention model.
[0067] In step 320, based on the source domain entity vector, the cross-domain preference features of the user entity to be recommended with respect to the source domain are obtained through a graph attention model.
[0068] In one embodiment, based on the target domain entity vector, the intra-domain preference feature of the user entity to be recommended in the target domain can be obtained through a graph attention model, and based on the source domain entity vector, the cross-domain preference feature of the user entity to be recommended with respect to the source domain can be obtained through a graph attention model. The graph attention model can be obtained through pre-training.
[0069] In step 330, based on the intra-domain preference features and the cross-domain preference features, the fused preference features of the user entity to be recommended are obtained.
[0070] It is understandable that similar entity preference features from different domains have different contributions to reshaping the user's final preference (corresponding to fused preference features). Based on the representation of similar nodes within and across domains of the target node, its new preference (corresponding to fused preference features) representation is finally fused through nonlinear mapping. In one example, the fused preference features of the user entity to be recommended can be obtained based on the intra-domain preference features and the cross-domain preference features.
[0071] In another embodiment, based on the intra-domain preference feature and the cross-domain preference feature, the fused preference feature of the user entity to be recommended can be determined by the following formula:
[0072]
[0073] in, represents the fused preference features of the user entity to be recommended; LeahkReLU[.] represents the LeahkReLU activation function processing; ξ represents the balance parameter of the preference representation, which is used to control the degree of participation of cross-domain preference features; Indicates the preference characteristics within the domain; Represents the cross-domain preference feature. It can be understood that when ξ is 1, the cross-domain nodes do not participate in model learning, that is, any cross-domain entity and project information (which can correspond to the cross-domain preference feature) is not used to calculate the preference feature of the target node. When ξ is 0, the preference learning of the target node comes entirely from the cross-domain nodes, and the feature information of similar nodes in the domain will not be used for the final preference prediction.
[0074] In order to further introduce the cross-domain recommendation method provided by the present invention, the process of obtaining the in-domain preference features of the user entity to be recommended in the target domain through the graph attention model based on the target domain entity vector is explained below.
[0075] Figure 4 It is a flow chart of obtaining the in-domain preference features of the user entity to be recommended in the target domain through the graph attention model based on the target domain entity vector provided by the present invention.
[0076] In an exemplary embodiment of the present invention, Figure 4 It can be seen that based on the target domain entity vector, obtaining the in-domain preference features of the user entity to be recommended in the target domain through the graph attention model may include steps 410 to 440, and each step will be introduced below.
[0077] In step 410, based on the target domain entity vector, a plurality of in-domain similar neighbors of the to-be-recommended user entity in the target domain are determined through a multi-hop reasoning mechanism.
[0078] The user's in-domain preference features reveal the intrinsic intent attributes of the target entity and play a vital role in modeling the final preference of the target user. Therefore, the acquisition of the target user's in-domain preference first requires the aggregation of the preferences of similar neighboring nodes in the domain.
[0079] In one embodiment, based on the target domain entity vector, neighbors of similar nodes in the same domain (corresponding to the target domain) (corresponding to multiple similar neighbors in the domain of the user entity to be recommended) may be found through a multi-hop reasoning mechanism.
[0080] In step 420, the attention weights of similar neighbors in the domain are determined through the graph attention model.
[0081] Inspired by the advantages of the Transformer structure in capturing node semantics, in one embodiment, the preference weights of nodes in different aspects can be learned through a graph attention method. In one example, the attention weights of similar neighbors in a domain determined by a graph attention model can be determined using the following formula:
[0082] e vk =ReLU(W vk ·h v ||W vk ·h k ),k∈N u (v) (4)
[0083] Among them, e vk represents the attention weights of similar neighbors in the domain; W vk is node h v and h k The shared attention parameter of the feature vector of N; || represents the connection operation of the low-dimensional vector; N u (v) represents the set of similar neighbors of the node (corresponding to the user entity to be recommended) in the same domain. v It can be understood as the node corresponding to the user entity to be recommended. Node h k It can be understood as nodes with similar neighbors in the corresponding domain.
[0084] In step 430, the attention weights of similar neighbors in the domain are normalized to obtain the preference attention coefficients of similar neighbors in the domain.
[0085] In one embodiment, the attention weights of similar neighbors in the domain are normalized to obtain the similarity between nodes in different clusters. In one example, the attention weights of similar neighbors in the domain are normalized to obtain the preference attention coefficient of similar neighbors in the domain, which can be determined using the following formula:
[0086]
[0087] Among them, the preference attention coefficient a vk It shows the contribution of node k in the domain to the preference weight of central node v. It can directly reveal the differentiated preferences between different nodes and central nodes in the domain.
[0088] In step 440, based on the weighted sum of the preference attention coefficients of similar neighbors in each domain, the intra-domain preference features of the user entity to be recommended in the target domain are obtained.
[0089] In one embodiment, the low-dimensional preference representations of similar nodes in the domain can be weighted and summed to obtain the preference representation of the new node in the domain (corresponding to the domain preference features of the user entity to be recommended in the target domain). In one example, based on the weighted sum of the preference attention coefficients of similar neighbors in each domain, the domain preference features of the user entity to be recommended in the target domain can be determined using the following formula:
[0090]
[0091] Wherein, σ represents an activation function; W represents a weight value, wherein the weight value can be adjusted according to actual conditions, and in this embodiment, there is no specific limitation.
[0092] In order to further introduce the cross-domain recommendation method provided by the present invention, the process of obtaining the cross-domain preference features of the user entity to be recommended about the source domain through the graph attention model based on the source domain entity vector is explained below.
[0093] Figure 5 It is a flow chart of obtaining the cross-domain preference features of the user entity to be recommended about the source domain through the graph attention model based on the source domain entity vector provided by the present invention.
[0094] In an exemplary embodiment of the present invention, Figure 5 It can be seen that based on the source domain entity vector, obtaining the cross-domain preference features of the user entity to be recommended about the source domain through the graph attention model may include steps 510 to 540, and each step will be introduced below.
[0095] In step 510, based on the source domain entity vector, a random walk mechanism is used to determine the cross-domain similar neighbors of the user entity to be recommended in the source domain.
[0096] The preferences of similar users across domains can be transferred and provide more semantic information for cold-start users in the target domain, thereby alleviating the problem of low recommendation accuracy in the target domain. In view of the differences in domain heterogeneity and data distribution in different recommendation systems, in this embodiment, a random walk method can be used to explore cross-domain similar nodes in the knowledge graph. By determining the cross-domain similar neighbors of the user entity to be recommended in the source domain, the preference features of cross-domain similar nodes are aggregated to more accurately model the preference features of the target user and enhance the generalization performance of the overall model.
[0097] In step 520, the attention weights of similar neighbors across domains are determined through the graph attention model.
[0098] In one embodiment, the following formula can be used to determine the attention weights of cross-domain similar neighbors through the graph attention model:
[0099]
[0100] Among them, h across represents the attention weights of similar neighbors across domains; W a represents the trainable attention weight to extract preference information for propagation; t represents the cross-domain similar neighbors of the target node (corresponding to the user entity to be recommended); N' u (v) represents the set of all cross-domain similar neighbors; n represents the number of cross-domain similar neighbors.
[0101] In step 530, based on the target domain entity vector, the original attention vector weight of the user entity to be recommended is determined.
[0102] In step 540, the attention weights of the cross-domain similar neighbors and the original attention vector weights of the user entity to be recommended are fully connected to obtain the cross-domain preference features of the user entity to be recommended with respect to the source domain.
[0103] In one embodiment, the original attention vector weight of the user entity to be recommended can be determined based on the target domain entity vector. Further, the low-dimensional vector representation of the current target node is propagated and combined to perceive the user preference, and then the final cross-domain preference representation is obtained through the representation propagation of multiple fully connected layers. In the application process, the attention weights of cross-domain similar neighbors and the original attention vector weights of the user entity to be recommended can be fully connected to obtain the cross-domain preference features of the user entity to be recommended with respect to the source domain.
[0104] Among them, the attention weights of cross-domain similar neighbors and the original attention vector weights of the user entity to be recommended are fully connected to obtain the cross-domain preference features of the user entity to be recommended about the source domain, which can be achieved by the following formula:
[0105]
[0106] in, represents the cross-domain preference features of the user entity to be recommended regarding the source domain; v represents the original attention vector weight of the user entity to be recommended; h across represents the attention weights of similar neighbors across domains.
[0107] In order to further introduce the cross-domain recommendation method provided by the present invention, the following describes a process of obtaining a recommendation ranking of the user entity to be recommended regarding the commodity entity to be recommended by making a recommendation based on the fused preference features of the user entity to be recommended through a cross-domain Bayesian mechanism.
[0108] Figure 6 The present invention provides a flowchart of recommending the user entity to be recommended based on the fusion preference features of the user entity to be recommended, and obtaining the recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended by making recommendations through a cross-domain Bayesian mechanism.
[0109] In an exemplary embodiment of the present invention, Figure 6 It can be seen that based on the fusion preference features of the user entity to be recommended, recommendation is performed through a cross-domain Bayesian mechanism to obtain the recommended ranking of the user entity to be recommended regarding the commodity entity to be recommended, which may include steps 610 to 640. Each step will be introduced below.
[0110] In step 610, based on the fused preference features of the user entity to be recommended, a target domain user node layer representation of the user entity to be recommended and a target domain commodity node layer representation of the commodity entity to be recommended in the target domain, as well as a source domain user node layer representation of the source domain user entity and a source domain commodity node layer representation of the source domain commodity entity in the source domain are obtained respectively through a cross-domain Bayesian mechanism.
[0111] In one example, after performing L-layer cross-domain node propagation, the source domain user node layer representation of the source domain user entity in the source domain can be obtained through the Bayesian mechanism: and the source domain commodity node layer representation of the source domain commodity entity Similar to the node representation in the source domain, under the network constraint condition L2 = L-L1, the representation of user and item nodes in the target domain can also be obtained, that is, the target domain user node layer representation of the user entity to be recommended in the target domain and the target domain product node layer representation of the recommended product entity Since the representations of nodes on different layers emphasize the preference information on different links, they have different contributions to the final fusion preference of the target node. Therefore, the present invention adopts a layer aggregation strategy to connect the representations within and across domains. Among them, the layer representation of the source domain user node after layer aggregation can be expressed by the following formula:
[0112]
[0113] The source domain commodity node layer representation after layer aggregation can be expressed by the following formula:
[0114]
[0115] The target domain user node layer representation after layer aggregation can be expressed by the following formula:
[0116]
[0117] The target domain commodity node layer representation after layer aggregation can be expressed by the following formula:
[0118]
[0119] Where s and t represent the source domain label and the target domain label respectively; || represents the connection operation. Based on the above processing, the present invention can not only obtain the preference perception representation of similar nodes within and across domains, but also flexibly control the propagation range by adjusting L1 and L2. In addition, the advantage of the connection mechanism is that it does not require too many parameters to be learned, and the training process is also simple and efficient.
[0120] In step 620, an inner product is performed on the target domain user node layer representation and the target domain commodity node layer representation in the target domain to obtain a first matching value of the to-be-recommended user entity with respect to the to-be-recommended commodity entity.
[0121] In one embodiment, the inner product of the target domain user node layer representation and the target domain commodity node layer representation in the target domain is performed to obtain the first matching value of the to-be-recommended user entity with respect to the to-be-recommended commodity entity, which can be implemented by using the following formula:
[0122]
[0123] In step 630, an inner product is performed on the source domain user node layer representation and the source domain commodity node layer representation in the source domain to obtain a second matching value of the source domain user entity with respect to the source domain commodity entity.
[0124] In one embodiment, the inner product of the source domain user node layer representation and the source domain commodity node layer representation in the source domain is performed to obtain the second matching value of the source domain user entity with respect to the source domain commodity entity, which can be implemented by using the following formula:
[0125]
[0126] In step 640, a cross-domain regularization term is processed on the first matching value and the second matching value to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity.
[0127] As an advanced baseline recommendation model, the Bayesian personalized ranking (BPR) strategy is often used to learn model parameters and predict entity ratings. Its basic principle is that known entity ratings can better expose the user's true preferences, and these ratings can be given higher prediction weights than unobserved ratings. Therefore, the present invention adopts a cross-domain Bayesian personalized ranking method, which can add similar preference features as regularization terms in the source domain to predict unobserved interaction ratings in the target domain. In one example, the first matching value and the second matching value can be processed with a cross-domain regularization term to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0128] The first matching value and the second matching value are processed with a cross-domain regularization term to obtain a recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity, which can be implemented by using the following formula:
[0129]
[0130] Among them, L CBPR represents the recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended product entity; κ and κ' represent the training samples in the source domain and the target domain respectively; σ(·) represents the Sigmoid function; λ represents the regularization parameter that controls the degree of cross-domain similarity preference fusion; Represents the user entity u to be recommended t About the recommended product entity i t The first matching value of Represents the user entity u to be recommended t About the recommended product entity j t The first matching value of Represents the source domain user entity u s About source domain product entity i s The second matching value of Represents the source domain user entity u s About source domain commodity entity j s The second matching value.
[0131] In another example, in order to further optimize the ranking result, the recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity can be achieved by using the following formula:
[0132]
[0133] Among them, L PGACKG represents the optimized recommendation ranking of the recommended product entity; L CBPR represents the recommended ranking of the recommended commodity entity based on formula (15); L CKGrepresents the loss function for training the TransD model; η and β represent weight coefficients respectively; Θ represents all trainable parameters; η represents the regularization parameter for constraining entities and relations in the knowledge graph.
[0134] In order to improve the training efficiency, the present invention adopts the Mini-Batch Gradient Descent strategy to optimize the representation loss and cross-domain prediction model. In addition, for a batch of randomly sampled triplets, their preference representations within and across domains are established after multi-step propagation, so the proposed model updates the parameters by predicting the gradient of the function.
[0135] The present invention proposes a preference-aware feature vector representation method based on graph representation, which can use the semantic information of entities and relationships in the knowledge graph to reveal the preference characteristics of the target node; secondly, a preference-aware graph attention network is constructed to aggregate the preference characteristics of similar entities within and between domains, and the final preference characteristics of the target node are modeled by fusing similar entity preferences in different recommendation systems; finally, a new cross-domain Bayesian personalized ranking method is proposed to generate cross-domain prediction results, thereby improving the recommendation efficiency and accuracy of commodity entity recommendations for recommended user entities.
[0136] Extensive experiments on a variety of public data sets show that the cross-domain recommendation method proposed in this invention achieves better recommendation quality than existing advanced technologies, especially in cross-domain scenarios with sparse data, which greatly improves the prediction performance. In addition, the method proposed in this invention achieves superior training effects in terms of training model depth, number of inter-layer iterations, and Dropout parameters, and has achieved significant improvements over existing technologies in multiple sets of ablation experiments.
[0137] Based on the same concept, the present invention also provides a cross-domain recommendation device.
[0138] The cross-domain recommendation device provided by the present invention is described below. The cross-domain recommendation device described below and the cross-domain recommendation method described above can be referred to each other.
[0139] Figure 7 It is a structural schematic diagram of the cross-domain recommendation device provided by the present invention.
[0140] In an exemplary embodiment of the present invention, the cross-domain recommendation device can be applied to a target domain with sparse data, wherein the target domain entity of the target domain may include a user entity to be recommended and a commodity entity to be recommended. Figure 7 It can be seen that the cross-domain recommendation device may include an acquisition module 710, a conversion module 720, a processing module 730 and a generation module 740, and each module will be introduced below.
[0141] The acquisition module 710 may be configured to acquire a knowledge graph and a source domain, wherein source domain entities in the source domain may include source domain user entities and source domain product entities.
[0142] The conversion module 720 may be configured to convert the target domain entities and the source domain entities based on the knowledge graph to obtain the target domain entity vector and the source domain entity vector.
[0143] The processing module 730 may be configured to obtain fused preference features of the user entity to be recommended through a graph attention model based on the target domain entity vector and the source domain entity vector, wherein the graph attention model may be obtained through pre-training.
[0144] The generation module 740 may be configured to perform a recommendation based on the fused preference features of the to-be-recommended user entity through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity.
[0145] In an exemplary embodiment of the present invention, the conversion module 720 can convert the target domain entities and the source domain entities based on the knowledge graph to obtain the target domain entity vector and the source domain entity vector in the following manner: based on the knowledge graph, the target domain entities and the source domain entities, a collaborative knowledge graph is obtained, wherein the collaborative knowledge graph includes the data of the target domain entities and the data of the source domain entities; based on the collaborative knowledge graph, the target domain entities and the source domain entities are converted through the knowledge representation model to obtain the target domain entity vector and the source domain entity vector, wherein the knowledge representation model is obtained through pre-training.
[0146] In an exemplary embodiment of the present invention, the processing module 730 can obtain the fused preference features of the user entity to be recommended based on the target domain entity vector and the source domain entity vector through a graph attention model in the following manner: based on the target domain entity vector, obtain the intra-domain preference features of the user entity to be recommended in the target domain through a graph attention model; based on the source domain entity vector, obtain the cross-domain preference features of the user entity to be recommended with respect to the source domain through a graph attention model; based on the intra-domain preference features and the cross-domain preference features, obtain the fused preference features of the user entity to be recommended.
[0147] In an exemplary embodiment of the present invention, the processing module 730 can obtain the intra-domain preference characteristics of the user entity to be recommended in the target domain based on the target domain entity vector through a graph attention model in the following manner: based on the target domain entity vector, determine multiple intra-domain similar neighbors of the user entity to be recommended in the target domain through a multi-hop reasoning mechanism; determine the attention weights of the intra-domain similar neighbors through a graph attention model; normalize the attention weights of the intra-domain similar neighbors to obtain the preference attention coefficients of the intra-domain similar neighbors; obtain the intra-domain preference characteristics of the user entity to be recommended in the target domain based on the weighted sum of the preference attention coefficients of each intra-domain similar neighbor.
[0148] In an exemplary embodiment of the present invention, the processing module 730 can obtain the cross-domain preference features of the user entity to be recommended regarding the source domain based on the source domain entity vector through a graph attention model in the following manner: based on the source domain entity vector, determine the cross-domain similar neighbors of the user entity to be recommended in the source domain through a random walk mechanism; determine the attention weights of the cross-domain similar neighbors through a graph attention model; based on the target domain entity vector, determine the original attention vector weight of the user entity to be recommended; perform full connection processing on the attention weights of the cross-domain similar neighbors and the original attention vector weight of the user entity to be recommended to obtain the cross-domain preference features of the user entity to be recommended regarding the source domain.
[0149] In an exemplary embodiment of the present invention, the processing module 730 may use the following formula to obtain the fused preference feature of the user entity to be recommended based on the intra-domain preference feature and the cross-domain preference feature:
[0150]
[0151] in, represents the fused preference features of the user entity to be recommended; LeahkReLU[.] represents the LeahkReLU activation function processing; ξ represents the balance parameter of the preference representation, which is used to control the degree of participation of cross-domain preference features; Indicates the preference characteristics within the domain; Represents cross-domain preference features.
[0152] In an exemplary embodiment of the present invention, the generation module 740 can adopt the following method to make recommendations based on the fused preference features of the user entity to be recommended through a cross-domain Bayesian mechanism to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended: based on the fused preference features of the user entity to be recommended, obtain the target domain user node layer representation of the user entity to be recommended and the target domain commodity node layer representation of the commodity entity to be recommended in the target domain, as well as the source domain user node layer representation of the source domain user entity and the source domain commodity node layer representation of the source domain commodity entity in the source domain respectively through a cross-domain Bayesian mechanism; perform an inner product on the target domain user node layer representation and the target domain commodity node layer representation in the target domain to obtain a first matching value of the user entity to be recommended with respect to the commodity entity to be recommended; perform an inner product on the source domain user node layer representation and the source domain commodity node layer representation in the source domain to obtain a second matching value of the source domain user entity with respect to the source domain commodity entity; perform cross-domain regularization term processing on the first matching value and the second matching value to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0153] In an exemplary embodiment of the present invention, the generation module 740 may use the following formula to perform cross-domain regularization processing on the first matching value and the second matching value to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity:
[0154]
[0155] Among them, L CBPR represents the recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended product entity; κ and κ' represent the training samples in the source domain and the target domain, respectively; σ(·) represents the Sigmoid function; λ represents the regularization parameter that controls the degree of cross-domain similarity preference fusion; Represents the user entity u to be recommended t About the recommended product entity i t The first matching value of Represents the user entity u to be recommended t About the recommended product entity j t The first matching value of Represents the source domain user entity u s About source domain product entity i s The second matching value of Represents the source domain user entity u s About source domain commodity entity j s The second matching value.
[0156] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8 As shown, the electronic device may include: a processor (processor) 810, a communication interface (CommunicationsInterface) 820, a memory (memory) 830 and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call the logic instructions in the memory 830 to execute the cross-domain recommendation method, wherein the method is applied to a target domain with sparse data, and the target domain entities of the target domain include user entities to be recommended and commodity entities to be recommended. The method includes: obtaining a knowledge graph and a source domain, wherein the source domain entities in the source domain include source domain user entities and source domain commodity entities; based on the knowledge graph, transforming the target domain entities and the source domain entities to obtain target domain entity vectors and source domain entity vectors; based on the target domain entity vectors and the source domain entity vectors, obtaining the fusion preference features of the user entity to be recommended through a graph attention model, wherein the graph attention model is obtained through pre-training; based on the fusion preference features of the user entity to be recommended, recommending through a cross-domain Bayesian mechanism to obtain a recommended ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
[0157] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0158] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the cross-domain recommendation method provided by the above methods, wherein the method is applied to a target domain with sparse data, and the target domain entities of the target domain include user entities to be recommended and commodity entities to be recommended. The method includes: obtaining a knowledge graph and a source domain, wherein the source domain entities in the source domain include source domain user entities and source domain commodity entities; based on the knowledge graph, converting the target domain entities and the source domain entities to obtain target domain entity vectors and source domain entity vectors; based on the target domain entity vectors and the source domain entity vectors, obtaining the fused preference features of the user entities to be recommended through a graph attention model, wherein the graph attention model is obtained through pre-training; based on the fused preference features of the user entities to be recommended, recommending through a cross-domain Bayesian mechanism to obtain a recommended ranking of the user entities to be recommended with respect to the commodity entities to be recommended.
[0159] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute the cross-domain recommendation method provided by the above methods, wherein the method is applied to a target domain with sparse data, and the target domain entities of the target domain include user entities to be recommended and commodity entities to be recommended, and the method includes: obtaining a knowledge graph and a source domain, wherein the source domain entities in the source domain include source domain user entities and source domain commodity entities; based on the knowledge graph, converting the target domain entities and the source domain entities to obtain target domain entity vectors and source domain entity vectors; based on the target domain entity vectors and the source domain entity vectors, obtaining the fused preference features of the user entities to be recommended through a graph attention model, wherein the graph attention model is obtained through pre-training; based on the fused preference features of the user entities to be recommended, recommending through a cross-domain Bayesian mechanism to obtain a recommended ranking of the user entities to be recommended with respect to the commodity entities to be recommended.
[0160] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0162] It is further understood that, although the operations are described in a specific order in the accompanying drawings in the embodiments of the present invention, it should not be understood as requiring the operations to be performed in the specific order or serial order shown, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cross-domain recommendation method, characterized in that: The method is applied to a target domain with sparse data, wherein the target domain entities of the target domain include a user entity to be recommended and a commodity entity to be recommended, and the method comprises: Acquire a knowledge graph and a source domain, wherein source domain entities in the source domain include source domain user entities and source domain commodity entities; Based on the knowledge graph, transform the target domain entity and the source domain entity to obtain a target domain entity vector and a source domain entity vector; Based on the target domain entity vector and the source domain entity vector, obtaining the fusion preference feature of the to-be-recommended user entity through a graph attention model, wherein the graph attention model is obtained through pre-training; Based on the fusion preference features of the user entity to be recommended, a recommendation is made through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the user entity to be recommended with respect to the commodity entity to be recommended, wherein: The step of performing recommendation based on the fusion preference features of the to-be-recommended user entity through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity specifically includes: Based on the fusion preference features of the user entity to be recommended, obtaining the target domain user node layer representation of the user entity to be recommended and the target domain commodity node layer representation of the commodity entity to be recommended in the target domain, and the source domain user node layer representation of the source domain user entity and the source domain commodity node layer representation of the source domain commodity entity in the source domain respectively through the cross-domain Bayesian mechanism; Performing an inner product on the target domain user node layer representation and the target domain commodity node layer representation in the target domain to obtain a first matching value of the to-be-recommended user entity with respect to the to-be-recommended commodity entity; Performing an inner product on the source domain user node layer representation and the source domain commodity node layer representation in the source domain to obtain a second matching value of the source domain user entity with respect to the source domain commodity entity; Performing cross-domain regularization processing on the first matching value and the second matching value to obtain a recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity; The cross-domain regularization term processing is performed on the first matching value and the second matching value to obtain the recommendation ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity using the following formula: Among them, L CBPR represents the recommended ranking of the to-be-recommended user entity with respect to the to-be-recommended commodity entity; κ and κ' represent the training samples in the source domain and the target domain respectively; σ(·) represents the Sigmoid function; λ represents the regularization parameter that controls the degree of cross-domain similarity preference fusion; Represents the user entity u to be recommended t About the recommended product entity i t The first matching value of Represents the user entity u to be recommended t About the recommended product entity j t The first matching value of Represents the source domain user entity u s About source domain product entity i s The second matching value of Represents the source domain user entity u s About source domain commodity entity j s The second matching value.
2. The cross-domain recommendation method according to claim 1, characterized in that: The converting the target domain entity and the source domain entity based on the knowledge graph to obtain a target domain entity vector and a source domain entity vector specifically includes: Based on the knowledge graph, the target domain entity and the source domain entity, a collaborative knowledge graph is obtained, wherein the collaborative knowledge graph includes data of the target domain entity and data of the source domain entity; Based on the collaborative knowledge graph, the target domain entity and the source domain entity are converted through a knowledge representation model to obtain a target domain entity vector and a source domain entity vector, wherein the knowledge representation model is obtained through pre-training.
3. The cross-domain recommendation method according to claim 1, characterized in that: The step of obtaining the fusion preference feature of the to-be-recommended user entity through a graph attention model based on the target domain entity vector and the source domain entity vector specifically includes: Based on the target domain entity vector, obtaining the in-domain preference feature of the to-be-recommended user entity in the target domain through the graph attention model; Based on the source domain entity vector, obtaining the cross-domain preference feature of the to-be-recommended user entity with respect to the source domain through the graph attention model; Based on the intra-domain preference feature and the cross-domain preference feature, a fused preference feature of the to-be-recommended user entity is obtained.
4. The cross-domain recommendation method according to claim 3, characterized in that: The obtaining, based on the target domain entity vector, the in-domain preference feature of the to-be-recommended user entity in the target domain through the graph attention model specifically includes: Based on the target domain entity vector, determining multiple in-domain similar neighbors of the to-be-recommended user entity in the target domain through a multi-hop reasoning mechanism; Determining attention weights of similar neighbors in the domain through the graph attention model; Normalizing the attention weights of similar neighbors in the domain to obtain the preference attention coefficients of similar neighbors in the domain; Based on the weighted sum of the preference attention coefficients of the similar neighbors in each of the domains, the domain preference feature of the to-be-recommended user entity in the target domain is obtained.
5. The cross-domain recommendation method according to claim 3, characterized in that: The step of obtaining the cross-domain preference feature of the to-be-recommended user entity with respect to the source domain through the graph attention model based on the source domain entity vector specifically includes: Based on the source domain entity vector, determining the cross-domain similar neighbors of the to-be-recommended user entity in the source domain through a random walk mechanism; Determining the attention weights of the cross-domain similar neighbors by the graph attention model; Based on the target domain entity vector, determining the original attention vector weight of the to-be-recommended user entity; The attention weights of the cross-domain similar neighbors and the original attention vector weights of the to-be-recommended user entity are fully connected to obtain the cross-domain preference features of the to-be-recommended user entity with respect to the source domain.
6. The cross-domain recommendation method according to claim 3, characterized in that: The fusion preference feature of the user entity to be recommended is obtained based on the intra-domain preference feature and the cross-domain preference feature by adopting the following formula: in, represents the fusion preference feature of the user entity to be recommended; LeakyReLU[.] represents the LeakyReLU activation function processing; ξ represents the balance parameter of the preference representation, which is used to control the participation degree of the cross-domain preference feature; representing the preference characteristics within the domain; Indicates the cross-domain preference feature.
7. A cross-domain recommendation device for implementing the cross-domain recommendation method according to claims 1-6, characterized in that: The device is applied to a target domain with sparse data, the target domain entities of the target domain include a user entity to be recommended and a commodity entity to be recommended, and the device includes: An acquisition module, used to acquire a knowledge graph and a source domain, wherein the source domain entities in the source domain include source domain user entities and source domain commodity entities; A conversion module, used to convert the target domain entity and the source domain entity based on the knowledge graph to obtain a target domain entity vector and a source domain entity vector; A processing module, configured to obtain, based on the target domain entity vector and the source domain entity vector, a fusion preference feature of the to-be-recommended user entity through a graph attention model, wherein the graph attention model is obtained through pre-training; A generation module is used to make recommendations based on the fusion preference features of the user entity to be recommended through a cross-domain Bayesian mechanism to obtain a recommendation ranking of the user entity to be recommended with respect to the commodity entity to be recommended.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the cross-domain recommendation method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cross-domain recommendation method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the cross-domain recommendation method according to any one of claims 1 to 6 is implemented.
