Commodity recommendation method and apparatus, model training method and apparatus, and device

By using a hyperbolic graph convolutional network to perform neighborhood aggregation processing in hyperbolic space, high-quality user and product feature vectors are generated, which solves the problem of inaccurate recommendations caused by the single data dimension in existing technologies and improves the accuracy and transaction rate of product recommendations.

WO2025200636A1PCT designated stage Publication Date: 2025-10-02CHINA UNIONPAY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/141655
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-25
Filing Date
2024-12-23
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In the prior art, when recommending products based on a user's historical browsing history, the data dimension is single, resulting in duplicate recommendations or recommendations that do not meet user preferences, thereby reducing transaction rates.

Method used

A hyperbolic graph convolutional network is used to perform neighborhood aggregation on the embedding vectors of users and products. A bipartite graph is initialized through a hyperbolic normal distribution function to generate feature vectors of users and products. The hyperbolic graph convolutional network is then used to perform neighborhood aggregation and average pooling to improve recommendation accuracy.

Benefits of technology

By performing neighborhood aggregation in hyperbolic space, high-quality user and product feature vectors are generated, thereby improving the accuracy and transaction rate of product recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141655_02102025_PF_FP_ABST
    Figure CN2024141655_02102025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a commodity recommendation method and apparatus, a model training method and apparatus, and a device, which can be used in the field of artificial intelligence. The commodity recommendation method comprises: acquiring a bipartite graph corresponding to each user and each commodity, and on the basis of a hyperbolic normal distribution function, performing initialization processing on the bipartite graph to obtain a vector set corresponding to the bipartite graph; on the basis of a hyperbolic graph convolution network, performing neighborhood aggregation processing on a user embedding vector of each user, the bipartite graph, and a commodity embedding vector of each commodity, so as to obtain a user feature vector of each user and a commodity feature vector of each commodity; and on the basis of user feature vectors of users and commodity feature vectors of commodities, recommending the commodities to the users. The method of the present application can improve the accuracy of commodity recommendations and the transaction rate.
Need to check novelty before this filing date? Find Prior Art

Description

Product recommendation method, model training method, device and equipment

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 25, 2024, with application number 202410346850.0 and application name “Product recommendation method, model training method, device and equipment”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence, and in particular to a product recommendation method, model training method, device, and equipment. Background Art

[0003] With the continuous development of mobile Internet technology, more and more users like online shopping. In order to increase users' click-through rate on products and online transaction rate, the business platform recommends users' preferred products to them.

[0004] In the prior art, based on the user's historical browsing history and the information of each product, the user's preference for each product is predicted, and a product recommendation list is generated and displayed to the user.

[0005] However, in the above method, product recommendations are made only based on the user's historical browsing history, and the data dimensions used are relatively single, resulting in repeated recommendations of recommended products, or the recommended products do not meet the current user's preferences, and it is impossible to accurately recommend products to users, thereby reducing the transaction rate. Summary of the Invention

[0006] The present application provides a product recommendation method, model training method, device and equipment to solve the problem of inaccurate user preferences for products caused by the introduction of erroneous interaction data and other noise data into the Euclidean graph convolutional network.

[0007] In a first aspect, the present application provides a product recommendation method, the method comprising:

[0008] Obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user; the product embedding vector represents the product; and the bipartite graph represents the interaction between each user and each product;

[0009] Based on a hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product;

[0010] Recommend products to the user based on the user feature vector of the user and the product feature vectors of each of the products.

[0011] In one example, based on a hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product to obtain a user feature vector of each user and a product feature vector of each product, including:

[0012] Based on the L graph convolution layers of the hyperbolic graph convolution network, according to the bipartite graph, a neighborhood aggregation process is performed on the user embedding vector of the user and the product embedding vector of each of the products to obtain L user convolution vectors of the user; at the same time, based on the L graph convolution layers, according to the bipartite graph, a neighborhood aggregation process is performed on the product embedding vector of the product and the user embedding vector of each of the users to obtain L product convolution vectors of the product; wherein the user convolution vector represents the characteristics of the user; the product convolution vector represents the characteristics of the product; and L is a positive integer greater than or equal to 1;

[0013] Based on the average pooling layer of the hyperbolic graph convolutional network, average pooling processing is performed on the L user convolution vectors of the user to obtain the user feature vector of the user; at the same time, based on the average pooling layer, average pooling processing is performed on the L product convolution vectors of the product to obtain the product feature vector of the product.

[0014] In one example, based on the L graph convolution layers of the hyperbolic graph convolution network, neighborhood aggregation processing is performed on the user embedding vector of the user and the product embedding vector of each product according to the bipartite graph to obtain L user convolution vectors of the user; at the same time, based on the L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product and the user embedding vector of each user according to the bipartite graph to obtain L product convolution vectors of the product, including:

[0015] According to the bipartite graph, at least one neighboring product of the user is determined from each of the products, and at least one neighboring user of the product is determined from each of the users; wherein the neighboring products are products that have interacted with the user; and the neighboring users are users that have interacted with the products;

[0016] Based on each of the graph convolutional layers, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain a user convolution vector of the user; at the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain a product convolution vector of the product.

[0017] In one example, the user convolution vector of each user corresponding to the l+1th graph convolution layer is The product convolution vector of each product corresponding to the l+1th graph convolution layer

[0018] in, is the set of adjacent products of the user in each product embedding vector obtained based on the lth graph convolution layer The product embedding vector of each neighborhood product in ; is the product embedding vector in the hyperbolic space with curvature κ The conformal factor; is the set of adjacent users of the product in each user embedding vector obtained based on the lth graph convolution layer The user embedding vector of each neighborhood user in , is the user embedding vector in the hyperbolic space with curvature κ conformal factor.

[0019] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; Wherein, σ is the standard deviation of the hyperbolic normal distribution function.

[0020] In one example, recommending a product to the user based on the user feature vector of the user and the product feature vector of the product includes:

[0021] Determine a distance metric between the user feature vector of the user and the product feature vector of the product; wherein the distance metric represents the user's preference for the product;

[0022] Recommend products to the user based on the distance metrics.

[0023] In a second aspect, the present application provides a model training method for product recommendation, the method comprising:

[0024] Obtain a bipartite graph corresponding to each to-be-trained user and each to-be-trained product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the to-be-trained user; the product embedding vector represents the to-be-trained product; and the bipartite graph represents the interaction between each to-be-trained user and each to-be-trained product.

[0025] The initial model is trained based on each of the user embedding vectors, each of the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is used to process the user embedding vectors, bipartite graph, and product embedding vectors described in the first aspect to recommend products to users.

[0026] In one example, the initial model is trained based on the user embedding vectors, the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network, including:

[0027] Based on the initial model, performing neighborhood aggregation processing on the user embedding vector of each user to be trained, the bipartite graph, and the product embedding vector of each product to be trained to obtain a user feature vector of each user to be trained and a product feature vector of each product to be trained; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product;

[0028] Determining a loss function based on the user feature vector of each to-be-trained user and the product feature vector of each to-be-trained product;

[0029] The initial model is trained according to the loss function to obtain the hyperbolic graph convolutional network.

[0030] In one example, determining a loss function based on the user feature vector of each user to be trained and the product feature vector of each product to be trained includes:

[0031] Performing data enhancement processing on the bipartite graph to obtain a first view and a second view corresponding to the bipartite graph;

[0032] Inputting the first view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a first intermediate vector of the user to be trained and a second intermediate vector of the product to be trained;

[0033] Inputting the second view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a third intermediate vector of the user to be trained and a fourth intermediate vector of the product to be trained;

[0034] The loss function is determined according to each of the user feature vectors, each of the product feature vectors, each of the first intermediate vectors, each of the second intermediate vectors, each of the third intermediate vectors, and each of the fourth intermediate vectors.

[0035] In one example, determining the loss function based on each of the user feature vectors, each of the product feature vectors, each of the first intermediate vectors, each of the second intermediate vectors, each of the third intermediate vectors, and each of the fourth intermediate vectors includes:

[0036] Determining an interval ranking loss based on each of the user feature vectors and each of the product feature vectors; wherein the interval ranking loss represents the spatial interval between each of the user feature vectors and each of the product feature vectors in a hyperbolic space;

[0037] Determining a user self-supervision loss based on each of the first intermediate vectors and each of the third intermediate vectors; wherein the user self-supervision loss represents the similarity between each of the users to be trained;

[0038] Determining a product self-supervision loss based on each of the second intermediate vectors and each of the fourth intermediate vectors; wherein the product self-supervision loss represents the similarity between each of the products to be trained;

[0039] The loss function is determined according to the interval ranking loss, the user self-supervision loss, and the product self-supervision loss.

[0040] In one example, the interval sorting loss Among them, e u is the user feature vector of each user u to be trained, is the set containing all users to be trained, e i is the product feature vector of each training product i preferred by each training user u; is a set of all the products to be trained that are preferred by the user u to be trained; e j For each product to be trained, The product feature vector of each remaining product j to be trained except the products to be trained in ; For each user feature vector e in the hyperbolic space u With each product feature vector e i The induced distance between For each user feature vector e in the hyperbolic space u With each product feature vector e j The induced distance between them; m is a hyperparameter representing the maximum interval set;

