Method, computing device and storage medium for recommending products to users

By constructing multi-dimensional user and product feature tags, using graph neural networks and deep Q network models, combined with attention mechanisms, the problems of poor generalization ability and dependence on training data of traditional recommendation methods are solved, and more accurate and efficient user product recommendations are achieved.

CN119577255BActive Publication Date: 2025-05-13ZHONGZHI AIAITONG (NANJING) INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510135403.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-05-13
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

Traditional object recommendation methods have poor generalization ability, poor cold start ability, and dependence on training data types, resulting in inaccurate recommendations.

Method used

By constructing multi-dimensional user feature labels and product feature labels, the user embedding vectors and product embedding vectors are obtained, and the attribute relationship between users and products is extracted using graph neural networks, and multiple iterations are carried out in combination with attention mechanisms and deep Q network models to obtain the probability of product recommendations for users.

Benefits of technology

It improves the accuracy, cold start capability and generalization capability of recommendations, reduces dependence on specific training data, and can accurately and efficiently recommend products to new users and recommend users to new products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577255B_ABST
    Figure CN119577255B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to a method, computing device, and storage medium for recommending products to users. The method includes constructing user feature labels with multiple dimensions and product feature labels with multiple dimensions based on a user data set and a product data set, respectively, to obtain user embedding vectors and product embedding vectors, respectively; extracting attribute relationships between users through the constructed first graph neural network to obtain user graph embedding vectors; extracting attribute relationships between products through the constructed second graph neural network to obtain product graph embedding vectors; performing attention calculation on the product graph embedding vector to obtain the product attention embedding vector; inputting the user graph embedding vector and the product attention embedding vector into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of the product for the user. In this way, the recommendation accuracy, cold start and generalization capabilities can be effectively improved, and the dependence on specific training data can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention generally relate to the field of artificial intelligence, and more specifically to a method, computing device, and storage medium for recommending products to users. Background Art

[0002] Traditional methods for object recommendation (e.g., recommending products, services, or information to users) include recommending systems based on specific algorithms such as collaborative filtering algorithms and content recommendation algorithms, or networks.

[0003] The above-mentioned traditional algorithms or networks for objects have shortcomings. For example, the collaborative filtering algorithm relies on user-item interaction data to build a recommendation model, and has poor generalization ability. It is difficult to make accurate recommendations for new products, new users or new systems due to the lack of historical data, and the cold start capability is poor. The content recommendation algorithm requires a clear description of the characteristics of the object and requires explicit feedback from users to train the model, which may not capture the user's potential interests.

[0004] In summary, the shortcomings of traditional methods for object recommendation are: dependence on the type of training data, poor cold start capability, and lack of accuracy. Summary of the invention

[0005] In response to the above problems, the present invention provides a method, a computing device and a storage medium for recommending products to users, which can effectively improve the recommendation accuracy, cold start capability and generalization capability, and reduce the dependence on specific training data.

[0006] According to a first aspect of the present invention, a method for recommending products to users comprises: constructing a user feature label with multiple dimensions and a product feature label with multiple dimensions based on a user data set and a product data set, respectively; obtaining a user embedding vector and a product embedding vector based on the user feature label and the product feature label, respectively; extracting attribute relationships between users via the constructed first graph neural network to obtain a user graph embedding vector; and extracting attribute relationships between products via the constructed second graph neural network to obtain a product graph embedding vector; performing attention calculation on the product graph embedding vector to obtain a product attention embedding vector; and inputting the user graph embedding vector and the product attention embedding vector into the constructed deep Q network model for multiple rounds of iterations to obtain a recommendation probability of the product for the user.

[0007] According to a second aspect of the present invention, a computing device is provided, comprising: at least one processing unit; at least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, enabling the computing device to perform the steps of the method according to the first aspect.

[0008] According to a third aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a machine, the method of the first aspect of the present invention is executed.

[0009] According to a fourth aspect of the present invention, there is further provided a computer program product, comprising a computer program, wherein when the computer program is executed by a machine, the method of the first aspect of the present invention is performed.

[0010] In some embodiments, obtaining a user embedding vector and a product embedding vector based on user feature tags and product feature tags respectively includes: obtaining a user feature vector and a product feature vector based on user feature tags and product feature tags respectively; calculating an embedding vector corresponding to each feature tag via a predetermined embedding algorithm based on the user feature vector and the product feature vector; concatenating multiple embedding vectors corresponding to user feature tags of multiple dimensions of the same user to obtain a user embedding vector for the same user; and concatenating multiple embedding vectors corresponding to product feature tags of multiple dimensions of the same product to obtain a product embedding vector for the same product.

[0011] In some embodiments, the first graph neural network is a multi-layer network, and extracting attribute relationships between users through the constructed first graph neural network to obtain a user graph embedding vector includes: initializing the adjacency matrix of the first graph neural network with users as nodes and attribute relationships between users as edges; determining the weight matrix of each layer in the first graph neural network based on user attribute features contained in the user embedding vector; inputting the user's embedding vector into the first graph neural network, and iterating layer by layer to learn the user's attribute relationships of various orders; and generating a user graph embedding vector based on the feature representation output by each layer of the first graph neural network.

