Commodity recommendation method and 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, improve the efficiency and accuracy of the recommendation system, and realize the A more comprehensive exploration of new user interests.

CN119313426AActive Publication Date: 2025-01-14江西省通讯终端产业技术研究院有限公司 +1
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202411344686.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

Existing recommendation systems are prone to cold start problems when new users recommend it, and it is difficult to provide accurate recommendations, especially with high requirements for data volume and data quality.

Method used

Using heterogeneous graph neural networks combined with social networks, the graph attention autoencoder, unsupervised clustering module and product recommendation module cooperate with each other to explore the interests and preferences of target users, use social relationships to recommend, and reduce the quality of high-quality data. rely.

Benefits of technology

It improves the efficiency and accuracy of new users' recommendations, solves the cold start problem, and improves the accuracy of recommendations by fully digging out semantic information in the heterogeneous graph matrix.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313426A_ABST
    Figure CN119313426A_ABST
Patent Text Reader

Abstract

The invention provides a commodity recommendation method and device, a storage medium and a program product, and relates to the technical field of computers.The method comprises the steps that a heterogeneous graph matrix corresponding to a target user is obtained, and the heterogeneous graph matrix comprises a plurality of nodes and connecting edges connecting the nodes; the plurality of nodes comprise user nodes and commodity nodes; obtaining a pre-trained commodity recommendation model, wherein the commodity recommendation model comprises a graph attention auto-encoder module, an unsupervised clustering module and a commodity recommendation module; the graph attention auto-encoder module is used for obtaining an embedded matrix corresponding to a user node; the unsupervised clustering module is used for obtaining a user node clustering result based on the embedded matrix; the commodity recommendation module is used for determining a user weight based on a user node clustering result, generating a commodity score with the interaction weight and recommending a commodity based on the commodity score; inputting the heterogeneous graph matrix into a commodity recommendation model to obtain a commodity recommendation result corresponding to the target user; the problem that accurate recommendation is difficult to provide when new users are recommended can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a commodity recommendation method, device, storage medium and program product. Background Art

[0002] As a powerful information filtering technology, the recommendation system has become more widely used with the continuous development of the Internet and the continuous increase in data scale, covering multiple fields such as e-commerce, social media, music, and video streaming, bringing users a more intelligent and convenient experience. Its core goal is to predict the items or content that users may be interested in, and present these recommendations to users accurately, 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., as well as relevant information about items such as descriptions, tags, categories, etc., the recommendation system can gain insight into user preferences and interests and tailor recommended 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 products with similar interests to the current user, so as to recommend products that may be of interest 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 based on user characteristics in the subsequent prediction stage.

[0004] However, both content-based and model-based recommendation methods have high requirements on the amount and quality of user data when making recommendations, are easily troubled by cold start problems, and have difficulty in providing accurate recommendations for new users. Summary of the invention

[0005] In view of this, embodiments of the present invention provide a product recommendation method, device, storage medium, and program product to eliminate or improve one or more defects in the prior art.

[0006] One aspect of the present invention provides a product recommendation method, the method comprising the following steps:

[0007] Obtain a heterogeneous graph matrix corresponding to the target user, wherein the heterogeneous graph matrix includes a plurality of nodes and connection edges connecting the nodes; wherein the plurality of nodes include user nodes and commodity nodes; the user nodes include a target user node corresponding to the target user, and neighbor user nodes associated with the target user node;

[0008] A pre-trained product recommendation model is obtained, and the product recommendation model includes a graph attention autoencoder module, an unsupervised clustering module, and a product recommendation module; the graph attention autoencoder module is used to obtain the embedding aggregation result corresponding to the user node based on the mutual relationship between several nodes and connecting 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 user nodes based on the embedding matrix to obtain the 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 product ratings based on the user weights and the interaction weights, and recommend products based on the product ratings;

[0009] The heterogeneous graph matrix is ​​input into the product recommendation model to obtain the product recommendation results corresponding to the target users.

[0010] In some embodiments of the present invention, 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; based on the mutual relationship between a number of nodes and connecting edges in the heterogeneous graph matrix, the embedding aggregation result corresponding to the user node is obtained, including:

[0011] Determine the mth user node as the main node; wherein m is a positive integer from 1 to n;