[0041] The user self-supervision loss Among them, e′ u is the first intermediate vector of each user u to be trained, e″ u is the third intermediate vector of each user u to be trained; e″ v is the first intermediate vector of each user v to be trained; τ is the temperature;

[0042] The self-monitoring loss of the goods Among them, e′ i is the second intermediate vector of each product i to be trained, e″ i is the fourth intermediate vector of each product i to be trained; e j ″ is the second intermediate vector of each product j to be trained, To include all products to be trained except The set of remaining training items other than the training items in .

[0043] In one example, the loss function in, sorting losses for said intervals; is the user's self-supervision loss; is the self-supervised loss of the product; λ is a hyperparameter used to control model training.

[0044] In one example, training the initial model according to the loss function to obtain the hyperbolic graph convolutional network includes:

[0045] performing shrinkage and updating processing on the user feature vector and the product feature vector according to the loss function to obtain a processed user feature vector and a processed product feature vector;

[0046] The initial model is trained based on the processed user feature vectors and the processed product feature vectors to obtain the hyperbolic graph convolutional network.

[0047] In one example, the processed user feature vector in, is the user feature vector; is the user feature vector The differential operator in the Euclidean space corresponding to the initial model; η is the learning rate; is the user feature vector The corresponding loss function; For the user feature vector Perform shrink operation processing;

[0048] The processed product feature vector in, is the product feature vector; is the product feature vector a differential operator in the Euclidean space corresponding to the initial model; is the product feature vector The corresponding loss function; For the product feature vector Perform shrink operation.

[0049] In one example, based on the initial model, neighborhood aggregation is performed on the user embedding vector of each user to be trained, the bipartite graph, and the product embedding vector of each product to be trained to obtain a user feature vector of each user to be trained and a product feature vector of each product to be trained, including:

[0050] Based on the L graph convolution layers of the initial model, according to the bipartite graph, the user embedding vector of the user to be trained and the product embedding vector of each product to be trained are subjected to neighborhood aggregation processing to obtain L user convolution vectors of the user to be trained; at the same time, based on the L graph convolution layers, according to the bipartite graph, the product embedding vector of the product to be trained and the user embedding vector of each user to be trained are subjected to neighborhood aggregation processing to obtain L product convolution vectors of the product to be trained; wherein the user convolution vector represents the characteristics of the user to be trained; the product convolution vector represents the characteristics of the product to be trained; and L is a positive integer greater than or equal to 1;

[0051] Based on the average pooling layer of the initial model, average pooling processing is performed on the L user convolution vectors of the user to be trained to obtain the user feature vector of the user to be trained; at the same time, based on the average pooling layer, average pooling processing is performed on the L product convolution vectors of the product to be trained to obtain the product feature vector of the product to be trained.

[0052] In one example, based on the L graph convolution layers of the initial model, neighborhood aggregation processing is performed on the user embedding vector of the user to be trained and the product embedding vector of each product to be trained according to the bipartite graph to obtain L user convolution vectors of the user to be trained; at the same time, based on the L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product to be trained and the user embedding vector of each user to be trained according to the bipartite graph to obtain L product convolution vectors of the product to be trained, including:

[0053] According to the bipartite graph, at least one neighboring product of the user to be trained is determined from each of the products to be trained, and at least one neighboring user of the product to be trained is determined from each of the users to be trained; wherein the neighboring products are products to be trained that have interacted with the user to be trained; and the neighboring users are users to be trained that have interacted with the products to be trained;

[0054] Based on each of the graph convolutional layers, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain a user convolution vector of the user to be trained; at the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain a product convolution vector of the product to be trained.

[0055] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; Wherein, σ is the standard deviation of the hyperbolic normal distribution function.

[0056] In a third aspect, the present application provides a product recommendation device, comprising:

[0057] A processing unit is configured to obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user; the product embedding vector represents the product; and the bipartite graph represents the interaction between each user and each product.

[0058] an aggregation unit configured to perform neighborhood aggregation processing on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product based on a hyperbolic graph convolutional network to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product;

[0059] A recommendation unit is configured to recommend products to the user based on the user feature vector of the user and the product feature vectors of each of the products.

[0060] In a fourth aspect, the present application provides a model training device for product recommendation, the device comprising:

[0061] A processing unit is configured to obtain a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained;

[0062] A training unit, configured to train the initial model based on each of the user embedding vectors, each of the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is configured to process the user embedding vectors, the bipartite graph, and the product embedding vectors described in the second aspect to recommend products to the user.

[0063] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0064] The memory stores computer-executable instructions;

[0065] The processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect or the second aspect.

[0066] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect or the second aspect.

[0067] In a seventh aspect, the present application provides a computer program product, comprising: a computer program, the computer program being stored in a readable storage medium, and the computer program being used to implement the method described in the first aspect or the second aspect when executed by a processor.

[0068] The product recommendation method, model training method, device and equipment provided in this application use exponential mapping to obtain the user embedding vectors and product embedding vectors of each user representing the user itself and each product vector representing the product itself, projected into the same hyperbolic space. Based on the hyperbolic graph convolutional network, according to the interaction relationship between each user and each product, the neighborhood aggregation operation is performed on each user embedding vector and each product embedding vector in the hyperbolic space to obtain high-quality user feature vectors and product feature vectors, so as to provide more accurate product preference information for product recommendation, thereby improving the accuracy and transaction rate of product recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0070] FIG1 is a schematic diagram of a framework of a graph collaborative filtering model provided by this application;

[0071] FIG2 is a schematic diagram of a framework of a graph convolutional graph collaborative filtering model provided by this application;

[0072] FIG3 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0073] FIG4 is a flow chart of a product recommendation method provided in an embodiment of the present application;

[0074] FIG5 is a schematic diagram of an implicit collaborative filtering example provided in an embodiment of the present application;

[0075] FIG6 is a schematic diagram of a user-product bipartite graph provided in an embodiment of the present application;

[0076] FIG7 is a flow chart of another product recommendation method provided in an embodiment of the present application;

[0077] FIG8 is a schematic diagram of a hyperbolic graph convolutional network provided in an embodiment of the present application;

[0078] FIG9 is a flow chart of a model training method for product recommendation provided in an embodiment of the present application;

[0079] FIG10 is a schematic diagram of the node degree distribution of a user-product bipartite graph provided in an embodiment of the present application;

[0080] FIG11 is a flow chart of another model training method for product recommendation provided in an embodiment of the present application;

[0081] FIG12 is a schematic diagram of a multi-task learning framework provided in an embodiment of the present application;

[0082] FIG13 is a user-merchant bipartite graph corresponding to a transaction dataset provided in an embodiment of the present application;

[0083] FIG14 is a schematic diagram of the structure of a product recommendation device provided in an embodiment of the present application;

[0084] FIG15 is a schematic diagram of the structure of a model training device for product recommendation provided in an embodiment of the present application;

[0085] FIG16 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.

[0086] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0087] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0088] First, let’s explain the terms involved in this application:

[0089] Manifold: A multidimensional manifold is a topological space in which the neighborhood of each point can be approximated as a multidimensional Euclidean space; spherical model Defined as a manifold.

[0090] Tangent space: For any point, the tangent space at that point is defined as a first-order linear approximation to the manifold around point x.

[0091] Exponential map: This operation essentially provides a way to project points in the tangent space back onto the manifold; the logarithmic map is the inverse operation of the exponential map, which projects points on the manifold into the tangent space; for any point And v≠0, exponential mapping Defined as in, for addition: For any point And y≠x, the inverse operation logarithmic mapping Defined as

[0092] Hyperbolic space: A multidimensional hyperbolic space is a multidimensional Riemannian manifold with negative constant curvature. A Riemannian manifold is a manifold that has a Riemannian metric. The Riemannian metric gives a local measure of angles, curve lengths, surface areas, and volumes.

[0093] conformal

[0094] When the metric When it defines the same angle as another metric g, we say Conformal to g, that is, for any have This is equivalent to the existence of a smooth function λ x : So that for any have We call λ x is the conformal factor.

[0095] With the continuous development of mobile Internet technology, more and more users like online shopping. Currently, based on the business platform, products can be recommended to users based on product information and user information.

[0096] In one example, FIG1 is a schematic diagram of the framework of a graph collaborative filtering model provided by this application. As shown in FIG1, in the graph collaborative filtering model based on Light Graph Convolution (LGC), the parameters to be trained only include the initial embedding representation of the nodes, and the model is trained using a ranking loss function. In the initial stage, is the initial representation of user u, u can be the first user u1, is the initial representation of item i, and e can be the first item e1. Each layer of graph convolution performs a simple weighted aggregation operation on the output of the previous graph convolution layer. By repeatedly stacking the above graph convolution layer L times, together with the initial representation of the node, we obtain a total of K+1 implicit representations. These implicit representations are averaged as the final representation of each user or item, that is, each node, that is, Finally, the prediction result of the model is defined as the inner product of the final embedding representation of the user and the item, that is, The size of this value reflects the ranking of the product recommended by the recommendation system to the corresponding user. The higher the value, the higher the ranking in the recommendation list.