[0012] In some embodiments, the second graph neural network is a multi-layer network, and extracting the attribute relationship between products through the constructed second graph neural network to obtain the product graph embedding vector includes: initializing the adjacency matrix of the second graph neural network with products as nodes and the attribute relationship between products as edges; determining the weight matrix of each layer of the second graph neural network based on the product attribute features contained in the product embedding vector; inputting the product embedding vector into the second graph neural network, iterating layer by layer to learn the attribute relationships of each order of the product; and generating the product graph embedding vector based on the feature representation output by each layer of the second graph neural network.

[0013] In some embodiments, the weight matrix of each layer of the first graph neural network is different from the weight matrices of adjacent layers; and the weight matrix of each layer of the second graph neural network is different from the weight matrices of adjacent layers.

[0014] In some embodiments, performing attention calculation on a product image embedding vector to obtain a product attention embedding vector includes: calculating the attention weights of various attribute features of a product for the product image embedding vector based on a predetermined attention algorithm; calculating the attention scores of the products based on the calculated attention weights to obtain the dependency relationship between different products; and calculating the product attention embedding vector based on the product's attention scores and the product's image embedding vector.

[0015] In some embodiments, the deep Q network model is a multi-layer network, and the user graph embedding vector and the product attention embedding vector are input into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of products for users, including: connecting the user graph embedding vector and the product attention embedding vector to represent the state vector parameters of the deep Q network; representing the action parameters of the deep Q network based on the behavioral data of recommending products to users; representing the reward parameters of the deep Q network based on the user's positive interaction behavior data for the products; iterating layer by layer based on the state vector parameters, action parameters and reward parameters to calculate the Q value of each recommendation behavior in order to evaluate the recommendation probability of the product; and obtaining the probability of recommending each product to any user.

[0016] In some embodiments, the attributes of the user include one or more of the following: age, gender, region, hobbies, friend relationships, historical product purchase information, historical product use information, attention information, and interaction information.

[0017] In some embodiments, the product includes one or more of the following: goods, items, services, games, insurance, meal subsidies, transportation subsidies, physical cards and coupons, and virtual cards and coupons.

[0018] Therefore, the present invention can fully combine embedding vectors, graph neural networks, attention mechanisms and deep Q network models, and fully consider the associations between users and users, products and products, and users and products, so as to achieve accurate recommendations of different types of products for different users; and through the dual-tower structure graph neural network, when obtaining graph embedding vectors, the dependence on data types is reduced (it does not rely on "user-product" association data, and the training of traditional recommendation system graph neural networks relies on a large number of "user-products"), and therefore has good versatility, and can accurately and efficiently recommend products to new users, and can also accurately and efficiently recommend users for new products.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.

[0021] Figure 1 A schematic diagram of a system for implementing a method for recommending products to a user according to an embodiment of the present invention is shown.

[0022] Figure 2 A flow chart of a method for recommending products to a user according to an embodiment of the present invention is shown.

[0023] Figure 3 A flowchart of a method for obtaining a user embedding vector according to an embodiment of the present invention is shown.

[0024] Figure 4 A flowchart of a method for obtaining a product embedding vector according to an embodiment of the present invention is shown.

[0025] Figure 5 A flowchart of a method for obtaining a product attention embedding vector according to an embodiment of the present invention is shown.

[0026] Figure 6 A flow chart of a method for obtaining a recommendation probability of a product for a user according to an embodiment of the present invention is shown.

[0027] Figure 7 A structural schematic diagram of a method for recommending products to a user according to an embodiment of the present invention is shown.

[0028] Figure 8A block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0030] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0031] As described above, traditional algorithms or networks for objects have shortcomings. For example, collaborative filtering algorithms rely on "user-item" interaction data to build recommendation models, and have poor generalization capabilities. Due to the lack of historical data, it is difficult to make accurate recommendations for new products, new users, or new systems, and the cold start capability is poor. The content recommendation algorithm requires a clear description of the characteristics of the object and requires explicit feedback from users to train the model, which may not capture the user's potential interests.

[0032] In summary, the shortcomings of traditional methods for object recommendation are: dependence on the type of training data, poor cold start capability, and lack of accuracy.

[0033] In order to at least partially solve one or more of the above-mentioned problems and other potential problems, an exemplary embodiment of the present invention proposes a solution for recommending products to users. In the solution of the present invention, firstly, based on the user data set and the product data set, user feature labels with multiple dimensions and product feature labels with multiple dimensions are respectively constructed; then, based on the user feature labels and the product feature labels, user embedding vectors and product embedding vectors are respectively obtained to perform embedding vectors of users and products; then, two groups of graph neural networks are respectively constructed for users and products to obtain user graph embedding vectors and product graph embedding vectors, thereby capturing potential relationships between users and potential relationships between products.