[0012] Based on the main node, the preset meta-path is matched with the heterogeneous graph matrix, and the meta-path instance is extracted from the heterogeneous graph matrix according to the preset meta-path; each meta-path instance includes the main node and the neighboring nodes corresponding to the main node;

[0013] Perform feature transformation on each meta-path instance to obtain the latent vector corresponding to each meta-path instance;

[0014] Based on the weighted sum of the latent vector corresponding to each meta-path instance and the weight of the main node corresponding to each meta-path instance, the node-level embedding aggregation result corresponding to the main node in each meta-path instance is obtained;

[0015] Calculate 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;

[0016] Based on the intermediate representation corresponding to each meta-path instance, determine the meta-path weight corresponding to each meta-path instance;

[0017] Based on 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, a weighted sum is performed to obtain the intermediate representation corresponding to the main node;

[0018] Project the intermediate representation into a vector space with the desired output dimension to obtain the embedding representation corresponding to the main nodes;

[0019] When m is not equal to n, let m=m+1, and execute the step of determining the mth user node as the main node.

[0020] In some embodiments of the present invention, when m is equal to n, obtaining an embedding matrix based on the embedding representation includes:

[0021] Update the embedding representation corresponding to each main node to the user node in the heterogeneous graph matrix;

[0022] Generate an embedding matrix based on the updated embedding representation of the user node.

[0023] In some embodiments of the present invention, a commodity node includes an instance node and a category node; a 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 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 product recommendation model includes:

[0025] Obtain a sample heterogeneous matrix diagram; the sample heterogeneous matrix diagram 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 diagram;

[0026] Input the sample heterogeneous matrix diagram into the 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 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;

[0027] Based on the first training result, the second training result, the sample product recommendation result and the preset loss function, a loss function value is obtained;

[0028] The initial product recommendation model is iteratively trained using the loss function value to obtain a product 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 a sample user node clustering result; the sample user node clustering result includes a number 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; improve the confidence of high probability items in the scoring matrix by 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;

[0031] The second training result includes a training product recommendation result; and the second loss sub-function is used to reduce the error between the training product recommendation result and the sample product 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 connecting edges is greater than 2.

[0033] Another aspect of the present invention provides a product recommendation device based on a social network, including a processor, a memory, and a computer program / instruction stored in the memory, the processor is used to execute the computer program / instruction, and when the computer program / instruction is executed, the device implements the steps of the aforementioned product recommendation method.

[0034] Another aspect of the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the aforementioned product recommendation method when executed by a processor.

[0035] Another aspect of the present invention provides a computer program product, including a computer program / instruction, which implements the steps of the aforementioned product recommendation method when executed by a processor.

[0036] The commodity recommendation method, device, storage medium and program product of the present invention can solve the problem that the requirements for data volume and data quality are high when recommending, and it is easy to be troubled by the cold start problem, and it is difficult to provide accurate recommendations when recommending to new users; by combining heterogeneous graph neural networks and social networks, the interests and preferences of target users are more comprehensively mined, and recommendations are made based on users who have direct or indirect social relationships with the target users. In this way, when recommending to new target users, if it is impossible to accurately recommend based on the sparse historical data of the target users, similar users with interactive behaviors such as friends of the target users can be mined based 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 increasing the efficiency and accuracy of commodity recommendations; at the same time, the graph attention autoencoder focuses on the important correlations between different data types, fully mines the rich semantic information in the heterogeneous graph matrix, and further improves the accuracy of recommendations; 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 autoencoder, the unsupervised clustering module and the commodity recommendation module, the efficiency and accuracy of commodity recommendations can be further improved.

[0037] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0038] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from 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, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0040] Figure 1 A flowchart of a product recommendation method provided by an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of the structure of a heterogeneous graph matrix provided by an embodiment of the present invention;

[0042] Figure 3 Schematic diagram of a flow chart of a graph attention autoencoder provided by an embodiment of the present invention