[0097] In another example, Figure 2 is a schematic diagram of the framework of a graph convolutional collaborative filtering model provided by this application. As shown in Figure 2, based on the Hyperbolic Graph Convolution Networks for Collaborative Filtering (HGCF) model, in order to train the model, a hyperbolic margin ranking loss (Hyperbolic Margin Ranking Loss) is proposed, which aims to separate the positive and negative user-item pairs as far as possible from a given interval distance. For user u and item i, we first sample from a multivariate Gaussian distribution to obtain vectors containing multiple users and multiple items respectively: then, perform concatenation operations respectively; project them from the Euclidean space to the hyperbolic space through exponential mapping; denote {θ u} u∈U and {θ i} i∈I are the initial embedding representations of user u and item i respectively; the output of the graph convolution at layer l is defined as: is the user vector and; is the product vector and; and, the input of the first layer of graph convolutional network is defined as Sum up the outputs of each convolutional layer: Among them, L is the total number of layers; finally, these implicit representations are projected back to the hyperbolic space through the exponential mapping to serve as the hyperbolic embedding representation ψ of the final user u =exp o (z u ), the hyperbolic embedding representation of the product ψ i =exp o (z i ); The neighborhood aggregation operation and skip connection summary of the entire hyperbolic skip connection graph convolutional network are run in the tangent space at the origin, using the hyperbolic distance To estimate the similarity between users and products, the smaller the value, the more user u likes product i; where l and L are integers greater than or equal to 1.

[0098] However, in the above methods, on the one hand, by simplifying the traditional graph convolutional network or using the traditional Euclidean graph convolutional network, only retaining the neighborhood aggregation operation, and introducing skip connection and average pooling technology, modeling the preference relationship between users and products in the Euclidean space will cause distortion of the node learned representation, causing the model to focus too much on the head products (high-degree items) and ignore the large number of long-tail products (long-tail items) with less interactions; on the other hand, projecting the node embedding representation onto the tangent space will introduce computational errors, and when the user may mistakenly click on some products that he is not actually interested in, resulting in the introduction of incorrect preference information, the neighborhood aggregation operation that the graph convolutional network relies on is more sensitive to noise edges, and a small number of erroneous associations may mislead the model training and reasoning; thus, it is impossible to accurately recommend products to users.

[0099] The product recommendation method, model training method, device and equipment provided in this application are intended to solve the above technical problems in the prior art.

[0100] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0101] Figure 3 is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in Figure 3, the scenario includes an electronic device 101 and at least one user 102. Each user 102 can conduct online shopping through electronic device 101. Electronic device 101 can randomly generate a user vector representing each user 102 and a product vector representing each product included in an online webpage, and then process these vectors to accurately recommend one or more products from the various products included in the online webpage to the user.

[0102] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0103] FIG4 is a flow chart of a product recommendation method provided in an embodiment of the present application. As shown in FIG4 , the method includes:

[0104] 201. Obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user itself; the product embedding vector represents the product itself; and the bipartite graph represents the interaction between each user and each product.

[0105] Exemplarily, the execution subject of this embodiment may be an electronic device. The electronic device will obtain the corresponding interaction data between multiple users and multiple commodities to be recommended, and generate a bipartite graph corresponding to each user and each commodity to characterize the interaction between each user and each commodity. For example, FIG5 is a schematic diagram of an implicit collaborative filtering example provided in an embodiment of the present application, and FIG6 is a schematic diagram of a user-commodity bipartite graph provided in an embodiment of the present application; as shown in FIG5 and FIG6, given m users and n commodities, the interaction relationship between them can be constructed as a sparse matrix. According to the interaction data or interaction records between each user and each commodity, user 1 has purchased or browsed commodity 1, which means that user 1 has interacted with the commodity, that is, there is an interaction relationship; furthermore, it can be known that the user's preferred commodity or the interaction relationship between the user and the commodity is not yet clear. Therefore, it is necessary to recommend several commodities that the user is most likely to like from the commodity set with which he has not yet interacted, which is implicit collaborative filtering. The electronic device can initialize the identity of each user on the bipartite graph based on the hyperbolic normal distribution function according to the identity of each user, and randomly generate a user embedding vector for each user to represent the user itself. At the same time, the electronic device can initialize the identity of each commodity on the bipartite graph based on the hyperbolic normal distribution function according to the identity of each commodity, and randomly generate a product embedding vector for each commodity to represent the commodity itself.

[0106] For example, in order to reduce calculation errors, electronic devices use hyperbolic wrapped normal distribution for initialization. That is, if the sample (user or product) Obeying the hyperbolic packing normal distribution, its value satisfies Then, the probability density of the hyperbolic packing normal distribution is The tangent space that will be located at the mean μ The Gaussian normal distribution in is projected into the hyperbolic space by exponential mapping; where The tangent space between two points μ,z∈ Inductive distance within; is the commonality factor of points μ in the hyperbolic space with curvature κ.

[0107] 202. Based on the hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents the feature information of the user; and the product feature vector represents the feature information of the product.

[0108] Exemplarily, the electronic device calls a hyperbolic graph convolutional network, and based on the hyperbolic graph convolutional network, performs neighborhood aggregation processing on the user embedding vector of each user according to the interaction between each user and each product indicated by the bipartite graph. For example, for each user, users with similar interaction situations with each product of the user are determined according to the bipartite graph, such as one or more users whose interacted products are consistent with those of the user, and the user embedding vectors of these users are subjected to neighborhood aggregation processing to obtain the user feature vector of the user to characterize the feature information of the user; at the same time, based on the hyperbolic graph convolutional network, the product embedding vector of each product is subjected to neighborhood aggregation processing according to the interaction between each user and each product indicated by the bipartite graph. For example, for each product, products with similar interaction situations with each user of the product are determined according to the bipartite graph, such as one or more products whose interacted users are consistent with those of the product, and the product embedding vectors of these products are subjected to neighborhood aggregation processing to obtain the product feature vector of the product to characterize the feature information of the product; thereby obtaining an accurate feature representation that contains and characterizes user features and merchant features.

[0109] 203. Recommend products to the user based on the user feature vector and the product feature vectors of each product.

[0110] Exemplarily, for each user, the electronic device processes the obtained user feature vector of the user and the product feature vector of each product. For example, the electronic device can calculate the similarity or distance between the user feature vector of the user and the product feature vector of each product in the same hyperbolic space, and then determine the user's preference for each product. Based on this, the electronic device accurately recommends to the user products that the user prefers more from among the products that the user has not interacted with.

[0111] In this embodiment, a product recommendation method is provided, in which each user vector representing the user itself and each product vector representing the product itself are exponentially mapped to obtain each user embedding vector and each product embedding vector projected into the same hyperbolic space. Based on the hyperbolic graph convolutional network, according to the interaction relationship between each user and each product, a neighborhood aggregation operation is performed on each user embedding vector and each product embedding vector in the hyperbolic space to obtain high-quality user feature vectors and product feature vectors, thereby providing more accurate product preference information for product recommendation, thereby improving the accuracy and transaction rate of product recommendations.

[0112] FIG7 is a flow chart of another product recommendation method provided in an embodiment of the present application. As shown in FIG7 , the method includes:

[0113] 301. Obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user itself; the product embedding vector represents the product itself; and the bipartite graph represents the interaction between each user and each product.

[0114] For example, this step may refer to step 201 and will not be described in detail.

[0115] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; where σ is the standard deviation of the hyperbolic normal distribution function.

[0116] For example, the electronic device uses a hyperbolic packing normal distribution for initialization, that is, each user embedding vector and each product embedding vector obtained have a mean of 0 and a variance of σ 2 Hyperbolic package normal distribution.

[0117] 302. Based on L graph convolution layers of a hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of the user and the product embedding vector of each product according to a bipartite graph to obtain L user convolution vectors of the user. Simultaneously, based on L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product and the user embedding vector of each user according to the bipartite graph to obtain L product convolution vectors of the product. The user convolution vector represents the characteristics of the user; the product convolution vector represents the characteristics of the product; and L is a positive integer greater than or equal to 1.

[0118] Exemplarily, the electronic device calls a hyperbolic graph convolutional network, in which multiple layers of graph convolutional layers are set to perform the most basic neighborhood aggregation operation, that is, based on the L graph convolutional layers of the hyperbolic graph convolutional network, L is a positive integer greater than or equal to 1; each graph convolutional layer performs neighborhood aggregation processing on the user embedding vector of each user according to the interaction relationship between the product and the user represented by the bipartite graph, and then obtains the user convolution vector of each user corresponding to each graph convolutional layer, that is, L user convolution vectors corresponding to each user, to represent the characteristics of each user; at the same time, based on the L graph convolutional layers of the hyperbolic graph convolutional network, each graph convolutional layer performs neighborhood aggregation processing on the product embedding vector of each product according to the interaction relationship between the product and the user represented by the bipartite graph, and then obtains the product convolution vector of each product corresponding to each graph convolutional layer, that is, L product convolution vectors corresponding to each product, to represent the characteristics of each product for processing.

[0119] In one example, step 302 includes the following steps:

[0120] In step 302 , the first step is to determine, based on the bipartite graph, at least one neighboring product of the user from each product, and at least one neighboring user of the product from each user. A neighboring product is a product with which the user has interacted, and a neighboring user is a user who has interacted with the product.

[0121] The second step of step 302 is to determine, based on the bipartite graph, at least one neighboring product of the user from each product, and at least one neighboring user of the product from each user; wherein a neighboring product is a product with which the user has interacted, and a neighboring user is a user who has interacted with the product.

[0122] Specifically, based on the interaction situation represented by the bipartite graph, the electronic device can determine, for each user, one or more commodities that interact with the user from various commodities, namely, neighboring commodities, and for each commodity, determine, from various users, one or more users that interact with the commodity, namely, neighboring users. Based on each graph convolution layer, for each user, the user embedding vector of the user and the commodity embedding vector of each neighboring commodity of the user are aggregated to obtain the user convolution vector of the user; at the same time, for each commodity, the commodity embedding vector of the commodity and the user embedding vector of each neighboring user of the commodity are aggregated to obtain the commodity convolution vector of the commodity. Among them, each graph convolution layer performs convolution processing based on the convolution result output by the previous graph convolution layer to obtain the convolution result output by the graph convolution layer, that is, it can be calculated according to the iterative calculation formula of the l+1th layer hyperbolic graph convolution network. in, ‖·‖2 represents the Euclidean vector Norm; get the user convolution vector of each user corresponding to the l+1th graph convolution layer According to the formula The product convolution vector of each product corresponding to the l+1th graph convolution layer in, is the set of adjacent products of the user in each product embedding vector obtained based on the lth graph convolution layer The product embedding vector of each neighborhood product in ; is the product embedding vector in the hyperbolic space with curvature κ The conformal factor; is the set of adjacent users of the product in each user embedding vector obtained based on the lth graph convolution layer The user embedding vector of each neighborhood user in , is the user embedding vector in the hyperbolic space with curvature κ By repeatedly stacking the above graph convolution layers, the hyperbolic graph convolutional network can fully capture the topological information contained in the user-item bipartite graph, thereby obtaining more accurate user and item representations.

[0123] 303. Based on the average pooling layer of the hyperbolic graph convolutional network, average pooling processing is performed on the L user convolution vectors of the user to obtain the user feature vector of the user. At the same time, based on the average pooling layer, average pooling processing is performed on the L product convolution vectors of the product to obtain the product feature vector of the product.

[0124] For example, FIG8 is a schematic diagram of a hyperbolic graph convolutional network provided by an embodiment of the present application. As shown in FIG8 , based on the hyperbolic graph convolutional network, an average-pooling layer is added after the last graph convolution layer. For each user, the L user convolution vectors of the user obtained in the previous layers are aggregated through skip connections and average pooling is performed to obtain the user feature vector of the user. At the same time, for each product, the L product convolution vectors of the product obtained in the previous layers are aggregated through skip connections and average pooling is performed to obtain the product feature vector of the product. For example, if the total number of graph convolutional layers is L, then the user feature vector of each user is Product feature vector for each product Through average pooling, the hyperbolic graph convolutional network model can fully perceive the low-order and high-order topological structures contained in the user-item bipartite graph. On the other hand, the hyperbolic graph convolutional network can better resist the adverse effects of over-smoothing on prediction performance and reduce computational errors.

[0125] 304. Determine a distance metric between the user feature vector of the user and the product feature vector of the product; wherein the distance metric represents the user's preference for the product.

[0126] For example, for each user, the electronic device calculates the distance metric between the user feature vector and the product feature vector of each product at the spatial level based on the user feature vector of the user and the product feature vector of each product to represent the user's preference for the product; for example, in the spherical space corresponding to the hyperbolic graph convolutional network, the formula User feature vector e for the user u and the commodity feature vector e of the commodity i The calculation process is performed to obtain the induced distance between the two points at the spherical space level; for example, two points on the Poincaré sphere The induced distance between

[0127] 305. Recommend products to the user based on the distance metrics.

[0128] For example, based on the distance measurement between the user feature vector of each user and the product feature vector of each product, the larger the value, that is, the smaller the distance between the vectors, indicates that the user may prefer the product more, and the product can be recommended to the user; conversely, the smaller the value, that is, the larger the distance between the embedded vectors, it is inferred that the user may not like the product, and the product can be not recommended to the user, so as to improve the accuracy of product recommendations.

[0129] In this embodiment, based on the above embodiment, neighborhood aggregation and average pooling are performed on each user embedding vector and each product embedding vector respectively through the multi-layer graph convolution layer and average pooling layer of the hyperbolic graph convolution network. On the one hand, the hyperbolic graph convolution network can fully perceive the low-order and high-order topological structures contained in the user-product bipartite graph to obtain a more accurate and comprehensive feature vector of the represented features for product recommendation processing; on the other hand, based on the hyperbolic graph convolution network, it can better resist the adverse effects of the over-smoothing process, thereby reducing calculation errors to improve the accuracy of product recommendations, and thus improve the transaction rate.

[0130] FIG9 is a flow chart of a model training method for product recommendation provided in an embodiment of the present application. As shown in FIG9 , the method includes:

[0131] 401. Obtain a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained.

[0132] Exemplarily, the execution subject of this embodiment may be an electronic device. In order to obtain an accurate model for product recommendation, the electronic device obtains the corresponding interaction data between multiple users to be trained and multiple products to be trained, and generates a bipartite graph corresponding to each user to be trained and each product to be trained, so as to characterize the interaction between each user to be trained and each product to be trained. The electronic device can initialize the identifier of each user to be trained on the bipartite graph based on the hyperbolic normal distribution function according to the identifier of each user to be trained, and randomly generate a user embedding vector for each user to be trained to characterize the user to be trained itself. At the same time, the electronic device can initialize the identifier of each product to be trained on the bipartite graph based on the hyperbolic normal distribution function according to the identifier of each product to be trained, and randomly generate a product embedding vector for each product to be trained to characterize the product to be trained itself.

[0133] 402. The initial model is trained based on the user embedding vectors, the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network. The hyperbolic graph convolutional network is used to process the user embedding vectors, the bipartite graph, and the product embedding vectors in the product recommendation method to recommend products to the user.

[0134] Exemplarily, the electronic device calls the initial model, which is an initial hyperbolic graph convolutional network. By inputting each user embedding vector, each product embedding vector, and a bipartite graph into the initial model for convolution processing, the initial model is trained for multiple rounds so that the trained model meets the preset conditions, and then a hyperbolic graph convolutional network can be obtained. The hyperbolic graph convolutional network can be used to process the user embedding vector, bipartite graph, and product embedding vector in the product recommendation method to recommend products to users.

[0135] For example, we test the hyperbolic graph convolutional network based on five public datasets. The statistics of the datasets are shown in Table 1.

[0136] Among them, Figure 10 is a schematic diagram of the node degree distribution of a user-item bipartite graph provided by an embodiment of the present application. As shown in Figure 10, for each data set, 80% of each user's interactions are randomly selected as the training set, and the rest are used as the test set. For each user in the test set, all products that have not interacted with the user are regarded as negative samples; six evaluation indicators commonly used in the field of recommendation systems can be used: precision, recall, average precision mean, average reciprocal rank, hit rate, and normalized cumulative loss gain; the performance comparison results of each model are shown in Table 2, reflecting the effectiveness of the hyperbolic graph convolutional network model for implicit feedback collaborative filtering tasks.

[0137] Table 1 Dataset statistics

[0138] Table 2 Performance comparison table

[0139] In this embodiment, a model training method for product recommendation is provided, in which each user vector representing the user to be trained and each product vector representing the product to be trained are subjected to exponential mapping to obtain user embedding vectors and product embedding vectors projected into the same hyperbolic space. Based on the interaction relationship between each user to be trained and each product to be trained, as well as the user embedding vectors and product embedding vectors in the hyperbolic space, an initial model is trained to obtain a hyperbolic graph convolutional network. Furthermore, based on the hyperbolic graph convolutional network, high-quality embedding representations of end users and products can be obtained, providing more accurate product preference information for product recommendation, thereby improving the accuracy of product recommendation.

[0140] FIG11 is a flow chart of another model training method for product recommendation provided in an embodiment of the present application. As shown in FIG11 , the method includes:

[0141] 501. Obtain a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained.

[0142] For example, this step may refer to step 401 and will not be described in detail.

[0143] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; where σ is the standard deviation of the hyperbolic normal distribution function.

[0144] For example, the electronic device uses a hyperbolic packing normal distribution for initialization, that is, each user embedding vector and each product embedding vector obtained have a mean of 0 and a variance of σ 2 Hyperbolic package normal distribution.

[0145] 502. Based on the initial model, neighborhood aggregation is performed on the user embedding vector and bipartite graph of each user to be trained, and the product embedding vector of each product to be trained, to obtain a user feature vector of each user to be trained and a product feature vector of each product to be trained; wherein the user feature vector represents the feature information of the user; and the product feature vector represents the feature information of the product.

