Product Recommendation Method, Device, Storage Medium and Program Product
Through the combination of heterogeneous graph neural network and social network, the graph attention autoencoder and unsupervised clustering module are used to solve the cold start problem when new users recommend it, and efficient and accurate product recommendations are achieved.
Patent Information
- Application Number
- CN202411344686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing recommendation system is difficult to provide accurate product recommendations when facing new users, mainly due to the high data volume and data quality requirements, and is easily troubled by cold start problems.
A heterogeneous graph neural network is adopted, combined with a graph attention autoencoder and an unsupervised clustering module, and the interests and preferences of target users are mined through a heterogeneous graph matrix, and direct or indirect social relationships in the social network are recommended. Combined with the embedding and clustering of user nodes and product nodes, product ratings are generated to recommend products.
It improves the product recommendation efficiency and accuracy of new users, solves the cold start problem, and uses social networks to mine the similarity of users' interaction behaviors, enhancing the accuracy and efficiency of recommendations.
Smart Images

Figure CN119313426B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a commodity recommendation method, apparatus, storage medium, and program product. Background Art
[0002] As a powerful information filtering technology, with the continuous development of the Internet and the continuous increase in data scale, the application of recommendation systems has become more extensive, covering multiple fields such as e-commerce, social media, music, and video streaming, bringing a more intelligent and convenient experience to users. Its core goal is to predict the items or content that users may be interested in and accurately present these recommendations to users, thereby increasing user satisfaction, improving platform conversion rates, and promoting user loyalty. By analyzing data, including user historical behavior, click records, search records, purchase records, etc., and information related to items, such as descriptions, tags, categories, etc., the recommendation system can gain insights into user preferences and interests and customize recommendation content for users.
[0003] Traditional recommendation methods include content-based recommendation methods and model-based recommendation methods; among them, the content-based recommendation method refers to exploring the user-item rating matrix and using user historical behavior data to find other users or commodities similar to the current user's interests, so as to recommend commodities that the user may be interested in to the user; the model-based recommendation method refers to obtaining a set of model parameters by learning user historical behavior data and directly making recommendations according to user characteristics in the subsequent prediction stage.
[0004] However, both content-based recommendation methods and model-based recommendation methods have high requirements for the amount and quality of user data during recommendation, are easily troubled by the cold start problem, and have the problem of being difficult to provide accurate recommendations for new users. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a commodity recommendation method, apparatus, storage medium, and program product to eliminate or improve one or more defects existing in the prior art.
[0006] One aspect of the present invention provides a commodity recommendation method, which includes the following steps:
[0007] Obtain a heterogeneous graph matrix corresponding to a target user, where the heterogeneous graph matrix includes several nodes and connection edges connecting each node; among them, the several nodes include user nodes and commodity nodes; the user nodes include a target user node corresponding to the target user and neighbor user nodes having an associated relationship with the target user node;
[0008] Obtain a pre-trained product recommendation model, which includes a graph attention auto-encoder module, an unsupervised clustering module, and a product recommendation module; the graph attention auto-encoder module is used to obtain the embedded aggregation result corresponding to the user node based on the mutual relationship between several nodes and connection edges in the heterogeneous graph matrix, and obtain the embedded matrix corresponding to the user node based on the embedded result; the unsupervised clustering module is used to perform clustering of user nodes based on the embedded matrix to obtain the user node clustering result; the product recommendation module is used to determine the user weight of neighbor user nodes for the target user node based on the user node clustering result, determine the interaction weight between the user node and the product node based on the edge type of the connection edge between the user node and the product node, generate a product score based on the user weight and the interaction weight, and recommend products based on the product score;
[0009] Input the heterogeneous graph matrix into the product recommendation model to obtain the product recommendation result corresponding to the target user.
[0010] In some embodiments of the present invention, the embedded aggregation result includes a node-level embedded aggregation result and a meta-path-level embedded aggregation result; the user nodes include n nodes; where n is an integer greater than 1; obtaining the embedded aggregation result corresponding to the user node based on the mutual relationship between several nodes and connection edges in the heterogeneous graph matrix includes:
[0011] Determine the m-th user node as the main node; where m sequentially takes positive integers from 1 to n;
[0012] Based on the main node, match the preset meta-path with the heterogeneous graph matrix, and extract the meta-path instance from the heterogeneous graph matrix according to the preset meta-path; each meta-path instance includes the main node and the neighbor nodes corresponding to the main node;
[0013] Perform feature transformation on each meta-path instance respectively to obtain the latent vector corresponding to each meta-path instance;
[0014] Based on the latent vector corresponding to each meta-path instance and the main node weight corresponding to each meta-path instance, perform weighted summation respectively to obtain the node-level embedded aggregation result corresponding to the main node in each meta-path instance;
[0015] Calculate the average value of the latent vectors of all nodes in each meta-path instance respectively to obtain the intermediate representation corresponding to each meta-path instance;
[0016] Based on the intermediate representation corresponding to each meta-path instance, determine the meta-path weight corresponding to each meta-path instance respectively;
[0017] Performing a weighted sum based on the meta-path weight corresponding to each meta-path instance and the aggregation result of the node-level embeddings corresponding to the main nodes in each meta-path instance to obtain the intermediate representation corresponding to the main nodes;
[0018] Projecting the intermediate representation into a vector space with an expected output dimension to obtain the embedding representation corresponding to the main nodes;
[0019] In the case where m is not equal to n, let m = m + 1, and execute the step of determining the m-th user node as the main node.
[0020] In some embodiments of the present invention, in the case where m is equal to n, obtaining an embedding matrix based on the embedding representation includes:
[0021] Updating the embedding representations corresponding to each main node into the user nodes in the heterogeneous graph matrix;
[0022] Generating an embedding matrix based on the updated embedding representations of the user nodes.
[0023] In some embodiments of the present invention, the commodity nodes include instance nodes and category nodes; the preset meta-paths include the first preset meta-path, the second preset meta-path or the third preset meta-path; in the first preset meta-path, the neighbor nodes include neighbor user nodes; in the second preset meta-path, the neighbor nodes include instance nodes and neighbor user nodes; in the third preset meta-path, the neighbor nodes include instance nodes, category nodes and neighbor user nodes.
[0024] In some embodiments of the present invention, obtaining a pre-trained commodity recommendation model includes:
[0025] Obtaining a sample heterogeneous matrix graph; the sample heterogeneous matrix graph includes sample user nodes corresponding to sample users and sample commodity nodes corresponding to sample commodities, as well as sample commodity recommendation results corresponding to the sample heterogeneous matrix graph;
[0026] Inputting the sample heterogeneous matrix graph into a pre-created initial commodity recommendation model to jointly train the unsupervised clustering module and the commodity recommendation module to obtain a training result; the model structure of the initial commodity recommendation model is the same as that of the commodity recommendation model; the training result includes the first training result corresponding to the unsupervised clustering module and the second training result corresponding to the commodity recommendation module;
[0027] Based on the first training result, the second training result, the sample commodity recommendation result and a preset loss function, obtaining a loss function value;
[0028] Using the loss function value to perform iterative training on the initial commodity recommendation model to obtain the commodity recommendation model.
[0029] In some embodiments of the present invention, the preset loss function includes a first loss sub-function and a second loss sub-function;
[0030] The first training result includes the clustering result of sample user nodes; the clustering result of sample user nodes includes several cluster centers. After obtaining the clustering result of sample user nodes, the unsupervised clustering module is further configured to: calculate the Euclidean distance between the embedding representations corresponding to each sample user node and the embedding representations corresponding to each cluster center; convert the Euclidean distance into a conditional probability representing similarity as a scoring matrix; generate a target distribution by squaring to enhance the confidence of high-probability terms in the scoring matrix; and the first loss sub-function is used to reduce the error between the scoring matrix and the target distribution;
[0031] The second training result includes the training commodity recommendation result; the second loss sub-function is used to reduce the error between the training commodity recommendation result and the sample commodity recommendation result.
[0032] In some embodiments of the present invention, the sum of the number of types of several nodes and the number of types of connection edges is greater than 2.
[0033] Another aspect of the present invention provides a commodity recommendation device based on a social network, including a processor, a memory, and a computer program / instruction stored on the memory. The processor is configured to execute the computer program / instruction, and when the computer program / instruction is executed, the device implements the steps of the foregoing commodity recommendation method.
[0034] Another aspect of the present invention provides a computer-readable storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the foregoing commodity recommendation method are implemented.
[0035] Another aspect of the present invention provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the foregoing commodity recommendation method are implemented.
[0036] The product recommendation method, device, storage medium and program product of the present invention can solve the problems that the requirements for data volume and data quality are relatively high during recommendation, it is easily troubled by the cold start problem, and it is difficult to provide accurate recommendations when recommending to new users. By combining the heterogeneous graph neural network and the social network, the interests and preferences of the target user are more comprehensively mined, and recommendations are made based on users who have direct or indirect social relationships with the target user. In this way, when recommending to a new target user, in the case where it is impossible to accurately recommend based on the sparse historical data of the target user, similar users with interaction behaviors such as the friends of the target user can be mined relying on the social network, and recommendations can be made based on this, without relying on a large amount of high-quality data, solving the cold start problem, and being able to increase the efficiency and accuracy of product recommendation. At the same time, the graph attention autoencoder focuses on the important relevance between different data types, fully mines the rich semantic information in the heterogeneous graph matrix, and further improves the accuracy of recommendation. The unsupervised clustering module can obtain the similarity between users and jointly optimize the user embedding with the product recommendation module. Through the mutual cooperation of the graph attention autoencoder, the unsupervised clustering module and the product recommendation module, the efficiency and accuracy of product recommendation can be further improved.
[0037] The additional advantages, objectives, and features of the present invention will be partially described below, and will become partially obvious to those of ordinary skill in the art after studying the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the specification and the drawings.
[0038] Those skilled in the art will understand that the objectives and advantages that can be achieved by the present invention are not limited to the above specifically described, and the above and other objectives that the present invention can achieve will be more clearly understood according to the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and do not constitute a limitation to the present invention. In the drawings:
[0040] Figure 1 is a flowchart of the product recommendation method provided by an embodiment of the present invention;
[0041] Figure 2 is a schematic structural diagram of the heterogeneous graph matrix provided by an embodiment of the present invention;
[0042] Figure 3 is a schematic flowchart of the graph attention autoencoder provided by an embodiment of the present invention
[0043] Figure 4 is a schematic structural diagram of the preset meta-path provided by an embodiment of the present invention;
[0044] Figure 5 Schematic diagram of model training provided by an embodiment of the present invention. Specific implementation manners
[0045] To make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the implementation manners and the drawings. Herein, the illustrative implementation manners of the present invention and the descriptions thereof are used to explain the present invention, but do not limit the present invention.
[0046] Herein, it also needs to be noted that in order to avoid obscuring the present invention due to unnecessary details, only the structures and / or processing steps closely related to the solution of the present invention are shown in the drawings, and other details less related to the present invention are omitted.
[0047] It should be emphasized that the term "comprising / including" when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0048] Herein, it also needs to be noted that if there is no special indication, the term "connection" in this article can not only refer to direct connection, but also represent indirect connection with an intermediate.
[0049] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0050] First, several nouns related to the embodiments of the present application will be introduced.
[0051] Heterogeneous graph matrix: defined as a directed acyclic graph G=(V, E), including an entity type mapping function φ: V→A and an edge type mapping function Each entity v∈V belongs to an entity type Each edge l∈E belongs to an edge type
[0052] Heterogeneous Graph Neural Networks (HGNN): Different from traditional deep learning models, Graph Neural Networks (GNN) focus on processing graph-structured data and make full use of the relationships and topological structures between nodes. The core idea of GNN is to learn the representations of nodes in the graph by gradually propagating and aggregating node information. It combines node features and graph topology for information transmission and node representation learning, thereby capturing the complex relationships between nodes and effectively processing graphs of different scales and densities.
[0053] In the real world, many complex systems and applications can be modeled as heterogeneous graphs, which contain different types of nodes and multiple types of edges, and each node and edge has a specific meaning and semantics. Heterogeneous graph neural networks enable each node and edge to be represented in its own way by introducing embedding techniques for different types of nodes and edges. In this way, different types of nodes and edges can communicate and influence each other through appropriate information transmission and aggregation methods. Compared with traditional graph neural networks, heterogeneous graph neural networks can capture more comprehensively the complex association relationships in heterogeneous graphs, thus better understanding and analyzing heterogeneous graph data.
[0054] Meta-path: The meta-path P is defined as (abbreviated as A1A2…A l+1 ) in the form of a path, which describes the composite relationship between node types A1 and A l+1 where is the composite operator representing the relationship.
[0055] Graph Attention Autoencoder: It is a deep learning model for the autoencoding and feature learning of graph data. It combines the ideas of the Autoencoder and the Graph Attention Mechanism, aiming to incorporate the structural information of graph data into the encoding and decoding processes, thereby achieving the representation learning of graph data.
[0056] The following provides a detailed introduction to the product recommendation provided by this application.
[0057] In some embodiments of the present invention, the execution subject of the product recommendation provided by this application is an electronic device, which can be a terminal such as a computer, a mobile phone, a tablet computer, a camera, etc., or it can also be a server. This embodiment does not limit the implementation manner of the electronic device.
[0058] This embodiment provides a product recommendation method, as Figure 1 shown, this method at least includes steps S101 to step S103:
[0059] Step S101, obtaining a heterogeneous graph matrix corresponding to the target user.
[0060] Among them, the topological structure of the heterogeneous graph matrix can be represented as a heterogeneous graph neural network, including several nodes and connecting edges connecting each node. The sum of the number of types of several nodes and the number of types of connecting edges is greater than 2.
[0061] In some embodiments of the present invention, several nodes form a node type set A, including: user nodes and commodity nodes. The connection edges form an edge type set R, including: connection edges between user nodes, and connection edges between user nodes and commodity nodes.
[0062] Among them, the connection edges between user nodes are interaction connections constructed according to the social network dataset, and the edge types of the connection edges corresponding to the interaction connections between different user nodes are different. The interaction connections include, but are not limited to, attention, private message / message, friend, or comment, etc.
[0063] The connection edges between user nodes and commodity nodes are interaction connections constructed according to the e-commerce network dataset. In an actual e-commerce platform, various interaction connections can occur between users and commodities, including, but not limited to, click, favorite, add to cart, or purchase, etc.
[0064] In some embodiments of the present invention, the social network dataset refers to a data set containing users and their social relationships, usually including user personal information, friend relationships, interaction records, etc. These data sets can be obtained through the application programming interface (Application Programming Interface, API) of the social network platform. The e-commerce network dataset refers to a data set containing users, commodities, and their purchase behaviors, usually including user purchase records, commodity information, evaluations, etc. These data sets can be obtained through the application programming interface of the e-commerce platform.
[0065] In some embodiments of the present invention, the user nodes include a target user node corresponding to the target user, and neighbor user nodes having an associated relationship with the target user node. Among them, the target user refers to the user for whom commodities are to be recommended.
[0066] The commodity nodes include instance nodes and category nodes. The instance nodes represent specific commodity individuals; the category nodes represent the types or classifications of commodities, such as clothes or mobile phones, etc. By constructing connections between different commodity individuals according to the e-commerce network dataset, the connections between different users are extended, providing rich semantic and structural information, which helps to improve the overall performance and effect of commodity recommendation. Figure 2 Shows a brief structure of the heterogeneous graph matrix, including user nodes, instance nodes, and category nodes.
[0067] Step S102, obtain a pre-trained commodity recommendation model.
[0068] In some embodiments of the present invention, the commodity recommendation model is a heterogeneous graph neural network, including a graph attention auto-encoder module, an unsupervised clustering module, and a commodity recommendation module.
[0069] Among them, the graph attention autoencoder module combines the mutual relationships of various data in the heterogeneous graph matrix through the attention mechanism, minimizes the recommendation loss, and can effectively learn the embedding matrix E~q(E) of user nodes. Specifically, the graph attention autoencoder module is used to obtain the embedding aggregation result corresponding to the user node based on the mutual relationships of several nodes and connection edges in the heterogeneous graph matrix, and obtain the embedding matrix corresponding to the user node based on the embedding result.
[0070] In some embodiments of the present invention, referring to Figure 3 , the graph attention autoencoder module can effectively extract useful features from the heterogeneous graph matrix through three stages: extracting subgraphs based on meta-paths, node-level and meta-path-level embedding aggregation, and updating node embeddings, providing support for the subsequent clustering task of user nodes by the unsupervised clustering module.
[0071] Among them, extracting subgraphs based on meta-paths means extracting meta-path instances from the heterogeneous graph matrix based on the main node and the preset meta-path. For each user node in the heterogeneous graph matrix, the user node is sequentially used as the main node, and by matching with the preset meta-path in the heterogeneous graph matrix, meta-path instances are extracted, and these instances include the main node and its neighbor nodes. Then, feature transformation is performed on each meta-path instance to obtain latent vectors, and the node-level embedding aggregation result is calculated based on these latent vectors and the weights of the main nodes. Subsequently, the intermediate representation in each meta-path instance is calculated, and the meta-path weight is determined, and the weighted sum of the intermediate representations is performed. Finally, the intermediate representation is projected into the desired vector space to obtain the embedding representation of the main node. Repeat this process until the embedding representations of all user nodes are generated.
[0072] Specifically, the embedded aggregation result includes a node-level embedded aggregation result and a meta-path-level embedded aggregation result. The user node includes n nodes; where n is an integer greater than 1; based on the mutual relationship between several nodes and connection edges in the heterogeneous graph matrix, the embedded aggregation result corresponding to the user node is obtained, including: determining the m-th user node as the main node; where m sequentially takes positive integers from 1 to n; based on the main node, matching the preset meta-path with the heterogeneous graph matrix, and extracting meta-path instances from the heterogeneous graph matrix according to the preset meta-path; each meta-path instance includes the main node and the neighbor nodes corresponding to the main node; respectively performing feature transformation on each meta-path instance to obtain the latent vector corresponding to each meta-path instance; respectively performing weighted summation based on the latent vector corresponding to each meta-path instance and the main node weight corresponding to each meta-path instance to obtain the node-level embedded aggregation result corresponding to the main node in each meta-path instance; respectively calculating the average value of the latent vectors of all nodes in each meta-path instance to obtain the intermediate representation corresponding to each meta-path instance; based on the intermediate representation corresponding to each meta-path instance, respectively determining the meta-path weight corresponding to each meta-path instance; performing weighted summation based on the meta-path weight corresponding to each meta-path instance and the node-level embedded aggregation result corresponding to the main node in each meta-path instance to obtain the intermediate representation corresponding to the main node; projecting the intermediate representation into a vector space with an expected output dimension to obtain the embedded representation corresponding to the main node; in the case where m is not equal to n, let m = m + 1, and execute the step of determining the m-th user node as the main node.
[0073] Among them, in the case where m is equal to n, an embedding matrix is obtained based on the embedded representation, including: respectively updating the embedded representations corresponding to each main node into the corresponding user nodes in the heterogeneous graph matrix; generating an embedding matrix based on the embedded representations of the updated user nodes.
[0074] Since different node types may have different feature vector dimensions, even if they happen to have the same dimension, they may also be in different feature spaces. Based on this, for the convenience of subsequent analysis and processing, before extracting the meta-path instances, it is necessary to project the node features of different types into the same latent vector space and convert the node content. The specific implementation method is shown in the following formula:
[0075]
[0076] In the formula, h′ v is the latent vector of node v; is the original feature vector of node v; A indicates that the node type of node v is node type A; W A is the parameter weight matrix corresponding to node type A.
[0077] After completing the node content conversion, the required subgraphs, namely meta-path instances, are extracted from the heterogeneous graph matrix according to the pre-defined meta-paths. These meta-path instances retain the association information between the nodes in the heterogeneous graph matrix, and at the same time, the node features of each node have been mapped into a unified latent vector space.
[0078] In some embodiments of the present invention, the preset meta-path includes a first preset meta-path, a second preset meta-path, and a third preset meta-path. The structures of the first preset meta-path, the second preset meta-path, and the third preset meta-path are as follows: Figure 4 shown.
[0079] Specifically, in the first preset meta-path, neighbor nodes include neighboring user nodes. This meta-path explores the social relationships between users, using a heterogeneous graph matrix to identify potential friends or idols of the target user, understand social relationships between users, and provide more diverse information for the recommendation system. For example, if user A follows user B, this indicates that user B has a certain appeal to user A and may have influenced user A's preferences.
[0080] In the second preset meta-path, the neighbor nodes include instance nodes and neighbor user nodes; in the third preset meta-path, the neighbor nodes include instance nodes, category nodes and neighbor user nodes.
[0081] In the second and third preset meta-paths, connections between user nodes and product nodes are established, exploring information within the e-commerce network to uncover different user preferences. By analyzing user interactions with products, user preferences can be understood. Furthermore, by connecting products based on their categories, the breadth of information dissemination can be expanded, allowing individual user nodes to access richer information. By integrating information from different semantic perspectives, the similarity between users can be measured. By comparing shared interests and behavioral patterns across users, products that meet their preferences can be more accurately recommended.
[0082] In actual implementation, the heterogeneous matrix graph may also include other types of nodes, such as text content nodes or image nodes. Accordingly, the preset meta-path may also include other types of meta-paths to adapt to the node types in the heterogeneous matrix graph. This embodiment does not limit the node types in the heterogeneous matrix graph and the meta-path types of the preset meta-paths.
[0083] After extracting the meta-path instances corresponding to the current main nodes according to the preset meta-path, it is necessary to perform the node-level and meta-path-level embedding aggregation stage of the main nodes. Among them, node-level embedding aggregation refers to using a linear encoder (LinearEncoder) to convert all node features along the meta-path instances into a single vector. The specific implementation method is shown in the following formula:
[0084]
[0085] In the formula, P(v, u) represents the meta-path instance; h P(v,u) represents the latent vector representation corresponding to the meta-path instance P(v, u); h′ v represents the latent vector corresponding to the main node v; h′ u represents the latent vector corresponding to the neighbor user node u among the neighbor nodes; h′ t represents the latent vector corresponding to the commodity node t among the neighbor nodes on the meta-path instance P(v, u), or the intermediate node t on the meta-path instance P(v, u); m P(v,u) represents the set of intermediate nodes on the meta-path instance, that is, the nodes between the main node v and the neighbor user node u; f θ () represents the linear transformation function, which performs a linear transformation operation on the average vector representation of each node on the meta-path instance.
[0086] After encoding each meta-path instance into a latent vector representation, in order to ensure that different meta-path instances can make different contributions to the representation of the main node v, it is necessary to weight and sum all the meta-path instances according to the normalized weight and output through the activation function σ, then the node-level embedding aggregation result of the main node v can be obtained The specific implementation method is shown in the following formula:
[0087]
[0088] In the formula, represents the node-level embedding aggregation result; σ() represents the activation function; h P(v,u) represents the latent vector representation corresponding to the meta-path instance P(v, u); represents the set of neighbor user nodes associated with the main node v on the meta-path instance P(v, u); represents the normalized weight. Among them, can be represented by the following formula:
[0089]
[0090] In the formula, Indicates the importance of the meta-path instance \(P(v, u)\) with the neighbor user node being node \(u\) for the primary node \(v\). Here, the neighbor user node refers to the user node among the neighbor nodes corresponding to the primary node \(v\) in the meta-path instance \(P(v, u)\); \(\exp()\) represents the exponential function; Is expressed as the set of neighbor user nodes associated with the primary node \(v\) on the meta-path instance \(P(v, u)\) and the meta-path instance \(P(v, s)\); Indicates the importance of the meta-path instance \(P(v, s)\) with the neighbor user node being node \(s\) for the primary node \(v\). Here, the meta-path instance \(P(v, s)\) with the neighbor user node being node \(s\) and the meta-path instance \(P(v, u)\) with the neighbor user node being node \(u\) correspond to the same preset meta-path.
[0091] For example: Taking the meta-path instances of the type of the second preset meta-path as an example, including the meta-path instance \(v - p1 - u1\) and the meta-path instance \(v - p2 - u2\), then Includes the neighbor user node \(u1\) and the neighbor user node \(u2\). The neighbor user node \(u\) is either the neighbor user node \(u1\) or the neighbor user node \(u2\). The neighbor user node \(s\) is successively the neighbor user node \(u1\) and the neighbor user node \(u2\); When the neighbor user node \(u\) is the neighbor user node \(u1\), it can be expressed as Correspondingly, when the neighbor user node \(u\) is the neighbor user node \(u2\), it can be expressed as
[0092] Among them, Is represented by the following formula:
[0093]
[0094] In the formula, \(Swish()\) represents the activation function; Represents the parameterized attention vector corresponding to the meta-path instance \(P(v, u)\); \(h\) P(v,u) Represents the latent vector representation corresponding to the meta-path instance \(P(v, u)\); \(h'\) v Represents the latent vector corresponding to the primary node \(v\).
[0095] In some embodiments of the present invention, through node-level embedding aggregation, it is possible to aggregate the data of nodes and connection edges within the same type of meta-path instances. After that, in order to obtain the semantic information revealed by all meta-path instances, meta-path-level embedding aggregation is also required.
[0096] Since the importance of each type of meta-path instance in the heterogeneous graph matrix is different, in the present invention, different weights are assigned to different types of meta-path instances through the attention mechanism to complete the meta-path-level aggregation operation.
[0097] First, calculate each meta-path instance \(p\) respectivelyi The average of the latent vectors of all nodes in sp i , to summarize each meta-path instance P i ∈P A , the specific implementation is shown in the following formula:
[0098]
[0099] In the formula, M A and b A respectively represent learnable parameters; tanh represents the hyperbolic tangent function; |V A | represents the number of nodes belonging to the node type set A in the meta-path instance P i ; V A represents the set of nodes belonging to the node type set A in the meta-path instance P i ; represents the latent vector corresponding to the node z belonging to the node type set A in the meta-path instance P i .
[0100] Then, use the attention mechanism to perform a weighted sum of all vectors of the main node v for a specific meta-path instance, and obtain the intermediate representation corresponding to the main node v. The specific implementation is shown in the following formula:
[0101]
[0102] In the formula, represents the intermediate representation corresponding to the main node v, that is, the embedding representation; represents the relative importance of the meta-path instance p i to the node type set A; represents the latent vector corresponding to the main node v in the meta-path instance P i ; P A represents the set of meta-path instances; represents the intermediate representation corresponding to the main node v. Among them, considering that this aggregation involves three different types of meta-path instances, in order to more accurately evaluate the importance of each meta-path instance, in the present invention, the path length l is introduced to ensure that the weight of the meta-path instance is negatively correlated with the path length l.
[0103] Specifically, is represented by the following formula:
[0104]
[0105] In the formula, ep i represents the preliminary importance estimate of the meta-path instance p i to the node type set A; l i represents the meta-path instance p iThe path length; P A represents the set of meta-path instances; ep represents the preliminary importance estimate of the preset meta-path p to the node type set A; l represents the path length corresponding to the preset meta-path p; P represents the set of preset meta-paths; exp() represents the exponential function. Among them, ep i is represented by the following formula:
[0106]
[0107] In the formula, ep i represents the preliminary importance estimate of the meta-path instance p i to the node type set A; The parameterized attention vector of the node type set A; sp i represents the meta-path instance p i The average value of the latent vectors of all nodes in.
[0108] Next, the intermediate representation of the main node v is projected into a vector space with the desired output dimension through an additional linear transformation and a non-linear function to obtain the final meta-path-level embedding aggregation result. The specific implementation method is shown in the following formula:
[0109]
[0110] In the formula, W o is the weight matrix; σ() represents the non-linear function; represents the intermediate representation corresponding to the main node v; h v represents the meta-path-level embedding aggregation result corresponding to the main node v.
[0111] After obtaining the node-level embedding aggregation result and the meta-path-level embedding aggregation result, the obtained results are updated to each user node, and then according to the embedding information corresponding to each updated user node, the corresponding embedding matrix E~q(E) is obtained for use by the subsequent unsupervised clustering module. Through the attention mechanism, the model can focus on the important correlations between different data types, thereby further improving the clustering effect of the unsupervised clustering module.
[0112] Since one of the main challenges of graph clustering methods is that nodes do not have artificially specified labels, and the clustering task is unsupervised and without feedback in learning, which brings certain difficulties to graph representation learning. Based on this, in the present invention, the unsupervised clustering module is used to dynamically update and optimize the embedding representation of nodes during the clustering process.
[0113] In some embodiments of the present invention, the unsupervised clustering module is used to cluster user nodes based on the embedding matrix to obtain the user node clustering result for the commodity recommendation module to calculate commodity scores.
[0114] In some embodiments of the present invention, the product recommendation module is configured to determine the user weight of neighbor user nodes for a target user node based on the user node clustering result, determine the interaction weight between the user node and the product node based on the edge type of the connection edge between the user node and the product node, generate a product score based on the user weight and the interaction weight, and recommend products based on the product score.
[0115] Among them, the user weight is obtained by calculating the Euclidean distance between the embedding representations of user nodes based on the user node clustering result. The user weight can quantify the importance of different users to the target user and is further applied to the calculation of the score for product recommendation by the product recommendation module. Specifically, the calculation of the user weight is represented by the following formula:
[0116]
[0117] In the formula, w ij represents the user weight of user u j for user u i ; e i represents the low-dimensional embedding vector corresponding to user node u i ; e j represents the low-dimensional embedding vector corresponding to user node u j ; e j′ represents other user nodes in the user nodes except user node u i .
[0118] In some embodiments of the present invention, the interaction behaviors between users and products at least include no interaction, click, favorite, add to cart, and purchase, etc. In actual implementation, the interaction behaviors between users and products may also include multiple purchases, deletion, or blocking, etc. This embodiment does not limit the types of interaction behaviors between users and products.
[0119] In some embodiments of the present invention, each type of interaction behavior between users and products corresponds to a weight, denoted as B ui ={0, 1, 2, 3, 4}. When a user has multiple interaction behaviors with a product, the weight B ui takes the maximum value. This way of weight assignment aims to establish a hierarchical relationship in the interaction behaviors between users and items to reflect the importance of different interaction behaviors, which helps to more accurately evaluate and quantify the interaction relationship between users and products.
[0120] When rating a product, if multiple users interact with a specific product, it can be inferred that the product is likely to be a bestseller and more popular among such users. Based on this, in order to reflect this view and comprehensively consider the influence of multiple users on the product, the product rating is calculated through the following formula:
[0121]
[0122] In the formula, Sc ui represents the product rating of user u for product i; w uj represents the user weight of user j for user u; B ji represents the interaction weight of user j for product i.
[0123] After obtaining the product rating, products are recommended based on the product rating. In some embodiments of the present invention, the products are sorted in descending order according to the product rating and recommended in sequence, or after the products are sorted in descending order according to the product rating, the top pre-set number of products in the ranking are recommended in sequence.
[0124] Step S103: Input the heterogeneous graph matrix into the product recommendation model to obtain the product recommendation result corresponding to the target user.
[0125] Specifically, first, input the heterogeneous graph matrix into the graph attention autoencoder, and the graph attention autoencoder outputs the embedding matrix corresponding to the user node; then, input the embedding matrix into the unsupervised clustering module, and the unsupervised clustering module performs the clustering task of the user node to obtain the user node clustering result; finally, based on the user node clustering result, the product recommendation module calculates the Euclidean distance between the embedding representations of the users in the same category and the target user node as the user weight, multiplies the user weight by the interaction behavior weight corresponding to the pre-defined user-product interaction behavior to obtain the product rating, and sorts the products according to the product rating to obtain the product recommendation result.
[0126] Reference Figure 5 In this embodiment, a training method for a product recommendation model is provided, and this method at least includes the following steps S201 to step S204:
[0127] Step S201: Obtain a sample heterogeneous matrix graph. Among them, the sample heterogeneous matrix graph includes sample user nodes corresponding to sample users and sample product nodes corresponding to sample products.
[0128] In some embodiments of the present invention, the sample heterogeneous graph matrix used for model training is generated based on a sample social network dataset and a sample e-commerce network dataset. The sample social network dataset refers to a data set containing users and their social relationships, usually including users' personal information, friendship relationships, interaction records, etc. These data sets can be obtained through the application programming interface (API) of the social network platform. The sample e-commerce network dataset refers to a data set containing users, goods, and their purchase behaviors, usually including users' purchase records, product information, evaluations, etc. These data sets can be obtained through the application programming interface of the e-commerce platform.
[0129] Specifically, obtaining the sample heterogeneous graph matrix includes: extracting first user information from the sample social network dataset; extracting second user information of users who have interaction behaviors with goods from the sample e-commerce network dataset; obtaining a user node set based on the first user information and the second user information; extracting product information from the sample e-commerce network dataset to obtain a product instance node set; extracting product category information from the sample e-commerce network dataset as a product category node set; extracting the interaction relationships between users from the sample social network dataset to construct an edge set corresponding to "user-user"; extracting the interaction behaviors between users and goods from the sample e-commerce network dataset to construct an edge set corresponding to "user-goods", and extracting the attribute information of goods from the sample e-commerce network dataset to construct an edge set corresponding to "goods-category"; constructing a sample heterogeneous graph matrix according to the user node set, the product instance node set, the product category node set, and each edge set.
[0130] Step S202: Input the sample heterogeneous matrix graph into a pre-created initial product recommendation model, and jointly train the unsupervised clustering module and the product recommendation module to obtain a training result. The model structure of the initial product recommendation model is the same as that of the product recommendation model. The training result includes a first training result corresponding to the unsupervised clustering module and a second training result corresponding to the product recommendation module.
[0131] Step S203: Based on the first training result, the second training result, and a preset loss function, obtain a loss function value.
[0132] The preset loss function is used to jointly optimize the unsupervised clustering module and the product recommendation module, and jointly optimize the user embedding to provide more accurate recommendations. The unsupervised clustering module can automatically obtain the similarity between users and jointly optimize the user embedding with the product recommendation module.
[0133] In some embodiments of the present invention, refer to Figure 5, the preset loss function includes a first loss sub - function \(L\) c and a second loss sub - function \(L\) r , which is represented by the following formula:
[0134] \(L = L\) c +\(\gamma L\) r
[0135] In the formula, \(L\) represents the preset loss function; \(L\) c represents the first loss function; \(\gamma\) represents a learnable parameter; \(L\) r represents the second loss function. Among them, the first loss function is represented by the following formula:
[0136]
[0137] In the formula, \(Q\) represents the target distribution; \(P\) represents the scoring matrix; \(q\) ij represents the confidence score that the user node \(u\) i belongs to the clustering category \(\gamma\) j ; \(p\) ij represents the score of the user node \(u\) i belonging to the clustering category \(\gamma\) j .
[0138] Specifically, the first training result includes the clustering result of sample user nodes; the clustering result of sample user nodes includes several clustering centers. After obtaining the clustering result of sample user nodes, the unsupervised clustering module is further used to: calculate the Euclidean distance between the embedding representation corresponding to each sample user node and the embedding representation corresponding to each clustering center; convert the Euclidean distance into a conditional probability representing similarity as the scoring matrix \(P\); generate the target distribution \(Q\) by squaring the operation to enhance the confidence of the high - probability terms in the scoring matrix; the first loss sub - function is used to reduce the error between the scoring matrix \(P\) and the target distribution \(Q\).
[0139] In some embodiments of the present invention, the unsupervised clustering module initializes \(K\) clustering centers through the K - means algorithm After that, calculate the scoring matrix \(P\) of the learned - embedding user nodes and the clustering centers. The scoring matrix \(P\) represents the probability distribution that the user node \(u\) i \(\in U\) belongs to the clustering category \(\gamma\) j \(\in\Gamma\). Among them, \(U\) represents the set of user nodes, and \(\Gamma\) represents the set of clustering categories. The unsupervised clustering module first converts the Euclidean distance between the embedding vectors of user nodes and clustering centers into a conditional probability representing similarity. The similarity between the user node \(u\) i and the clustering center \(\gamma\) j can be expressed as the conditional probability \(p\) ij \(=P(y = j|i)\), that is, \(p\) ij represents that the user node \(u\) i belongs to the clustering category \(\gamma\)j The scoring is as follows. The specific implementation process is represented by the following formula:
[0140]
[0141] In the formula, e i represents the low-dimensional embedding vector corresponding to the user node u i ; γ j represents the low-dimensional embedding vector corresponding to the clustering center γ j ; γ j' represents the low-dimensional embedding vector corresponding to the clustering center γ j′ ; exp() represents the normalization exponential function (Softmax).
[0142] The probability representation of the scoring matrix P of the user node and the clustering center helps to determine the relationship between the user node and the clustering center. A scoring with a higher probability indicates that the user node is closer to the corresponding clustering center, and thus has a higher confidence level.
[0143] Meanwhile, in order to enhance the importance in the unsupervised clustering process, "confidence scoring" is introduced. To achieve this goal, first, the scoring matrix P is squared, and then, it is converted into a probability distribution using the normalization exponential function (Softmax) to form the target distribution Q, which helps to spread the scoring and make the "confidence scoring" more prominent. The calculation process is shown in the following formula:
[0144]
[0145] In the formula, q ij represents the confidence scoring that the user node u i belongs to the category γ j , that is, the target distribution Q; p ij represents the scoring that the user node u i belongs to the clustering category γ j ; p ij′ represents the scoring that the user node u i belongs to the clustering category γ j′ , and j' takes values from 0 to k in sequence.
[0146] During the training process, the error between the scoring matrix P and the target distribution Q is minimized through the first preset sub-function, so that the scoring matrix P can fit the target distribution Q as much as possible. The first preset sub-function measures the difference between the scoring matrix P and the target distribution Q. The training objective is to reduce this difference to the minimum, and the model is continuously iteratively optimized to make the scoring matrix P better match the target distribution Q, thereby improving the accuracy and reliability of the clustering of the unsupervised clustering module.
[0147] In some embodiments of the present invention, the second training result includes the training product recommendation result output by the product recommendation module; the second loss sub-function is used to reduce the error between the training product recommendation result and the sample product recommendation result. In the second loss sub-function, based on the product scores obtained in the previous steps, recommendations are made for the target user to obtain the training product recommendation result, and the recommendation effect is evaluated according to the true sample product recommendation result. Specifically, the second loss sub-function is represented by the following formula:
[0148]
[0149] In the formula, I rec represents the training product recommendation result recommended for user u; B ui represents the interaction weight between user u and product i; Sc ui represents the product score of user u for product i; δ represents the penalty coefficient, which is used to adjust the weight of the penalty term.
[0150] The core idea of the second loss sub-function is a reward mechanism. If the target user has an interaction behavior with a high-scoring product. It can be considered that the recommendation is reliable and should be rewarded. At the same time, a penalty term is also introduced in the second loss sub-function. In the case where the target user has an interaction behavior with a product, but the product is not recommended to the target user, then the reward of the product recommendation module should be deducted. Finally, multiplying by a negative sign converts the maximization problem into a minimization problem.
[0151] Step S204: Use the loss function value to iteratively train the initial product recommendation model to obtain the product recommendation model.
[0152] In summary, the commodity recommendation method provided in this embodiment obtains the heterogeneous graph matrix corresponding to the target user. The heterogeneous graph matrix includes a number of nodes and connection edges connecting each node. Among them, the number of nodes includes user nodes and commodity nodes. The user nodes include the target user node corresponding to the target user and neighbor user nodes having an association relationship with the target user node. Obtain a pre-trained commodity recommendation model, which includes a graph attention auto-encoder module, an unsupervised clustering module, and a commodity recommendation module. The graph attention auto-encoder module is used to obtain the embedding aggregation result corresponding to the user node based on the mutual relationship between the number of nodes and connection edges in the heterogeneous graph matrix, and obtain the embedding matrix corresponding to the user node based on the embedding result. The unsupervised clustering module is used to perform clustering of the user nodes based on the embedding matrix to obtain the user node clustering result. The commodity recommendation module is used to determine the user weight of the neighbor user node for the target user node based on the user node clustering result, determine the interaction weight between the user node and the commodity node based on the edge type of the connection edge between the user node and the commodity node, generate a commodity score based on the user weight and the interaction weight, and recommend commodities based on the commodity score. Input the heterogeneous graph matrix into the commodity recommendation model to obtain the commodity recommendation result corresponding to the target user. It can solve the problems that the requirements for data volume and data quality are relatively high during recommendation, it is easily troubled by the cold start problem, and it is difficult to provide accurate recommendations when recommending to new users. By combining the heterogeneous graph neural network and the social network, it can more comprehensively mine the interests and preferences of the target user, and recommend according to the users having direct or indirect social relationships with the target user. In this way, when recommending to a new target user, in the case where it is impossible to accurately recommend based on the sparse historical data of the target user, it can rely on the social network to mine similar users with interaction behaviors such as the friends of the target user, and recommend based on this, without relying on a large amount of high-quality data, solve the cold start problem, and increase the efficiency and accuracy of commodity recommendation. At the same time, the graph attention auto-encoder focuses on the important relevance between different data types, fully mines the rich semantic information in the heterogeneous graph matrix, and further improves the accuracy of recommendation. The unsupervised clustering module can obtain the similarity between users and jointly optimize the user embedding with the commodity recommendation module. Through the mutual cooperation of the graph attention auto-encoder, the unsupervised clustering module, and the commodity recommendation module, the efficiency and accuracy of commodity recommendation can be further improved.
[0153] Correspondingly to the above method, the present invention also provides a commodity recommendation device for a social network. The device includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the device implements the steps of the commodity recommendation method described above.
[0154] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the foregoing product recommendation method are implemented. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium well-known in the technical field.
[0155] An embodiment of the present invention further provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the product recommendation method as described above are implemented.
[0156] Those of ordinary skill in the art should understand that the various exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Specifically, whether to execute in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave on a transmission medium or a communication link.
[0157] It should be clear that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present invention is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0158] In the present invention, the features described and / or illustrated for one embodiment can be used in the same manner or in a similar manner in one or more other embodiments, and / or combined with the features of other embodiments or replace the features of other embodiments.
[0159] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the embodiments of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A product recommendation method, characterized in that: The method comprises the following steps: Obtaining a heterogeneous graph matrix corresponding to a target user, wherein the heterogeneous graph matrix includes a plurality of nodes and edges connecting the nodes; wherein the plurality of nodes include user nodes and product nodes; the user nodes include a target user node corresponding to the target user and neighbor user nodes associated with the target user node; Obtain a pre-trained product recommendation model, the product recommendation model comprising a graph attention autoencoder module, an unsupervised clustering module, and a product recommendation module; the graph attention autoencoder module is used to obtain an embedding aggregation result corresponding to the user node based on the mutual relationship between the several nodes and the connecting edges in the heterogeneous graph matrix, and obtain an embedding matrix corresponding to the user node based on the embedding aggregation result; the unsupervised clustering module is used to perform clustering of the user nodes based on the embedding matrix to obtain a user node clustering result; the product recommendation module is used to determine the user weight of the neighboring user node for the target user node based on the user node clustering result, determine the interaction weight between the user node and the product node based on the edge type of the connecting edge between the user node and the product node, generate a product rating based on the user weight and the interaction weight, and recommend products based on the product rating; Inputting the heterogeneous graph matrix into the product recommendation model to obtain product recommendation results corresponding to the target user; The embedding aggregation result includes a node-level embedding aggregation result and a meta-path-level embedding aggregation result; the user node includes n nodes; wherein n is an integer greater than 1; the embedding aggregation result corresponding to the user node is obtained based on the mutual relationship between the plurality of nodes and the connection edges in the heterogeneous graph matrix, including: Determine the mth user node as the primary node; wherein m is a positive integer from 1 to n; Based on the main node, matching a preset meta-path with the heterogeneous graph matrix, and extracting meta-path instances from the heterogeneous graph matrix according to the preset meta-path; each meta-path instance includes the main node and neighbor nodes corresponding to the main node; Perform feature conversion on each meta-path instance to obtain a latent vector corresponding to each meta-path instance; Obtaining a node-level embedding aggregation result corresponding to the main nodes in each meta-path instance based on a weighted summation of the latent vector corresponding to each meta-path instance and the weight of the main node corresponding to each meta-path instance; Calculating the average value of the potential vectors of all nodes in each meta-path instance respectively to obtain an intermediate representation corresponding to each meta-path instance; Determining, based on the intermediate representation corresponding to each meta-path instance, a meta-path weight corresponding to each meta-path instance; Obtaining an intermediate representation corresponding to the main node based on a weighted summation of the meta-path weight corresponding to each meta-path instance and the node-level embedding aggregation result corresponding to the main node in each meta-path instance; Projecting the intermediate representation into a vector space with a desired output dimension to obtain an embedded representation corresponding to the main node; In the case that m is not equal to n, set m=m+1 and execute the step of determining the mth user node as the main node.
2. The product recommendation method according to claim 1, characterized in that: When m is equal to n, obtaining an embedding matrix based on the embedding representation includes: Updating the embedding representation corresponding to each of the main nodes to the corresponding user node in the heterogeneous graph matrix; The embedding matrix is generated based on the updated embedding representation of the user node.
3. The product recommendation method according to claim 1, characterized in that: The commodity node includes an instance node and a category node; the preset meta-path includes a first preset meta-path, a second preset meta-path, or a third preset meta-path; in the first preset meta-path, the neighbor node includes a neighbor user node; in the second preset meta-path, the neighbor node includes an instance node and the neighbor user node; In the third preset meta-path, the neighbor nodes include the instance node, the category node, and the neighbor user node.
4. The product recommendation method according to claim 1, wherein: The obtaining of a pre-trained product recommendation model includes: Obtain a sample heterogeneous matrix diagram; the sample heterogeneous matrix diagram includes sample user nodes corresponding to sample users and sample product nodes corresponding to sample products, as well as sample product recommendation results corresponding to the sample heterogeneous matrix diagram; Inputting the sample heterogeneous matrix graph into a pre-created initial product recommendation model, jointly training the unsupervised clustering module and the product recommendation module to obtain a training result; the model structure of the initial product recommendation model is the same as the model structure of the product recommendation model; the training result includes a first training result corresponding to the unsupervised clustering module and a second training result corresponding to the product recommendation module; Obtaining a loss function value based on the first training result, the second training result, the sample product recommendation result, and a preset loss function; The initial product recommendation model is iteratively trained using the loss function value to obtain the product recommendation model.
5. The product recommendation method according to claim 4, characterized in that: The preset loss function includes a first loss sub-function and a second loss sub-function; The first training result includes a sample user node clustering result; the sample user node clustering result includes a plurality of cluster centers. After obtaining the sample user node clustering result, the unsupervised clustering module is further used to: calculate the Euclidean distance between the embedding representation corresponding to each sample user node and the embedding representation corresponding to each cluster center; convert the Euclidean distance into a conditional probability representing similarity as a scoring matrix; increase the confidence of high-probability items in the scoring matrix through a square operation to generate a target distribution; the first loss subfunction is used to reduce the error between the scoring matrix and the target distribution; The second training result includes a training product recommendation result; the second loss sub-function is used to reduce the error between the training product recommendation result and the sample product recommendation result.
6. The product recommendation method according to claim 1, characterized in that: The sum of the number of types of the plurality of nodes and the number of types of the connecting edges is greater than 2.
7. A product recommendation device based on a social network, comprising a processor, a memory, and a computer program / instruction stored in the memory, characterized in that: The processor is configured to execute the computer program / instructions. When the computer program / instructions are executed, the device implements the steps of the product recommendation method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the product recommendation method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the product recommendation method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Personalized recommendation method and system based on meta-path network representation learning
CN113239264A
Recommendation method and device based on heterogeneous relational graph neural network and medium
CN115082142A
Personalized cross-domain recommendation method based on network data driving
CN117556148A