[0043] Figure 4 A schematic diagram of the structure of a preset meta-path provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of model training provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0046] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0047] It should be emphasized that the term “include / comprises” 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] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0049] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0050] First, several terms involved in the embodiments of the present application are 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 structure data and make full use of the relationship and topological structure of nodes. The core idea of ​​GNN is to learn the representation 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 relationship between nodes and neighbors, 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, each of which has specific meanings and semantics. Heterogeneous graph neural networks introduce embedding technology for different types of nodes and edges, so that each node and edge can be represented in its own way. 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 more comprehensively capture the complex associations in heterogeneous graphs, thereby better understanding and analyzing heterogeneous graph data.

[0054] Meta-path: A meta-path P is defined as (Abbreviated as A1A2…A l+1 ) of the form, which describes the node types A1 and A l+1 The compound relationship between in A composite operator that represents a relation.

[0055] Graph Attention Autoencoder: It is a deep learning model for automatic encoding and feature learning of graph data. It combines the ideas of Autoencoder and GraphAttention Mechanism, aiming to integrate the structural information of graph data into the encoding and decoding process, thereby achieving representation learning of graph data.

[0056] The following is a detailed introduction to the product recommendations provided in this application.

[0057] In some embodiments of the present invention, the executor of the product recommendation provided by this application is an electronic device, which may be a terminal such as a computer, a mobile phone, a tablet computer, a camera, or a server. This embodiment does not limit the implementation method of the electronic device.

[0058] This embodiment provides a product recommendation method, such as Figure 1 As shown, the method at least includes steps S101 to S103:

[0059] Step S101, obtaining a heterogeneous graph matrix corresponding to a target user.

[0060] The topological structure of the heterogeneous graph matrix can be represented as a heterogeneous graph neural network, including a plurality of nodes and edges connecting the nodes. The sum of the number of types of the plurality of nodes and the number of types of the edges is greater than 2.

[0061] In some embodiments of the present invention, several nodes constitute a node type set A, including user nodes and commodity nodes. Connection edges constitute an edge type set R, including connection edges between user nodes and connection edges between user nodes and commodity nodes.

[0062] The connection edges between user nodes are interactive connections constructed based on social network datasets, and the interactive connections between different user nodes correspond to different edge types. Interactive connections include but are not limited to following, private letters / messages, friends, or comments.

[0063] The connection edge between the user node and the product node is an interactive connection constructed based on the e-commerce network dataset. In the actual e-commerce platform, there can be many interactive connections between users and products, including but not limited to clicks, favorites, adding to shopping carts, or purchases.

[0064] In some embodiments of the present invention, a social network dataset refers to a data set containing users and their social relationships, usually including users' personal information, friend relationships, interaction records, etc. These datasets can be obtained through the application programming interface (API) of the social network platform. An e-commerce network dataset refers to a data set containing users, products, and their purchase behaviors, usually including users' purchase records, product information, reviews, etc. These datasets can be obtained through the application programming interface (API) 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 associated with the target user node. The target user refers to the user of the product to be recommended.

[0066] Product nodes include instance nodes and category nodes. Instance nodes represent specific product individuals; category nodes represent product types or categories, such as clothes or mobile phones. The connections between different product individuals are constructed based on the e-commerce network dataset, thereby expanding the connections between different users, providing rich semantic and structural information, and helping to improve the overall performance and effect of product recommendations. Figure 2 The brief structure of the heterogeneous graph matrix is ​​shown, including user nodes, instance nodes, and category nodes.

[0067] Step S102, obtaining a pre-trained product recommendation model.

[0068] In some embodiments of the present invention, the product recommendation model is a heterogeneous graph neural network, including a graph attention autoencoder module, an unsupervised clustering module and a product recommendation module.

[0069] Among them, the graph attention autoencoder module combines the mutual relationship of various data in the heterogeneous graph matrix through the attention mechanism to minimize the recommendation loss and can effectively learn the embedding matrix E~q(E) of the user node. Specifically, the graph attention autoencoder module is used to obtain the embedding aggregation result corresponding to the user node based on the mutual relationship between several nodes and connecting 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, reference Figure 3 ,The graph attention autoencoder module can effectively extract useful features from the heterogeneous graph matrix through three stages of ,extracting subgraphs based on meta-path, aggregating node-level and meta-path level embeddings, and updating node embeddings, ,which provides support for the subsequent user node clustering task of ,unsupervised clustering module.