[0034] The present invention also performs attention calculation on the product graph embedding vector to obtain the product attention embedding vector, thereby making full use of the semantic features in the product embedding vector and further capturing the dependency between products; then the user graph embedding vector and the product attention embedding vector are input into the constructed deep Q network model for multiple rounds of iteration to obtain the recommendation probability of the product for the user; the user graph embedding vector and the product attention embedding vector are fused through the deep Q network. Thus, the present invention can fully combine the embedding vector (embedding), the graph neural network, the attention mechanism and the deep Q network model, and fully consider the association between users and users, products and products, and users and products, so as to achieve accurate recommendation of different types of products for different users; and through the dual-tower structure graph neural network, when obtaining the graph embedding vector, the dependence on the data type is reduced (not dependent on the "user-product" association data, the training of the traditional recommendation system graph neural network depends on a large number of "user-products"), and therefore has good versatility, can accurately and efficiently recommend products to new users, and can also accurately and efficiently recommend users for new products.

[0035] Therefore, the present invention can effectively improve recommendation accuracy, cold start capability and generalization capability, and reduce dependence on specific training data.

[0036] Figure 1 FIG. 1 is a schematic diagram of a system 100 (referred to as system 100 ) for implementing a method for recommending products to a user according to an embodiment of the present invention. Figure 1 As shown in FIG, system 100 includes computing device 110, server 130, network 140 and user terminal 150. Computing device 110, server 130 and user terminal 150 can exchange data through network 140 (eg, the Internet, a local area network or a wide area network, etc.).

[0037] Regarding the user terminal 150, it is, for example, a mobile device, a personal terminal, a desktop computer, a smart watch, a tablet computer, an interactive device, etc. The user can perform interactive operations on its display interface (such as browsing information, inputting information, searching for products, etc.). The user terminal 150 interacts with the server 130 through the network, obtains the user's product recommendation information from the server 130, and recommends it to the user through the display interface.

[0038] Regarding server 130, it can be, for example, an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud database, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms.

[0039] Regarding the server 130, a method for recommending products to users according to an embodiment of the present invention is deployed thereon, which can, for example, obtain information about users and product information through the network 140, thereby extracting user feature labels, product feature labels, etc., and send the extracted labels to the computing device 110 for training the network, model, system, etc. for recommending products to users provided by an embodiment of the present invention.

[0040] Regarding the computing device 110, it is used, for example, to train a network model for recommending a product method to a user according to an embodiment of the present invention. The computing device 110 may have one or more processing units, including dedicated processing units such as GPUs, FPGAs, and ASICs, and general-purpose processing units such as CPUs. The computing device 110 may be an integration of multiple physical servers, an integration of multiple processing units, and the like. In addition, one or more virtual machines may also be running on each computing device 110. In some embodiments, the computing device 110 and the server 130 may be integrated together or may be separately arranged from each other. In some embodiments, the computing device 110 includes, for example, a feature label construction module 112, an embedding vector module 114, a graph neural network module 116, an attention module 118, and a deep Q network module 120.

[0041] The feature label construction module 112 is used to respectively construct a user feature label with multiple dimensions and a product feature label with multiple dimensions based on the user data set and the product data set.

[0042] The embedding vector module 114 is used to obtain a user embedding vector and a product embedding vector based on the user feature label and the product feature label, respectively.

[0043] Regarding the graph neural network module 116, it is used to extract the attribute relationship between users through the constructed first graph neural network to obtain the user graph embedding vector; and to extract the attribute relationship between products through the constructed second graph neural network to obtain the product graph embedding vector.

[0044] Regarding the attention module 118, it is used to perform attention calculation on the product image embedding vector to obtain the product attention embedding vector.

[0045] The deep Q network module 120 is used to embed the user graph vector and the product attention vector into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of the product for the user.

[0046] Figure 2 FIG. 2 is a flow chart of a method 200 for recommending products to a user according to an embodiment of the present invention. The method 200 may be performed as follows: Figure 1 The computing device 110 shown may also be executed in Figure 8 The method 200 is executed at the electronic device 800. It should be understood that the method 200 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect. Figure 7 4 is a schematic diagram of the structure of a method for recommending products to a user according to an embodiment of the present invention.

[0047] In step 202 , the computing device 110 constructs a user feature label with multiple dimensions and a product feature label with multiple dimensions based on the user data set and the product data set, respectively.

[0048] Regarding multi-dimensional user feature labels, for example, a user has multiple attributes, and the feature labels are used to reflect the attribute characteristics of the user. In some embodiments, the user's attributes include one or more of the following: age, gender, region, hobbies, friend relationships, historical product purchase information, historical product use information, attention information, and interaction information.

[0049] Regarding multi-dimensional product feature labels, for example, a product itself has multiple attributes, and the feature labels are used to reflect the attribute characteristics of the product, such as the product category, price, sales volume, product audience, etc. In some embodiments, the product includes one or more of the following: goods, items, services, games, insurance, meal subsidies, transportation subsidies, physical cards and coupons, and virtual cards and coupons.

[0050] Therefore, multi-dimensional feature labels are extracted for users and products respectively, which can fully consider the commonalities between products and users.