[0146] Exemplarily, the electronic device calls the initial model, which is an initial hyperbolic graph convolutional network. Multiple layers of graph convolution layers are set in the initial model to perform the most basic neighborhood aggregation operation, that is, based on the L graph convolution layers of the initial model, L is a positive integer greater than or equal to 1; each graph convolution layer performs neighborhood aggregation processing on the user embedding vector of each user to be trained according to the interaction relationship between the product to be trained and the user to be trained represented by the bipartite graph, and then obtains the user convolution vector of each user to be trained corresponding to each graph convolution layer, that is, L user convolution vectors corresponding to each user to be trained, to represent the characteristics of each user to be trained; at the same time, based on the L graph convolution layers of the initial model, each graph convolution layer performs neighborhood aggregation processing on the product embedding vector of each product to be trained according to the interaction relationship between the product to be trained and the user to be trained represented by the bipartite graph, and then obtains the product convolution vector of each product to be trained corresponding to each graph convolution layer, that is, L product convolution vectors corresponding to each product to be trained, to represent the characteristics of each product to be trained, for processing.

[0147] In one example, step 502 includes:

[0148] In the first step of step 502, based on the L graph convolution layers of the initial model, neighborhood aggregation processing is performed on the user embedding vector of the user to be trained and the product embedding vector of each product to be trained according to the bipartite graph to obtain L user convolution vectors of the user to be trained. At the same time, based on the L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product to be trained and the user embedding vector of each user to be trained according to the bipartite graph to obtain L product convolution vectors of the product to be trained. The user convolution vector represents the characteristics of the user to be trained; the product convolution vector represents the characteristics of the product to be trained; and L is a positive integer greater than or equal to 1.

[0149] In the second step of step 502, based on the average pooling layer of the initial model, the L user convolution vectors of the user to be trained are average pooled to obtain the user feature vector of the user to be trained; at the same time, based on the average pooling layer, the L product convolution vectors of the product to be trained are average pooled to obtain the product feature vector of the product to be trained.

[0150] Specifically, the electronic device is based on an initial model, in which multiple layers of graph convolution layers are set to perform the most basic neighborhood aggregation operation, that is, L graph convolution layers based on the initial model, where L is a positive integer greater than or equal to 1; each graph convolution layer performs neighborhood aggregation processing on the user embedding vector of each user to be trained according to the interaction relationship between the product to be trained and the user to be trained represented by the bipartite graph, and then obtains the user convolution vector of each user to be trained corresponding to each graph convolution layer, that is, L user convolution vectors corresponding to each user to be trained, to represent the characteristics of each user to be trained; at the same time, based on the L graph convolution layers of the hyperbolic graph convolution network, each graph convolution layer performs neighborhood aggregation processing on the product embedding vector of each product to be trained according to the interaction relationship between the product to be trained and the user to be trained represented by the bipartite graph, and then obtains the product convolution vector of each product to be trained corresponding to each graph convolution layer, that is, L product convolution vectors corresponding to each product to be trained, to represent the characteristics of each product to be trained, for processing. The initial model adds an average-pooling layer after the last graph convolution layer. For each user to be trained, the L user convolution vectors of the user to be trained obtained in the previous layers are aggregated through skip connections and average pooling is performed to obtain the user feature vector of the user to be trained. At the same time, for each product to be trained, the L product convolution vectors of the product to be trained obtained in the previous layers are aggregated through skip connections and average pooling is performed to obtain the product feature vector of the product to be trained.

[0151] In one example, the first step of step 502 includes:

[0152] Step 1: Based on the bipartite graph, determine at least one neighboring product of the user to be trained from each product to be trained, and determine at least one neighboring user of the product to be trained from each user to be trained. A neighboring product is a product to be trained that has interacted with the user to be trained, and a neighboring user is a user to be trained that has interacted with the product to be trained.

[0153] Step 2: Based on each graph convolution layer, aggregate the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector to obtain the user convolution vector of the user to be trained. At the same time, aggregate the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector to obtain the product convolution vector of the product to be trained.

[0154] Specifically, based on the interactions represented by the bipartite graph, the electronic device can, for each user to be trained, identify one or more training items that interact with the user to be trained from among the various training items, known as neighboring items. Furthermore, for each training item, the electronic device can identify one or more users to be trained that interact with the item to be trained from among the various users to be trained, known as neighboring users. Based on each graph convolutional layer, for each user to be trained, the user embedding vector of the user to be trained and the item embedding vectors of each of the user's neighboring items are aggregated to obtain the user convolution vector of the user to be trained. Simultaneously, for each item to be trained, the item embedding vector of the item to be trained and the user embedding vectors of each of its neighboring users are aggregated to obtain the item convolution vector of the item to be trained.

[0155] 503. Determine a loss function based on the user feature vector of each to-be-trained user and the product feature vector of each to-be-trained product.

[0156] Exemplarily, the electronic device calculates and processes the user feature vector of each user to be trained and the product feature vector of each product to be trained output after each initial model training based on a preset calculation method to obtain the loss function of the initial model for adjusting the training parameters for the next initial model training.

[0157] In one example, step 503 includes the following steps:

[0158] The first step of step 503 is to perform data enhancement processing on the bipartite graph to obtain a first view and a second view corresponding to the bipartite graph.

[0159] In the second step of step 503, the first view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained are input into the initial model to obtain a first intermediate vector of the user to be trained and a second intermediate vector of the product to be trained.

[0160] In the third step of step 503, the second view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained are input into the initial model to obtain a third intermediate vector of the user to be trained and a fourth intermediate vector of the product to be trained.

[0161] The fourth step of step 503 is to determine a loss function based on each user feature vector, each product feature vector, each first intermediate vector, each second intermediate vector, each third intermediate vector, and each fourth intermediate vector.

[0162] For example, while obtaining the user feature vector of each user to be trained and the product feature vector of each product to be trained, edge dropout is used to perform data enhancement on the original user-product bipartite graph to generate two sub-views. For example, for the original bipartite graph We discard some edges with a certain probability. M′ ij ~Bernoulli distribution Bernoulli(ρ); M″ ij ~Bernoulli(ρ); where M′, M″ is the mask matrix and ρ is the discard probability, two bipartite graphs are obtained, namely the first view and the second view. Each bipartite graph contains two node sets, namely the set of users to be trained and the set of products to be trained, which are consistent with the original. However, some edges are missing in each bipartite graph, namely the interaction relationship between some users to be trained and some products to be trained, which helps the initial model to enhance its ability to resist noise interaction. Then, the electronic device inputs the first view, the user embedding vector of each user to be trained, and the product embedding vector of each product to be trained into the hyperbolic graph convolution of the initial model, and performs the user embedding vector of each user to be trained and the product embedding vector of each product to be trained according to the interaction relationship indicated by the first view. Graph convolution processing is performed to obtain a first intermediate vector for each user to be trained and a second intermediate vector for each product to be trained. At the same time, the electronic device inputs the second view, the user embedding vector of each user to be trained, and the product embedding vector of each product to be trained into the initial model. According to the interaction relationship indicated by the second view, the user embedding vector of each user to be trained and the product embedding vector of each product to be trained are subjected to graph convolution processing to obtain a third intermediate vector for each user to be trained and a fourth intermediate vector for each product to be trained. Then, each user feature vector, each product feature vector, each first intermediate vector, each second intermediate vector, each third intermediate vector, and each fourth intermediate vector are calculated to determine the loss function corresponding to this model training.

[0163] In one example, the fourth step of step 503 includes:

[0164] Step 1: Determine the margin ranking loss based on each user feature vector and each product feature vector; wherein the margin ranking loss represents the spatial interval between each user feature vector and each product feature vector in the hyperbolic space.

[0165] Step 2: Determine a user self-supervision loss based on each first intermediate vector and each third intermediate vector; wherein the user self-supervision loss represents the similarity between each user to be trained.

[0166] Step 3: Determine the product self-supervision loss based on each second intermediate vector and each fourth intermediate vector; wherein the product self-supervision loss represents the similarity between each product to be trained.

[0167] Step 4: Determine the loss function based on the interval sorting loss, user self-supervision loss, and product self-supervision loss.

[0168] Specifically, FIG12 is a schematic diagram of a multi-task learning framework provided by an embodiment of the present application. As shown in FIG12 , based on the electronic device, for the current model training, each user feature vector and each product feature vector are calculated and processed to determine the interval sorting loss corresponding to the current model training; wherein, the interval sorting loss represents the spatial interval between each user feature vector and each product feature vector in the hyperbolic space; the interval sorting loss can be calculated according to the formula Among them, e u is the user feature vector of each user u to be trained, is the set containing all users to be trained, e i is the product feature vector of each training product i preferred by each training user u; is a set of all the products to be trained that are preferred by the user u to be trained; e j For each product to be trained, The product feature vector of each remaining product j to be trained except the products to be trained in ; For each user feature vector e in the hyperbolic space u With each product feature vector e i The induced distance between For each user feature vector e in the hyperbolic space u With each product feature vector e j The induced distance between them; m is a hyperparameter representing the maximum interval set; to encourage the vectors of user-item pairs with preference association to be closer, and the vectors of user-item pairs without preference association to be further apart. Based on the electronic device, for the current model training, each first intermediate vector and each third intermediate vector are calculated and processed to obtain the user self-supervision loss of the current model training; wherein, the user self-supervision loss represents the similarity between each user to be trained, and the user self-supervision loss can be calculated according to the formula: User self-supervision loss Among them, e′ uis the first intermediate vector of each user u to be trained, e″ u is the third intermediate vector of each user u to be trained; e″ v is the first intermediate vector of each user v to be trained; τ is the temperature; based on the electronic device, for the current model training, for each second intermediate vector and each fourth intermediate vector, determine the self-supervisory loss of the product for the current model training; wherein, the self-supervisory loss of the product represents the similarity between each product to be trained; and thus, the similarity between the representations of different views of the same node (user to be trained or product to be trained) can be maximized, and the similarity between the representations of different nodes (user to be trained or product to be trained) can be minimized. Based on the electronic device, for the current model training, the obtained interval sorting loss, user self-supervisory loss, and product self-supervisory loss are calculated and processed to obtain the loss function of the current model training; the loss function can be obtained according to the formula in, is the interval sorting loss; Self-monitoring loss for users; is the commodity self-supervision loss; λ is the hyperparameter used to control model training.