[0071] Among them, extracting subgraphs based on meta-paths refers to extracting meta-path instances from the heterogeneous graph matrix based on the main nodes and the preset meta-paths. For each user node in the heterogeneous graph matrix, the user node is taken as the main node in turn, and the meta-path instances are extracted by matching with the preset meta-paths in the heterogeneous graph matrix. These instances include the main node and its neighbor nodes. Next, feature transformation is performed on each meta-path instance to obtain a latent vector, and the node-level embedding aggregation result is calculated based on these latent vectors and the weights of the main nodes. Subsequently, the intermediate representations in each meta-path instance are calculated and the meta-path weights are determined, and the intermediate representations are weighted summed. Finally, the intermediate representation is projected into the desired vector space to obtain the embedded representation of the main node. This process is repeated until the embedded representations of all user nodes are generated.

[0072] Specifically, the embedding aggregation results include node-level embedding aggregation results and meta-path-level embedding aggregation results. The user node includes n nodes; n is an integer greater than 1; based on the relationship between several nodes and connecting edges in the heterogeneous graph matrix, the embedding aggregation results corresponding to the user node are obtained, including: determining the mth user node as the main node; m is a positive integer from 1 to n in sequence; based on the main node, matching the preset meta-path with the heterogeneous graph matrix, and extracting 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 neighboring nodes corresponding to the main node; performing feature transformation on each meta-path instance to obtain the latent vector corresponding to each meta-path instance; based on the 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, the meta-path instance is obtained. to the node-level embedding aggregation result corresponding to the main node in each meta-path instance; respectively calculate 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 determine the meta-path weight corresponding to each meta-path instance; based on 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, perform weighted summation to obtain the intermediate representation corresponding to the main node; project the intermediate representation to the vector space with the desired output dimension to obtain the embedding representation corresponding to the main node; when m is not equal to n, set m=m+1 and execute the step of determining the mth user node as the main node.

[0073] In which, when m is equal to n, an embedding matrix is ​​obtained based on the embedding representation, including: updating the embedding representation corresponding to each main node to the corresponding user node in the heterogeneous graph matrix respectively; and generating the embedding matrix based on the embedded representation of the updated user node.

[0074] Since different node types may have different feature vector dimensions, even if they happen to have the same dimension, they may be located in different feature spaces. Based on this, in order to facilitate subsequent analysis and processing, before extracting meta-path instances, it is necessary to project different types of node features into the same latent vector space and transform the node content. The specific implementation method is shown in the following formula:

[0075]

[0076] In the formula, h′ v is the potential 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 subgraphs required for subsequent processing are extracted from the heterogeneous graph matrix according to the pre-set meta-paths, i.e., meta-path instances. 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 to 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, the neighbor nodes include neighbor user nodes; the first preset meta-path explores the social relationships between users, and is used to mine potential friends or idols of target users through heterogeneous graph matrices, understand the social relationships between users, and provide more diverse information for the recommendation system. For example, if user a follows user b, it means that user b has a certain attraction to user a, and there is a possibility of having a certain influence on user a's preference.

[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 preset meta-path and the third preset meta-path, the connection between user nodes is established through the connection between user nodes and product nodes, and the information in the e-commerce network is explored to mine the preferences of different users. By analyzing the interactive behavior between users and products, users' preferences for products can be understood. At the same time, by building connections between products through product categories, the breadth of information dissemination can be expanded, so that a single user node can obtain richer information. By integrating information obtained from different semantic perspectives, the similarity between users can be measured. By comparing the common interests and behavior patterns between users, products that meet their preferences can be recommended to users more accurately.

[0082] In actual implementation, the heterogeneous matrix graph may also include other types of nodes, such as text content nodes or image nodes, etc. Correspondingly, 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 instance corresponding to the current main node according to the preset meta-path, it is necessary to perform the node-level and meta-path-level embedding aggregation stage of the main node. Among them, node-level embedding aggregation refers to using a linear encoder (LinearEncoder) to convert all node features along the meta-path instance into a single vector. The specific implementation method is shown in the following formula:

[0084]

[0085] Where P(v,u) represents a 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 potential vector corresponding to the main node v; h′ u represents the potential vector corresponding to the neighbor user node u in the neighbor node; h′ t represents the potential vector corresponding to the commodity node t in the neighbor node 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, i.e., the nodes between the main node v and the neighboring user node u; f θ () represents a 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 use the normalized weights The weighted sum of all meta-path instances is output through the activation function σ to obtain the node-level embedding aggregation result of the main node v 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); It is represented as the set of neighbor user nodes associated with the primary node v on the meta-path instance P(v,u); represents the normalized weight. It can be expressed by the following formula:

[0089]

[0090] In the formula, Indicates the importance of the meta-path instance P(v,u) whose neighbor user node is node u to the main node v, where the neighbor user node refers to the user node in the neighbor node corresponding to the main node v in the meta-path instance P(v,u); exp() represents the exponential function; It is represented 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) whose neighbor user node is node s to the main node v. Among them, the meta-path instance P(v,s) whose neighbor user node is node s and the meta-path instance P(v,u) whose neighbor user node is node u have the same corresponding preset meta-path.

[0091] For example, taking the meta-path instance of the second preset meta-path type as an example, including the meta-path instance v-p1-u1 and the meta-path instance v-p2-u2, then Including neighbor user node u1 and neighbor user node u2, neighbor user node u is neighbor user node u1 or neighbor user node u2, neighbor user node s is neighbor user node u1 and neighbor user node u2 in sequence; when neighbor user node u is 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] in, It is expressed 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, node-level embedding aggregation can be used to aggregate the data of nodes and connecting edges within the same type of meta-path instances. Subsequently, 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 separatelyi The average value of the latent vectors of all nodes in i , to summarize each meta-path instance P i ∈P A , the specific implementation method is shown as follows:

[0098]

[0099] Where M A and b A Respectively represent learnable parameters; tanh represents the hyperbolic tangent function; |V A | represents a meta-path instance P i The number of nodes in the node type set A; V A Represents a meta-path instance P i The set of nodes in that belong to the node type set A; Represents a meta-path instance P i The node z in that belongs to the node type set A corresponds to the potential vector.

[0100] Then, the attention mechanism is used to perform weighted summation on all vectors of the main node v for a specific meta-path instance to 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 embedded representation; Represents a meta-path instance p i The relative importance to the node type set A; Represents a meta-path instance P i The main node v in P corresponds to the latent vector; A Represents a collection of meta-path instances; Represents the intermediate representation corresponding to the main node v. Considering that this aggregation involves three different types of meta-path instances, in order to more accurately judge the importance of each meta-path instance, the present invention introduces the path length l to ensure that the weight of the meta-path instance is negatively correlated with the path length l.

[0103] Specifically, It is expressed by the following formula:

[0104]

[0105] In the formula, ep i Represents a meta-path instance p i To the preliminary importance estimate of the node type set A; i Represents a meta-path instance p iThe path length P A represents a 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 preset meta-path set; exp() represents the exponential function. i It is expressed by the following formula:

[0106]

[0107] In the formula, ep i Represents a meta-path instance p i A preliminary importance estimate for the node type set A; The parameterized attention vector for the set of node types A; sp i Represents a meta-path instance p i The average 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 nonlinear function to obtain the final meta-path-level embedding aggregation result. The specific implementation is shown in the following formula:

[0109]

[0110] Where W o is the weight matrix; σ() represents a nonlinear 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 results and the meta-path-level embedding aggregation results, the obtained results are updated to each user node, and then the corresponding embedding matrix E~q(E) is obtained based on the updated embedding information of each user node for use in the subsequent unsupervised clustering module. The attention mechanism enables the model to pay attention to 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 there are no artificially specified labels for nodes, the clustering task is unsupervised and feedback-free in learning, which brings certain difficulties to graph representation learning. Based on this, in the present invention, an unsupervised clustering module is used to dynamically update and optimize the embedded representation of nodes during the clustering process.

[0113] In some embodiments of the present invention, the unsupervised clustering module is used to perform clustering of user nodes based on the embedding matrix to obtain user node clustering results for the product recommendation module to calculate product ratings.

[0114] In some embodiments of the present invention, the product 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 results, 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 product ratings based on the user weights and interaction weights, and recommend products based on the product ratings.

[0115] Among them, user weight is obtained by calculating the Euclidean distance between the embedded representations of user nodes based on the clustering results of user nodes. User weight can quantify the importance of different users to the target user, and is further applied to the score calculation of recommended products in the product recommendation module. Specifically, the calculation of user weight is expressed by the following formula:

[0116]

[0117] In the formula, w ij Represents user u j For user u i User weight of e i Represents user node u i The corresponding low-dimensional embedding vector; e j Represents user node u j The corresponding low-dimensional embedding vector; e j′ Represents user node u in user node i Other user nodes other than .

[0118] In some embodiments of the present invention, the interaction between the user and the product includes at least no interaction, click, favorite, add to cart, purchase, etc. In actual implementation, the interaction between the user and the product may also include multiple purchases, deletion or blocking, etc. This embodiment does not limit the type of interaction between the user and the product.

[0119] In some embodiments of the present invention, each interaction between a user and a product corresponds to a weight, which is expressed as B ui ={0,1,2,3,4}, when a user has multiple interactive behaviors for a product, the weight B ui This weight distribution method aims to establish a hierarchical relationship between 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 items.

[0120] When rating a product, if multiple users interact with a particular product, it can be inferred that the product is likely to be hot-selling and more popular among this type of users. Based on this, in order to reflect this point of view, the impact of multiple users on the product is comprehensively considered and the product rating calculation is implemented through the following formula:

[0121]

[0122] In the formula, Sc ui represents the rating of product i by user u; w uj represents the user weight of user j to user u; B ji represents the interaction weight of user j to product i.

[0123] After obtaining the product scores, the products are recommended based on the product scores. In some embodiments of the present invention, the products are recommended in descending order according to the product scores, or after the products are arranged in descending order according to the product scores, the first preset number of products in the arrangement are recommended in sequence.

[0124] Step S103: input the heterogeneous graph matrix into the product recommendation model to obtain the product recommendation results corresponding to the target user.

[0125] Specifically, first, the heterogeneous graph matrix is ​​input into the graph attention autoencoder, and the graph attention autoencoder outputs the embedding matrix corresponding to the user node; then, the embedding matrix is ​​input into the unsupervised clustering module, and the unsupervised clustering module performs the clustering task of the user nodes to obtain the user node clustering result; finally, the product recommendation module calculates the Euclidean distance between the embedding representation of the same user node and the target user node based on the user node clustering result as the user weight, multiplies the user weight with the interaction behavior weight corresponding to the pre-defined user-product interaction behavior to obtain the product score, and sorts the product scores to obtain the product recommendation results.

[0126] refer to Figure 5 This embodiment provides a method for training a product recommendation model, which includes at least the following steps S201 to S204:

[0127] Step S201, obtaining a sample heterogeneous matrix diagram, wherein the sample heterogeneous matrix diagram includes sample user nodes corresponding to sample users and sample commodity nodes corresponding to sample commodities.

[0128] In some embodiments of the present invention, the sample heterogeneous graph matrix used in 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, 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 sample e-commerce network dataset refers to a data set containing users, products and their purchase behaviors, usually including users' purchase records, product information, evaluations, etc. These data sets can be obtained through the application programming interface (API) of the e-commerce platform.

[0129] Specifically, obtaining a sample heterogeneous graph matrix includes: extracting first user information from a sample social network data set; extracting second user information of a user who interacts with a product from a sample e-commerce network data set; 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 data set to obtain a product instance node set; extracting product category information from the sample e-commerce network data set as a product category node set; extracting interaction relationships between users from the sample social network data set to construct an edge set corresponding to "user-user"; extracting interaction behaviors between users and products from the sample e-commerce network data set to construct an edge set corresponding to "user-product", extracting product attribute information from the sample e-commerce network data set to construct an edge set corresponding to "product-category"; and constructing a sample heterogeneous graph matrix based on 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 diagram into the 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 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.

[0131] Step S203, obtaining a loss function value based on the first training result, the second training result and a preset loss function.

[0132] Among them, the preset loss function is used to jointly optimize the unsupervised clustering module and the product recommendation module to 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, reference Figure 5, the preset loss function includes the first loss sub-function L c and the second loss subfunction L r , expressed by the following formula:

[0134] L=L c +γL r

[0135] Where, L represents the preset loss function; L c represents the first loss function; γ represents the learnable parameter; L r represents the second loss function. The first loss function is expressed by the following formula:

[0136]

[0137] In the formula, Q represents the target distribution; P represents the scoring matrix; q ij Represents user node u i Belongs to cluster category γ j The confidence score of ij Represents user node u i Belongs to cluster category γ j 's rating.

[0138] Specifically, the first training result includes the sample user node clustering result; the sample user node clustering result includes several clustering centers. After obtaining the sample user node clustering result, the unsupervised clustering module is also 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 a scoring matrix P; improve the confidence of high-probability items in the scoring matrix through a square operation to generate a target distribution Q; 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 is initialized by the K-means algorithm to obtain K cluster centers. After that, the score matrix P of the learned embedded user nodes and cluster centers is calculated. The score matrix P represents the user node u i ∈U belongs to the cluster category γ j ∈Γ. Where U represents the set of user nodes and Γ represents the set of cluster categories. The unsupervised clustering module first converts the Euclidean distance between the embedding vectors of the user node and the cluster center into a conditional probability representing similarity. i With cluster center γ j The similarity can be expressed as the conditional probability p ij =P(y=j|i), that is, p ij Represents user node u i Belongs to cluster category γj The specific implementation process is expressed by the following formula:

[0140]

[0141] In the formula, e i Represents user node u i The corresponding low-dimensional embedding vector; γ j Represents the cluster center γ j The corresponding low-dimensional embedding vector; γ j' Represents the cluster center γ j′ The corresponding low-dimensional embedding vector; exp() represents the normalized exponential function (Softmax).

[0142] The probability representation of the rating matrix P of the user node and the cluster center helps to determine the relationship between the user node and the cluster center. A rating with a higher probability indicates that the user node is closer to the corresponding cluster center and therefore has a higher confidence.

[0143] At the same time, in order to enhance the importance of unsupervised clustering, "confidence score" is introduced. To achieve this goal, first, the score matrix P is squared, and then it is converted into a probability distribution using a normalized exponential function (Softmax) to form a target distribution Q, which helps spread the score and makes the "confidence score" more prominent. The calculation process is shown in the following formula:

[0144]

[0145] In the formula, q ij Represents user node u i Belongs to category γ j The confidence score of the target distribution Q; p ij Represents user node u i Belongs to cluster category γ j Rating; p ij′ Represents user node u i Belongs to cluster category γ j′ The score of , j′ takes the value from 0 to k.

[0146] During the training process, the error between the rating matrix P and the target distribution Q is minimized through the first preset sub-function, so that the rating matrix P fits the target distribution Q as much as possible. The first preset sub-function measures the difference between the rating matrix P and the target distribution Q. The training goal is to minimize this difference and continuously iterate and optimize the model so that the rating matrix P better matches the target distribution Q, thereby improving the accuracy and reliability of clustering in 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, the target user is recommended based on the product rating obtained in the previous step to obtain the training product recommendation result, and the recommendation effect is evaluated based on the real sample product recommendation result. Specifically, the second loss sub-function is expressed 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 rating of product i by user u; δ represents the penalty coefficient, which is used to adjust the weight of the penalty item.

[0150] The core idea of ​​the second loss sub-function is the reward mechanism. If the target user interacts with a high-rated product, the recommendation can be considered reliable and should be rewarded. At the same time, a penalty term is introduced in the second loss sub-function. If the target user interacts with a product but the product is not recommended to the target user, 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, iteratively train the initial product recommendation model using the loss function value to obtain a product recommendation model.