[0051] In step 204 , the computing device 110 obtains a user embedding vector and a product embedding vector based on the user feature label and the product feature label, respectively.

[0052] In some embodiments, obtaining a user embedding vector and a product embedding vector based on user feature tags and product feature tags respectively includes: obtaining a user feature vector and a product feature vector based on user feature tags and product feature tags respectively; and calculating an embedding vector corresponding to each feature tag via a predetermined embedding vector algorithm based on the user feature vector and the product feature vector.

[0053] In some embodiments, multiple embedding vectors corresponding to user feature labels of multiple dimensions of the same user are concatenated to obtain a user embedding vector of the same user; and multiple embedding vectors corresponding to product feature labels of multiple dimensions of the same product are concatenated to obtain a product embedding vector of the same product.

[0054] Regarding embedding, in the fields of artificial intelligence (AI), computer science, and machine learning, embedding usually refers to a representation method that maps high-dimensional data into a low-dimensional space for efficient calculation and analysis. The purpose of this mapping is to convert discrete, sparse data into a continuous, dense vector representation so that the data can be better processed and understood by machine learning or deep learning models. Embedding is essentially a way to represent complex objects (such as words, phrases, users, products, etc.) with a real number vector, where each dimension in the vector corresponds to a potential feature of the object. This representation can capture the similarity or correlation between objects.

[0055] For example, see Figure 7 In the illustrated input layer, user labels include user label 1 to user label n. Each user label is embedded to obtain user embedding vectors U1-Un respectively. The user embedding vectors U1-Un are concatenated to obtain the embedding vector of each user. For example, there are 100 users, each user has n user labels, and after concatenation, 100 user embedding vectors corresponding to the 100 users are obtained, and each user embedding vector is generated by concatenating the embedding vectors corresponding to the n feature labels of the same user.

[0056] For another example, the embedding process of user tags is illustrated below according to the following formulas (1), (2) and (3):

[0057] U age = E age •V age (1)

[0058] U gender = E gender •V gender (2)

[0059] U category = E category •V category (3)

[0060] Where E represents the embedding vector, E age The embedding vector representing the user’s age, E gender The embedding vector representing the user’s gender, E category Embedding vector representing user type; V age Represents the user's value in the age dimension, V gender Represents the user's value in the gender dimension, V category represents the user's value in the type dimension; U represents the feature vector, which is obtained by multiplying E and V. ageRepresents the feature vector on the user age dimension, U gender Represents the user’s feature vector in the gender dimension, U category Represents the feature vector of the user in the type dimension. Assuming there are four types of labels (A=0, B=1, C=2, D=3), then the dictionary size is 4. The word dimension should not be too large, for example, set it to 24. Different from natural semantic processing, E (embedding) here does not need to be filled because there is no head-to-tail relationship. For example, if a user has label types B and D, then his V category The value of is [0,1,0,3]. It should be understood that in addition to the above three dimensional labels, there can be more dimensional labels to mark other characteristics of the product, such as E 区域 Embedding vector representing the region of the user.

[0061] For example, see Figure 7 In the illustrated input layer, product labels include product label 1 to product label m. Each product label is embedded to obtain product embedding vectors S1-Sn respectively. The product embedding vectors S1-Sn are concatenated to obtain the embedding vector of each product. For example, there are 2000 products, each product has m product labels, and after concatenation, 2000 product embedding vectors corresponding to these 2000 products are obtained, and each product embedding vector is generated by concatenating the embedding vectors corresponding to the m feature labels of the same product.

[0062] For another example, the embedding process of a product label is illustrated below according to the following formulas (4), (5) and (6):

[0063] P 品牌 = E 品牌 •V 品牌 (4)

[0064] P 价格 = E 价格 •V 价格 (5)

[0065] P 评分 = E 评分 •V 评分 (6)

[0066] Among them, E 品牌 Embedding vector representing the product brand, E 价格 The embedding vector representing the product price, E 评分 Embedding vector representing the user rating of the product, V 品牌 Represents the value of the product in the brand dimension, V 价格 represents the value of the product in the price dimension, and V score represents the value of the product in the user rating dimension; P品牌 Represents the characteristic vector of the brand dimension of the product, P 价格 Represents the feature vector of the price dimension of the commodity, P 评分 It should be understood that in addition to the above three dimensional labels, there can be more dimensional labels to mark other characteristics of the product, such as E 成色 Indicates the new and old embedding vectors of the product. For example, the following formulas (7) and (8) respectively illustrate the process of obtaining user embedding tags and product embedding tags:

[0067] U 1 = [U age , U gender , U category ] (7)

[0068] P 1 = [P 品牌 , P 价格 , P 评分 ] (8)

[0069] Among them, U 1 represents the embedding vector of user 1 (with respect to multiple dimensions), P 1 Embedding vector representing the product 1 (with respect to multiple dimensions).

[0070] In step 206, the computing device 110 extracts attribute relationships between users via the constructed first graph neural network to obtain a user graph embedding vector; and extracts attribute relationships between products via the constructed second graph neural network to obtain a product graph embedding vector.