[0169] 504. The initial model is trained according to the loss function to obtain a hyperbolic graph convolutional network.

[0170] Exemplarily, the electronic device retrains the initial model based on the loss function of the current model training, and adjusts relevant parameters of the initial model to obtain a hyperbolic graph convolutional network for product recommendation.

[0171] In one example, step 504 includes the following steps:

[0172] The first step of step 504 is to perform shrinkage and update processing on the user feature vector and the product feature vector according to the loss function to obtain a processed user feature vector and a processed product feature vector.

[0173] The second step of step 504 is to train the initial model based on the processed user feature vectors and the processed product feature vectors to obtain a hyperbolic graph convolutional network.

[0174] For example, based on the electronic device, according to the loss function of the current model training, each user feature vector and each product feature vector are subjected to contraction and update processing to obtain the processed user feature vector and the processed product feature vector; specifically, the stochastic gradient descent algorithm can be used, for example, with the parameter corresponding to user u For example, the iterative update formula is: Among them, the gradient It is defined as the Euclidean gradient of the scaled longitude tensor, that is, And, retr θ (·) represents the retraction operation, which is: Then we can get the formula Then we can calculate the user feature vector after each processing in, is the user feature vector; is the user feature vector The differential operator in the Euclidean space corresponding to the initial model; η is the learning rate; is the user feature vector The corresponding loss function; For user feature vector Perform contraction operation; you can also get the formula Then we get the feature vector of each processed product; is the product feature vector; is the product feature vector Differential operators in the Euclidean space corresponding to the initial model; is the product feature vector The corresponding loss function; For product feature vector Then, the electronic device re-inputs each processed user feature vector and each processed product feature vector into the initial model, and retrains the initial model to obtain a hyperbolic graph convolutional network, thereby obtaining higher-quality user and product representations and improving the accuracy of product recommendations.

[0175] For example, we can define a predefined area and use all transactions occurring within that area from January to March as the training set, and transactions occurring in April as the test set. We can see that transaction hotspots are primarily concentrated in commercial streets, subway stations, and student dormitories. Table 3 describes the transactions within the predefined area from January to April.

[0176] Table 3 Transaction data set statistics

[0177] FIG13 is a user-merchant bipartite graph corresponding to a transaction data set provided in an embodiment of the present application. As shown in FIG13 , the transaction data still satisfies the characteristics of a power-law distribution. The performance comparison results of each model are shown in Table 4.

[0178] Table 4. Comparison of model performance based on transaction dataset

[0179] As can be seen from Table 4, more than 31% of the merchants that users are interested in appear in the top 20 recommended merchant lists based on this recommendation method, indicating that this recommendation method can effectively recommend preferred merchants to users, so as to accurately attract users to consume and thus increase transaction volume.

[0180] In this embodiment, based on the above embodiments, on the one hand, the user embedding vector of each user to be trained and the product embedding vector of each product to be trained are respectively subjected to neighborhood aggregation through the multi-layer graph convolution layer of the hyperbolic graph convolution network to train the initial model, so that the trained model can fully perceive the low-order and high-order topological structures contained in the user-product bipartite graph to obtain a more accurate and comprehensive feature vector of the represented features for product recommendation processing; on the other hand, based on the loss function, the initial model is trained to obtain a hyperbolic graph convolution network, which can better resist the adverse effects of the over-smoothing process, thereby reducing calculation errors and improving the accuracy of product recommendations.

[0181] FIG14 is a schematic diagram of the structure of a product recommendation device provided in an embodiment of the present application. As shown in FIG14 , the device includes:

[0182] Processing unit 601 is used to obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user itself; the product embedding vector represents the product itself; and the bipartite graph represents the interaction between each user and each product.

[0183] Aggregation unit 602 is used to perform neighborhood aggregation processing on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product based on the hyperbolic graph convolutional network to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents the feature information of the user; and the product feature vector represents the feature information of the product.

[0184] The recommendation unit 603 is configured to recommend products to the user based on the user feature vector of the user and the product feature vectors of each product.

[0185] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0186] The present application also provides a product recommendation device, which includes:

[0187] A processing unit is configured to obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user; the product embedding vector represents the product; and the bipartite graph represents the interaction between each user and each product.

[0188] The aggregation unit is used to perform neighborhood aggregation processing on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product based on the hyperbolic graph convolutional network to obtain the user feature vector of each user and the product feature vector of each product; wherein the user feature vector represents the feature information of the user; and the product feature vector represents the feature information of the product.

[0189] The recommendation unit is used to recommend products to the user based on the user feature vector and the product feature vector of each product.

[0190] The recommendation unit is used to recommend products to the user based on the user feature vector and the product feature vector of each product.

[0191] In one example, the aggregation unit includes:

[0192] The aggregation module is used to perform neighborhood aggregation processing on the user embedding vector of the user and the product embedding vector of each product based on the bipartite graph based on L graph convolution layers of the hyperbolic graph convolution network to obtain L user convolution vectors of the user; at the same time, based on the L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product and the user embedding vector of each user based on the bipartite graph to obtain L product convolution vectors of the product; wherein the user convolution vector represents the characteristics of the user; the product convolution vector represents the characteristics of the product; and L is a positive integer greater than or equal to 1.

[0193] The pooling module is used to perform average pooling processing on the L user convolution vectors of the user based on the average pooling layer of the hyperbolic graph convolutional network to obtain the user feature vector of the user; at the same time, based on the average pooling layer, it performs average pooling processing on the L product convolution vectors of the product to obtain the product feature vector of the product.

[0194] In one example, the aggregation module is specifically used to:

[0195] Based on the bipartite graph, at least one neighboring product of the user is determined from each product, and at least one neighboring user of the product is determined from each user. The neighboring products are products that have interacted with the user, and the neighboring users are users who have interacted with the products.

[0196] Based on each graph convolution layer, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain the user convolution vector of the user. At the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain the product convolution vector of the product.

[0197] In one example, the user convolution vector of each user corresponding to the l+1th graph convolution layer is The product convolution vector of each product corresponding to the l+1th graph convolution layer

[0198] in, is the set of adjacent products of the user in each product embedding vector obtained based on the lth graph convolution layer The product embedding vector of each neighborhood product in ; is the product embedding vector in the hyperbolic space with curvature κ The conformal factor; is the set of adjacent users of the product in each user embedding vector obtained based on the lth graph convolution layer The user embedding vector of each neighborhood user in , is the user embedding vector in the hyperbolic space with curvature κ conformal factor.

[0199] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; where σ is the standard deviation of the hyperbolic normal distribution function.

[0200] In one example, the recommended unit includes:

[0201] The determination module is used to determine the distance metric between the user feature vector of the user and the product feature vector of the product; wherein the distance metric represents the user's preference for the product.

[0202] The recommendation module is used to recommend products to users based on various distance metrics.

[0203] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0204] FIG15 is a schematic diagram of the structure of a model training device for product recommendation provided in an embodiment of the present application. As shown in FIG15 , the device includes:

[0205] Processing unit 701 is used to obtain a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained.

[0206] A training unit 702 is used to train the initial model based on each user embedding vector, each product embedding vector, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is used to process the user embedding vector, the bipartite graph, and the product embedding vector in the product recommendation method to recommend products to users.

[0207] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0208] The present application also provides a model training device for product recommendation, which includes:

[0209] An acquisition unit is configured to acquire a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained.

[0210] The training unit is used to train the initial model based on the user embedding vectors, the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is used to process the user embedding vectors, the bipartite graph, and the product embedding vectors in the product recommendation device to recommend products to the user.

[0211] In one example, the training unit includes:

[0212] The aggregation module is used to perform neighborhood aggregation processing on the user embedding vector and bipartite graph of each user to be trained, and the product embedding vector of each product to be trained based on the initial model, to obtain the user feature vector of each user to be trained and the product feature vector of each product to be trained; wherein the user feature vector represents the feature information of the user; and the product feature vector represents the feature information of the product.

[0213] The determination module is used to determine the loss function according to the user feature vector of each user to be trained and the product feature vector of each product to be trained.

[0214] The training module is used to train the initial model according to the loss function to obtain a hyperbolic graph convolutional network.