[0152] In summary, the commodity recommendation method provided in this embodiment obtains a heterogeneous graph matrix corresponding to the target user, wherein the heterogeneous graph matrix includes a plurality of nodes and connecting edges connecting the nodes; wherein the plurality of nodes include user nodes and commodity nodes; the user nodes include a target user node corresponding to the target user, and a neighbor user node associated with the target user node; obtains a pre-trained commodity recommendation model, wherein the commodity recommendation model includes a graph attention autoencoder module, an unsupervised clustering module and a commodity 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 plurality of nodes and connecting edges in the heterogeneous graph matrix, and obtains an 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 a clustering result of the user nodes; the commodity recommendation module is used to determine the user weight of the neighbor user node for the target user node based on the clustering result of the user node, determine the interaction weight between the user node and the commodity node based on the edge type of the connecting edge between the user node and the commodity node, generate a commodity rating based on the user weight and the interaction weight, and recommend commodities based on the commodity rating; the heterogeneous graph matrix is ​​input into the commodity recommendation model , and obtain the product recommendation results corresponding to the target user; it can solve the problem that the data volume and data quality are high when recommending, it is easy to be troubled by the cold start problem, and it is difficult to provide accurate recommendations for new users; by combining heterogeneous graph neural networks and social networks, the interests and preferences of target users are more comprehensively mined, and recommendations are made based on users who have direct or indirect social relationships with the target users. In this way, when recommending to new target users, if it is impossible to accurately recommend based on the sparse historical data of the target users, similar users with interactive behaviors such as friends of the target users can be mined based on social networks, and recommendations can be made based on this, without relying on a large amount of high-quality data, solving the cold start problem, and increasing the efficiency and accuracy of product recommendations; at the same time, the graph attention autoencoder focuses on the important correlations between different data types, fully mining the rich semantic information in the heterogeneous graph matrix, and further improving the accuracy of recommendations; the unsupervised clustering module can obtain the similarity between users, and jointly optimize the user embedding with the product recommendation module. Through the mutual collaboration of the graph attention autoencoder, the unsupervised clustering module and the product recommendation module, the efficiency and accuracy of product recommendations can be further improved.

[0153] Corresponding to the above method, the present invention also provides a product recommendation device for a social network, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the product recommendation method as described above.

[0154] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned commodity recommendation method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0155] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned product recommendation method when executed by a processor.

[0156] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond 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 function 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 on a transmission medium or a communication link via a data signal carried in a carrier.

[0157] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0158] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0159] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in 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 connection edges connecting the nodes; wherein the plurality of nodes include user nodes and commodity 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 the 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 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 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 score based on the user weight and the interaction weight, and recommend a product based on the product score; The heterogeneous graph matrix is ​​input into the product recommendation model to obtain the product recommendation result corresponding to the target user.

2. The commodity recommendation method according to claim 1, characterized in that: 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 main 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 a neighbor node corresponding to the main node; Performing feature transformation on each meta-path instance respectively to obtain a potential vector corresponding to each meta-path instance; Obtaining a node-level embedding aggregation result corresponding to the main node in each meta-path instance based on a weighted sum of a potential vector corresponding to each meta-path instance and a main node weight 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; Determine, based on the intermediate representation corresponding to each meta-path instance, a 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 embedding aggregation result corresponding to the main node in each meta-path instance, obtaining an intermediate representation corresponding to the main node; Projecting the intermediate representation into a vector space having a desired output dimension to obtain an embedding representation corresponding to the main node; In the case that m is not equal to n, let m=m+1, and execute the step of determining the mth user node as the main node.

3. The commodity recommendation method according to claim 2, characterized in that: In a case where 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.

4. The commodity recommendation method according to claim 2, 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.

5. The commodity recommendation method according to claim 1, characterized in that: The obtaining of the 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 commodity nodes corresponding to sample commodities, as well as sample commodity recommendation results corresponding to the sample heterogeneous matrix diagram; Input the sample heterogeneous matrix diagram 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 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 the preset loss function; The initial product recommendation model is iteratively trained using the loss function value to obtain the product recommendation model.

6. The commodity recommendation method according to claim 5, 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; improve the confidence of high probability items in the scoring matrix by 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; and the second loss sub-function is used to reduce the error between the training product recommendation result and the sample product recommendation result.

7. The commodity 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.

8. A commodity 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 used to execute the computer program / instructions. When the computer program / instructions are executed, the device implements the steps of the product recommendation method as described in any one of claims 1 to 7.

9. 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 as described in any one of claims 1 to 7 are implemented.

10. 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 described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Personalized recommendation method and system based on meta-path network representation learning

    CN113239264A

  • Graph model intelligent commodity recommendation method fusing knowledge graph and user interaction

    CN113362131A

  • Recommendation method and system based on graph contrast learning and social network enhancement

    CN114036406A

  • Shopping network commodity recommendation method and system based on random walk heterogeneous attention

    CN114169975A

  • Sequence recommendation method based on meta-path neighborhood target generalization

    CN114841765A