[0071] Regarding the embedding vector, the process from user feature label to embedding vector goes through the process of feature label → feature vector → embedding vector. Here, feature vector and embedding vector are different. Feature label needs to be converted into feature vector first, and then converted into embedding vector through embedding process. The input of graph neural network in step 206 is embedding vector. The choice of using input feature vector or embedding vector depends on the characteristics of data and the requirements of recommendation system. Feature vector is suitable for situations with clear attributes and features, while embedding vector is more suitable for complex user-product interaction scenarios and can capture implicit relationships between objects.

[0072] For example, see Figure 7In the graph neural network layer, the input of the first graph neural network is the user embedding vector, and the input of the second graph neural network is the product embedding vector. Therefore, in the above scheme, the inputs of the two groups of graph neural networks are user embedding vectors and product embedding vectors respectively, which can capture more implicit relationships between objects than directly inputting feature vectors based on feature labels, and does not rely on "user-product" relationship data.

[0073] The following will combine Figure 3 and Figure 4 The detailed description of obtaining the user embedding vector and obtaining the product embedding vector is omitted here.

[0074] In step 208 , the computing device 110 performs attention calculation on the product image embedding vector to obtain a product attention embedding vector.

[0075] It is worth noting that in the method provided in the embodiment of the present invention, the attention mechanism is only introduced for the product, but not for the user. This is determined by the product attribute characteristics. Through the attention mechanism, in addition to the proximity relationship between products (this part is captured and recognized by the graph neural network), other relationships such as dependency relationships can also be captured, thereby more accurately recommending products to users.

[0076] The following will combine Figure 5 The method of obtaining the product attention embedding vector is described in detail and will not be repeated here.

[0077] In step 210, the computing device 110 inputs the user graph embedding vector and the product attention embedding vector into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of the product for the user.

[0078] Deep Q-Network (DQN) combines the advantages of deep learning and reinforcement learning and can handle problems with high-dimensional state and action spaces. In user product recommendations, the features of users and products often constitute a high-dimensional space. DQN can automatically extract these features through deep neural networks and learn the complex mapping relationship between user preferences and product features.

[0079] DQN can learn the optimal strategy by continuously interacting with the environment to maximize the cumulative reward. For example, DQN can continuously adjust the recommendation strategy based on user feedback (such as clicks, purchases, reviews, etc.), so that the recommendation results are more in line with user expectations, and continuously optimize continuous learning, so as to adapt to the ever-changing market demand and user preferences. In addition, DQN automatically extracts features through deep neural networks, which greatly reduces the workload in the development process of the recommendation system and improves the system's adaptability.

[0080] The following will combine Figure 6 The method of obtaining the recommendation probability of a product for a user is described in detail and will not be repeated here.

[0081] In the above scheme, feature labels, embedding vectors, graph neural networks, attention mechanisms and deep Q network models are combined to fully consider the associations between users, products and products, and between users and products; and a dual-tower structure is constructed respectively, two sets of graph neural networks are constructed respectively, and only user embedding vectors and product embedding vectors are input respectively, which can capture the relationship between users only through attribute data, and the relationship between products only through product attribute data, so as not to rely on a large amount of user-product data, and the requirement for data volume is also reduced accordingly; in addition, an attention mechanism is also added to the product side to make full use of semantic information to capture the potential dependency between products; finally, through the DQN network model, users and products are associated, so that the model improves objectivity and interpretability, and also has good versatility, which can accurately and efficiently recommend products to new users, and can also accurately and efficiently recommend users for new products.

[0082] Figure 3 FIG. 3 is a flowchart of a method 300 for obtaining a user embedding vector according to an embodiment of the present invention. The method 300 may be performed as follows: Figure 1 The computing device 110 shown may also be executed in Figure 8 The method 300 is executed at the electronic device 800. It should be understood that the method 300 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.

[0083] In step 302, the computing device 110 initializes the adjacency matrix of the first graph neural network with users as nodes and attribute relationships between users as edges.

[0084] In step 304, the computing device 110 determines a weight matrix for each layer in the first graph neural network based on the user attribute features included in the user embedding vector.

[0085] In some embodiments, the user's attributes include one or more of the following: age, gender, region, hobbies, friend relationships, historical product purchase information, historical product usage information, attention information, and interaction information. Thus, the possibility of implicit relationships between users can be fully considered.

[0086] In step 306, the computing device 110 inputs the user's embedding vector into the first graph neural network and iterates layer by layer to learn the user's attribute relationships of various orders.

[0087] For example, in the first layer of the first graph neural network, the first-order relationship between users is learned, in the second layer of the first graph neural network, the second-order relationship between users is learned, and in the third layer of the first graph neural network, the third-order relationship between users is learned. The third-order relationship is deeper and more hidden than the second-order relationship, and the second-order relationship is deeper and more hidden than the first-order relationship. That is, the distance between user nodes is the shortest in the first-order relationship, and more distant user relationships are learned as the order increases.

[0088] In step 308 , the computing device 110 generates a user graph embedding vector based on the feature representation output by each layer of the first graph neural network.

