Item recommendation method and device
By generating feature vectors of items and users, building a relationship network, and training a scoring model, we solve the problem of single recommendation results in existing recommendation methods, achieve more accurate and diverse item recommendations, and integrate the diversity of users and items. Related relationships.
Patent Information
- Application Number
- CN202110119534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-28
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-01-28
AI Technical Summary
Existing item recommendation methods are mainly based on user behavior data and relationships, resulting in relatively single recommendation results and a lack of diversity.
By generating feature vectors of items and users, and constructing user relationship networks and item relationship networks, the rating model is trained to integrate the user's own characteristics, the items' own characteristics, the correlation between users and the correlation between items, and improve the diversity of recommendations.
It achieves more accurate and diversified item recommendations, integrates users' long-term and short-term interests, considers the correlation between users and items, and improves the accuracy and diversity of recommendations.
Smart Images

Figure CN113781150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an item recommendation method and device. Background Art
[0002] In order to provide users with more satisfactory items, e-commerce platforms extract user features based on users' browsing history, click behavior, etc., and provide users with personalized recommendations based on the extracted features.
[0003] Existing recommendation methods generally recommend items to users based only on user behavior data and relationships between users.
[0004] The items recommended by this method are relatively simple. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides an item recommendation method and device, which can improve the diversity of recommendations.
[0006] In a first aspect, an embodiment of the present invention provides an item recommendation method, comprising:
[0007] Generate a first feature vector of the item according to the item information;
[0008] Generate a first feature vector of the user according to the user information;
[0009] Determine the user relationship network and item relationship network;
[0010] Training a scoring model according to the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network;
[0011] Recommend items to users based on the trained rating model.
[0012] Optionally,
[0013] The step of generating a first feature vector of the item according to the item information includes:
[0014] Extract item features from multimodal item information respectively;
[0015] The item features of the item information of each modality are concatenated to obtain a first feature vector of the item.
[0016] Optionally,
[0017] The modalities include: text;
[0018] The extracting item features from the multimodal item information respectively includes:
[0019] Input the item information into word2vec to obtain a word vector;
[0020] The word vector is input into the trained first convolutional neural network to obtain the item feature.
[0021] Optionally,
[0022] The modalities include: pictures;
[0023] The extracting item features from the multimodal item information respectively includes:
[0024] The object information is input into the trained second convolutional neural network to obtain the object features.
[0025] Optionally,
[0026] The user information includes: attribute information and browsed item sequence;
[0027] The step of generating a first feature vector of the user according to the user information includes:
[0028] Inputting the attribute information into an embedding layer to obtain a second feature vector of the user;
[0029] The second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence are input into a trained vector model to obtain the first feature vector of the user.
[0030] Optionally,
[0031] The step of inputting the second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence into a trained vector model to obtain the first feature vector of the user includes:
[0032] Inputting the first feature vector of each browsed item into a gated recurrent unit respectively to obtain a context vector of each browsed item;
[0033] The context vector of each browsed item and the second feature vector of the user are input into the attention layer, so that the attention layer calculates the weight of each browsed item according to the context vector of each browsed item and the second feature vector of the user; and determines the first feature vector of the user according to the context vector and weight of each browsed item.
[0034] Optionally,
[0035] The determining of the item relationship network includes:
[0036] Calculate the similarity between two items based on their positions;
[0037] The item relationship network is generated by taking items as nodes and the similarity between two items as edges; wherein, in the item relationship network, if the similarity between two items is greater than a specified threshold, an edge exists between the items.
[0038] Optionally,
[0039] The step of training a scoring model according to the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network includes:
[0040] Generate a user adjacency matrix according to the user relationship network;
[0041] Generate an item adjacency matrix according to the item relationship network;
[0042] Inputting the first feature vector of the user and the user adjacency matrix into a first graph neural network to obtain a third feature vector of the user;
[0043] Inputting the first feature vector of the item and the item adjacency matrix into a second graph neural network to obtain a second feature vector of the item;
[0044] Inputting the third feature vector of the user and the second feature vector of the item into a multilayer perceptron to obtain a predicted score of the item;
[0045] The parameters of the scoring model are adjusted according to the predicted score of the item and a preset loss function.
[0046] In a second aspect, an embodiment of the present invention provides an item recommendation device, comprising:
[0047] A generating module configured to generate a first feature vector of the item based on the item information; and to generate a first feature vector of the user based on the user information;
[0048] A determination module configured to determine a user relationship network and an item relationship network;
[0049] A prediction module, configured to train a scoring model according to the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network;
[0050] The recommendation module is configured to recommend items to users based on the trained scoring model.
[0051] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0052] one or more processors;
[0053] a storage device for storing one or more programs,
[0054] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0055] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0056] An embodiment of the above invention has the following advantages or beneficial effects: a scoring model is trained through the first feature vector of the item, the first feature vector of the user, the user relationship network and the item relationship network, so that the scoring model not only learns the user's own characteristics and the item's own characteristics, but also learns the association relationship between users and the association relationship between items, which can improve the recommendation diversity.
[0057] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0059] Figure 1 is a flow chart of an item recommendation method provided by an embodiment of the present invention;
[0060] Figure 2 is a flow chart of an item recommendation method provided by another embodiment of the present invention;
[0061] Figure 3 is a schematic diagram of an item recommendation device provided by an embodiment of the present invention;
[0062] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0063] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0064] 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.
[0065] like Figure 1As shown, an embodiment of the present invention provides an item recommendation method, including:
[0066] Step 101: Generate a first feature vector of the object according to the object information.
[0067] The item information may be in multiple modes such as text, picture, audio, and video. For example, it may be a paragraph of text describing the item, or it may be a picture including the item. The first feature vector of the item is extracted from the item information.
[0068] Step 102: Generate a first feature vector of the user according to the user information.
[0069] User information may include: attribute information, behavior information, etc. Attribute information includes: basic information such as user's age, gender and occupation. Behavior information includes: user's browsed item sequence, clicked item record, etc.
[0070] Step 103: Determine the user relationship network and the item relationship network.
[0071] The user relationship network uses users as nodes and social relationships between users as edges. Social relationships can be determined based on the user's mobile phone address book, social software address book, etc. The item relationship network uses items as nodes and similarities between items as edges. For example, if two items both belong to the fruit category, there is an edge between the two items.
[0072] Step 104: Train a scoring model based on the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network.
[0073] The scoring model may include: graph convolutional network and multi-layer perceptron, wherein the multi-layer perceptron is composed of a fully connected layer and a softmax layer. The training process may use cross entropy as the loss function or the least square error as the loss function.
[0074] Step 105: Recommend items to the user based on the trained rating model.
[0075] The rating model can be used to obtain the user's rating of each item, and the items recommended to the user can be selected in descending order of the rating.
[0076] The scoring model is trained through the first feature vector of the item, the first feature vector of the user, the user relationship network and the item relationship network. The scoring model not only learns the characteristics of the user and the item themselves, but also learns the associations between users and between items, which can improve the diversity of recommendations.
[0077] In one embodiment of the present invention, generating a first feature vector of the object according to the object information includes:
[0078] Extract item features from multimodal item information respectively;
[0079] The item features of each modality of item information are concatenated to obtain the first feature vector of the item.
[0080] In actual application scenarios, item information can have only one modality or multiple modalities. If there are multiple modalities, the item features corresponding to each modality need to be spliced. By splicing multi-modal item features, the items can be more accurately characterized to obtain more accurate recommendation results.
[0081] In one embodiment of the present invention, if the item information is text, item features are extracted from the multimodal item information respectively, including:
[0082] Input item information into word2vec to get word vector;
[0083] Input the word vector into the first trained convolutional neural network to obtain the item features.
[0084] Word2vec is used to map each word in the text into a vector of a specified dimension, and then input into CNN (Convolutional Neural Networks) for feature extraction.
[0085] In one embodiment of the present invention, if the item information is a picture, extracting item features from the multimodal item information respectively includes:
[0086] The item information is input into the trained second convolutional neural network to obtain the item features.
[0087] The embodiment of the present invention extracts object features from the image through CNN, and other neural networks may also be used for feature extraction, such as HOG (histogram of Oriented Gradient).
[0088] In one embodiment of the present invention, the user information includes: attribute information and a browsed item sequence;
[0089] Generate the first feature vector of the user according to the user information, including:
[0090] Input the attribute information into the embedding layer to obtain the user's second feature vector;
[0091] The second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence are input into the trained vector model to obtain the first feature vector of the user.
[0092] Attribute information includes: occupation, age, gender and user ID. The role of the embedding layer is to digitize the attribute information. Attribute information can reflect the user's long-term interests, while the sequence of browsed items can reflect the user's short-term interests. The user's first feature vector is determined by the attribute information and the sequence of browsed items, which can reflect the user's long-term interests and short-term interests. Long-term interest refers to the user's interest in an item over a long period of time. For example, a lawyer may have a long-term interest in legal books, while short-term interest refers to the user's interest in an item in a short period of time. For example, if the trash can at home is broken, the user may browse the information about the trash can within a few days, and after buying it, he will no longer pay attention to it.
[0093] In actual application scenarios, users' short-term interests can also be mined from the collection item sequence and the search item sequence, that is, the above-mentioned browse item sequence is replaced with the collection item sequence or the search item sequence, and the browse item sequence and the collection item sequence can also be combined.
[0094] The user's first feature vector combines the user's long-term interests and short-term interests, which can improve the accuracy of recommendations.
[0095] In one embodiment of the present invention, the second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence are input into a trained vector model to obtain the first feature vector of the user, including:
[0096] Input the first feature vector of each browsed item into the gated recurrent unit to obtain the context vector of each browsed item;
[0097] The context vector of each browsed item and the second feature vector of the user are input into the attention layer, so that the attention layer calculates the weight of each browsed item according to the context vector of each browsed item and the second feature vector of the user; and determines the first feature vector of the user according to the context vector and weight of each browsed item.
[0098] In an embodiment of the present invention, the vector model includes a GRU (Gate Recurrent Unit) and an attention layer. In order to distinguish the training and prediction processes of the vector model, the user participating in the training is the first user, and the user participating in the prediction process is the second user. In an embodiment of the present invention, the parameters of the vector model are adjusted by the second feature vector of the first user and the first feature vectors of each corresponding browsed item, and the second feature vector of the second user and the first feature vectors of each corresponding browsed item are input into the trained vector model to obtain the first feature vector of the second user.
[0099] For each browsed item, the user's preference degree is different. The embodiment of the present invention determines the user's preference degree for each item through the attention mechanism. Among them, the weight of the browsed item is used to represent the user's preference degree for the browsed item.
[0100] Considering that similar items tend to cluster together, such as clothing stores tend to be located in shopping malls and breakfast shops tend to be located around residences, an embodiment of the present invention establishes an item relationship network based on the locations of the items.
[0101] Specifically, determine the item relationship network, including:
[0102] Calculate the similarity between two items based on their positions;
[0103] An item relationship network is generated with items as nodes and the similarity between two items as edges; in the item relationship network, if the similarity between two items is greater than a specified threshold, there is an edge between the items.
[0104] The embodiment of the present invention can calculate the Euclidean distance between the items according to the positions of the items, and use the Euclidean distance between the items as the similarity between the two items. The larger the Euclidean distance, the lower the similarity. In the embodiment of the present invention, in order to improve the recommendation efficiency, an edge can be established between the items when the similarity between the two items is greater than a specified threshold.
[0105] In actual application scenarios, the similarity between items can also be determined based on information such as the name, type, and manufacturer of the items.
[0106] According to the first feature vector of the item, the first feature vector of the user, the user relationship network and the item relationship network, a scoring model is trained, including:
[0107] Generate a user adjacency matrix based on the user relationship network;
[0108] Generate an item adjacency matrix based on the item relationship network;
[0109] Inputting the user's first eigenvector and the user's adjacency matrix into the first graph neural network to obtain the user's third eigenvector;
[0110] Input the first feature vector of the item and the item adjacency matrix into the second graph neural network to obtain the second feature vector of the item;
[0111] Input the third feature vector of the user and the second feature vector of the item into the multi-layer perceptron to obtain the predicted score of the item;
[0112] Adjust the parameters of the scoring model based on the predicted score of the item and the preset loss function.
[0113] In the embodiment of the present invention, the user adjacency matrix is used to represent the social relationship between users, that is, the edge of the user relationship network, and the item adjacency matrix is used to represent the similarity between items, that is, the edge of the item relationship network. Both are two-dimensional arrays.
[0114] The embodiment of the present invention learns the preferences of similar users through the first graph neural network, and can recommend items related to the user's preferences to the user. The second graph neural network learns the characteristics of similar items, and can recommend items similar to the items browsed by the user. Combining the first graph neural network with the second graph neural network can improve the diversity of item recommendations. Figure 2 , an embodiment of the present invention provides an item recommendation method, comprising:
[0115] Step 201: Input the item text into word2vec to obtain a word vector, and input the word vector into the trained first convolutional neural network to obtain item text features.
[0116] This embodiment of the present invention obtains information of 5,000 users and 5,000 items from the Yelp 2018 dataset.
[0117] Word2vec is used to map each word in the item text into a 200-dimensional vector, which is then input into CNN to extract features from the word vectors to obtain item text features.
[0118] Step 202: Input the object image into the trained second convolutional neural network to obtain the object image features.
[0119] Input the object image into CNN to obtain the object image features.
[0120] Step 203: Concatenate the object text features and the object image features to obtain a first feature vector of the object.
[0121] Step 204: Input the user's attribute information into the embedding layer to obtain the user's second feature vector.
[0122] The user’s occupation, age, gender and user ID are input into the embedding layer to obtain the user’s second feature vector.
[0123] Step 205: input the first feature vector of each browsed item in the user's browsed item sequence into the gated recurrent unit respectively to obtain the context vector of each browsed item.
[0124] Browse item sequence from p1 to p k .
[0125] Extract the context vector of the browsed items through GRU:
[0126]
[0127] Among them, p k is used to characterize the browsed item k, and θ is used to characterize the parameters of GRU. The first feature vector used to characterize item k, The context vector used to represent the browsed item k. The hidden layer unit dimension of GRU is 100, and the output vector dimension is 200.
[0128] In the embodiment of the present invention, in order to improve the training speed, the number of browsed items in the browsed item sequence is less than 30.
[0129] Step 206: Input the context vector of each browsed item and the second feature vector of the user into the attention layer, so that the attention layer calculates the weight of each browsed item based on the context vector of each browsed item and the second feature vector of the user; and determines the first feature vector of the user based on the context vector and weight of each browsed item.
[0130] The weight of the browsed items is calculated using equations (2) and (3).
[0131]
[0132]
[0133] Among them, α k is used to represent the weight of the browsed item k, v is used to represent the weight matrix, W H is the context vector weight, W X Used to characterize the weight of the first eigenvector, b is a constant, The first feature vector used to characterize user i.
[0134] The first feature vector of the user is calculated by formula (4).
[0135]
[0136] In the embodiment of the present invention, the second feature vector of the user is used as the initialization state of the first feature vector of the user, and the hidden state of the GRU network is used to represent the context vector of the browsed items, and finally the first feature vector of the user that integrates long-term interests and short-term interests is generated.
[0137] Step 207: Calculate the similarity between two items based on the locations of the items, and generate an item relationship network with the items as nodes and the similarities between the two items as edges.
[0138] Among them, in the item relationship network, if the similarity between two items is greater than a specified threshold, there is an edge between the items.
[0139] The location of an item can be represented by the longitude and latitude of the item. The specified threshold can be 30 kilometers. If the Euclidean distance between two items is less than 30 kilometers, there is an edge between the two items.
[0140] Step 208: Determine a user relationship network and an item relationship network with users as nodes and social relationships between users as edges.
[0141] Step 209: Generate a user adjacency matrix based on the user relationship network.
[0142] Step 210: Generate an item adjacency matrix based on the item relationship network.
[0143] Step 211: Input the user's first eigenvector and the user adjacency matrix into the first graph neural network to obtain the user's third eigenvector.
[0144] In the embodiment of the present invention, the number of users is M, and the first characteristic matrix X of the users is U It can be expressed as formula (5).
[0145]
[0146] The user's third eigenvector matrix U is expressed as formula (6).
[0147] U=GCN (2) (X U ; A U ,θ G,U ) (6)
[0148] Among them, A U is the user adjacency matrix, θ G,U Parameters used to characterize GCN. In order to ensure recommendation accuracy and improve training speed, the embodiment of the present invention adopts a two-layer convolutional network.
[0149] In a social network, the farther two nodes are from each other, the weaker the information association strength between them is, and the smaller the impact is. Therefore, the embodiment of the present invention can only focus on the user information within two nodes, thereby improving the training efficiency. For example, user 2 is connected to user 1, user 3 is connected to user 2 vector, and user 4 is connected to user 3. If the third eigenvector of user 1 is to be determined, only user 2 and user 3 are focused, and user 4 does not need to be focused.
[0150] Step 212: Input the first feature vector of the item and the item adjacency matrix into the second graph neural network to obtain the second feature vector of the item.
[0151] In the embodiment of the present invention, the number of items is N, and the first feature matrix Y of the items is P It can be expressed as formula (7).
[0152]
[0153] The second eigenvector matrix P of the item is expressed as formula (8).
[0154] P=GCN (2) (X P ; A P ,θ G,P ) (8)
[0155] Among them, A P is the item adjacency matrix, θ G,P Parameters used to characterize GCN. In order to ensure recommendation accuracy and efficiency, the embodiment of the present invention adopts a two-layer convolutional network.
[0156] Step 213: Input the third feature vector of the user and the second feature vector of the item into a multi-layer perceptron to obtain a predicted score of the item.
[0157] Input the user's third feature vector and the item's second feature vector into the multilayer perceptron to obtain the predicted score of user u for item p As shown in formula (9).
[0158]
[0159] Among them, f mlp (·) is used to characterize the multi-layer perceptron, θ r Parameters used to characterize a multilayer perceptron.
[0160] Step 214: Adjust the parameters of the scoring model according to the predicted score of the item and the preset loss function.
[0161] The loss function adopted by the present invention is formula (10).
[0162]
[0163] in, Used to characterize the prediction score, r up Used to represent the true rating.
[0164] Step 215: Recommend items to the user based on the trained rating model.
[0165] During the prediction process, the scoring model can determine the target user's predicted score for each item, and select a specified number of items to recommend to the target user based on the order of the predicted scores from high to low.
[0166] In this embodiment of the present invention, based on the Yelp 2018 dataset, different recommendation methods are evaluated by root mean square error (RMSE) and mean absolute error (MAE). The results are shown in Table 1.
[0167] The recommended methods include: improved singular value decomposition (SVD++), matrix factorization-Bayesian personalized ranking (MF-BPR), dual attention based model (D-ATT), deep collaborative neural network (DeepCoNN), neural attention score regression with comment level explanation (NARRE), and multi-pointer mutual attention network (MPCN).
[0168] It can be seen from Table 1 that the recommendation method provided by the embodiment of the present invention is superior to other recommendation methods.
[0169] Table 1 Evaluation results of different recommendation methods
[0170] Recommended Method RMSE MAE SVD++ 1.0968 0.7798 MF-BPR 1.0154 0.7723 D-ATT 0.9833 0.7599 DeepCoNN 0.8971 0.7562 NARRE 0.8875 0.7493 MPCN 0.8526 0.7285 Method provided by the embodiment of the present invention 0.7918 0.7043
[0171] The embodiment of the present invention integrates the long-term interests and short-term interests of users, takes into account the correlation between users and the correlation between items, and can improve the accuracy and diversity of recommendations.
[0172] like Figure 3 As shown, an embodiment of the present invention provides an item recommendation device, comprising:
[0173] The generating module 301 is configured to generate a first feature vector of the item according to the item information; and generate a first feature vector of the user according to the user information;
[0174] A determination module 302, configured to determine a user relationship network and an item relationship network;
[0175] A prediction module 303 is configured to train a scoring model based on the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network;
[0176] The recommendation module 304 is configured to recommend items to the user based on the trained rating model.
[0177] In one embodiment of the present invention, the generation module 301 is configured to extract item features from the multi-modal item information respectively; and concatenate the item features of the item information of each modality to obtain a first feature vector of the item.
[0178] In one embodiment of the present invention, the modality includes: text; a generation module 301 configured to input item information into word2vec to obtain a word vector; and input the word vector into a trained first convolutional neural network to obtain item features.
[0179] In one embodiment of the present invention, the modality includes: a picture; a generation module 301, configured to input item information into a trained second convolutional neural network to obtain item features.
[0180] In one embodiment of the present invention, user information includes: attribute information and a sequence of browsed items; a generation module 301 is configured to input the attribute information into an embedding layer to obtain a second feature vector of the user; and input the second feature vector of the user and the first feature vector of each browsed item in the sequence of browsed items into a trained vector model to obtain a first feature vector of the user.
[0181] In one embodiment of the present invention, the generation module 301 is configured to input the first feature vector of each browsed item into the gated recurrent unit respectively to obtain the context vector of each browsed item; input the context vector of each browsed item and the second feature vector of the user into the attention layer, so that the attention layer calculates the weight of each browsed item according to the context vector of each browsed item and the second feature vector of the user; and determine the first feature vector of the user according to the context vector and weight of each browsed item.
[0182] In one embodiment of the present invention, the determination module 302 is configured to calculate the similarity between two items based on the positions of the items; generate an item relationship network with the items as nodes and the similarities between the two items as edges; wherein, in the item relationship network, if the similarity between the two items is greater than a specified threshold, then there is an edge between the items.
[0183] In one embodiment of the present invention, the prediction module 303 is configured to generate a user adjacency matrix based on the user relationship network; generate an item adjacency matrix based on the item relationship network; input the user's first eigenvector and the user adjacency matrix into the first graph neural network to obtain the user's third eigenvector; input the item's first eigenvector and the item adjacency matrix into the second graph neural network to obtain the item's second eigenvector; input the user's third eigenvector and the item's second eigenvector into a multilayer perceptron to obtain a predicted score for the item; and adjust the parameters of the scoring model based on the predicted score of the item and a preset loss function.
[0184] An embodiment of the present invention provides an electronic device, including:
[0185] one or more processors;
[0186] a storage device for storing one or more programs,
[0187] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0188] An embodiment of the present invention provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method of any of the above embodiments is implemented.
[0189] Figure 4An exemplary system architecture 400 is shown to which the item recommendation method or item recommendation apparatus according to the embodiments of the present invention can be applied.
[0190] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0191] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0192] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0193] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0194] It should be noted that the item recommendation method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the item recommendation device is generally disposed in the server 405 .
[0195] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0196] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0197] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0198] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0199] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0200] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0201] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession 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 box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0202] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."
[0203] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0204] Generate a first feature vector of the item according to the item information;
[0205] Generate a first feature vector of the user according to the user information;
[0206] Determine the user relationship network and item relationship network;
[0207] Training a scoring model according to the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network;
[0208] Recommend items to users based on the trained rating model.
[0209] According to the technical solution of the embodiment of the present invention, the scoring model is trained through the first feature vector of the item, the first feature vector of the user, the user relationship network and the item relationship network, so that the scoring model not only learns the user's own characteristics and the item's own characteristics, but also learns the association relationship between users and the association relationship between items, which can improve the recommendation diversity.
[0210] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An item recommendation method, characterized in that: include: Generate a first feature vector of the item according to the item information; Generate a first feature vector of the user according to the user information; Determine the user relationship network and item relationship network; According to the first feature vector of the item, the first feature vector of the user, the user relationship network and the item relationship network, a scoring model is trained, including: generating a user adjacency matrix according to the user relationship network; generating an item adjacency matrix according to the item relationship network; inputting the first feature vector of the user and the user adjacency matrix into a first graph neural network to obtain a third feature vector of the user; inputting the first feature vector of the item and the item adjacency matrix into a second graph neural network to obtain a second feature vector of the item; inputting the third feature vector of the user and the second feature vector of the item into a multi-layer perceptron to obtain a predicted score of the item; adjusting the parameters of the scoring model according to the predicted score of the item and a preset loss function, wherein the first graph neural network learns the preferences of similar users; and the second graph neural network learns the features of similar items; Recommend items to users based on the trained rating model; The determining of the item relationship network includes: Calculate the similarity between two items based on the location of the items, where the location of the items is the longitude and latitude of the items, and the similarity between the two items is the Euclidean distance between the items; The item relationship network is generated with items as nodes and the similarities between two items as edges.
2. The method according to claim 1, characterized in that The step of generating a first feature vector of the item according to the item information includes: Extract item features from multimodal item information respectively; The item features of the item information of each modality are concatenated to obtain a first feature vector of the item.
3. The method according to claim 2, characterized in that The modalities include: text; The extracting item features from the multimodal item information respectively includes: Input the item information into word2vec to obtain a word vector; Inputting the word vector into the trained first convolutional neural network to obtain the item feature; and / or, The modalities include: pictures; The extracting item features from the multimodal item information respectively includes: The object information is input into the trained second convolutional neural network to obtain the object features.
4. The method according to claim 1, characterized in that The user information includes: attribute information and browsed item sequence; The step of generating a first feature vector of the user according to the user information includes: Inputting the attribute information into an embedding layer to obtain a second feature vector of the user; The second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence are input into a trained vector model to obtain the first feature vector of the user.
5. The method according to claim 4, characterized in that The step of inputting the second feature vector of the user and the first feature vector of each browsed item in the browsed item sequence into a trained vector model to obtain the first feature vector of the user includes: Inputting the first feature vector of each browsed item into a gated recurrent unit respectively to obtain a context vector of each browsed item; The context vector of each browsed item and the second feature vector of the user are input into the attention layer, so that the attention layer calculates the weight of each browsed item according to the context vector of each browsed item and the second feature vector of the user; and determines the first feature vector of the user according to the context vector and weight of each browsed item.
6. The method according to claim 1, characterized in that In the item relationship network, if the similarity between two items is greater than a specified threshold, there is an edge between the items.
7. An item recommendation device, characterized in that: include: A generating module configured to generate a first feature vector of the object according to the object information; Generate a first feature vector of the user according to the user information; A determination module configured to determine a user relationship network and an item relationship network; A prediction module, configured to train a scoring model according to the first feature vector of the item, the first feature vector of the user, the user relationship network, and the item relationship network; A recommendation module, configured to recommend items to users based on the trained rating model; The determination module is further configured to calculate the similarity of two items according to the location of the items, wherein the location of the items is the longitude and latitude of the items, and the similarity of the two items is the Euclidean distance between the items; and generate the item relationship network with the items as nodes and the similarity of the two items as edges; The prediction module is further configured to generate a user adjacency matrix based on the user relationship network; generate an item adjacency matrix based on the item relationship network; input the first feature vector of the user and the user adjacency matrix into a first graph neural network to obtain the third feature vector of the user; input the first feature vector of the item and the item adjacency matrix into a second graph neural network to obtain the second feature vector of the item; input the third feature vector of the user and the second feature vector of the item into a multilayer perceptron to obtain a predicted score of the item; adjust the parameters of the scoring model according to the predicted score of the item and a preset loss function, wherein the first graph neural network learns the preferences of similar users; and the second graph neural network learns the characteristics of similar items.
8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Information recommendation method based on graph convolution and neural collaborative filtering
CN108874914A
User dynamic preference oriented commodity sequence personalized recommendation method
CN110458627A
Method and device for acquiring information
CN110473042A
Multi-relation collaborative filtering algorithm based on graph neural network
CN111523047A
Article score prediction method based on improved graph convolutional neural network
CN111859166A