[0215] In one example, the module is determined to include:

[0216] The enhancement submodule is used to perform data enhancement processing on the bipartite graph to obtain a first view and a second view corresponding to the bipartite graph.

[0217] The first processing submodule is configured to input the first view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a first intermediate vector of the user to be trained and a second intermediate vector of the product to be trained.

[0218] The second processing submodule is configured to input the second view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a third intermediate vector of the user to be trained and a fourth intermediate vector of the product to be trained.

[0219] The determination submodule is used to determine a loss function based on each user feature vector, each product feature vector, each first intermediate vector, each second intermediate vector, each third intermediate vector, and each fourth intermediate vector.

[0220] In one example, a submodule is determined for:

[0221] An interval ranking loss is determined based on each user feature vector and each product feature vector. The interval ranking loss represents the spatial interval between each user feature vector and each product feature vector in a hyperbolic space.

[0222] A user self-supervision loss is determined based on each first intermediate vector and each third intermediate vector, wherein the user self-supervision loss represents the similarity between each to-be-trained user.

[0223] A product self-supervision loss is determined based on each second intermediate vector and each fourth intermediate vector. The product self-supervision loss represents the similarity between each product to be trained.

[0224] The loss function is determined based on the interval ranking loss, user self-supervision loss, and product self-supervision loss.

[0225] In one example, the interval ranking loss Among them, e u is the user feature vector of each user u to be trained, is the set containing all users to be trained, e i is the product feature vector of each training product i preferred by each training user u; is a set of all the products to be trained that are preferred by the user u to be trained; e j For each product to be trained, The product feature vector of each remaining product j to be trained except the products to be trained in ; For each user feature vector e in the hyperbolic space u With each product feature vector e i The induced distance between For each user feature vector e in the hyperbolic space u With each product feature vector e j The induced distance between them; m is a hyperparameter representing the maximum interval set.

[0226] User self-supervision loss Among them, e′ u is the first intermediate vector of each user u to be trained, e″ u is the third intermediate vector of each user u to be trained; e″ v is the first intermediate vector of each user v to be trained; τ is the temperature.

[0227] Commodity self-monitoring losses Among them, e′ i is the second intermediate vector of each product i to be trained, e″ i is the fourth intermediate vector of each product i to be trained; e j ″ is the second intermediate vector of each product j to be trained, To include all products to be trained except The set of remaining training items other than the training items in .

[0228] In one example, the loss function in, is the interval sorting loss; Self-monitoring loss for users; is the commodity self-supervision loss; λ is the hyperparameter used to control model training.

[0229] In one example, the training module is specifically used to:

[0230] According to the loss function, the user feature vector and the product feature vector are subjected to shrinkage and update processing to obtain a processed user feature vector and a processed product feature vector.

[0231] The initial model is trained based on the processed user feature vectors and the processed product feature vectors to obtain a hyperbolic graph convolutional network.

[0232] In one example, the processed user feature vector in, is the user feature vector; is the user feature vector The differential operator in the Euclidean space corresponding to the initial model; η is the learning rate; is the user feature vector The corresponding loss function; For user feature vector Perform shrink operation.

[0233] Processed product feature vector in, is the product feature vector; is the product feature vector Differential operators in the Euclidean space corresponding to the initial model; is the product feature vector The corresponding loss function; For product feature vector Perform shrink operation.

[0234] In one example, the aggregation module includes:

[0235] The aggregation submodule is used to perform neighborhood aggregation processing on the user embedding vector of the user to be trained and the product embedding vector of each product to be trained based on the L graph convolution layers of the initial model according to the bipartite graph, so as to obtain L user convolution vectors of the user to be trained; at the same time, based on the L graph convolution layers, neighborhood aggregation processing is performed on the product embedding vector of the product to be trained and the user embedding vector of each user to be trained according to the bipartite graph, so as to obtain L product convolution vectors of the product to be trained; wherein the user convolution vector represents the characteristics of the user to be trained; the product convolution vector represents the characteristics of the product to be trained; and L is a positive integer greater than or equal to 1.

[0236] The pooling submodule is used to perform average pooling processing on the L user convolution vectors of the training user based on the average pooling layer of the initial model to obtain the user feature vector of the training user; at the same time, based on the average pooling layer, it performs average pooling processing on the L product convolution vectors of the training product to obtain the product feature vector of the training product.

[0237] In one example, the aggregation submodule is specifically used to:

[0238] Based on the bipartite graph, at least one neighboring product of the user to be trained is determined from each product to be trained, and at least one neighboring user of the product to be trained is determined from each user to be trained. The neighboring products are the products to be trained that have interacted with the user to be trained, and the neighboring users are the users to be trained that have interacted with the products to be trained.

[0239] Based on each graph convolution layer, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain the user convolution vector of the user to be trained. At the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain the product convolution vector of the product to be trained.

[0240] In one example, the mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; where σ is the standard deviation of the hyperbolic normal distribution function.

[0241] The device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.

[0242] FIG16 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in FIG16 , the electronic device includes: a memory 801 and a processor 802 ; the memory 801 ; and a memory for storing instructions executable by the processor 802 .

[0243] The processor 802 is configured to execute the method provided in the above embodiment.

[0244] The electronic device 800 further includes a receiver 803 and a transmitter 804. The receiver 803 is used to receive instructions and data sent by other devices, and the transmitter 804 is used to send instructions and data to external devices.

[0245] According to an embodiment of the present application, the present application further provides a non-transitory computer-readable storage medium including instructions, such as a memory including instructions, wherein the instructions can be executed by a processor to implement the solution provided by any of the above embodiments. For example, the non-transitory computer-readable storage medium can be a random access memory, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0246] According to an embodiment of the present application, the present application also provides a non-temporary computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor, can complete the solution provided by any of the above embodiments.

[0247] According to an embodiment of the present application, the present application also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor can read the computer program from the readable storage medium, and at least one processor executes the computer program to complete the solution provided by any of the above embodiments.

[0248] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0249] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A product recommendation method, characterized in that: The method comprises: Obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user; the product embedding vector represents the product; and the bipartite graph represents the interaction between each user and each product; Based on a hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product; Recommend products to the user based on the user feature vector of the user and the product feature vectors of each of the products.

2. The method according to claim 1, characterized in that Based on a hyperbolic graph convolutional network, neighborhood aggregation processing is performed on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product to obtain a user feature vector of each user and a product feature vector of each product, including: Based on the L graph convolution layers of the hyperbolic graph convolution network, according to the bipartite graph, a neighborhood aggregation process is performed on the user embedding vector of the user and the product embedding vector of each of the products to obtain L user convolution vectors of the user; at the same time, based on the L graph convolution layers, according to the bipartite graph, a neighborhood aggregation process is performed on the product embedding vector of the product and the user embedding vector of each of the users to obtain L product convolution vectors of the product; wherein the user convolution vector represents the characteristics of the user; the product convolution vector represents the characteristics of the product; and L is a positive integer greater than or equal to 1; Based on the average pooling layer of the hyperbolic graph convolutional network, average pooling processing is performed on the L user convolution vectors of the user to obtain the user feature vector of the user; at the same time, based on the average pooling layer, average pooling processing is performed on the L product convolution vectors of the product to obtain the product feature vector of the product.

3. The method according to claim 2, characterized in that Based on the L graph convolution layers of the hyperbolic graph convolution network, according to the bipartite graph, a neighborhood aggregation process is performed on the user embedding vector of the user and the product embedding vector of each of the products to obtain L user convolution vectors of the user; at the same time, based on the L graph convolution layers, according to the bipartite graph, a neighborhood aggregation process is performed on the product embedding vector of the product and the user embedding vector of each of the users to obtain L product convolution vectors of the product, including: According to the bipartite graph, at least one neighboring product of the user is determined from each of the products, and at least one neighboring user of the product is determined from each of the users; wherein the neighboring products are products that have interacted with the user; and the neighboring users are users that have interacted with the products; Based on each of the graph convolutional layers, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain a user convolution vector of the user; at the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain a product convolution vector of the product.

4. The method according to claim 3, characterized in that The user convolution vector of each user corresponding to the l+1th graph convolution layer The product convolution vector of each product corresponding to the l+1th graph convolution layer in, is the set of adjacent products of the user in each product embedding vector obtained based on the lth graph convolution layer The product embedding vector of each neighborhood product in ; is the product embedding vector in the hyperbolic space with curvature κ The conformal factor; is the set of adjacent users of the product in each user embedding vector obtained based on the lth graph convolution layer The user embedding vector of each neighborhood user in , is the user embedding vector in the hyperbolic space with curvature κ conformal factor.

5. The method according to claim 1, wherein The mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; Wherein, σ is the standard deviation of the hyperbolic normal distribution function.

6. The method according to any one of claims 1 to 5, characterized in that Recommending products to the user based on the user feature vector of the user and the product feature vector of the product, including: Determine a distance metric between the user feature vector of the user and the product feature vector of the product; wherein the distance metric represents the user's preference for the product; Recommend products to the user based on the distance metrics.