[0089] Regarding the first graph neural network, it is, for example, a multi-layer network, for example, please refer to Figure 7 The graph neural network layer in Figure 1 illustrates a two-layer structure of the first graph neural network.

[0090] In some embodiments, the weight matrix of each layer of the first graph neural network is different from the weight matrix of the adjacent layer. Each layer of the first graph neural network uses a different weight matrix, which can make each layer of the first graph neural network learn with different focuses, thereby learning different implicit relationships between users. For example, through the IP address dimension, the social attribute relationship between users (such as family, colleagues, etc.) can be learned; for example, users in the same family or office usually use the same IP, and the possible potential relationship between users can be preliminarily determined through the relationship between IP addresses, and then the implicit relationship between users can be further determined through other features between users; in addition, weights of different tendencies can also reduce the amount of calculation (making the weights of some features 0).

[0091] Figure 4 FIG. 4 is a flowchart of a method 400 for obtaining a product embedding vector according to an embodiment of the present invention. The method 400 may be performed as follows: Figure 1 The computing device 110 shown may also be executed in Figure 8 The method 400 is executed at the electronic device 800. It should be understood that the method 400 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.

[0092] In step 402, the computing device 110 initializes the adjacency matrix of the second graph neural network using products as nodes and attribute relationships between products as edges.

[0093] In step 404, the computing device 110 determines a weight matrix for each layer of the second graph neural network based on the product attribute features included in the product embedding vector.

[0094] In some embodiments, the attributes of the product include one or more of the following: brand, category, origin, shelf life, material, style, season, trial age group, scene, fashion trend, and user rating.

[0095] In step 406, the computing device 110 inputs the product embedding vector into the second graph neural network and iterates layer by layer to learn the attribute relationships of each order of the product.

[0096] For example, in the first layer of the second graph neural network, the first-order relationship between products is learned, in the second layer of the second graph neural network, the second-order relationship between products is learned, and in the third layer of the second graph neural network, the third-order relationship between products is learned. The distance between product nodes is the shortest in the first-order relationship, and as the order increases, more distant product relationships are learned, thereby capturing more hidden product relationships to make richer and more accurate recommendations.

[0097] In step 408, the computing device 110 generates a product image embedding vector based on the feature representation output by each layer of the second graph neural network.

[0098] In some embodiments, the second graph neural network is a multi-layer network, and the weight matrix of each layer of the second graph neural network is different from the weight matrix of the adjacent layer, so that each layer of the first graph neural network can learn with different focuses, thereby learning different implicit relationships between products, for example, product A is a keyboard, product B is a mouse, product C is a motherboard, and product D is a CPU; when a user browses (or purchases, or adds to a shopping cart) product A, product B is recommended to the user, and when a user browses (or purchases, or adds to a shopping cart) product C, product D is recommended to the user; that is, product recommendations are made through implicit relationships between products, and this implicit relationship is not limited to the similarity, combination, correlation, usage matching, etc. between products; in addition, weights of different tendencies can also reduce the amount of computation (making the weights of some features 0).

[0099] For example, user A purchased product 1 and product 2, and product 1 and product 3 were purchased by other users (such as user B and user C). There is no direct connection between user A and product 3, but product 3 is similar to product 1 and product 2. Through the multi-layer graph neural network, the graph embedding vector of user A not only contains the features of the products he directly interacts with, but also contains similar products of these products and the behavior information of other users. These high-order features enable the recommendation system to more accurately predict, for example, that user A may like product 3.

[0100] Figure 5 1 is a flowchart of a method 500 for obtaining a product attention embedding vector according to an embodiment of the present invention. The method 500 may be performed as follows: Figure 1 The computing device 110 shown may also be executed in Figure 8The method 500 is executed at the electronic device 800. It should be understood that the method 500 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.

[0101] In step 502, the computing device 110 calculates the attention weight of each attribute feature of the product for the product image embedding vector based on a predetermined attention algorithm.

[0102] In step 504 , the computing device 110 calculates the attention score of the product based on the calculated attention weight, so as to obtain the dependency relationship between different products.

[0103] It is worth noting that the attention here is different from the attention in the graph neural network. The attention mechanism here is more similar to transformer or self-attention, which tends to capture the implicit dependencies between products based on semantic features to make up for the features that the graph neural network has not learned. For example, the product relationship feature learned in the graph neural network is "mobile phone-iPhone-Huawei mobile phone-Xiaomi mobile phone", and after adding attention, the additional product dependency feature learned is "mobile phone-mobile phone case-mobile phone film-mobile phone charging cable"; for example, the product relationship feature learned in the graph neural network is "cat-cat-kitty-raccoon cat-orange cat-blue cat", and after adding attention, the additional product dependency feature learned is "cat-cat food-cat litter box-cat teaser".

[0104] At step 506 , the computing device 110 calculates a product attention embedding vector based on the product's attention score and the product image embedding vector.

[0105] For example, regarding attention calculation, it is calculated using the following formulas (9) to (11):

[0106] e i =a(Wp i +b) (9)

[0107] (10)

[0108] (11)

[0109] Among them, e i represents the attention weight, W represents the weight matrix of the attention mechanism, b represents the bias vector of the attention mechanism, and a represents the attention score function tanh; represents the attention score of the ith product, exp represents the natural exponential function, P att Represents the attention embedding vector of the product, Pi Embedding vector representing product i (with respect to multiple dimensions).

[0110] In some embodiments, the attention embedding vector is calculated by weighting the attention score and the product graph vector. The weighted weights can be adjusted by factors such as reservation and product type, thereby combining the advantages of graph neural networks and attention mechanisms so that various implicit relationships and dependency relationships of products can be learned, making full use of the semantic information provided by the product attribute information.

[0111] Figure 6 FIG. 6 is a flowchart of a method 600 for obtaining a recommendation probability of a product for a user according to an embodiment of the present invention. Figure 1 The computing device 110 shown may also be executed in Figure 8 The method 600 is executed at the electronic device 800 shown. It should be understood that the method 600 may further include additional steps not shown and / or may omit the steps shown, and the scope of the present invention is not limited in this respect.

[0112] At step 602 , the computing device 110 concatenates the user graph embedding vector and the product attention embedding vector to represent the state vector parameters of the deep Q-network.

[0113] For deep Q network models, such as multi-layer networks, please refer to Figure 7 The three-layer deep Q network model is illustrated. After the third layer, the product recommendation strategy is output, for example, a set of probabilities of each product being recommended to any user is output.

[0114] At step 604 , the computing device 110 represents action parameters of the deep Q network based on the behavioral data of recommending products to users.

[0115] At step 606 , the computing device 110 represents a reward parameter of the deep Q network based on the user's positive interaction behavior data for the product.

[0116] Positive interaction behavior data, such as likes, browsing, positive reviews, purchases, recommendations, and sharing, can reflect the user's preference for decision-making, thereby further adjusting network parameters and conducting iterative learning.

[0117] In step 608, the computing device 110 iterates layer by layer based on the state vector parameters, action parameters, and reward parameters to calculate the Q value of each recommended behavior in order to evaluate the recommendation probability of the product.

[0118] The Q value can be calculated, for example, by the following formulas (12) to (13):

[0119] s=[U gcn,_P att ] (12)

[0120] Q(s,a)=σ 3 (W 3 σ 2 (W 2 σ 1 (W 1 s+b 1 )+ b 2 ) + b 3 ) (13)

[0121] Among them, s represents the state vector, U gcn Represents the feature vector of multiple dimensions of the user, P att represents the attention embedding vector of the product, Q represents the Q value of the recommended behavior, and a represents the attention score function tanh; W 1 Represents the weight matrix of the first layer network, W 2 Represents the weight matrix of the second layer network, W 3 represents the weight matrix of the third layer network, b 1 represents the bias vector of the first layer network, b 2 represents the bias vector of the second layer network, b 3 represents the bias vector of the third layer network, σ 1 represents the activation function of the first layer network, σ 2 represents the activation function of the second layer network, σ 3 Represents the activation function of the third layer network.

[0122] In step 610 , the computing device 110 obtains the probability of recommending each product to any user.

[0123] Regarding the probability of each product being recommended to any user, for example, after the deep Q network model is trained, a set of probabilities of each product being recommended to each user is output. It should be understood that when a user interacts with the server, the server uses the trained network model based on the above method to select products with a recommendation probability higher than a predetermined threshold and recommend them to the user.

[0124] Therefore, the traditional recommendation algorithm does not take into account user feedback support, and has poor cold start capability, and cannot make timely adjustments to changes in user preferences or product updates. In the above scheme, the present invention mainly adopts the deep Q network (DQN), which can realize adaptive adjustment of label weights and can be adjusted according to different user usage scenarios, and has good versatility and cold start capability.

[0125] Figure 8Schematic diagram of an example electronic device 800 that can be used to implement an embodiment of the present specification is shown. Figure 1 The computing device 110 shown can be implemented by an electronic device 800. As shown, the electronic device 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from a storage unit 808 to a random access memory (RAM) 803. In the random access memory 803, various programs and data required for the operation of the electronic device 800 can also be stored. The central processing unit 801, the read-only memory 802, and the random access memory 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0126] Multiple components in the electronic device 800 are connected to the input / output interface 805, including: an input unit 806, such as a keyboard, a mouse, a microphone, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0127] The various processes and processing described above, such as methods 200 to 600, may be performed by the central processing unit 801. For example, in some embodiments, methods 200 to 600 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the read-only memory 802 and / or the communication unit 809. When the computer program is loaded into the random access memory 803 and executed by the central processing unit 801, one or more actions of the methods 200 to 600 described above may be performed.

[0128] The present invention relates to methods, apparatuses, systems, electronic devices, computer-readable storage media and / or computer program products. The computer program products may include computer-readable program instructions for executing various aspects of the present invention.

[0129] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0130] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge computing devices. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0131] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, the electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be executed by using the state information of the computer-readable program instructions to personalize and customize the electronic circuit, thereby implementing various aspects of the present invention.