7. A model training method for product recommendation, characterized in that: The method comprises: Obtain a bipartite graph corresponding to each to-be-trained user and each to-be-trained product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the to-be-trained user; the product embedding vector represents the to-be-trained product; and the bipartite graph represents the interaction between each to-be-trained user and each to-be-trained product. The initial model is trained based on each of the user embedding vectors, each of the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is used to process the user embedding vector, bipartite graph, and product embedding vector described in any one of claims 1-6 to recommend products to users.

8. The method according to claim 7, characterized in that The initial model is trained based on the user embedding vectors, the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network, including: Based on the initial model, performing neighborhood aggregation processing on the user embedding vector of each user to be trained, the bipartite graph, and the product embedding vector of each product to be trained to obtain a user feature vector of each user to be trained and a product feature vector of each product to be trained; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product; Determining a loss function based on the user feature vector of each to-be-trained user and the product feature vector of each to-be-trained product; The initial model is trained according to the loss function to obtain the hyperbolic graph convolutional network.

9. The method according to claim 8, characterized in that Determining a loss function based on the user feature vector of each to-be-trained user and the product feature vector of each to-be-trained product includes: Performing data enhancement processing on the bipartite graph to obtain a first view and a second view corresponding to the bipartite graph; Inputting the first view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a first intermediate vector of the user to be trained and a second intermediate vector of the product to be trained; Inputting the second view, the user embedding vector of the user to be trained, and the product embedding vector of the product to be trained into the initial model to obtain a third intermediate vector of the user to be trained and a fourth intermediate vector of the product to be trained; The loss function is determined according to each of the user feature vectors, each of the product feature vectors, each of the first intermediate vectors, each of the second intermediate vectors, each of the third intermediate vectors, and each of the fourth intermediate vectors.

10. The method according to claim 9, characterized in that Determining the loss function according to each of the user feature vectors, each of the product feature vectors, each of the first intermediate vectors, each of the second intermediate vectors, each of the third intermediate vectors, and each of the fourth intermediate vectors includes: Determining an interval ranking loss based on each of the user feature vectors and each of the product feature vectors; wherein the interval ranking loss represents the spatial interval between each of the user feature vectors and each of the product feature vectors in a hyperbolic space; Determining a user self-supervision loss based on each of the first intermediate vectors and each of the third intermediate vectors; wherein the user self-supervision loss represents the similarity between each of the users to be trained; Determining a product self-supervision loss based on each of the second intermediate vectors and each of the fourth intermediate vectors; wherein the product self-supervision loss represents the similarity between each of the products to be trained; The loss function is determined according to the interval ranking loss, the user self-supervision loss, and the product self-supervision loss.

11. The method according to claim 10, characterized in that The interval sorting loss Among them, e u is the user feature vector of each user u to be trained, is the set containing all users to be trained, e i is the product feature vector of each training product i preferred by each training user u; is a set of all the products to be trained that are preferred by the user u to be trained; e j For each product to be trained, The product feature vector of each remaining product j to be trained except the products to be trained in ; For each user feature vector e in the hyperbolic space u With each product feature vector e i The induced distance between For each user feature vector e in the hyperbolic space u With each product feature vector e j The induced distance between them; m is a hyperparameter representing the maximum interval set; The user self-supervision loss Among them, e′ u is the first intermediate vector of each user u to be trained, e″ u is the third intermediate vector of each user u to be trained; e″ v is the first intermediate vector of each user v to be trained; τ is the temperature; The self-monitoring loss of the goods Among them, e′ i is the second intermediate vector of each product i to be trained, e″ i is the fourth intermediate vector of each product i to be trained; e″ j is the second intermediate vector of each product j to be trained, To include all products to be trained except The set of remaining training items other than the training items in .

12. The method according to claim 10, characterized in that The loss function in, sorting losses for said intervals; is the user's self-supervision loss; is the self-supervised loss of the product; λ is a hyperparameter used to control model training.

13. The method according to claim 8, characterized in that The initial model is trained according to the loss function to obtain the hyperbolic graph convolutional network, including: performing shrinkage and updating processing on the user feature vector and the product feature vector according to the loss function to obtain a processed user feature vector and a processed product feature vector; The initial model is trained based on the processed user feature vectors and the processed product feature vectors to obtain the hyperbolic graph convolutional network.

14. The method according to claim 13, characterized in that The processed user feature vector in, is the user feature vector; is the user feature vector The differential operator in the Euclidean space corresponding to the initial model; η is the learning rate; is the user feature vector The corresponding loss function; For the user feature vector Perform shrink operation processing; The processed product feature vector in, is the product feature vector; is the product feature vector a differential operator in the Euclidean space corresponding to the initial model; is the product feature vector The corresponding loss function; For the product feature vector Perform shrink operation.

15. The method according to claim 8, characterized in that Based on the initial model, neighborhood aggregation processing is performed on the user embedding vector of each to-be-trained user, the bipartite graph, and the product embedding vector of each to-be-trained product to obtain a user feature vector of each to-be-trained user and a product feature vector of each to-be-trained product, including: Based on the L graph convolution layers of the initial model, according to the bipartite graph, the user embedding vector of the user to be trained and the product embedding vector of each product to be trained are subjected to neighborhood aggregation processing to obtain L user convolution vectors of the user to be trained; at the same time, based on the L graph convolution layers, according to the bipartite graph, the product embedding vector of the product to be trained and the user embedding vector of each user to be trained are subjected to neighborhood aggregation processing to obtain L product convolution vectors of the product to be trained; wherein the user convolution vector represents the characteristics of the user to be trained; the product convolution vector represents the characteristics of the product to be trained; and L is a positive integer greater than or equal to 1; Based on the average pooling layer of the initial model, average pooling processing is performed on the L user convolution vectors of the user to be trained to obtain the user feature vector of the user to be trained; at the same time, based on the average pooling layer, average pooling processing is performed on the L product convolution vectors of the product to be trained to obtain the product feature vector of the product to be trained.

16. The method according to claim 15, characterized in that Based on the L graph convolution layers of the initial model, according to the bipartite graph, a neighborhood aggregation process is performed on the user embedding vector of the user to be trained and the product embedding vector of each product to be trained to obtain L user convolution vectors of the user to be trained; at the same time, based on the L graph convolution layers, according to the bipartite graph, a neighborhood aggregation process is performed on the product embedding vector of the product to be trained and the user embedding vector of each user to be trained to obtain L product convolution vectors of the product to be trained, including: According to the bipartite graph, at least one neighboring product of the user to be trained is determined from each of the products to be trained, and at least one neighboring user of the product to be trained is determined from each of the users to be trained; wherein the neighboring products are products to be trained that have interacted with the user to be trained; and the neighboring users are users to be trained that have interacted with the products to be trained; Based on each of the graph convolutional layers, the user embedding vector and the product embedding vectors of each neighboring product corresponding to the user embedding vector are aggregated to obtain a user convolution vector of the user to be trained; at the same time, the product embedding vector and the user embedding vectors of each neighboring user corresponding to the product embedding vector are aggregated to obtain a product convolution vector of the product to be trained.

17. The method according to any one of claims 7 to 16, characterized in that The mean of the hyperbolic normal distribution function is zero, and the variance of the hyperbolic normal distribution function is σ 2 ; Wherein, σ is the standard deviation of the hyperbolic normal distribution function.

18. A product recommendation device, characterized in that: The device comprises: A processing unit is configured to obtain a bipartite graph corresponding to each user and each product; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user; the product embedding vector represents the product; and the bipartite graph represents the interaction between each user and each product. an aggregation unit configured to perform neighborhood aggregation processing on the user embedding vector of each user, the bipartite graph, and the product embedding vector of each product based on a hyperbolic graph convolutional network to obtain a user feature vector of each user and a product feature vector of each product; wherein the user feature vector represents feature information of the user; and the product feature vector represents feature information of the product; A recommendation unit is configured to recommend products to the user based on the user feature vector of the user and the product feature vectors of each of the products.

19. A model training device for product recommendation, characterized in that: The device comprises: A processing unit is configured to obtain a bipartite graph corresponding to each user to be trained and each product to be trained; and initialize the bipartite graph based on a hyperbolic normal distribution function to obtain a vector set corresponding to the bipartite graph; wherein the vector set includes a user embedding vector for each user in the bipartite graph and a product embedding vector for each product; the user embedding vector represents the user to be trained; the product embedding vector represents the product to be trained; and the bipartite graph represents the interaction between each user to be trained and each product to be trained; A training unit is used to train the initial model based on each of the user embedding vectors, each of the product embedding vectors, and the bipartite graph to obtain a hyperbolic graph convolutional network; wherein the hyperbolic graph convolutional network is used to process the user embedding vector, bipartite graph, and product embedding vector according to claim 18 to recommend products to the user.

20. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 17.

21. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 17 when executed by a processor.

22. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 or the method according to any one of claims 7 to 17 is implemented.

Citation Information

Patent Citations

  • Commodity prediction method fusing commodity association relationship

    CN114997476A

  • Article recommendation method based on boundary ranking loss and neighborhood perception graph neural network

    CN116911949A

  • Commodity recommendation method, model training method, device and equipment

    CN118279017A

  • Joint personalized search and recommendation with hypergraph convolutional networks

    US20230195809A1