[0132] Various aspects of the present invention are described herein with reference to flow charts and / or step diagrams of methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each of the steps in the flow charts and / or step diagrams and the combination of the steps in the flow charts and / or step diagrams can be implemented by computer-readable program instructions.

[0133] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more steps in the flowchart and / or step diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more steps in the flowchart and / or step diagram.

[0134] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more steps in the flowchart and / or step diagram.

[0135] The flowchart and step diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each square step in the flowchart or step diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the square steps can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive square steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square step in the step diagram and / or the flowchart, and the combination of the square steps in the step diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for recommending products to a user, characterized in that: include: Based on the user data set and the product data set, construct user feature labels with multiple dimensions and product feature labels with multiple dimensions respectively; Based on the user feature label and the product feature label, respectively obtaining a user embedding vector and a product embedding vector, including: concatenating multiple embedding vectors corresponding to user feature labels of multiple dimensions of the same user to obtain a user embedding vector of the same user; Extracting attribute relationships between users via the constructed first graph neural network to obtain a user graph embedding vector includes: inputting the user embedding vector into the first graph neural network; and extracting attribute relationships between products via the constructed second graph neural network to obtain a product graph embedding vector; Performing attention calculation on the product image embedding vector to obtain the product attention embedding vector includes: calculating the attention weight of each attribute feature of the product for the product image embedding vector based on a predetermined attention algorithm; calculating the attention score of the product based on the calculated attention weight to obtain the dependency relationship between different products; calculating the product attention embedding vector based on the attention score of the product and the image embedding vector of the product; and The user graph embedding vector and the product attention embedding vector are input into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of the product for the user.

2. The method according to claim 1, characterized in that Based on the user feature label and the product feature label, obtaining the user embedding vector and the product embedding vector respectively includes: Based on the user feature label and the product feature label, obtain a user feature vector and a product feature vector respectively; Based on the user feature vector and the product feature vector, calculating an embedding vector corresponding to each feature tag via a predetermined embedding algorithm; and Multiple embedding vectors corresponding to product feature labels of multiple dimensions of the same product are concatenated to obtain a product embedding vector of the same product.

3. The method according to claim 1, characterized in that The first graph neural network is a multi-layer network. The attribute relationship between users is extracted through the constructed first graph neural network to obtain the user graph embedding vector, including: Using users as nodes and attribute relationships between users as edges, initialize the adjacency matrix of the first graph neural network; Determine a weight matrix for each layer in the first graph neural network based on the user attribute features contained in the user embedding vector; Input the user's embedding vector into the first graph neural network and iterate layer by layer to learn the user's attribute relationships of various orders; and Based on the feature representation output by each layer of the first graph neural network, a user graph embedding vector is generated.

4. The method according to claim 1, characterized in that The second graph neural network is a multi-layer network. The attribute relationship between products is extracted through the constructed second graph neural network to obtain the product graph embedding vector including: Using products as nodes and attribute relationships between products as edges, initialize the adjacency matrix of the second graph neural network; Determine a weight matrix for each layer of the second graph neural network based on the product attribute features contained in the product embedding vector; Input the product embedding vector into the second graph neural network and iterate layer by layer to learn the attribute relationships of each order of the product; and Based on the feature representation of each layer output by the second graph neural network, a product image embedding vector is generated.

5. The method according to claim 3 or 4, characterized in that Also includes: The weight matrix of each layer of the first graph neural network is different from the weight matrix of the adjacent layers; as well as The weight matrix of each layer of the second graph neural network is different from the weight matrices of adjacent layers.

6. The method according to claim 5, characterized in that The deep Q network model is a multi-layer network. The user graph embedding vector and the product attention embedding vector are input into the constructed deep Q network model for multiple rounds of iterations to obtain the recommendation probability of the product for the user, including: Concatenate the user graph embedding vector and the product attention embedding vector to represent the state vector parameters of the deep Q network; Behavioral data based on product recommendations to users, representing the action parameters of the deep Q network; Based on the user's positive interaction behavior data for the product, it represents the reward parameters of the deep Q network; Iterate layer by layer based on the state vector parameters, action parameters and reward parameters to calculate the Q value of each recommended behavior so as to evaluate the recommendation probability of the product; and Get the probability of recommending each product to any user.

7. The method according to any one of claims 1 to 3, characterized in that User attributes include one or more of the following: Age, gender, region, hobbies, friend relationships, historical product purchase information, historical product usage information, attention information, and interaction information.

8. The method according to claim 1, characterized in that The products include one or more of the following: Goods, items, services, games, insurance, meal subsidies, transportation subsidies, physical cards and coupons, and virtual cards and coupons.

9. A computing device, characterized in that include: at least one processing unit; At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform the steps of the method according to any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a machine, the method according to any one of claims 1 to 8 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a machine, the method according to any one of claims 1 to 8 is performed.

Citation Information

Patent Citations

  • Personalized recommendation method and system based on collaborative filtering and deep learning

    CN112598462A

  • Article recommendation method and device

    CN113781150A

  • Model training and intervention strategy determination method and device, and electronic equipment

    CN116844695A