WO2019109724A1 - 一种推荐物品的方法和装置 - Google Patents
一种推荐物品的方法和装置 Download PDFInfo
- Publication number
- WO2019109724A1 WO2019109724A1 PCT/CN2018/109590 CN2018109590W WO2019109724A1 WO 2019109724 A1 WO2019109724 A1 WO 2019109724A1 CN 2018109590 W CN2018109590 W CN 2018109590W WO 2019109724 A1 WO2019109724 A1 WO 2019109724A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- target
- item
- user
- node list
- feedback
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
Definitions
- the present application relates to the field of computer technology, and in particular, to a method and apparatus for recommending an item.
- the user Before people can operate on an item, they can first select the item (product or movie, etc.) to be processed. Specifically, the user may trigger the terminal to send an item list obtaining request to the server by operation, and after receiving the item list obtaining request, the server may send the item list of each item stored in the server to the terminal. After receiving the item list, the terminal can display it, and the user can browse each item in the item list one by one to determine the final favorite item.
- the embodiment of the present invention provides a method and an apparatus for recommending an item.
- the technical solution is as follows:
- a method for recommending an item comprising: obtaining attribute data of a target user and attribute data of a plurality of candidate items, the attribute data of the target user includes an identifier of the target user, and attribute data of each candidate item Include an identifier of the corresponding candidate item; process the attribute data of the target user and the attribute data of the plurality of candidate items to generate a target data set, where the target data set includes the identifier of the target user and the corresponding target first interaction node list, and multiple candidates An identifier of each candidate item in the item and a corresponding target second interaction node list, the target first interaction node list is used to represent interaction information of the target user with other users or items, and the target second interaction node list is used to represent the candidate item and The interaction information of other items or users; input the target data set into the scoring model, and obtain the scoring of the plurality of candidate items by the target user, wherein the scoring model is trained according to the attribute data of the plurality of users, the attribute data of the
- the attribute data of each user includes the identifier of the corresponding user, and the plurality of items includes a plurality of candidate items, and the attribute data of each item of the plurality of items includes the identifier of the corresponding item, and the scoring data includes each of the plurality of users. Scoring one or more items of the plurality of items; determining the target recommended items according to the scoring of the plurality of candidate items by the target user.
- the server may have the function of recommending an item. Specifically, the server may acquire the attribute data of the target user and the attribute data of the plurality of candidate items in the candidate set. Further, the attribute data of the target user and the attribute data of the plurality of candidate items may be processed to obtain a user including the target user.
- the interaction information that is, the target first interaction node list may include identifiers of other users or items that the target user history has interacted with, and the target second interaction node list may be used to indicate interaction information between the candidate items and other items or users, that is, the target number
- the second interactive node list may contain other items or user's identification that the candidate item history has interacted with.
- the scoring model may be pre-stored in the server, wherein the scoring model may be obtained by the server according to the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data, wherein the plurality of users include the target user, and the plurality of items include multiple Candidates.
- the server may predict, by the scoring model, the scoring of each candidate item of the plurality of candidate items by the target user. Specifically, the server generates the identifier of the target user and the corresponding target first interactive node list, and each candidate item of the plurality of candidate items. After the identifier and the target data set of the corresponding target second interaction node list, the target data set can be input into the scoring model, and the target user can score the plurality of candidate items.
- the server can be based on the target user to the plurality of candidate items.
- the score is determined, among the plurality of candidate items, the target recommended item to be recommended to the target user.
- the target user can select the desired item among the target recommended items recommended by the server, and does not need to select among all the items stored in the server, thereby improving the efficiency of the user selecting the item.
- the server utilizes the interaction information of the target user with other users or items (ie, the target first interactive node list) and the interaction information of each candidate item with other items or users when predicting the target user's scoring of each candidate item. (ie, the target second interactive node list), thereby improving the accuracy of the score obtained.
- the attribute data of the target user further includes one or more of the following data: gender, height, weight, age, occupation, income, hobbies, education, and attribute data of each candidate item. Also included is one or more of the following data: brand, color, size, price, comment, taste, shelf life, icon.
- the attribute data of the target user and the attribute data of the plurality of candidate items are processed to generate the target data set, including: each user among the plurality of pre-recorded users according to the identifier of the target user Determining, in the target first interaction node list corresponding to the target, determining a target first interaction node list corresponding to the target user, and corresponding to the identifier of each candidate item among the plurality of candidate items recorded in advance according to the identifier of each candidate item Determining, in the target second interaction node list, a target second interaction node list corresponding to each candidate item; according to the identifier of the target user, the target first interaction node list corresponding to the target user, the identifier of each candidate item, and each candidate A target second interactive node list corresponding to the item, and a target data set is generated.
- the target first interaction node list corresponding to the identifier of each user of the plurality of users and the target second interaction corresponding to the identifier of each candidate item of the plurality of candidate items may be pre-stored in the server.
- a node list wherein the server may record, in the form of a table, a target first interaction node list corresponding to the identifier of each user and a target second interaction node list corresponding to the identifier of each candidate item, or may record in the form of a bipartite graph a target first interaction node list corresponding to the identifier of each user and a target second interaction node list corresponding to the identifier of each candidate item.
- the target first interaction node corresponding to the target user may be determined in the target first interaction node list corresponding to the identifier of each user among the plurality of pre-recorded users. a list, and the target second interaction node list corresponding to each candidate item may be determined in the target second interaction node list corresponding to the identifier of each candidate item among the plurality of candidate items recorded in advance.
- the server may generate the identifier including the target user and the corresponding target first interaction node list, and each candidate item.
- each target data in the target data set may include the identifier of the target user and the corresponding target first interaction node list, the identifier of the candidate item j, and the corresponding target number
- the second interactive node list, the candidate item j is any one of the plurality of candidate items.
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model
- the target data set is input into the scoring model to obtain the scoring of the plurality of candidate items by the target user, including: inputting the identifier of the target user in the target data set and the identifier of the candidate item j into the feature learning model, and obtaining the feature vector corresponding to the target user. And a feature vector corresponding to the candidate item j, and the target first interaction node list corresponding to the target user in the target data set and the target second interaction node list corresponding to the candidate item j are input into the feedback learning model, and the implicit correspondence corresponding to the target user is obtained.
- Feedback is implicit feedback corresponding to the candidate item j, wherein the item j is any one of the plurality of candidate items; the feature vector corresponding to the target user, the feature vector corresponding to the candidate item j, and the implicit feedback corresponding to the target user
- the implicit feedback corresponding to the candidate item j is input to the neural network model, and the target user is scored for the candidate item j.
- the feature vector corresponding to the target user may be a vector for characterizing the feature (or characteristic) of the user itself.
- the feature vector corresponding to the candidate item j may be a vector for characterizing the feature (or characteristic) of the candidate item j itself.
- the scoring model may include a feature learning model, a feedback learning model, and a neural network model, wherein the feature learning model may be a feature vector for learning the target user and each candidate item, and the feature learning model
- the model parameters may include a user feature matrix and an item feature matrix, wherein the user feature matrix is composed of feature vectors of each user of the plurality of users (ie, each row vector of the user feature matrix is a feature vector of the corresponding user, respectively, and the user feature The number of rows of the matrix is the number of multiple users.
- the item feature matrix is composed of the feature vectors of each of the plurality of items (ie, each row of the item feature matrix is a feature vector of the corresponding item, and the item feature matrix The number of rows is the number of items).
- the server may input the identifier of the target user and the identifier of the candidate item j into the feature learning model to obtain the feature vector corresponding to the target user and the feature vector corresponding to the candidate item j.
- the server inputs the identifier of the target user and the identifier of the candidate item j into the feature learning model
- the feature vector corresponding to the target user is extracted in the user feature matrix by the feature learning model according to the identifier of the target user and the identifier of the candidate item j.
- the feature vector corresponding to the candidate item j is extracted in the item feature matrix, and the feature vector corresponding to the target user and the feature vector corresponding to the candidate item j are obtained.
- the feedback learning model may be implicit feedback for learning the target user and each candidate item, and the model parameters of the feedback learning model may include a user feedback matrix (which may be represented by Y) and an item feedback matrix (which may be represented by X), wherein
- the user feedback matrix may be composed of feedback vectors (each row vector in the user feedback matrix represents a feedback vector corresponding to one node), and the item feedback matrix may be composed of feedback vectors (each row vector in the item feedback matrix represents one) The feedback vector corresponding to the node).
- the feedback learning model is input, and the implicit feedback corresponding to the target user k and the implicit feedback corresponding to the candidate item j are obtained.
- the feedback learning model may extract multiple feedback vectors corresponding to the target first interaction node list in the user feedback matrix (wherein the feedback vector)
- the number of nodes is the number of nodes included in the target first interactive node list), and the feedback vector corresponding to the target user k is obtained.
- multiple feedback vectors may be added to obtain implicit feedback corresponding to the target user k.
- the specific processing of obtaining the implicit feedback corresponding to the candidate item j may be as follows: after the server inputs the target second interactive node list corresponding to the candidate item j into the feedback learning model, the target second interaction node may be extracted in the item feedback matrix by using the feedback learning model. A plurality of feedback vectors corresponding to the list (wherein the number of feedback vectors is the number of nodes included in the target second interactive node list), and a feedback vector corresponding to the candidate item j is obtained. After the feedback vector corresponding to the candidate item j is obtained, a plurality of feedback vectors may be added to obtain an implicit feedback corresponding to the candidate item j.
- the server may input the neural network model into the target user candidate.
- the score of item j may be obtained by the server.
- the target first interaction node list includes a multi-level target first interaction node list
- the target second interaction node list corresponding to each candidate item includes a multi-level target second interaction node list
- the multi-level target The first interactive node list in the first interactive node list is used to represent the interaction information of the target user and the item, and the even-order target in the multi-level target first interactive node list is used to represent the target user and other users.
- Interactive information multi-level target second interactive node list odd-numbered target second interactive node list is used to represent candidate item and user interaction information, multi-level target second interactive node list in even-order target second interactive node list
- the information indicating the interaction between the candidate item and the other item; the target first interactive node list corresponding to the target user in the target data set and the target second interactive node list corresponding to the candidate item j are input into the feedback learning model to obtain the hidden corresponding to the target user.
- Implicit feedback corresponding to candidate item j including: target According to the multi-level target first interaction node list corresponding to the centralized target user and the multi-level target second interaction node list corresponding to the candidate item j, the feedback learning model is input, and the implicit feedback corresponding to the target user and the hidden corresponding to the candidate item j are obtained. Feedback.
- the server when the server predicts the target user to score the candidate item j, the server may also use the multi-level target first interaction node list corresponding to the target user, and the multi-level target second interaction node corresponding to the candidate item j.
- the multi-level target first interaction node list may be a first-order target first interaction node list, a second-order target first interaction node list, ..., an A-order target first interaction node list
- a multi-level user feedback matrix may be Including first-order user feedback matrix, second-order user feedback matrix, ..., A-order user feedback matrix
- A is a preset value (such as A is 3)
- A is the default target user can reach in the user-item map
- the multi-level target second interactive node list may be a first-order target second interactive node list, a second-order target second interactive node list, ..., a B-order target second interactive node list, a multi-order item feedback matrix It may include a first-order item feedback matrix, a second-order item feedback matrix, ..., a B-order item feedback matrix, B is a preset value, and B is a preset candidate item j in the user-object
- B is a preset candidate item j in the user-object
- the first-order user feedback matrix can be Y 1
- each row vector in the first-order user feedback matrix can be a vector representation of the corresponding item as a node in the first-order target first interaction node list
- a second-order user feedback matrix can Expressed by Y 2
- each row vector in the second-order user feedback matrix may be a vector representation when the corresponding user is a node in the second-order target first interaction node list, and so on.
- the first-order item feedback matrix can be X 1
- each row vector in the first-order item feedback matrix can be a vector representation of the corresponding user as a node in the first-order target second interactive node list
- a second-order item feedback matrix can Expressed by X 2
- each row vector in the second-order item feedback matrix may be a vector representation of the corresponding item as a node in the second-order target second interactive node list, and so on.
- the server may input the multi-level target first interaction node list corresponding to the target user in the target data set and the multi-level target second interaction node list corresponding to the candidate item j into the feedback learning model to obtain the target user corresponding Implicit feedback and implicit feedback corresponding to candidate j.
- the server learning model by feedback the user feedback matrix Y a step
- a first interaction extraction target node list Corresponding feedback vector.
- the server may select the feedback vector corresponding to the first interaction node list of each target object corresponding to the target user according to the above manner, and then add all the selected feedback vectors to obtain the implicit feedback corresponding to the target user.
- the server can select the target second interactive node list in the item feedback matrix X b by feedback learning model Corresponding feedback vector, obtaining a target second interactive node list corresponding to the candidate item j Corresponding feedback vector.
- the server may select the feedback vector corresponding to the second interactive node list of each target object corresponding to the candidate item j according to the above manner, and further, all the selected feedback vectors may be added to obtain the implicit feedback corresponding to the candidate item j.
- the historical interaction information corresponding to the target user and the historical interaction information of each order of each candidate item are utilized, thereby improving the predicted target user-to-candidate item.
- the accuracy of the score is improved.
- the model parameters of the feedback learning model include: a weight of a feedback vector of each of the plurality of users, a weight of a feedback vector of each of the plurality of items; and a target user in the target data set Corresponding target first interactive node list and target second interactive node list corresponding to the candidate item j, input a feedback learning model, and obtain implicit feedback corresponding to the target user and implicit feedback corresponding to the candidate item j, including: concentrating the target data The identifier of the target user and the corresponding target first interaction node list, the identifier of the candidate item j, and the corresponding target second interaction node list, input a feedback learning model, and obtain implicit feedback corresponding to the target user and the hidden corresponding to the candidate item j Feedback.
- the model parameter for the feedback learning model further includes a weight of a feedback vector of each of the plurality of users and a weight of a feedback vector of each of the plurality of items
- the server may target the The identifier of the target user in the data set and the corresponding target first interaction node list, the identifier of the candidate item j, and the corresponding target second interaction node list, input the feedback learning model, and obtain the implicit feedback corresponding to the target user and the candidate item j correspondingly. Implicit feedback.
- the server may determine the feedback vector corresponding to the target user and the feedback vector corresponding to the candidate item j by using the learning model according to the method for determining the feedback vector corresponding to the target user and the candidate item j. Then, the server may weight and process the feedback vector corresponding to the target user k by feeding back the weight of the feedback vector of the target user in the learning model (which may be represented by ⁇ kt ) according to the identifier of the target user and the identifier of the candidate item j.
- the learning model which may be represented by ⁇ kt
- the implicit feedback corresponding to the target user and by weighting the feedback vector of the candidate item j in the feedback learning model (which can be represented by ⁇ vj ), the feedback vector corresponding to the candidate item j is weighted and processed to obtain the hidden corresponding to the candidate item j. Feedback.
- the weight of the feedback vector of the target user and the weight of the feedback vector of each candidate item are introduced, thereby improving the predicted target user's scoring of the candidate item. accuracy.
- determining the target recommended item according to the scoring of the plurality of candidate items by the target user including: determining, according to the scoring of the plurality of candidate items by the target user, determining that the corresponding scoring meets the target recommendation of the preset recommended condition. article.
- the server may pre-store the preset recommendation condition, and after the server obtains the score of the plurality of candidate items by the target user, the selected scores may be selected among the plurality of candidate items to satisfy the preset recommendation condition. Target recommended items.
- determining, according to the scoring of the plurality of candidate items by the target user, determining that the corresponding scoring meets the target recommended item that meets the preset recommendation condition including: determining, according to the scoring of the plurality of candidate items by the target user, determining corresponding The maximum number of target recommended items is scored; or, according to the target user's scoring of the plurality of candidate items, the target recommended item whose score is greater than the preset score threshold is determined.
- the plurality of candidate items may be sorted according to the order of the corresponding scores, and then the ranking is advanced.
- a predetermined number of candidate items are determined as target recommended items.
- a preset score threshold may be pre-stored in the server. After the server determines that the target user scores the plurality of candidate items, the candidate items whose scores are greater than the preset score threshold may be selected among the plurality of candidate items, and the determined candidate items may be determined as the target recommended items.
- the scoring model is trained by acquiring attribute data of a plurality of users, attribute data of the plurality of items, and the scoring data; attribute data of the plurality of users, and attributes of the plurality of items.
- the data and the scoring data are processed to obtain a training data set, where the training data set includes an identifier of each user and a corresponding first interactive node list, an identifier of each item, and a corresponding second interactive node list, and each user pairs a score of one or more items in the item, the first interactive node list is used to represent the interaction information of the user with other users or items, and the second interactive node list is used to represent the interaction information of the item with other items or users; according to the training data set , training the scoring model.
- the server may predetermine the training data set. Specifically, the server may acquire attribute data of the plurality of users, attribute data of the plurality of items, and scoring data, wherein the attribute data of each of the plurality of users may include an identifier of the corresponding user, and each of the plurality of items
- the attribute data may include an identification of the corresponding item
- the scoring data may include scoring of one or more of the plurality of items by each of the plurality of users.
- the server may process the same to obtain a training data set, where the training data set may include the identifier and corresponding of each of the plurality of users. a first interactive node list, an identification of each of the plurality of items, and a corresponding second interactive node list, and each user scores one or more of the plurality of items.
- the server can train the above scoring model, that is, the model parameters in the scoring model can be adjusted to obtain the scoring model after training.
- the attribute data of each of the multiple users further includes one or more of the following: gender, height, weight, age, occupation, income, hobbies, education, and more.
- the attribute data of each item in the item also includes one or more of the following data: brand, color, size, price, comment, taste, shelf life, icon; the scoring data also includes one or more of the following data: : Operating time, current equipment usage, discounts.
- acquiring attribute data of multiple users, attribute data of multiple items, and scoring data includes: acquiring a plurality of scoring records, each of the plurality of scoring records including attribute data of the user u
- the attribute data of the item i and the score data of the item i by the user u, the user u is any one of the plurality of users who have scored the item i, and the item i is any one of the plurality of items;
- the attribute data of the user, the attribute data of the plurality of items, and the scoring data are processed to obtain a training data set, including: processing the plurality of scoring records to obtain a training data set, where each training data in the training data set includes the identifier of the user u and Corresponding first interactive node list, identifier of item i and corresponding second interactive node list, user u scores item i.
- the server may acquire a plurality of scoring records, and each of the plurality of scoring records includes attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, the item i is any one of a plurality of items, the user u is any one of a plurality of users who have overwhelmed the item i, the attribute data of the user u includes the identifier of the user u, and the attribute data of the item i includes the identifier of the item i
- the scoring data of the item i by the user u may include the scoring of the item i by the user u, wherein the scoring record may also be referred to as an interaction record (for example, if the user purchases an item, the scoring data in the corresponding scoring record may be 1) ).
- the plurality of scoring records are (u 0 , i 0 , 1), (u 0 , i 1 , 1), (u 0 , i 2 , 1), respectively.
- the training data g corresponding to the scoring record w can be obtained based on the scoring record w and the scoring record before the scoring record w.
- the scoring record is first obtained as w 0 (u 0 , i 0 , 1).
- the scoring record w 0 Since the scoring record w 0 is acquired for the first time, the first interactive node list corresponding to the user u 0 is empty, and the item i 0 corresponds to second interactive node list is empty, to obtain training data g 0 w 0 corresponding to the score recorded for the identification of a user u u 0, i, i 0 tagged items, a first list of the corresponding user u interactive node is empty, the article i
- the corresponding second interactive node list is empty and is divided into 1; the second obtained scoring record is w 1 (u 0 , i 1 , 1), so that it can be seen that the user u 0 over-scoring the item i 0 , the item i 1 other users are not playing too, therefore, a first user u 0 corresponding to the interactive node list is I 0, i 1 corresponding to the second article interactive node list is empty, the corresponding scoring recording w 1 g 1 training data obtained for the user u
- the item i 1 is over-subscribed by the user u 0. Therefore, the first interactive node list corresponding to the user u 1 is empty, the second interactive node list corresponding to the item i 1 is u 0 , and the obtained training data g corresponding to the scoring record w 2 is obtained.
- 2 is the identifier u 1 of the user u and the identifier i 1 of the item i.
- the first interactive node list corresponding to the user u is empty, and the second interactive node list corresponding to the item i is u 0 and is divided into 1.
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model; wherein, according to the training data set, the scoring model is trained, including: inputting the identifier of the user u and the identifier of the item i
- the feature learning model obtains the feature vector corresponding to the user u and the feature vector corresponding to the item i, and inputs the first interactive node list corresponding to the user u and the second interactive node list corresponding to the item i into the feedback learning model to obtain the user u corresponding
- the implicit feedback corresponds to the implicit feedback corresponding to the item i; the feature vector corresponding to the user u and the feature vector corresponding to the item i, the implicit feedback corresponding to the user u, and the implicit feedback corresponding to the item i are input into the neural network model, Predicting the score; according to the predicted score and the user u's scoring of the item i, the feature learning model, the feedback learning model and the neural network model are adjusted to obtain the trained scoring
- the server after obtaining the training data set, the server inputs the identifier of the user u and the identifier of the item i in each training data in the training data set into the feature learning model to obtain the feature vector and the item i corresponding to the user u.
- Corresponding feature vector, and the first interactive node list corresponding to the user u and the second interactive node list corresponding to the item i in each training data are input into the feedback learning model, and the implicit feedback corresponding to the user u and the item i corresponding are obtained.
- the implicit feedback wherein the eigenvector corresponding to the user u and the eigenvector corresponding to the item i are similar to the eigenvector corresponding to the eigenvector corresponding to the target user and the eigenvector corresponding to the candidate item j, and the hidden corresponding to the user u is obtained.
- the specific manner of the implicit feedback corresponding to the item feedback and the item i is similar to the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j, and details are not described herein.
- the server can input the neural network model to obtain the predicted score.
- the model parameters of the feature learning model, the feedback learning model, and the neural network model may be adjusted according to the prediction score and the user u in each training data in the training data set.
- the trained scoring model is obtained, wherein the model parameters of the feature learning model, the feedback learning model and the neural network model can be adjusted based on the training principle that the predicted score approaches the scoring of the item i by the user u, and the trained model is obtained. Score the model.
- the first interaction node list corresponding to the user u includes a multi-level first interaction node list
- the second interaction node list corresponding to the item i includes a multi-level second interaction node list
- the model of the feedback learning model is fed back.
- the parameter includes: a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the first interactive node list corresponding to the user u is the same as the order of the user feedback matrix, and the order of the second interactive node list corresponding to the item i
- the order of the first interactive node in the multi-order first interactive node list is used to represent the interaction information between the user and the item, and the first-order first interactive node list in the multi-level first interactive node list is used.
- the odd-order second interaction node list is used to represent the interaction information between the item and the user
- the even-order second interaction node list in the multi-level second interaction node list is used to represent the interaction information between the user and other users.
- the interaction node list inputs the feedback learning model, and obtains the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i, including: a multi-level first interaction node list corresponding to the user u, and a multi-level second interaction node corresponding to the item i
- the list input feedback learning model obtains implicit feedback corresponding to user u and implicit feedback corresponding to item i.
- the server when training the scoring model, may further utilize a multi-level first interactive node list corresponding to the user u and a multi-level second interactive node list corresponding to the item i.
- the server may input the multi-level first interaction node list corresponding to the user u and the multi-level second interaction node list corresponding to the item i into the feedback learning model, and obtain the implicit feedback corresponding to the user u and the hidden corresponding to the item i. Feedback.
- the model parameters of the feedback learning model include: a weight of a feedback vector of each of the plurality of users, a weight of a feedback vector of each of the plurality of items; and a first corresponding to the user u
- the interaction node list and the second interaction node list corresponding to the item i are input to the feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained, including: the identifier of the user u and the corresponding first interaction node list
- the identifier of the item i and the corresponding second interactive node list are input into the feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained.
- the server may input the identifier of the user u in each training data in the training data set and the corresponding first interactive node list, the identifier of the item i, and the corresponding second interactive node list, and input feedback learning.
- the model obtains implicit feedback corresponding to user u and implicit feedback corresponding to item i.
- a training method for a scoring model comprising: acquiring attribute data of a plurality of users, attribute data of a plurality of items, and scoring data; attribute data of a plurality of users, and attribute data of a plurality of items And scoring the data for processing, obtaining a training data set, where the training data set includes an identifier of each user and a corresponding first interactive node list, an identifier of each item, and a corresponding second interactive node list, and each user pairs multiple items
- the scoring of one or more items in the first interaction node list is used to represent the interaction information of the user with other users or items
- the second interaction node list is used to represent the interaction information of the item with other items or users; according to the training data set, Train the scoring model.
- the server may predetermine the training data set. Specifically, the server may acquire attribute data of the plurality of users, attribute data of the plurality of items, and scoring data, wherein the attribute data of each of the plurality of users may include an identifier of the corresponding user, and each of the plurality of items
- the attribute data may include an identification of the corresponding item
- the scoring data may include scoring of one or more of the plurality of items by each of the plurality of users.
- the server may process the same to obtain a training data set, where the training data set may include the identifier and corresponding of each of the plurality of users. a first interactive node list, an identification of each of the plurality of items, and a corresponding second interactive node list, and each user scores one or more of the plurality of items.
- the server can train the above scoring model, that is, the model parameters in the scoring model can be adjusted to obtain the scoring model after training.
- the attribute data of each of the multiple users further includes one or more of the following: gender, height, weight, age, occupation, income, hobbies, education, and more.
- the attribute data of each item in the item also includes one or more of the following data: brand, color, size, price, comment, taste, shelf life, icon; the scoring data also includes one or more of the following data: : Operating time, current equipment usage, discounts.
- acquiring attribute data of multiple users, attribute data of multiple items, and scoring data includes: acquiring a plurality of scoring records, each of the plurality of scoring records including attribute data of the user u
- the attribute data of the item i and the score data of the item i by the user u, the user u is any one of the plurality of users who have scored the item i, and the item i is any one of the plurality of items;
- the attribute data of the user, the attribute data of the plurality of items, and the scoring data are processed to obtain a training data set, including: processing the plurality of scoring records to obtain a training data set, where each training data in the training data set includes the identifier of the user u and Corresponding first interactive node list, identifier of item i and corresponding second interactive node list, user u scores item i.
- the server may acquire a plurality of scoring records, and each of the plurality of scoring records includes attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, the item i is any one of a plurality of items, the user u is any one of a plurality of users who have overwhelmed the item i, the attribute data of the user u includes the identifier of the user u, and the attribute data of the item i includes the identifier of the item i
- the scoring data of the item i by the user u may include the scoring of the item i by the user u, wherein the scoring record may also be referred to as an interaction record (for example, if the user purchases an item, the scoring data in the corresponding scoring record may be 1) ).
- the plurality of scoring records are (u 0 , i 0 , 1), (u 0 , i 1 , 1), (u 0 , i 2 , 1), respectively.
- the training data g corresponding to the scoring record w can be obtained based on the scoring record w and the scoring record before the scoring record w.
- the scoring record is first obtained as w 0 (u 0 , i 0 , 1).
- the scoring record w 0 Since the scoring record w 0 is acquired for the first time, the first interactive node list corresponding to the user u 0 is empty, and the item i 0 corresponds to second interactive node list is empty, to obtain training data g 0 w 0 corresponding to the score recorded for the identification of a user u u 0, i, i 0 tagged items, a first list of the corresponding user u interactive node is empty, the article i
- the corresponding second interactive node list is empty and is divided into 1; the second obtained scoring record is w 1 (u 0 , i 1 , 1), so that it can be seen that the user u 0 over-scoring the item i 0 , the item i 1 other users are not playing too, therefore, a first user u 0 corresponding to the interactive node list is I 0, i 1 corresponding to the second article interactive node list is empty, the corresponding scoring recording w 1 g 1 training data obtained for the user u
- the item i 1 is over-subscribed by the user u 0. Therefore, the first interactive node list corresponding to the user u 1 is empty, the second interactive node list corresponding to the item i 1 is u 0 , and the obtained training data g corresponding to the scoring record w 2 is obtained.
- 2 is the identifier u 1 of the user u and the identifier i 1 of the item i.
- the first interactive node list corresponding to the user u is empty, and the second interactive node list corresponding to the item i is u 0 and is divided into 1.
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model; wherein, according to the training data set, the scoring model is trained, including: inputting the identifier of the user u and the identifier of the item i
- the feature learning model obtains the feature vector corresponding to the user u and the feature vector corresponding to the item i, and inputs the first interactive node list corresponding to the user u and the second interactive node list corresponding to the item i into the feedback learning model to obtain the user u corresponding
- the implicit feedback corresponds to the implicit feedback corresponding to the item i; the feature vector corresponding to the user u and the feature vector corresponding to the item i, the implicit feedback corresponding to the user u, and the implicit feedback corresponding to the item i are input into the neural network model, Predicting the score; according to the predicted score and the user u's scoring of the item i, the feature learning model, the feedback learning model and the neural network model are adjusted to obtain the trained scoring
- the server after obtaining the training data set, the server inputs the identifier of the user u and the identifier of the item i in each training data in the training data set into the feature learning model to obtain the feature vector and the item i corresponding to the user u.
- Corresponding feature vector, and the first interactive node list corresponding to the user u and the second interactive node list corresponding to the item i in each training data are input into the feedback learning model, and the implicit feedback corresponding to the user u and the item i corresponding are obtained.
- the implicit feedback wherein the eigenvector corresponding to the user u and the eigenvector corresponding to the item i are similar to the eigenvector corresponding to the eigenvector corresponding to the target user and the eigenvector corresponding to the candidate item j, and the hidden corresponding to the user u is obtained.
- the specific manner of the implicit feedback corresponding to the item feedback and the item i is similar to the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j, and details are not described herein.
- the server can input the neural network model to obtain the predicted score.
- the model parameters of the feature learning model, the feedback learning model, and the neural network model may be adjusted according to the prediction score and the user u in each training data in the training data set.
- the trained scoring model is obtained, wherein the model parameters of the feature learning model, the feedback learning model and the neural network model can be adjusted based on the training principle that the predicted score approaches the scoring of the item i by the user u, and the trained model is obtained. Score the model.
- the first interaction node list corresponding to the user u includes a multi-level first interaction node list
- the second interaction node list corresponding to the item i includes a multi-level second interaction node list
- the model of the feedback learning model is fed back.
- the parameter includes: a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the first interactive node list corresponding to the user u is the same as the order of the user feedback matrix, and the order of the second interactive node list corresponding to the item i
- the order of the first interactive node in the multi-order first interactive node list is used to represent the interaction information between the user and the item, and the first-order first interactive node list in the multi-level first interactive node list is used.
- the odd-order second interaction node list is used to represent the interaction information between the item and the user
- the even-order second interaction node list in the multi-level second interaction node list is used to represent the interaction information between the user and other users.
- the mutual node list inputs the feedback learning model, and obtains the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i, including: a multi-level first interactive node list corresponding to the user u, and a multi-order second interactive node corresponding to the item i
- the list input feedback learning model obtains implicit feedback corresponding to user u and implicit feedback corresponding to item i.
- the server when training the scoring model, may further utilize a multi-level first interactive node list corresponding to the user u and a multi-level second interactive node list corresponding to the item i.
- the server may input the multi-level first interaction node list corresponding to the user u and the multi-level second interaction node list corresponding to the item i into the feedback learning model, and obtain the implicit feedback corresponding to the user u and the hidden corresponding to the item i. Feedback.
- the model parameters of the feedback learning model include: a weight of a feedback vector of each of the plurality of users, a weight of a feedback vector of each of the plurality of items; and a first corresponding to the user u
- the interaction node list and the second interaction node list corresponding to the item i are input to the feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained, including: the identifier of the user u and the corresponding first interaction node list
- the identifier of the item i and the corresponding second interactive node list are input into the feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained.
- the server may input the identifier of the user u in each training data in the training data set and the corresponding first interactive node list, the identifier of the item i, and the corresponding second interactive node list, and input feedback learning.
- the model obtains implicit feedback corresponding to user u and implicit feedback corresponding to item i.
- an apparatus for recommending an item comprising at least one module for implementing the method of recommending an item provided by the first aspect above.
- an apparatus comprising a processor, a memory and a transmitter, the processor being configured to execute instructions stored in the memory; the processor executing the instructions to cause the apparatus to implement the recommended item provided by the first aspect above Methods.
- a computer readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of the first aspect described above.
- a computer program product comprising instructions for causing the computer to perform the method of the first aspect described above when the computer program product is run on a computer.
- a training apparatus for a scoring model comprising at least one module for implementing the training method of the scoring model provided by the second aspect above.
- an apparatus comprising a processor, a memory and a transmitter, the processor being configured to execute instructions stored in the memory; the processor executing the instructions to cause the apparatus to implement the scoring model provided by the second aspect above Training method.
- a computer readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of the second aspect described above.
- a computer program product comprising instructions for causing the computer to perform the method of the second aspect described above when the computer program product is run on a computer.
- the attribute data of the target user and the attribute data of the plurality of candidate items are acquired, and the attribute data of the target user includes the identifier of the target user, and the attribute data of each candidate item includes the identifier of the corresponding candidate item;
- the attribute data and the attribute data of the plurality of candidate items are processed to generate a target data set, where the target data set includes the identifier of the target user and the corresponding target first interactive node list, the identifier of each candidate item of the plurality of candidate items, and the corresponding a target second interaction node list, the target first interaction node list is used to represent interaction information of the target user with other users or items, and the target second interaction node list is used to represent interaction information of the candidate item with other items or users;
- the input scoring model is set to obtain the scoring of the plurality of candidate items by the target user, wherein the scoring model is obtained according to the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data, and the plurality of users include
- the attribute data of each user in the user includes corresponding The identification of the household, the plurality of items comprising a plurality of candidate items, the attribute data of each of the plurality of items including the identification of the corresponding item, the scoring data comprising one or more items of each of the plurality of users
- the scoring of the target; the target recommended item is determined according to the scoring of the plurality of candidate items by the target user. In this way, the target user can select the desired item among the target recommended items recommended by the server, and does not need to select among all the items stored in the server, thereby improving the efficiency of the user selecting the item.
- FIG. 1 is a schematic diagram of a system framework provided by an embodiment of the present invention.
- FIG. 2 is a schematic structural diagram of a server according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a bipartite diagram provided by an embodiment of the present invention.
- FIG. 4 is a flowchart of a method for recommending an item according to an embodiment of the present invention.
- FIG. 5 is a flowchart of a training method for a scoring model according to an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a device for recommending an article according to an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of an apparatus for recommending an article according to an embodiment of the present invention.
- FIG. 8 is a schematic structural diagram of a training apparatus for a scoring model according to an embodiment of the present invention.
- An embodiment of the present invention provides a method for recommending an item.
- the execution subject of the method is a device, and the device may be a server.
- the server may be a background server that recommends the function of the item.
- the server may be a single server or a server group composed of multiple servers.
- the embodiment of the present invention uses a server as a separate server as an example for detailed description. Other situations are similar and will not be repeated.
- the operation triggering terminal may send an item recommendation request corresponding to the target user to the server, and correspondingly, after receiving the item recommendation request, the server may be in the candidate set.
- the target recommended item that the target user may like is determined, and then the target recommended item may be sent to the terminal, and the terminal may display the target recommended item after receiving the target recommended item, so that the target user can select the desired item in the target recommended item.
- the required items of which, the system frame diagram is shown in Figure 1.
- the server may include a processor 210, a transmitter 220, a receiver 230, and a memory 240.
- the receiver 230 and the transmitter 220, and the memory 240 may be respectively coupled to the processor 210, as shown in FIG.
- the receiver 230 can be used to receive messages or data
- the transmitter 220 and the receiver 230 can be network cards
- the transmitter 220 can be used to transmit messages or data, that is, the target recommended items can be sent to the target user's terminal.
- the processor 210 can be the control center of the server, connecting various parts of the entire server, such as the receiver 230, the transmitter 220, and the memory 240, using various interfaces and lines.
- the processor 210 may be a CPU (Central Processing Unit), which may be used to determine related processing of the target recommended item.
- the processor 210 may include one or more processing units; 210 may integrate an application processor and a modem processor, wherein the application processor primarily processes an operating system, and the modem processor primarily processes wireless communications.
- Processor 210 can also be a digital signal processor, an application specific integrated circuit, a field programmable gate array, or other programmable logic device or the like.
- the memory 240 can be used to store software programs and modules, and the processor 210 performs various functional applications and data processing of the server by reading software code and modules stored in the memory.
- the user's interaction with the item can be represented by a bipartite graph, wherein the connected side between the user and the item indicates that the user's history has interacted with the item, and the two parts are described in detail below:
- the server can obtain historical behavior data of each user (for example, in the case that the item is a movie, the historical behavior data of each user may be a movie that each user has downloaded, viewed, and collected), and further, for each user, the server According to the historical behavior data of the user, the user can establish the side of the item that the user interacts with, and thus obtain the user-item bipartite graph.
- the user-item two-part diagram is shown in FIG. 3, and user1 to user5 in FIG. 3 respectively represent five users, and item1 to item8 respectively represent eight items.
- all nodes that can be reached in one step are items, and all nodes that can be reached in two steps are at least one of the same interactive items as the current user.
- All users, in which all nodes that can be reached in one step from the user may be referred to as a first-order first interactive node list, and all nodes that can be reached in two steps may be referred to as a second-order first interactive node list, and so on, starting from an item.
- the server may obtain a first interactive node list corresponding to each user and a second interactive node list corresponding to each item according to the user-item bipartite graph.
- the first-order first interactive node list corresponding to user1 includes item1.
- the second-order first interactive node list of item2, item3, item8, and user1 includes user2, user3, and user5.
- the first-order second interaction node list corresponding to item1 includes user1 and user3, and the second-order second interaction node list corresponding to item1 includes item2, item3, item4, and item8.
- Step 401 Acquire attribute data of the target user and attribute data of the plurality of candidate items.
- the attribute data of the target user includes an identifier of the target user, and the attribute data of each candidate item includes an identifier of the corresponding candidate item.
- the item recommendation triggering event corresponding to each user may be pre-stored in the server, where the item recommendation triggering event corresponding to each user may be the same.
- the item recommendation triggering event may be a preset item recommendation period, and each The item recommendation triggering event corresponding to the user may also be different.
- the item recommendation triggering event corresponding to each user may be an item recommendation request sent by the user's terminal, respectively.
- the server detects that the item recommendation triggering event of the corresponding target user occurs (for example, when detecting the item recommendation request of the corresponding target user sent by the terminal), the server may determine the target recommended item that the target user likes and recommend it to Target users.
- the server may acquire attribute data of the target user and attribute data of each candidate item of the plurality of candidate items, wherein the attribute data of the target user may include an identifier of the target user, and attributes of each candidate item of the plurality of candidate items
- the data may include an identification of the corresponding candidate item.
- attribute data of the target user may further include one or more of the following data: gender, height, weight, age, occupation, income, hobbies, education, and attribute data of each candidate item may further include the following: One or more of the data: brand, color, size, price, comment, taste, shelf life, icon.
- Step 402 Process attribute data of the target user and attribute data of the plurality of candidate items to generate a target data set, where the target data set includes an identifier of the target user and a corresponding target first interaction node list, and each of the plurality of candidate items.
- the identifier of the candidate item and the corresponding target second interaction node list, the target first interaction node list is used to represent the interaction information of the target user with other users or items, and the target second interaction node list is used to represent the candidate item and other items or users. Interaction information.
- the server may process the target data set, where the target data set may include the target user's identifier and the corresponding target first.
- the process of step 402 may be as follows: according to the identifier of the target user, determine the target corresponding to the target user in the target first interaction node list corresponding to the identifier of each user among the plurality of pre-recorded users.
- An interactive node list and determining, according to the identifier of each candidate item, a target second interaction corresponding to each candidate item in a target second interaction node list corresponding to the identifier of each candidate item among the plurality of candidate items recorded in advance a node list; generating a target data set according to the identifier of the target user, the target first interaction node list corresponding to the target user, the identifier of each candidate item, and the target second interaction node list corresponding to each candidate item.
- the server may pre-store a target first interaction node list corresponding to the identifier of each user of the plurality of users, and a target second interaction node list corresponding to the identifier of each candidate item of the plurality of candidate items, where The server may record, in the form of a table, a target first interaction node list corresponding to the identifier of each user and a target second interaction node list corresponding to the identifier of each candidate item, and may also record the identifier of each user in the form of a bipartite graph. Corresponding target first interactive node list and a target second interactive node list corresponding to the identifier of each candidate item.
- the target first interaction node corresponding to the target user may be determined in the target first interaction node list corresponding to the identifier of each user among the plurality of pre-recorded users. a list, and the target second interaction node list corresponding to each candidate item may be determined in the target second interaction node list corresponding to the identifier of each candidate item among the plurality of candidate items recorded in advance.
- the server may generate the identifier including the target user and the corresponding target first interaction node list, and each candidate item.
- each target data in the target data set may include the identifier of the target user and the corresponding target first interaction node list, the identifier of the candidate item j, and the corresponding target number
- the second interactive node list, the candidate item j is any one of the plurality of candidate items.
- Step 403 the target data set is input into the scoring model, and the target user scores the plurality of candidate items, wherein the scoring model is obtained according to the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data training.
- the attribute data of each user of the users includes the identifier of the corresponding user
- the attribute data of each item of the plurality of items includes the identifier of the corresponding item
- the scoring data includes one of the plurality of users for each of the plurality of items or Score multiple items.
- the scoring model may be pre-stored in the server, wherein the scoring model may be obtained by the server according to attribute data of multiple users, attribute data of multiple items, and scoring data, and multiple users include target users and multiple The item includes a plurality of candidate items.
- the server may predict the target user's scoring of each of the plurality of candidate items by the scoring model. Specifically, after generating the target data set, the server may input the target data set into the scoring model to obtain a scoring of each candidate item among the plurality of candidate items by the target user, where the server includes multiple target data for the target data set, the server Each target data can be input into the scoring model to obtain a score of the corresponding candidate item by the target user.
- the scoring model may include a feature learning model, a feedback learning model, and a neural network model.
- the processing of step 403 may be as follows: inputting the identifier of the target user in the target data set and the identifier of the candidate item j into the feature learning model.
- the feature vector corresponding to the target user may be a vector for characterizing the feature (or characteristic) of the user itself.
- the feature vector corresponding to the candidate item j may be a vector for characterizing the feature (or characteristic) of the candidate item j itself.
- the scoring model may include a feature learning model, a feedback learning model, and a neural network model, wherein the feature learning model may be used to learn a target user and a feature vector corresponding to each candidate item, and the model parameters of the feature learning model may include the user.
- the feature matrix and the item feature matrix wherein the user feature matrix is composed of feature vectors of each user of the plurality of users (ie, each row of the user feature matrix is a feature vector corresponding to the user, and the number of rows of the user feature matrix is The number of the plurality of users), the item feature matrix is composed of the feature vectors of each of the plurality of items (ie, each line of the item feature matrix is a feature vector of the corresponding item, and the number of lines of the item feature matrix is multiple The number of items).
- the server may input the identifier of the target user and the identifier of the candidate item j into the feature learning model to obtain the feature vector corresponding to the target user and the feature vector corresponding to the candidate item j.
- the feature vector corresponding to the target user is extracted in the user feature matrix by the feature learning model according to the identifier of the target user and the identifier of the candidate item j.
- the feature vector corresponding to the candidate item j is extracted in the item feature matrix, and the feature vector corresponding to the target user and the feature vector corresponding to the candidate item j are obtained.
- the feedback learning model can be used to learn implicit feedback corresponding to the target user and each candidate item, and the model parameters of the feedback learning model can include a user feedback matrix (which can be represented by Y) and an item feedback matrix (which can be represented by X), wherein
- the user feedback matrix may be composed of feedback vectors (each row vector in the user feedback matrix represents a feedback vector corresponding to one node), and the item feedback matrix may be composed of feedback vectors (each row vector in the item feedback matrix represents one node) Corresponding feedback vector).
- the feedback learning model is input, and the implicit feedback corresponding to the target user k and the implicit feedback corresponding to the candidate item j are obtained.
- the feedback learning model may extract multiple feedback vectors corresponding to the target first interaction node list in the user feedback matrix (wherein the feedback vector)
- the number of nodes is the number of nodes included in the target first interactive node list
- the feedback vector corresponding to the target user k is obtained.
- multiple feedback vectors may be added to obtain implicit feedback corresponding to the target user k.
- the server may obtain the implicit feedback P corresponding to the target user k according to formula (1). k ,
- the specific processing of obtaining the implicit feedback corresponding to the candidate item j may be as follows: after the server inputs the target second interactive node list corresponding to the candidate item j into the feedback learning model, the target second interaction node may be extracted in the item feedback matrix by using the feedback learning model. A plurality of feedback vectors corresponding to the list (wherein the number of feedback vectors is the number of nodes included in the target second interactive node list), and a feedback vector corresponding to the candidate item j is obtained. After obtaining the feedback vector corresponding to the candidate item j, multiple feedback vectors may be added to obtain implicit feedback corresponding to the candidate item j, wherein the server may obtain the implicit feedback Q corresponding to the candidate item j according to formula (2). j ,
- the server may input the neural network model into the target user candidate.
- the score of item j may be obtained by the server.
- the server may pre-store a pre-trained neural network model, wherein the neural network model may include a multi-layer neural network, and the input of each layer of the neural network in the multi-layer neural network may be the upper layer neural network.
- Output wherein the formula of the h-th neural network can be as shown in formula (3),
- ⁇ () is called an activation function, such as sigmoid function, relu function, tanh function, etc.
- r h is the input of layer h
- b h is the offset item of layer h
- W h is the layer h nerve
- the weights on the side edges of the neurons and the h+1th layer neurons, wherein W h and b h are also trained, and the input r 1 of the first layer neural network can be as shown in formula (4).
- the neural network model can be as shown in equation (5), where H is the total number of layers of the neural network model.
- the server determines the target user k corresponding eigenvectors P k, implicit feedback target user corresponding to k P k, the feature vector Q j, potential item j corresponding implicit feedback Q j candidate item j corresponding, you may be r 1 Kj is input to the neural network model and is brought to the formula (5) to obtain the score of the candidate item j by the target user k.
- r 1 kj is as shown in equation (6).
- the sum of b k , b j and b may be included in the formula (6) (the sum of b k , b j and b may be referred to as a statistical reference score), where b is all the scores included in the training data set.
- the mean value, b k is the difference between the mean value of all the scores of the target users k for each item included in the training data set and b
- b j is the difference between the mean value of the scores of all the users included in the training data set and the b. .
- the target first interaction node list may include a multi-level target first interaction node list
- the target second interaction node list corresponding to each candidate item may include a multi-level target second interaction node list
- the multi-level target first interaction node The first interactive node list in the node list is used to represent the interaction information between the target user and the item, and the even-order target in the multi-level target first interactive node list is used to represent the interaction information between the target user and other users.
- the second-order target second interaction node list in the multi-level target second interaction node list is used to represent the interaction information between the candidate item and the user, and the even-order target second interaction node list in the multi-level target second interaction node list is used to represent the candidate
- the model parameters of the feedback learning model may include a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the target first interactive node list is the same as the order of the user feedback matrix, and each The order of the target second interactive node list corresponding to the candidate item and the item feedback moment The order of the array is the same.
- the specific processing process of obtaining the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j may be as follows: a multi-level target first interactive node list corresponding to the target user in the target data set and The candidate object j corresponds to the multi-level target second interaction node list, and inputs the feedback learning model to obtain implicit feedback corresponding to the target user and implicit feedback corresponding to the candidate item j.
- the server may also use the multi-level target first interaction node list corresponding to the target user, and the multi-level target second interaction node list corresponding to the candidate item j, where
- the first-level target interaction node list may be a first-order target first interaction node list, a second-order target first interaction node list, ..., an A-order target first interaction node list
- the multi-level user feedback matrix may include first-order user feedback.
- Matrix, second-order user feedback matrix, ..., A-order user feedback matrix, A is a preset value (for example, A is 3), and A is the maximum number of steps that the target user can reach in the user-item map.
- the multi-level target second interaction node list may be a first-order target second interaction node list, a second-order target second interaction node list, ..., a B-order target second interaction node list, and the multi-level item feedback matrix may include a first-order item.
- Feedback matrix, second-order item feedback matrix, ..., B-order item feedback matrix, B is the preset value
- B is the default candidate item j can be found in the user-item two-part map
- the maximum number of steps, wherein, A and B may be the same or different.
- the first-order user feedback matrix can be Y 1
- each row vector in the first-order user feedback matrix can be a vector representation of the corresponding item as a node in the first-order target first interaction node list
- a second-order user feedback matrix can Expressed by Y 2
- each row vector in the second-order user feedback matrix may be a vector representation when the corresponding user is a node in the second-order target first interaction node list, and so on.
- the first-order item feedback matrix can be X 1
- each row vector in the first-order item feedback matrix can be a vector representation of the corresponding user as a node in the first-order target second interactive node list
- a second-order item feedback matrix can Expressed by X 2
- each row vector in the second-order item feedback matrix may be a vector representation of the corresponding item as a node in the second-order target second interactive node list, and so on.
- the server may input the multi-level target first interaction node list corresponding to the target user in the target data set and the multi-level target second interaction node list corresponding to the candidate item j into the feedback learning model to obtain the target user corresponding Implicit feedback and implicit feedback corresponding to candidate j.
- the server learning model by feedback the user feedback matrix Y a step
- a first interaction extraction target node list Corresponding feedback vector.
- the server may select the feedback vector corresponding to the first interaction node list of each target object corresponding to the target user according to the above manner, and then add all the selected feedback vectors to obtain the implicit feedback corresponding to the target user.
- the server can select the target second interactive node list in the item feedback matrix X b by feedback learning model Corresponding feedback vector, obtaining a target second interactive node list corresponding to the candidate item j Corresponding feedback vector.
- the server may select the feedback vector corresponding to the second interactive node list of each target object corresponding to the candidate item j according to the above manner, and further, all the selected feedback vectors may be added to obtain the implicit feedback corresponding to the candidate item j.
- the model parameter of the feedback learning model may further include: a weight of a feedback vector of each of the plurality of users, a weight of a feedback vector of each of the plurality of items, wherein the weight may be pre-trained by the server.
- the specific process of obtaining the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j may be as follows: the identifier of the target user in the target data set and the corresponding target first interaction node list, The identifier of the candidate item j and the corresponding target second interaction node list are input, and the feedback learning model is input, and the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j are obtained.
- the model parameter for the feedback learning model further includes a weight of a feedback vector of each of the plurality of users and a weight of a feedback vector of each of the plurality of items
- the server may target the target user in the target data set
- the server may determine the feedback vector corresponding to the target user and the feedback vector corresponding to the candidate item j by using the feedback learning model according to the method for determining the feedback vector corresponding to the target user and the candidate item j.
- the server may weight and process the feedback vector corresponding to the target user k by feeding back the weight of the feedback vector of the target user in the learning model (which may be represented by ⁇ kt ) according to the identifier of the target user and the identifier of the candidate item j.
- the model parameters of the feedback learning model may include: weights of feedback vectors of each of the plurality of users, weights of feedback vectors of each of the plurality of items, multi-level user feedback matrix, and multi-level item feedback a matrix
- the target first interaction node list corresponding to the target user may include a multi-level target first interaction node list
- the target second interaction node list corresponding to each candidate item may include a multi-level target second interaction node list, corresponding
- the process of determining the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j may be as follows: the identifier of the target user in the target data set and the corresponding multi-level target first interactive node list, candidate item j
- the identifier and the corresponding multi-level target second interaction node list are input, and the feedback learning model is input, and the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j are obtained.
- the server may select, according to the foregoing manner, a feedback vector corresponding to the first interaction node list of each target object corresponding to the target user and a feedback vector corresponding to each second-order target second interaction node list corresponding to the candidate item j.
- the server may feedback the weight of the feedback vector of the target user in the learning model according to the identifier of the target user and the identifier of the candidate item j (may be used) Representing) weighting and processing the feedback vector corresponding to the target user k, obtaining implicit feedback corresponding to the target user, and feeding back the weight of the feedback vector of the candidate item j in the learning model (can be used) It is shown that the feedback vector corresponding to the candidate item j is weighted and processed to obtain implicit feedback corresponding to the candidate item j.
- the server can obtain the implicit feedback P k corresponding to the target user according to formula (7).
- the server can obtain the implicit feedback Q j corresponding to the candidate item j according to formula (8).
- Step 404 Determine a target recommended item according to the target user's scoring of the plurality of candidate items.
- the server may determine, in the plurality of candidate items, the target recommended items to be recommended to the target user according to the scoring of each candidate item of the plurality of candidate items by the target user. Further, the target recommended item can be recommended to the target user.
- the preset recommendation condition may be stored in the server.
- the processing of step 404 may be as follows: determining, according to the target user's scoring of the plurality of candidate items, the corresponding recommended item that meets the preset recommendation condition.
- the preset recommendation condition may be a condition for the server to determine whether an item is recommended according to the corresponding score.
- the server may pre-store the preset recommendation condition, and after the server obtains the score of the plurality of candidate items by the target user, the target recommended item that meets the preset recommendation condition may be selected from the plurality of candidate items.
- determining the processing method of the target recommended item may be various, and several feasible processing methods are given below:
- a preset number of target recommended items with the largest scores are determined.
- the plurality of candidate items may be sorted according to the order of the corresponding scores, and then the preset number of candidates are ranked first. Item, determined as the target recommended item.
- the target recommended item whose score is greater than the preset score threshold is determined.
- a preset score threshold may be pre-stored in the server. After the server determines that the target user scores the plurality of candidate items, the candidate items whose scores are greater than the preset score threshold may be selected among the plurality of candidate items, and the determined candidate items may be determined as the target recommended items.
- the embodiment of the present invention further provides a training method for the scoring model.
- the processing flow shown in FIG. 5 will be described in detail below in conjunction with the specific implementation manner, and the content may be as follows:
- Step 501 Acquire attribute data of a plurality of users, attribute data of a plurality of items, and scoring data.
- the server may pre-determine the training data set. Specifically, the server may acquire attribute data of the plurality of users, attribute data of the plurality of items, and scoring data, wherein the attribute data of each of the plurality of users may include an identifier of the corresponding user, and each of the plurality of items The attribute data may include an identification of the corresponding item, and the scoring data may include scoring of one or more of the plurality of items by each of the plurality of users.
- the attribute data of each of the plurality of users may further include one or more of the following: gender, height, weight, age, occupation, income, hobbies, education, and each of the plurality of items.
- the server may obtain attribute data of multiple users, attribute data of multiple items, and scoring data by acquiring multiple scoring records.
- the process of step 501 may be as follows: acquiring multiple scoring records, and more Each scoring record in the scoring record includes attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, and the user u is any one of the plurality of users who have beaten the item i, the item i is any of a plurality of items.
- the server may acquire a plurality of scoring records, wherein each of the plurality of scoring records includes attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, and the item i is a plurality of items.
- the user u is any one of a plurality of users who have overwhelmed the item i
- the attribute data of the user u includes the identifier of the user u
- the attribute data of the item i includes the identifier of the item i
- the user u pairs the item
- the scoring data of i may include the scoring of the item i by the user u, wherein the scoring record may also be referred to as an interactive record (for example, if the user has purchased an item, the scoring data in the corresponding scoring record may be 1).
- the plurality of scoring records are (u 0 , i 0 , 1), (u 0 , i 1 , 1), (u 0 , i 2 , 1), respectively.
- Step 502 processing attribute data of multiple users, attribute data of multiple items, and scoring data to obtain a training data set, where the training data set includes an identifier of each user and a corresponding first interactive node list, and each item Identifying and corresponding a second interactive node list, each user scoring one or more items of the plurality of items, the first interactive node list is used to represent interaction information of the user with other users or items, and the second interactive node list is used by Represents information about the interaction of an item with other items or users.
- the server may process the same, and obtain a training data set, where the training data set may include each user of multiple users. And the corresponding first interactive node list, the identifier of each item of the plurality of items, and the corresponding second interactive node list, each user scoring one or more items of the plurality of items.
- the process of step 502 may be as follows: processing a plurality of scoring records to obtain a training data set, where each training data in the training data set includes the identifier of the user u and Corresponding first interactive node list, identifier of item i and corresponding second interactive node list, user u scores item i.
- the training data corresponding to the scoring record w may be obtained according to the scoring record w and the scoring record before the scoring record w.
- the scoring record first acquired is w 0 (u 0 , i 0 , 1).
- the scoring record w 0 Since the scoring record w 0 is acquired for the first time, the first interactive node list corresponding to the user u 0 is empty, and the item i 0 the corresponding node list is empty second interaction, to obtain training data g 0 w 0 corresponding to the score recorded for the identification of a user u u 0, i, i 0 tagged items, a first list of the corresponding user u interactive node is empty, the article
- the second interactive node list corresponding to i is empty and is divided into 1; the second obtained scoring record is w 1 (u 0 , i 1 , 1), so that it can be seen that the user u 0 over-scoring the item i 0 , the item i 1 is not too much play other users, and therefore, a first user u 0 corresponding to the interactive node list is I 0, the second list of items I 1 corresponding to the interactive node is empty, the resulting score recording w 1 g 1 corresponds to the training
- the first interactive node list corresponding to the user u 1 is empty
- the second interactive node list corresponding to the item i 1 is u 0
- the obtained scoring record w 2 corresponds to the training.
- the data g 2 is the identifier u 1 of the user u and the identifier i 1 of the item i.
- the first interactive node list corresponding to the user u is empty
- the second interactive node list corresponding to the item i is u 0 and is divided into 1.
- step 503 the scoring model is trained according to the training data set.
- the server may train the scoring model, that is, the model parameters in the scoring model may be adjusted to obtain the scoring model after training.
- the server may uniformly train the feature learning model, the feedback learning model, and the neural network model.
- the processing of step 503 may be as follows: The identifier of the user u and the identifier of the item i are input into the feature learning model, and the feature vector corresponding to the user u and the feature vector corresponding to the item i are obtained, and the first interaction node list corresponding to the user u and the second interaction corresponding to the item i are obtained.
- the node list input feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained; the feature vector corresponding to the user u and the feature vector corresponding to the item i, and the implicit feedback corresponding to the user u correspond to the item i
- the implicit feedback input neural network model obtains the predicted score; according to the predicted score and the user u scores the item i, the feature learning model, the feedback learning model and the neural network model are adjusted to obtain the trained scoring model.
- the server after obtaining the training data set, the server inputs the identifier of the user u and the identifier of the item i in each training data in the training data set into the feature learning model, and obtains the feature vector corresponding to the user u and the feature vector corresponding to the item i, And the first interaction node list corresponding to the user u and the second interaction node list corresponding to the item i in each training data are input into the feedback learning model, and the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i are obtained.
- the specific manner of obtaining the feature vector corresponding to the user u and the feature vector corresponding to the item i is similar to the method of obtaining the feature vector corresponding to the target user and the feature vector corresponding to the candidate item j, and obtaining the implicit feedback and the item i corresponding to the user u.
- the specific manner of the corresponding implicit feedback is similar to the implicit feedback corresponding to the target user and the implicit feedback corresponding to the candidate item j, and details are not described herein.
- the feature vector corresponding to the user u, the feature vector corresponding to the item i, the implicit feedback corresponding to the user u, and the implicit feedback corresponding to the item i are obtained, and then input into the neural network model to obtain a predicted score.
- the model parameters of the feature learning model, the feedback learning model, and the neural network model may be adjusted according to the prediction score and the user u in each training data in the training data set.
- the trained scoring model is obtained, wherein the model parameters of the feature learning model, the feedback learning model and the neural network model can be adjusted based on the training principle that the predicted score approaches the scoring of the item i by the user u, and the trained model is obtained. Score the model.
- the first interaction node list corresponding to the user u may include a multi-level first interaction node list
- the second interaction node list corresponding to the item i may include a multi-level second interaction node list
- the model parameters of the feedback learning model may include a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the first interactive node list corresponding to the user u is the same as the order of the user feedback matrix, and the order and the item of the second interactive node list corresponding to the item i
- the order of the feedback matrix is the same, and the first interactive node list of the odd-order first interactive node list is used to represent the interaction information between the user and the item, and the even-numbered first interactive node list in the multi-level first interactive node list is used to represent User interaction information with other users, the odd-order second interaction node list in the multi-level second interaction node list is used to represent the interaction information between the item and the user, and the even-order second interaction node list in the multi-level
- the specific processing of determining the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i may be as follows: a multi-order first interactive node list corresponding to the user u, and a multi-order corresponding to the item i
- the second interactive node list inputs the feedback learning model, and obtains implicit feedback corresponding to the user u and implicit feedback corresponding to the item i.
- the server may also utilize the multi-level first interactive node list corresponding to the user u and the multi-level second interactive node list corresponding to the item i. For this situation, the server may input the multi-level first interaction node list corresponding to the user u and the multi-level second interaction node list corresponding to the item i into the feedback learning model, and obtain the implicit feedback corresponding to the user u and the hidden corresponding to the item i. Feedback.
- the model parameters of the feedback learning model may include: a weight of a feedback vector of each of the plurality of users, and a weight of a feedback vector of each of the plurality of items.
- the specific processing of determining the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i may be as follows: the identifier of the user u and the corresponding first interactive node list, the identifier of the item i, and the corresponding The second interactive node list inputs the feedback learning model, and obtains the implicit feedback corresponding to the user u and the implicit feedback corresponding to the item i.
- the server may input the identifier of the user u in each training data in the training data set and the corresponding first interactive node list, the identifier of the item i, and the corresponding second interactive node list, and input the feedback learning model to obtain the user u.
- an embodiment of the present invention further provides a device for recommending an item.
- the device includes:
- the obtaining module 610 is configured to acquire attribute data of the target user and attribute data of the plurality of candidate items, where the attribute data of the target user includes an identifier of the target user, and the attribute data of each candidate item includes an identifier of the corresponding candidate item, specifically
- the acquisition function in the above step 401 is implemented, as well as other implicit steps.
- a generating module 620 configured to process attribute data of the target user and attribute data of the plurality of candidate items to generate a target data set, where the target data set includes an identifier of the target user and a corresponding target first An interaction node list, an identifier of each candidate item in the plurality of candidate items, and a corresponding target second interaction node list, wherein the target first interaction node list is used to represent interaction information between the target user and other users or items
- the target second interaction node list is used to represent the interaction information of the candidate item with other items or users, and specifically, the generation function in the above step 402, and other implicit steps may be implemented.
- a scoring module 630 configured to input the target data set into a scoring model, and obtain a score of the plurality of candidate items by the target user, wherein the scoring model is based on attribute data of multiple users, attributes of multiple items Data and training of the scoring data, wherein the attribute data of each of the plurality of users includes an identifier of the corresponding user, and the attribute data of each of the plurality of items includes an identifier of the corresponding item, and the scoring data Including the scoring of one or more of the plurality of items by each of the plurality of users, specifically performing the scoring function in the above step 403, and other implicit steps.
- the determining module 640 is configured to determine the target recommended item according to the target user's scoring of the plurality of candidate items, and specifically may implement the determining function in the foregoing step 404, and other implicit steps.
- attribute data of the target user further includes one or more of the following data: gender, height, weight, age, occupation, income, hobbies, education, and attribute data of each candidate item includes the following: One or more of the data: brand, color, size, price, comment, taste, shelf life, icon.
- the generating module 620 is configured to:
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model
- the scoring module 630 is configured to:
- the target first interaction node list includes a multi-level target first interaction node list
- the target second interaction node list corresponding to each candidate item includes a multi-level target second interaction node list
- the multi-level target first interaction node The first interactive node list in the node list is used to represent the interaction information between the target user and the item, and the even-order target in the multi-level target first interactive node list is used to represent the interaction information between the target user and other users.
- the second-order target second interaction node list in the multi-level target second interaction node list is used to represent the interaction information between the candidate item and the user, and the even-order target second interaction node list in the multi-level target second interaction node list is used to represent the candidate Information on the interaction of items with other items;
- the scoring module 630 is configured to:
- the model parameter of the feedback learning model includes: a weight of a feedback vector of each of the plurality of users, and a weight of a feedback vector of each of the plurality of items;
- the scoring module 630 is configured to:
- the determining module 640 is configured to:
- the determining module 640 is configured to:
- the acquiring module 610 is further configured to:
- the generating module 620 is further configured to:
- the scoring data Processing the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data to obtain a training data set, where the training data set includes an identifier of each user and a corresponding first interactive node list And an identifier of each item and a corresponding second interactive node list, each user scoring one or more items of the plurality of items, the first interactive node list being used to represent the user and other users or items Interactive information, the second interactive node list is used to indicate interaction information of the item with other items or users;
- the device also includes:
- the training module 650 is configured to train the scoring model according to the training data set.
- the attribute data of each of the multiple users further includes one or more of the following: gender, height, weight, age, occupation, income, hobbies, education, and the plurality of The attribute data of each item in the item further includes one or more of the following data: brand, color, size, price, comment, taste, shelf life, icon; the scoring data further includes one or more of the following data Kind: operating time, current equipment, discounts.
- the obtaining module 610 is configured to:
- each of the plurality of scoring records including attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, the user u is over-scoring the item i Any one of the plurality of users, the item i being any one of the plurality of items;
- the generating module 620 is configured to:
- Each training data in the training data set includes an identifier of the user u and a corresponding first interactive node list, an identifier of the item i, and a corresponding second interactive node list, and a user u pair.
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model
- the training module 650 is configured to:
- the first interaction node list corresponding to the user u includes a multi-level first interaction node list
- the second interaction node list corresponding to the item i includes a multi-level second interaction node list
- the feedback learning model is
- the model parameters include: a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the first interactive node list corresponding to the user u is the same as the order of the user feedback matrix, and the item i corresponds to the first
- the order of the two interactive node lists is the same as the order of the item feedback matrix
- the odd-order first interactive node list in the multi-level first interactive node list is used to represent the interaction information between the user and the item
- the multi-level first interactive node list The even-order first interaction node list is used to represent the interaction information between the user and other users
- the odd-order second interaction node list in the multi-level second interaction node list is used to represent the interaction information between the item and the user
- the training module 650 is configured to:
- the model parameter of the feedback learning model includes: a weight of a feedback vector of each of the plurality of users, and a weight of a feedback vector of each of the plurality of items;
- the training module 650 is configured to:
- the foregoing obtaining module 610, the generating module 620, the scoring module 630, the determining module 640, and the training module 650 may be implemented by a processor, or the processor may be implemented by using a memory, or the processor may execute a program instruction in the memory. Implementation, or the processor is implemented with a memory and a transmitter.
- the attribute data of the target user and the attribute data of the plurality of candidate items are acquired, and the attribute data of the target user includes the identifier of the target user, and the attribute data of each candidate item includes the identifier of the corresponding candidate item;
- the attribute data and the attribute data of the plurality of candidate items are processed to generate a target data set, where the target data set includes the identifier of the target user and the corresponding target first interactive node list, the identifier of each candidate item of the plurality of candidate items, and the corresponding a target second interaction node list, the target first interaction node list is used to represent interaction information of the target user with other users or items, and the target second interaction node list is used to represent interaction information of the candidate item with other items or users;
- the input scoring model is set to obtain the scoring of the plurality of candidate items by the target user, wherein the scoring model is obtained according to the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data, and the plurality of users include
- the attribute data of each user in the user includes corresponding The identification of the household, the plurality of items comprising a plurality of candidate items, the attribute data of each of the plurality of items including the identification of the corresponding item, the scoring data comprising one or more items of each of the plurality of users
- the scoring of the target; the target recommended item is determined according to the scoring of the plurality of candidate items by the target user. In this way, the target user can select the desired item among the target recommended items recommended by the server, and does not need to select among all the items stored in the server, thereby improving the efficiency of the user selecting the item.
- the device of the recommended item provided by the foregoing embodiment when the device of the recommended item provided by the foregoing embodiment is recommended, only the division of each functional module is used as an example. In an actual application, the function distribution may be completed by different functional modules as needed. The internal structure of the server is divided into different functional modules to complete all or part of the functions described above.
- the device for recommending the article provided in the above embodiment is the same as the method embodiment of the recommended article, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
- the embodiment of the present invention further provides a training device for scoring a model.
- the device includes:
- the obtaining module 810 is configured to obtain the attribute data of the plurality of users, the attribute data of the plurality of items, and the scoring data, and specifically may implement the obtaining function in the foregoing step 501, and other implicit steps.
- a generating module 820 configured to process attribute data of the plurality of users, attribute data of the plurality of items, and the scoring data to obtain a training data set, where the training data set includes an identifier and a corresponding of each user a first interactive node list, an identifier of each item, and a corresponding second interactive node list, each user scoring one or more items of the plurality of items, the first interactive node list being used to represent the user
- the interaction information with other users or items, the second interaction node list is used to indicate the interaction information of the item with other items or users, and specifically, the generation function in the above step 502, and other implicit steps can be implemented.
- the training module 830 is configured to train the scoring model according to the training data set, and specifically implement the training function in the foregoing step 503, and other implicit steps.
- the attribute data of each of the multiple users further includes one or more of the following: gender, height, weight, age, occupation, income, hobbies, education, and the plurality of The attribute data of each item in the item further includes one or more of the following data: brand, color, size, price, comment, taste, shelf life, icon; the scoring data also includes one or more of the following data: Kind: operating time, current equipment, discounts.
- the obtaining module 810 is configured to:
- each of the plurality of scoring records including attribute data of the user u, attribute data of the item i, and scoring data of the item i by the user u, the user u is over-scoring the item i Any one of the plurality of users, the item i being any one of the plurality of items;
- the generating module 820 is configured to:
- Each training data in the training data set includes an identifier of the user u and a corresponding first interactive node list, an identifier of the item i, and a corresponding second interactive node list, and a user u pair.
- the scoring model includes a feature learning model, a feedback learning model, and a neural network model
- the training module 830 is configured to:
- the first interaction node list corresponding to the user u includes a multi-level first interaction node list
- the second interaction node list corresponding to the item i includes a multi-level second interaction node list
- the feedback learning model is
- the model parameters include: a multi-level user feedback matrix and a multi-order item feedback matrix, wherein the order of the first interactive node list corresponding to the user u is the same as the order of the user feedback matrix, and the item i corresponds to the first
- the order of the two interactive node lists is the same as the order of the item feedback matrix
- the odd-order first interactive node list in the multi-level first interactive node list is used to represent the interaction information between the user and the item
- the multi-level first interactive node list The even-order first interaction node list is used to represent the interaction information between the user and other users
- the odd-order second interaction node list in the multi-level second interaction node list is used to represent the interaction information between the item and the user
- the training module 830 is configured to:
- the model parameter of the feedback learning model includes: a weight of a feedback vector of each of the plurality of users, and a weight of a feedback vector of each of the plurality of items;
- the training module 830 is configured to:
- the foregoing obtaining module 810, the generating module 820, and the training module 830 may be implemented by a processor, or the processor may be implemented by using a memory, or the processor may execute a program instruction in the memory, or the processor cooperates with the memory.
- the transmitter is implemented.
- the training device of the scoring model provided by the above embodiment is only illustrated by the division of the above functional modules when training the scoring model.
- the function allocation may be completed by different functional modules as needed, that is, the server
- the internal structure is divided into different functional modules to perform all or part of the functions described above.
- the training device of the scoring model and the training method of the scoring model provided by the above embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
- a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
- the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本发明实施例公开了一种推荐物品的方法和装置,属于计算机技术领域。所述方法包括:获取目标用户的属性数据和多个候选物品的属性数据;将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,目标数据集包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表;将目标数据集输入打分模型,得到目标用户对述多个候选物品的打分,其中,打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的;根据目标用户对多个候选物品的打分,确定目标推荐物品。采用本发明,可以提高用户选择物品的效率。
Description
本申请要求于2017年12月07日提交申请号为201711283557.0、发明名称为“一种推荐物品的方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机技术领域,特别涉及一种推荐物品的方法和装置。
随着计算机技术和互联网技术的发展,手机、计算机等终端得到了广泛的应用,相应的终端上的应用程序的种类越来越多、功能越来越丰富。人们可以通过终端中安装的购物应用程序进行购物,还可以通过终端中安装的视频播放应用程序观看电影等。
人们在对物品进行操作前,首先可以选择所要处理的物品(商品或电影等)。具体的,用户可以通过操作,触发终端向服务器发送物品列表获取请求,服务器接收到物品列表获取请求后,可以向终端发送由服务器中存储的各物品组成的物品列表。终端接收到物品列表后,可以对其进行显示,用户可以一一浏览物品列表中的各个物品,确定最终喜欢的物品。
在实现本申请的过程中,发明人发现现有技术至少存在以下问题:
基于上述处理方式,用户想要选择物品时,需要在服务器发送的物品列表中选择,往往物品列表中的物品数量比较多,从而,导致用户选择物品的效率较低。
发明内容
为了解决相关技术中存在的用户选择物品的效率较低的问题,本发明实施例提供了一种推荐物品的方法和装置。所述技术方案如下:
第一方面,提供了一种推荐物品的方法,该方法包括:获取目标用户的属性数据和多个候选物品的属性数据,目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识;将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,目标数据集包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,目标第一交互节点列表用于表示目标用户与其他用户或物品的交互信息,目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息;将目标数据集输入打分模型,得到目标用户对多个候选物品的打分,其中,打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户包括目标用户,多个用户中每一用户的属性数据包括对应的用户的标识,多个物品包括多个候选物品,多个物品中每一物品的属性数据包括对应的物品的标识,打分数据包括多个用户中每一用户对多个物品中一个或多个物品的打分;根据目标用户对多个候选物品的打分,确定目标推荐物品。
本发明实施例所示的方案,服务器可以具有推荐物品的功能。具体的,服务器可以获 取目标用户的属性数据和候选集中的多个候选物品的属性数据,进而,可以对目标用户的属性数据和多个候选物品的属性数据进行处理,得到包含目标用户的用户即对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,其中,目标第一交互节点列表可以用于表示目标用户与其他用户或物品的交互信息,即目标第一交互节点列表中可以包含目标用户历史交互过的其他用户或物品的标识,目标第二交互节点列表可以用于表示候选物品与其他物品或用户的交互信息,即目标第二交互节点列表中可以包含候选物品历史交互过的其他物品或用户的标识。
服务器中可以预先存储有打分模型,其中,打分模型可以是服务器根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户包括目标用户,多个物品包括多个候选物品。服务器可以通过打分模型预测目标用户对多个候选物品中每一候选物品的打分,具体的,服务器生成包含目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表的目标数据集后,可以将其输入到打分模型中,得到目标用户对多个候选物品的打分,进而,服务器可以基于目标用户对多个候选物品的打分,在多个候选物品中,确定待推荐给目标用户的目标推荐物品。这样,目标用户可以在服务器推荐的目标推荐物品中,选取自己想要的物品,无需在服务器中存储的所有物品中选择,从而,可以提高用户选择物品的效率。另外,服务器在预测目标用户对每一候选物品的打分时,利用了目标用户与其他用户或物品的交互信息(即目标第一交互节点列表)和每一候选物品与其他物品或用户的交互信息(即目标第二交互节点列表),从而,可以提高得到的打分的准确性。
在一种可能的实现方式中,目标用户的属性数据还包括以下数据中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,每一候选物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标。
在一种可能的实现方式中,将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,包括:根据目标用户的标识,在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定目标用户对应的目标第一交互节点列表,且根据每一候选物品的标识,在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表;根据目标用户的标识、目标用户对应的目标第一交互节点列表、每一候选物品的标识、以及每一候选物品对应的目标第二交互节点列表,生成目标数据集。
本发明实施例所示的方案,服务器中可以预先存储有多个用户中每一用户的标识对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识对应的目标第二交互节点列表,其中,服务器可以以表的形式记录每一用户的标识对应的目标第一交互节点列表和每一候选物品的标识对应的目标第二交互节点列表,也可以以二部图的形式记录每一用户的标识对应的目标第一交互节点列表和每一候选物品的标识对应的目标第二交互节点列表。服务器获取到目标用户的标识和每一候选物品的标识后,可以在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定目标用户对应的目标第一交互节点列表,且可以在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表。确定出目标用户对应的目标第一交互节点列表、每一候选物品对应的目标第二交互节点列表后,服务器可以生成包含 目标用户的标识及对应的目标第一交互节点列表、每一候选物品的标识及对应的目标第二交互节点列表的目标数据集,其中,目标数据集中每一目标数据可以包括目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,候选物品j是多个候选物品中的任一候选物品。
在一种可能的实现方式中,打分模型包括特征学习模型、反馈学习模型和神经网络模型;
其中,将目标数据集输入打分模型,得到目标用户对多个候选物品的打分,包括:将目标数据集中的目标用户的标识和候选物品j的标识输入特征学习模型,得到目标用户对应的特征向量和候选物品j对应的特征向量,且将目标数据集中的目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈,其中,物品j为多个候选物品中的任一候选物品;将目标用户对应的特征向量、候选物品j对应的特征向量、目标用户对应的隐式反馈和候选物品j对应的隐式反馈,输入神经网络模型,得到目标用户对候选物品j的打分。
其中,目标用户对应的特征向量可以是用于表征该用户本身的特征(或特性)的向量。候选物品j对应的特征向量可以是用于表征候选物品j本身的特征(或特性)的向量。
本发明实施例所示的方案,打分模型可以包括特征学习模型、反馈学习模型和神经网络模型,其中,特征学习模型可以是用于学习目标用户和每一候选物品对应的特征向量,特征学习模型的模型参数可以包括用户特征矩阵和物品特征矩阵,其中,用户特征矩阵是由多个用户中每一用户的特征向量组成(即用户特征矩阵的每行向量分别是对应用户的特征向量,用户特征矩阵的行数即是多个用户的数量),物品特征矩阵是由多个物品中每一物品的特征向量组成(即物品特征矩阵的每行向量分别是对应物品的特征向量,物品特征矩阵的行数即是多个物品的数量)。得到目标数据集后,服务器可以将目标数据集中的目标用户的标识和候选物品j的标识输入特征学习模型,得到目标用户对应的特征向量和候选物品j对应的特征向量。具体的,服务器将目标用户的标识和候选物品j的标识输入特征学习模型后,根据目标用户的标识和候选物品j的标识,通过特征学习模型在用户特征矩阵中提取目标用户对应的特征向量,在物品特征矩阵中提取候选物品j对应的特征向量,得到目标用户对应的特征向量和候选物品j对应的特征向量。
反馈学习模型可以是用于学习目标用户和每一候选物品对应的隐式反馈,反馈学习模型的模型参数可以包括用户反馈矩阵(可以用Y表示)和物品反馈矩阵(可以用X表示),其中,用户反馈矩阵可以是由反馈向量组成的(用户反馈矩阵中的每行向量代表一个节点对应的反馈向量)、物品反馈矩阵可以是由反馈向量组成的(物品反馈矩阵中的每行向量代表一个节点对应的反馈向量)。确定出目标用户(可以用k表示)对应的目标第一交互节点列表(可以用R
k表示)后、候选物品j对应的目标第二交互节点列表(可以用R
j表示)后,可以将其输入反馈学习模型,得到目标用户k对应的隐式反馈和候选物品j对应的隐式反馈。具体的,服务器将目标用户k对应的目标第一交互节点列表输入反馈学习模型后,可以通过反馈学习模型在用户反馈矩阵中提取目标第一交互节点列表对应的多个反馈向量(其中,反馈向量的数量即是目标第一交互节点列表中包含的节点的数量),得到目标用户k对应的反馈向量。获取到目标用户k对应的反馈向量后,可以将多个反馈向量相加,得到目标用户k对应的隐式反馈。得到候选物品j对应的隐式反馈的具体处理可以如下:服务器将候选 物品j对应的目标第二交互节点列表输入反馈学习模型后,可以通过反馈学习模型在物品反馈矩阵中提取目标第二交互节点列表对应的多个反馈向量(其中,反馈向量的数量即是目标第二交互节点列表中包含的节点的数量),得到候选物品j对应的反馈向量。获取到候选物品j对应的反馈向量后,可以将多个反馈向量相加,得到候选物品j对应的隐式反馈。
得到目标用户k对应的特征向量、候选物品j对应的特征向量、目标用户k对应的隐式反馈和候选物品j对应的隐式反馈后,服务器可以将其输入神经网络模型,得到目标用户对候选物品j的打分。
在一种可能的实现方式中,目标第一交互节点列表包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表包括多阶目标第二交互节点列表,多阶目标第一交互节点列表中奇数阶目标第一交互节点列表用于表示目标用户与物品的交互信息,多阶目标第一交互节点列表中偶数阶目标第一交互节点列表用于表示目标用户与其他用户的交互信息,多阶目标第二交互节点列表中奇数阶目标第二交互节点列表用于表示候选物品与用户的交互信息,多阶目标第二交互节点列表中偶数阶目标第二交互节点列表用于表示候选物品与其他物品的交互信息;将目标数据集中的目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈,包括:将目标数据集中的目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
本发明实施例所示的方案,服务器在预测目标用户对候选物品j的打分时,还可以利用目标用户对应的多阶目标第一交互节点列表、候选物品j对应的多阶目标第二交互节点列表,其中,多阶目标第一交互节点列表可以分别是一阶目标第一交互节点列表、二阶目标第一交互节点列表、…、A阶目标第一交互节点列表,多阶用户反馈矩阵可以包括一阶用户反馈矩阵、二阶用户反馈矩阵、…、A阶用户反馈矩阵,A为预设数值(比如A为3),A是预设的目标用户在用户-物品二部图中能到达的最大步数,多阶目标第二交互节点列表可以分别是一阶目标第二交互节点列表、二阶目标第二交互节点列表、…、B阶目标第二交互节点列表,多阶物品反馈矩阵可以包括一阶物品反馈矩阵、二阶物品反馈矩阵、…、B阶物品反馈矩阵,B为预设数值,B是预设的候选物品j在用户-物品二部图中能到达的最大步数,其中,A与B可以相同,也可以不同。一阶用户反馈矩阵,可以用Y
1,一阶用户反馈矩阵中的每行向量可以是对应的物品作为一阶目标第一交互节点列表中的节点时的向量表示,二阶用户反馈矩阵,可以用Y
2表示,二阶用户反馈矩阵中的每行向量可以是对应的用户作为二阶目标第一交互节点列表中的节点时的向量表示,以此类推。一阶物品反馈矩阵,可以用X
1,一阶物品反馈矩阵中的每行向量可以是对应的用户作为一阶目标第二交互节点列表中的节点时的向量表示,二阶物品反馈矩阵,可以用X
2表示,二阶物品反馈矩阵中的每行向量可以是对应的物品作为二阶目标第二交互节点列表中的节点时的向量表示,以此类推。
针对此种情况,服务器可以将目标数据集中的目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入到反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。具体的,对于每阶目标第一交互节点列表
(a=1,2,…,A),服务器可以通过反馈学习模型,在该阶用户反馈矩阵Y
a中,提取目标第一交互节点列表
对应的反馈向量。服务器可以按照上述方式,选取出目标用户对应的 各阶目标第一交互节点列表对应的反馈向量,进而,可以将选取出的所有反馈向量相加,得到目标用户对应的隐式反馈。对于候选物品j对应的每阶目标第二交互节点列表
(b=1,2,…,B),服务器可以通过反馈学习模型,在物品反馈矩阵X
b中,选取目标第二交互节点列表
对应的反馈向量,得到候选物品j对应的目标第二交互节点列表
对应的反馈向量。服务器可以按照上述方式,选取出候选物品j对应的各阶目标第二交互节点列表对应的反馈向量,进而,可以将选取出的所有反馈向量相加,得到候选物品j对应的隐式反馈。这样,在预测目标用户对每一候选物品的打分时,利用了目标用户对应的各阶历史交互信息和每一候选物品的各阶历史交互信息,从而,可以提高预测出的目标用户对候选物品的打分的准确性。
在一种可能的实现方式中,反馈学习模型的模型参数包括:多个用户中每一用户的反馈向量的权重,多个物品中每一物品的反馈向量的权重;将目标数据集中的目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈,包括:将目标数据集中的目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
本发明实施例所示的方案,针对反馈学习模型的模型参数还包括多个用户中每一用户的反馈向量的权重和多个物品中每一物品的反馈向量的权重的情况,服务器可以将目标数据集中的目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。具体的,服务器可以按照上述确定目标用户和候选物品j对应的反馈向量的方法,通过学习模型确定目标用户对应的反馈向量和候选物品j对应的反馈向量。然后,服务器可以根据目标用户的标识和候选物品j的标识,通过反馈学习模型中的目标用户的反馈向量的权重(可以用Φ
kt表示)对目标用户k对应的反馈向量进行加权和处理,得到目标用户对应的隐式反馈,并通过反馈学习模型中的候选物品j的反馈向量的权重(可以用Ω
vj表示)对候选物品j对应的反馈向量进行加权和处理,得到候选物品j对应的隐式反馈。这样,在预测目标用户对每一候选物品的打分时,引入了目标用户的反馈向量的权重和每一候选物品的反馈向量的权重,从而,可以提高预测出的目标用户对候选物品的打分的准确性。
在一种可能的实现方式中,根据目标用户对多个候选物品的打分,确定目标推荐物品,包括:根据目标用户对多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品。
本发明实施例所示的方案,服务器中可以预先存储有预设推荐条件,服务器得到目标用户对多个候选物品的打分后,可以在多个候选物品中,选取对应的打分满足预设推荐条件的目标推荐物品。
在一种可能的实现方式中,根据目标用户对多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品,包括:根据目标用户对多个候选物品的打分,确定对应的打分最大的预设数目个目标推荐物品;或者,根据目标用户对多个候选物品的打分,确定对应的打分大于预设分数阈值的目标推荐物品。
本发明实施例所示的方案,服务器确定出目标用户对多个候选物品的打分后,可以按照对应的打分由大到小的顺序,对多个候选物品进行排序,进而,将排序靠前的预设数目个候选物品,确定为目标推荐物品。或者,服务器中可以预先存储有预设分数阈值。服务 器确定出目标用户对多个候选物品的打分后,可以在多个候选物品中,选取对应的打分大于预设分数阈值的候选物品,进而,可以将确定的候选物品确定为目标推荐物品。
在一种可能的实现方式中,打分模型通过以下方法训练得到:获取多个用户的属性数据、多个物品的属性数据以及所述打分数据;对多个用户的属性数据、多个物品的属性数据以及打分数据进行处理,得到训练数据集,训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对多个物品中一个或多个物品的打分,第一交互节点列表用于表示用户与其他用户或物品的交互信息,第二交互节点列表用于表示物品与其他物品或用户的交互信息;根据训练数据集,对打分模型进行训练。
本发明实施例所示的方案,为训练打分模型,服务器可以预先确定训练数据集。具体的,服务器可以获取多个用户的属性数据、多个物品的属性数据和打分数据,其中,多个用户中每一用户的属性数据可以包括对应用户的标识,多个物品中每一物品的属性数据可以包括对应物品的标识,打分数据可以包括多个用户中每一用户对多个物品中一个物品或多个物品的打分。获取到多个用户的属性数据、多个物品的属性数据和打分数据后,服务器可以对其进行处理,得到训练数据集,其中,训练数据集可以包括多个用户中每一用户的标识及对应的第一交互节点列表、多个物品中每一物品的标识及对应的第二交互节点列表、每一用户对多个物品中一个或多个物品的打分。得到训练数据集后,服务器可以对上述打分模型进行训练,即可以对打分模型中的模型参数进行调整,得到训练后的打分模型。
在一种可能的实现方式中,多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标;打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
在一种可能的实现方式中,获取多个用户的属性数据、多个物品的属性数据以及打分数据,包括:获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,用户u为对物品i打过分的多个用户中的任一用户,物品i为多个物品中的任一物品;对多个用户的属性数据、多个物品的属性数据以及打分数据进行处理,得到训练数据集,包括:对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
本发明实施例所示的方案,服务器可以获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,物品i为多个物品中的任一物品,用户u为对物品i打过分的多个用户中的任一用户,用户u的属性数据包括用户u的标识,物品i的属性数据包括物品i的标识,用户u对物品i的打分数据可以包括用户u对物品i的打分,其中,打分记录也可称为交互记录(比如,用户购买过某物品,则对应的打分记录中的打分数据可以是1)。例如,多个打分记录分别为(u
0,i
0,1)、(u
0,i
1,1)、(u
0,i
2,1)。获取到多个打分记录后,对于多个打分记录中每一打分记录w,可以根据打分记录w和发生时间在打分记录w之前的打分记录,得到打分记录w对应的训练数据g。例如,首先获取到打分记录为w
0(u
0,i
0,1),由于打分记录w
0是首次获 取到的,因此,用户u
0对应的第一交互节点列表为空,物品i
0对应的第二交互节点列表为空,得到的打分记录w
0对应的训练数据g
0为用户u的标识u
0、物品i的标识i
0、用户u对应的第一交互节点列表为空、物品i对应的第二交互节点列表为空、打分为1;其次获取到的打分记录为w
1(u
0,i
1,1),由此可见,用户u
0对物品i
0打过分,物品i
1未被其他用户打过分,因此,用户u
0对应的第一交互节点列表为i
0,物品i
1对应的第二交互节点列表为空,得到的打分记录w
1对应的训练数据g
1为用户u的标识u
0、物品i的标识i
1,用户u对应的第一交互节点列表为i
0,物品i对应的第二交互节点列表为空、打分为1;然后获取到的打分记录w
2(u
1,i
1,1),由此可见,用户u
1未对其他物品打过分,物品i
1被用户u
0打过分,因此,用户u
1对应的第一交互节点列表为空,物品i
1对应的第二交互节点列表为u
0,得到的打分记录w
2对应的训练数据g
2为用户u的标识u
1、物品i的标识i
1,用户u对应的第一交互节点列表为空,物品i对应的第二交互节点列表为u
0、打分为1。
在一种可能的实现方式中,打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,根据训练数据集,对打分模型进行训练,包括:将用户u的标识、物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i对应的特征向量,且将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈;将用户u对应的特征向量和物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;根据预测分数以及用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型进行调整,得到训练后的打分模型。
本发明实施例所示的方案,得到训练数据集后,服务器将训练数据集中每一训练数据中的用户u的标识和物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i对应的特征向量,且可以将每一训练数据中的用户u对应的第一交互节点列表和物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,其中,得到用户u对应的特征向量和物品i对应的特征向量的具体方式与得到目标用户对应的特征向量和候选物品j对应的特征向量的方式类似,得到用户u对应的隐式反馈和物品i对应的隐式反馈的具体方式与得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈的方式类似,此处不再进行赘述。得到用户u对应的特征向量、物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈后,服务器可以将其输入神经网络模型,得到预测分数。得到用户u对物品i的预测分数后,可以根据预测分数以及训练数据集中每一训练数据中的用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型,其中,可以基于预测分数趋近于用户u对物品i的打分的训练原则,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型。
在一种可能的实现方式中,用户u对应的第一交互节点列表包括多阶第一交互节点列表,物品i对应的第二交互节点列表包括多阶第二交互节点列表,反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,用户u对应的第一交互节点列表的阶数与用户反馈矩阵的阶数相同,物品i对应的第二交互节点列表的阶数与物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互 信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,包括:将用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
本发明实施例所示的方案,服务器在训练打分模型时,还可以利用用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表。针对此种情况,服务器可以将用户u对应的多阶第一交互节点列表和物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
在一种可能的实现方式中,反馈学习模型的模型参数包括:多个用户中每一用户的反馈向量的权重,多个物品中每一物品的反馈向量的权重;将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,包括:将用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
本发明实施例所示的方案,服务器可以将训练数据集中每一训练数据中的用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表,输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
第二方面,提供了一种打分模型的训练方法,该方法包括:获取多个用户的属性数据、多个物品的属性数据以及打分数据;对多个用户的属性数据、多个物品的属性数据以及打分数据进行处理,得到训练数据集,训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对多个物品中一个或多个物品的打分,第一交互节点列表用于表示用户与其他用户或物品的交互信息,第二交互节点列表用于表示物品与其他物品或用户的交互信息;根据训练数据集,对打分模型进行训练。
本发明实施例所示的方案,为训练打分模型,服务器可以预先确定训练数据集。具体的,服务器可以获取多个用户的属性数据、多个物品的属性数据和打分数据,其中,多个用户中每一用户的属性数据可以包括对应用户的标识,多个物品中每一物品的属性数据可以包括对应物品的标识,打分数据可以包括多个用户中每一用户对多个物品中一个物品或多个物品的打分。获取到多个用户的属性数据、多个物品的属性数据和打分数据后,服务器可以对其进行处理,得到训练数据集,其中,训练数据集可以包括多个用户中每一用户的标识及对应的第一交互节点列表、多个物品中每一物品的标识及对应的第二交互节点列表、每一用户对多个物品中一个或多个物品的打分。得到训练数据集后,服务器可以对上述打分模型进行训练,即可以对打分模型中的模型参数进行调整,得到训练后的打分模型。
在一种可能的实现方式中,多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保 质期、图标;打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
在一种可能的实现方式中,获取多个用户的属性数据、多个物品的属性数据以及打分数据,包括:获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,用户u为对物品i打过分的多个用户中的任一用户,物品i为多个物品中的任一物品;对多个用户的属性数据、多个物品的属性数据以及打分数据进行处理,得到训练数据集,包括:对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
本发明实施例所示的方案,服务器可以获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,物品i为多个物品中的任一物品,用户u为对物品i打过分的多个用户中的任一用户,用户u的属性数据包括用户u的标识,物品i的属性数据包括物品i的标识,用户u对物品i的打分数据可以包括用户u对物品i的打分,其中,打分记录也可称为交互记录(比如,用户购买过某物品,则对应的打分记录中的打分数据可以是1)。例如,多个打分记录分别为(u
0,i
0,1)、(u
0,i
1,1)、(u
0,i
2,1)。获取到多个打分记录后,对于多个打分记录中每一打分记录w,可以根据打分记录w和发生时间在打分记录w之前的打分记录,得到打分记录w对应的训练数据g。例如,首先获取到打分记录为w
0(u
0,i
0,1),由于打分记录w
0是首次获取到的,因此,用户u
0对应的第一交互节点列表为空,物品i
0对应的第二交互节点列表为空,得到的打分记录w
0对应的训练数据g
0为用户u的标识u
0、物品i的标识i
0、用户u对应的第一交互节点列表为空、物品i对应的第二交互节点列表为空、打分为1;其次获取到的打分记录为w
1(u
0,i
1,1),由此可见,用户u
0对物品i
0打过分,物品i
1未被其他用户打过分,因此,用户u
0对应的第一交互节点列表为i
0,物品i
1对应的第二交互节点列表为空,得到的打分记录w
1对应的训练数据g
1为用户u的标识u
0、物品i的标识i
1,用户u对应的第一交互节点列表为i
0,物品i对应的第二交互节点列表为空、打分为1;然后获取到的打分记录w
2(u
1,i
1,1),由此可见,用户u
1未对其他物品打过分,物品i
1被用户u
0打过分,因此,用户u
1对应的第一交互节点列表为空,物品i
1对应的第二交互节点列表为u
0,得到的打分记录w
2对应的训练数据g
2为用户u的标识u
1、物品i的标识i
1,用户u对应的第一交互节点列表为空,物品i对应的第二交互节点列表为u
0、打分为1。
在一种可能的实现方式中,打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,根据训练数据集,对打分模型进行训练,包括:将用户u的标识、物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i对应的特征向量,且将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈;将用户u对应的特征向量和物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;根据预测分数以及用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型进行调整,得到训练后的打分模型。
本发明实施例所示的方案,得到训练数据集后,服务器将训练数据集中每一训练数据中的用户u的标识和物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i 对应的特征向量,且可以将每一训练数据中的用户u对应的第一交互节点列表和物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,其中,得到用户u对应的特征向量和物品i对应的特征向量的具体方式与得到目标用户对应的特征向量和候选物品j对应的特征向量的方式类似,得到用户u对应的隐式反馈和物品i对应的隐式反馈的具体方式与得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈的方式类似,此处不再进行赘述。得到用户u对应的特征向量、物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈后,服务器可以将其输入神经网络模型,得到预测分数。得到用户u对物品i的预测分数后,可以根据预测分数以及训练数据集中每一训练数据中的用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型,其中,可以基于预测分数趋近于用户u对物品i的打分的训练原则,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型。
在一种可能的实现方式中,用户u对应的第一交互节点列表包括多阶第一交互节点列表,物品i对应的第二交互节点列表包括多阶第二交互节点列表,反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,用户u对应的第一交互节点列表的阶数与用户反馈矩阵的阶数相同,物品i对应的第二交互节点列表的阶数与物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,包括:将用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
本发明实施例所示的方案,服务器在训练打分模型时,还可以利用用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表。针对此种情况,服务器可以将用户u对应的多阶第一交互节点列表和物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
在一种可能的实现方式中,反馈学习模型的模型参数包括:多个用户中每一用户的反馈向量的权重,多个物品中每一物品的反馈向量的权重;将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,包括:将用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
本发明实施例所示的方案,服务器可以将训练数据集中每一训练数据中的用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表,输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
第三方面,提供了一种推荐物品的装置,该装置包括至少一个模块,该至少一个模块 用于实现上述第一方面所提供的推荐物品的方法。
第四方面,提供了一种设备,该设备包括处理器、存储器和发射器,处理器被配置为执行存储器中存储的指令;处理器执行指令使得该设备实现上述第一方面所提供的推荐物品的方法。
第五方面,提供了计算机可读存储介质,包括指令,当所述计算机可读存储介质在计算机上运行时,使得所述计算机执行上述第一方面所述的方法。
第六方面,提供了一种包含指令的计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述第一方面所述的方法。
第七方面,提供了一种打分模型的训练装置,该装置包括至少一个模块,该至少一个模块用于实现上述第二方面所提供的打分模型的训练方法。
第八方面,提供了一种设备,该设备包括处理器、存储器和发射器,处理器被配置为执行存储器中存储的指令;处理器执行指令使得该设备实现上述第二方面所提供的打分模型的训练方法。
第九方面,提供了计算机可读存储介质,包括指令,当所述计算机可读存储介质在计算机上运行时,使得所述计算机执行上述第二方面所述的方法。
第十方面,提供了一种包含指令的计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述第二方面所述的方法。
本发明实施例提供的技术方案带来的有益效果是:
本发明实施例中,获取目标用户的属性数据和多个候选物品的属性数据,目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识;将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,目标数据集包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,目标第一交互节点列表用于表示目标用户与其他用户或物品的交互信息,目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息;将目标数据集输入打分模型,得到目标用户对多个候选物品的打分,其中,打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户包括目标用户,多个用户中每一用户的属性数据包括对应的用户的标识,多个物品包括多个候选物品,多个物品中每一物品的属性数据包括对应的物品的标识,打分数据包括多个用户中每一用户对多个物品中一个或多个物品的打分;根据目标用户对多个候选物品的打分,确定目标推荐物品。这样,目标用户可以在服务器推荐的目标推荐物品中,选取自己想要的物品,无需在服务器中存储的所有物品中选择,从而,可以提高用户选择物品的效率。
图1是本发明实施例提供的一种***框架示意图;
图2是本发明实施例提供的一种服务器结构示意图;
图3是本发明实施例提供的一种二部图示意图;
图4是本发明实施例提供的一种推荐物品的方法流程图;
图5是本发明实施例提供的一种打分模型的训练方法流程图;
图6是本发明实施例提供的一种推荐物品的装置结构示意图;
图7是本发明实施例提供的一种推荐物品的装置结构示意图;
图8是本发明实施例提供的一种打分模型的训练装置结构示意图。
本发明实施例提供了一种推荐物品的方法,该方法的执行主体为设备,该设备可以是服务器。其中,该服务器可以是推荐物品功能的后台服务器,该服务器可以是一个单独的服务器,也可以是由多个服务器组成的服务器组,本发明实施例以服务器为一个单独的服务器为例进行详细说明,其他情况与之类似,不再进行赘述。为提高用户选择物品的效率,当目标用户想要选择物品时,可以通过操作触发终端向服务器发送对应目标用户的物品推荐请求,相应的,服务器接收到物品推荐请求后,可以在候选集中的多个候选物品中,确定目标用户可能喜欢的目标推荐物品,进而,可以向终端发送目标推荐物品,终端接收到目标推荐物品后可以对其进行显示,以便目标用户可以在目标推荐物品中选择自己想要的物品,其中,***框架图如图1所示。
服务器可以包括处理器210、发射器220、接收器230和存储器240,接收器230和发射器220、存储器240可以分别与处理器210连接,如图2所示。接收器230可以用于接收消息或数据,发射器220和接收器230可以是网卡,发射器220可以用于发送消息或数据,即可以向目标用户的终端发送目标推荐物品。处理器210可以是服务器的控制中心,利用各种接口和线路连接整个服务器的各个部分,如接收器230、发射器220和存储器240等。在本发明中,处理器210可以是CPU(Central Processing Unit,中央处理器),可以用于确定目标推荐物品的相关处理,可选的,处理器210可以包括一个或多个处理单元;处理器210可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***,调制解调处理器主要处理无线通信。处理器210还可以是数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件等。存储器240可用于存储软件程序以及模块,处理器210通过读取存储在存储器的软件代码以及模块,从而执行服务器的各种功能应用以及数据处理。
为了便于对本发明实施例的理解,下面首先介绍本发明实施例涉及的基本概念。
1、用户-物品二部图
即用户与物品的交互可以通过二部图表示,其中,用户与物品之间的连边表示该用户历史交互过该物品,下面对二部图进行详细描述:
服务器可以获取各用户的历史行为数据(比如,对于物品是电影的情况,各用户的历史行为数据可以是各用户曾经下载过、观看过、收藏过的电影),进而,对于每个用户,服 务器可以根据该用户的历史行为数据,建立该用户与历史交互过的物品的连边,从而,得到用户-物品二部图。
例如,用户-物品的二部图如图3所示,图3中的user1到user5分别表示5个用户,item1到item8分别表示8个物品。从图3中的一个节点出发,经过一条边称之为一步,对于用户而言,一步能到达的所有节点为物品,二步能到达的所有节点是与当前用户至少有一个相同的交互物品的所有用户,其中,从用户出发,一步能到达的所有节点可以称为一阶第一交互节点列表,二步能到达的所有节点可以称为二阶第一交互节点列表,依次类推,从物品出发,一步能到达的所有节点可以称为一阶第二交互节点列表,二步能到达的所有节点可以称为二阶第二交互节点列表,依次类推。服务器可以根据用户-物品二部图得到每一用户对应的各阶第一交互节点列表和每一物品对应的各阶第二交互节点列表,例如,user1对应的一阶第一交互节点列表包括item1、item2、item3、item8,user1的二阶第一交互节点列表包括user2、user3、user5。又例如,item1对应的一阶第二交互节点列表包括user1和user3,item1对应的二阶第二交互节点列表包括item2、item3、item4、item8。
下面将结合具体实施方式,对图4所示的处理流程进行详细的说明,内容可以如下:
步骤401,获取目标用户的属性数据和多个候选物品的属性数据,目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识。
在实施中,服务器中可以预先存储有对应各用户的物品推荐触发事件,其中,每个用户对应的物品推荐触发事件可以相同,比如,物品推荐触发事件可以是预设的物品推荐周期,每个用户对应的物品推荐触发事件也可以不同,比如,每个用户对应的物品推荐触发事件可以分别是用户的终端发送的物品推荐请求。当服务器检测到对应目标用户的物品推荐触发事件发生时(比如,当检测到终端发送的对应目标用户的物品推荐请求时),服务器可以确定目标用户所喜爱的目标推荐物品,并将其推荐给目标用户。具体的,服务器可以获取目标用户的属性数据和多个候选物品中每一候选物品的属性数据,其中,目标用户的属性数据可以包括目标用户的标识,多个候选物品中每一候选物品的属性数据可以包括对应候选物品的标识。
可选的,目标用户的属性数据还可以包括以下数据中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,每一候选物品的属性数据还可以包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标。
步骤402,将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,目标数据集包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,目标第一交互节点列表用于表示目标用户与其他用户或物品的交互信息,目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息。
在实施中,服务器获取到目标用户的属性数据和多个候选物品的属性数据后,可以对其进行处理,得到目标数据集,其中,目标数据集可以包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,目标第一交互节点列表用于表示目标用户与其他用户或物品的交互信息,目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息。
可选的,获取目标用户的标识和每一候选物品的标识后,可以根据目标用户的标识和每一候选物品的标识,确定目标第一交互节点列表和每一候选物品对应的目标第二交互节点列表,相应的,步骤402的处理过程可以如下:根据目标用户的标识,在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定目标用户对应的目标第一交互节点列表,且根据每一候选物品的标识,在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表;根据目标用户的标识、目标用户对应的目标第一交互节点列表、每一候选物品的标识、以及每一候选物品对应的目标第二交互节点列表,生成目标数据集。
在实施中,服务器中可以预先存储有多个用户中每一用户的标识对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识对应的目标第二交互节点列表,其中,服务器可以以表的形式记录每一用户的标识对应的目标第一交互节点列表和每一候选物品的标识对应的目标第二交互节点列表,也可以以二部图的形式记录每一用户的标识对应的目标第一交互节点列表和每一候选物品的标识对应的目标第二交互节点列表。服务器获取到目标用户的标识和每一候选物品的标识后,可以在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定目标用户对应的目标第一交互节点列表,且可以在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表。确定出目标用户对应的目标第一交互节点列表、每一候选物品对应的目标第二交互节点列表后,服务器可以生成包含目标用户的标识及对应的目标第一交互节点列表、每一候选物品的标识及对应的目标第二交互节点列表的目标数据集,其中,目标数据集中每一目标数据可以包括目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,候选物品j是多个候选物品中的任一候选物品。
步骤403,将目标数据集输入打分模型,得到目标用户对所述多个候选物品的打分,其中,打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户中每一用户的属性数据包括对应的用户的标识,多个物品中每一物品的属性数据包括对应的物品的标识,打分数据包括多个用户中每一用户对多个物品中一个或多个物品的打分。
在实施中,服务器中可以预先存储有打分模型,其中,打分模型可以是服务器根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户包括目标用户,多个物品包括多个候选物品。服务器可以通过打分模型预测目标用户对多个候选物品中每一候选物品的打分。具体的,生成目标数据集后,服务器可以将目标数据集输入打分模型,得到目标用户对多个候选物品中每一候选物品的打分,其中,针对目标数据集包括多个目标数据的情况,服务器可以将每一目标数据输入打分模型,得到目标用户对对应候选物品的打分。
可选的,打分模型可以包括特征学习模型、反馈学习模型和神经网络模型,相应的,步骤403的处理过程可以如下:将目标数据集中的目标用户的标识和候选物品j的标识输入特征学习模型,得到目标用户对应的特征向量和候选物品j对应的特征向量,且将目标数据集中的目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈,其中,物 品j为多个候选物品中的任一候选物品;将目标用户对应的特征向量、候选物品j对应的特征向量、目标用户对应的隐式反馈和候选物品j对应的隐式反馈,输入神经网络模型,得到目标用户对候选物品j的打分。
其中,目标用户对应的特征向量可以是用于表征该用户本身的特征(或特性)的向量。候选物品j对应的特征向量可以是用于表征候选物品j本身的特征(或特性)的向量。
在实施中,打分模型可以包括特征学习模型、反馈学习模型和神经网络模型,其中,特征学习模型可以用于学习目标用户和每一候选物品对应的特征向量,特征学习模型的模型参数可以包括用户特征矩阵和物品特征矩阵,其中,用户特征矩阵是由多个用户中每一用户的特征向量组成(即用户特征矩阵的每行向量分别是对应用户的特征向量,用户特征矩阵的行数即是多个用户的数量),物品特征矩阵是由多个物品中每一物品的特征向量组成(即物品特征矩阵的每行向量分别是对应物品的特征向量,物品特征矩阵的行数即是多个物品的数量)。得到目标数据集后,服务器可以将目标数据集中的目标用户的标识和候选物品j的标识输入特征学习模型,得到目标用户对应的特征向量和候选物品j对应的特征向量。具体的,服务器将目标用户的标识和候选物品j的标识输入特征学习模型后,根据目标用户的标识和候选物品j的标识,通过特征学习模型在用户特征矩阵中提取目标用户对应的特征向量,在物品特征矩阵中提取候选物品j对应的特征向量,得到目标用户对应的特征向量和候选物品j对应的特征向量。
反馈学习模型可以用于学习目标用户和每一候选物品对应的隐式反馈,反馈学习模型的模型参数可以包括用户反馈矩阵(可以用Y表示)和物品反馈矩阵(可以用X表示),其中,用户反馈矩阵可以是由反馈向量组成的(用户反馈矩阵中的每行向量代表一个节点对应的反馈向量)、物品反馈矩阵可以是由反馈向量组成的(物品反馈矩阵中的每行向量代表一个节点对应的反馈向量)。确定出目标用户(可以用k表示)对应的目标第一交互节点列表(可以用R
k表示)后、候选物品j对应的目标第二交互节点列表(可以用R
j表示)后,可以将其输入反馈学习模型,得到目标用户k对应的隐式反馈和候选物品j对应的隐式反馈。具体的,服务器将目标用户k对应的目标第一交互节点列表输入反馈学习模型后,可以通过反馈学习模型在用户反馈矩阵中提取目标第一交互节点列表对应的多个反馈向量(其中,反馈向量的数量即是目标第一交互节点列表中包含的节点的数量),得到目标用户k对应的反馈向量。获取到目标用户k对应的反馈向量后,可以将多个反馈向量相加,得到目标用户k对应的隐式反馈,其中,服务器可以按照公式(1),得到目标用户k对应的隐式反馈P
k,
其中,用户反馈矩阵中每行向量可以用Y
t表示,其中,t为节点的标识,t=1,2,…,M,M为用户反馈矩阵的总行数。需要说明的是,当用户反馈矩阵为奇数阶用户反馈矩阵时,M为多个物品的总数量,当用户反馈矩阵为偶数阶用户反馈矩阵时,M为多个用户的总数量。
得到候选物品j对应的隐式反馈的具体处理可以如下:服务器将候选物品j对应的目标第二交互节点列表输入反馈学习模型后,可以通过反馈学习模型在物品反馈矩阵中提取目标第二交互节点列表对应的多个反馈向量(其中,反馈向量的数量即是目标第二交互节点列表中包含的节点的数量),得到候选物品j对应的反馈向量。获取到候选物品j对应的反 馈向量后,可以将多个反馈向量相加,得到候选物品j对应的隐式反馈,其中,服务器可以按照公式(2),得到候选物品j对应的隐式反馈Q
j,
其中,物品反馈矩阵中每行向量可以用X
v表示,其中,v为节点的标识,v=1,2,…,N,N为物品反馈矩阵的总行数。需要说明的是,当物品反馈矩阵为奇数阶物品反馈矩阵时,N为多个用户的总数量,当物品反馈矩阵为偶数阶物品反馈矩阵时,N为多个物品的总数量。
得到目标用户k对应的特征向量、候选物品j对应的特征向量、目标用户k对应的隐式反馈和候选物品j对应的隐式反馈后,服务器可以将其输入神经网络模型,得到目标用户对候选物品j的打分。
具体的,服务器中可以预先存储有预先训练出的神经网络模型,其中,神经网络模型可以包含多层神经网络,多层神经网络中的每一层神经网络的输入可以是上一层神经网络的输出,其中,第h层神经网络的公式可以如公式(3)所示,
r
h+1=σ(W
hr
h+b
h) (3)
其中,σ()称为激活函数,比如可以是sigmoid函数、relu函数、tanh函数等,r
h为第h层的输入,b
h为第h层的偏移项,W
h为第h层神经元与第h+1层神经元连边上的权重,其中,W
h和b
h也是训练得到的,第一层神经网络的输入r
1可以如公式(4)所示,
r
1=<p+P,q+Q> (4)
其中,<x,y>表示向量x与向量y对应维数的数值相乘,r
1为向量,p表示用户对应的特征向量、P表示用户对应的隐式反馈、q表示物品对应的特征向量、Q表示物品对应的隐式反馈。因此,神经网络模型可以如公式(5)所示,其中,H为神经网络模型的总层数。
y=σ(W
H(σ(W
H-1(σ(...σ(W
1r
1+b
1)+...+b
H-1))+b
H) (5)
服务器确定出目标用户k对应的特征向量p
k、目标用户k对应的隐式反馈P
k、候选物品j对应的特征向量q
j、候选物品j对应的隐式反馈Q
j后,可以将r
1
kj作为神经网络模型的输入,带到公式(5)中,得到目标用户k对候选物品j的打分。其中,r
1
kj如公式(6)所示。
另外,公式(6)中还可以包括b
k、b
j与b的和(b
k、b
j与b的和可称为统计上的基准分数),其中,b为训练数据集中包括的所有打分的均值,b
k为训练数据集中包括的目标用户k对各物品的所有打分的均值与b的差值,b
j为训练数据集中包括的所有用户对物品j的打分的均值与b的差值。
可选的,目标第一交互节点列表可以包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表可以包括多阶目标第二交互节点列表,多阶目标第一交互节点列表中奇数阶目标第一交互节点列表用于表示目标用户与物品的交互信息,多阶目标第一交互节点列表中偶数阶目标第一交互节点列表用于表示目标用户与其他用户的交互信息,多阶目标第二交互节点列表中奇数阶目标第二交互节点列表用于表示候选物品与用户的交互信息,多阶目标第二交互节点列表中偶数阶目标第二交互节点列表用于表示候选物 品与其他物品的交互信息;反馈学习模型的模型参数可以包括多阶用户反馈矩阵和多阶物品反馈矩阵,其中,目标第一交互节点列表的阶数与用户反馈矩阵的阶数相同,每一候选物品对应的目标第二交互节点列表的阶数与物品反馈矩阵的阶数相同。针对此种情况,相应的,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈的具体处理过程可以如下:将目标数据集中的目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
在实施中,服务器在预测目标用户对候选物品j的打分时,还可以利用目标用户对应的多阶目标第一交互节点列表、候选物品j对应的多阶目标第二交互节点列表,其中,多阶目标第一交互节点列表可以分别是一阶目标第一交互节点列表、二阶目标第一交互节点列表、…、A阶目标第一交互节点列表,多阶用户反馈矩阵可以包括一阶用户反馈矩阵、二阶用户反馈矩阵、…、A阶用户反馈矩阵,A为预设数值(比如A为3),A是预设的目标用户在用户-物品二部图中能到达的最大步数,多阶目标第二交互节点列表可以分别是一阶目标第二交互节点列表、二阶目标第二交互节点列表、…、B阶目标第二交互节点列表,多阶物品反馈矩阵可以包括一阶物品反馈矩阵、二阶物品反馈矩阵、…、B阶物品反馈矩阵,B为预设数值,B是预设的候选物品j在用户-物品二部图中能到达的最大步数,其中,A与B可以相同,也可以不同。一阶用户反馈矩阵,可以用Y
1,一阶用户反馈矩阵中的每行向量可以是对应的物品作为一阶目标第一交互节点列表中的节点时的向量表示,二阶用户反馈矩阵,可以用Y
2表示,二阶用户反馈矩阵中的每行向量可以是对应的用户作为二阶目标第一交互节点列表中的节点时的向量表示,以此类推。一阶物品反馈矩阵,可以用X
1,一阶物品反馈矩阵中的每行向量可以是对应的用户作为一阶目标第二交互节点列表中的节点时的向量表示,二阶物品反馈矩阵,可以用X
2表示,二阶物品反馈矩阵中的每行向量可以是对应的物品作为二阶目标第二交互节点列表中的节点时的向量表示,以此类推。
针对此种情况,服务器可以将目标数据集中的目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入到反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。具体的,对于每阶目标第一交互节点列表
(a=1,2,…,A),服务器可以通过反馈学习模型,在该阶用户反馈矩阵Y
a中,提取目标第一交互节点列表
对应的反馈向量。服务器可以按照上述方式,选取出目标用户对应的各阶目标第一交互节点列表对应的反馈向量,进而,可以将选取出的所有反馈向量相加,得到目标用户对应的隐式反馈。
对于候选物品j对应的每阶目标第二交互节点列表
(b=1,2,…,B),服务器可以通过反馈学习模型,在物品反馈矩阵X
b中,选取目标第二交互节点列表
对应的反馈向量,得到候选物品j对应的目标第二交互节点列表
对应的反馈向量。服务器可以按照上述方式,选取出候选物品j对应的各阶目标第二交互节点列表对应的反馈向量,进而,可以将选取出的所有反馈向量相加,得到候选物品j对应的隐式反馈。
可选的,反馈学习模型的模型参数还可以包括:多个用户中每一用户的反馈向量的权重,多个物品中每一物品的反馈向量的权重,其中,权重可以是由服务器预先训练得到的,此种情况下,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈的具体处理过程可以如下:将目标数据集中的目标用户的标识及对应的目标第一交互节点列表、候选物品j 的标识及对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
在实施中,针对反馈学习模型的模型参数还包括多个用户中每一用户的反馈向量的权重和多个物品中每一物品的反馈向量的权重的情况,服务器可以将目标数据集中的目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。具体的,服务器可以按照上述确定目标用户和候选物品j对应的反馈向量的方法,通过反馈学习模型确定目标用户对应的反馈向量和候选物品j对应的反馈向量。然后,服务器可以根据目标用户的标识和候选物品j的标识,通过反馈学习模型中的目标用户的反馈向量的权重(可以用Φ
kt表示)对目标用户k对应的反馈向量进行加权和处理,得到目标用户对应的隐式反馈,并通过反馈学习模型中的候选物品j的反馈向量的权重(可以用Ω
vj表示)对候选物品j对应的反馈向量进行加权和处理,得到候选物品j对应的隐式反馈。
可选的,反馈学习模型的模型参数可以同时包括:多个用户中每一用户的反馈向量的权重、多个物品中每一物品的反馈向量的权重、多阶用户反馈矩阵和多阶物品反馈矩阵,相应的,目标用户对应的目标第一交互节点列表可以包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表可以包括多阶目标第二交互节点列表,相应的,确定目标用户对应的隐式反馈和候选物品j对应的隐式反馈的处理过程可以如下:将目标数据集中的目标用户的标识及对应的多阶目标第一交互节点列表、候选物品j的标识及对应的多阶目标第二交互节点列表,输入反馈学习模型,得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
在实施中,服务器可以按照上述方式,选取出目标用户对应的各阶目标第一交互节点列表对应的反馈向量和候选物品j对应的各阶目标第二交互节点列表对应的反馈向量。然后,服务器可以根据目标用户的标识和候选物品j的标识,通过反馈学习模型中的目标用户的反馈向量的权重(可以用
表示)对目标用户k对应的反馈向量进行加权和处理,得到目标用户对应的隐式反馈,并通过反馈学习模型中的候选物品j的反馈向量的权重(可以用
表示)对候选物品j对应的反馈向量进行加权和处理,得到候选物品j对应的隐式反馈。
具体的,服务器可以按照公式(7),得到目标用户对应的隐式反馈P
k,
服务器可以按照公式(8),得到候选物品j对应的隐式反馈Q
j,
步骤404,根据目标用户对多个候选物品的打分,确定目标推荐物品。
在实施中,得到目标用户对多个候选物品的打分后,服务器可以在多个候选物品中,根据目标用户对多个候选物品每一候选物品的打分,确定待推荐给目标用户的目标推荐物 品,进而,可以向目标用户推荐目标推荐物品。
可选的,服务器中可以存储有预设推荐条件,相应的,步骤404的处理过程可以如下:根据目标用户对多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品。
其中,预设推荐条件可以是用于服务器根据对应的打分判断某物品是否被推荐的条件。
在实施中,服务器中可以预先存储有预设推荐条件,服务器得到目标用户对多个候选物品的打分后,可以在多个候选物品中,选取对应的打分满足预设推荐条件的目标推荐物品。
可选的,基于预设推荐条件不同,确定目标推荐物品的处理方式可以多种多样,以下给出了几种可行的处理方式:
方式一,根据目标用户对多个候选物品的打分,确定对应的打分最大的预设数目个目标推荐物品。
在实施中,服务器确定出目标用户对多个候选物品的打分后,可以按照对应的打分由大到小的顺序,对多个候选物品进行排序,进而,将排序靠前的预设数目个候选物品,确定为目标推荐物品。
方式二,根据目标用户对多个候选物品的打分,确定对应的打分大于预设分数阈值的目标推荐物品。
在实施中,服务器中可以预先存储有预设分数阈值。服务器确定出目标用户对多个候选物品的打分后,可以在多个候选物品中,选取对应的打分大于预设分数阈值的候选物品,进而,可以将确定的候选物品确定为目标推荐物品。
本发明实施例还提供了一种打分模型的训练方法,下面将结合具体实施方式,对图5所示的处理流程进行详细的说明,内容可以如下:
步骤501,获取多个用户的属性数据、多个物品的属性数据以及打分数据。
在实施中,为训练打分模型,服务器可以预先确定训练数据集。具体的,服务器可以获取多个用户的属性数据、多个物品的属性数据和打分数据,其中,多个用户中每一用户的属性数据可以包括对应用户的标识,多个物品中每一物品的属性数据可以包括对应物品的标识,打分数据可以包括多个用户中每一用户对多个物品中一个物品或多个物品的打分。
可选的,多个用户中每一用户的属性数据还可以包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,多个物品中每一物品的属性数据还可以包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标;打分数据还可以包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
可选的,服务器可以通过获取多个打分记录,来获取多个用户的属性数据、多个物品的属性数据以及打分数据,相应的,步骤501的处理过程可以如下:获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,用户u为对物品i打过分的多个用户中的任一用户,物品i为多个物品中的任一物品。
在实施中,服务器可以获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,物品i为多个物品中的任一物品,用户u为对物品i打过分的多个用户中的任一用户,用户u的属性数据包括用户 u的标识,物品i的属性数据包括物品i的标识,用户u对物品i的打分数据可以包括用户u对物品i的打分,其中,打分记录也可称为交互记录(比如,用户购买过某物品,则对应的打分记录中的打分数据可以是1)。例如,多个打分记录分别为(u
0,i
0,1)、(u
0,i
1,1)、(u
0,i
2,1)。
步骤502,对多个用户的属性数据、多个物品的属性数据以及打分数据进行处理,得到训练数据集,训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对多个物品中一个或多个物品的打分,第一交互节点列表用于表示用户与其他用户或物品的交互信息,第二交互节点列表用于表示物品与其他物品或用户的交互信息。
在实施中,获取到多个用户的属性数据、多个物品的属性数据和打分数据后,服务器可以对其进行处理,得到训练数据集,其中,训练数据集可以包括多个用户中每一用户的标识及对应的第一交互节点列表、多个物品中每一物品的标识及对应的第二交互节点列表,每一用户对多个物品中一个或多个物品的打分。
可选的,针对获取多个打分记录的情况,相应的,步骤502的处理过程可以如下:对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
在实施中,获取到多个打分记录后,对于多个打分记录中每一打分记录w,可以根据打分记录w和发生时间在打分记录w之前的打分记录,得到打分记录w对应的训练数据g。例如,首先获取到的打分记录为w
0(u
0,i
0,1),由于打分记录w
0是首次获取到的,因此,用户u
0对应的第一交互节点列表为空,物品i
0对应的第二交互节点列表为空,得到的打分记录w
0对应的训练数据g
0为用户u的标识u
0、物品i的标识i
0、用户u对应的第一交互节点列表为空、物品i对应的第二交互节点列表为空、打分为1;其次获取到的打分记录为w
1(u
0,i
1,1),由此可见,用户u
0对物品i
0打过分,物品i
1未被其他用户打过分,因此,用户u
0对应的第一交互节点列表为i
0,物品i
1对应的第二交互节点列表为空,得到的打分记录w
1对应的训练数据g
1为用户u的标识u
0、物品i的标识i
1,用户u对应的第一交互节点列表为i
0,物品i对应的第二交互节点列表为空、打分为1;然后获取到的打分记录为w
2(u
1,i
1,1),由此可见,用户u
1未对其他物品打过分,物品i
1被用户u
0打过分,因此,用户u
1对应的第一交互节点列表为空,物品i
1对应的第二交互节点列表为u
0,得到的打分记录w
2对应的训练数据g
2为用户u的标识u
1、物品i的标识i
1,用户u对应的第一交互节点列表为空,物品i对应的第二交互节点列表为u
0、打分为1。
步骤503,根据训练数据集,对打分模型进行训练。
在实施中,得到训练数据集后,服务器可以对上述打分模型进行训练,即可以对打分模型中的模型参数进行调整,得到训练后的打分模型。
可选的,对于打分模型包括特征学习模型、反馈学习模型和神经网络模型的情况,服务器可以统一对特征学习模型、反馈学习模型和神经网络模型进行训练,相应的,步骤503的处理过程可以如下:将用户u的标识、物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i对应的特征向量,且将用户u对应的第一交互节点列表、物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈; 将用户u对应的特征向量和物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈输入神经网络模型,得到预测分数;根据预测分数以及用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型进行调整,得到训练后的打分模型。
在实施中,得到训练数据集后,服务器将训练数据集中每一训练数据中的用户u的标识和物品i的标识输入特征学习模型,得到用户u对应的特征向量和物品i对应的特征向量,且可以将每一训练数据中的用户u对应的第一交互节点列表和物品i对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈,其中,得到用户u对应的特征向量和物品i对应的特征向量的具体方式与得到目标用户对应的特征向量和候选物品j对应的特征向量的方式类似,得到用户u对应的隐式反馈和物品i对应的隐式反馈的具体方式与得到目标用户对应的隐式反馈和候选物品j对应的隐式反馈的方式类似,此处不再进行赘述。得到用户u对应的特征向量、物品i对应的特征向量、用户u对应的隐式反馈和物品i对应的隐式反馈后,可以将其输入神经网络模型,得到预测分数。得到用户u对物品i的预测分数后,可以根据预测分数以及训练数据集中每一训练数据中的用户u对物品i的打分,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型,其中,可以基于预测分数趋近于用户u对物品i的打分的训练原则,对特征学习模型、反馈学习模型和神经网络模型的模型参数进行调整,得到训练后的打分模型。
可选的,用户u对应的第一交互节点列表可以包括多阶第一交互节点列表,物品i对应的第二交互节点列表可以包括多阶第二交互节点列表,反馈学习模型的模型参数可以包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,用户u对应的第一交互节点列表的阶数与用户反馈矩阵的阶数相同,物品i对应的第二交互节点列表的阶数与物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息。针对此种情况,相应的,确定用户u对应的隐式反馈和物品i对应的隐式反馈的具体处理过程可以如下:将用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
在实施中,服务器在训练打分模型时,还可以利用用户u对应的多阶第一交互节点列表、物品i对应的多阶第二交互节点列表。针对此种情况,服务器可以将用户u对应的多阶第一交互节点列表和物品i对应的多阶第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
可选的,反馈学习模型的模型参数可以包括:多个用户中每一用户的反馈向量的权重,多个物品中每一物品的反馈向量的权重。此种情况下,确定用户u对应的隐式反馈和物品i对应的隐式反馈的具体处理过程可以如下:将用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
在实施中,服务器可以将训练数据集中每一训练数据中的用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表,输入反馈学习模型,得到用户u对应的隐式反馈和物品i对应的隐式反馈。
基于相同的技术构思,本发明实施例还提供了一种推荐物品的装置,如图6所示,该装置包括:
获取模块610,用于获取目标用户的属性数据和多个候选物品的属性数据,所述目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识,具体可以实现上述步骤401中的获取功能,以及其他隐含步骤。
生成模块620,用于将所述目标用户的属性数据和所述多个候选物品的属性数据进行处理,生成目标数据集,所述目标数据集包括所述目标用户的标识及对应的目标第一交互节点列表、所述多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,所述目标第一交互节点列表用于表示所述目标用户与其他用户或物品的交互信息,所述目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息,具体可以实现上述步骤402中的生成功能,以及其他隐含步骤。
打分模块630,用于将所述目标数据集输入打分模型,得到所述目标用户对所述多个候选物品的打分,其中,所述打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,所述多个用户中每一用户的属性数据包括对应的用户的标识,所述多个物品中每一物品的属性数据包括对应的物品的标识,所述打分数据包括所述多个用户中每一用户对所述多个物品中一个或多个物品的打分,具体可以实现上述步骤403中的打分功能,以及其他隐含步骤。
确定模块640,用于根据所述目标用户对所述多个候选物品的打分,确定目标推荐物品,具体可以实现上述步骤404中的确定功能,以及其他隐含步骤。
可选的,所述目标用户的属性数据还包括以下数据中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,每一候选物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标。
可选的,所述生成模块620,用于:
根据所述目标用户的标识,在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定所述目标用户对应的目标第一交互节点列表,且根据每一候选物品的标识,在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表;
根据所述目标用户的标识、所述目标用户对应的目标第一交互节点列表、每一候选物品的标识、以及每一候选物品对应的目标第二交互节点列表,生成目标数据集。
可选的,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;
其中,打分模块630,用于:
将所述目标数据集中的目标用户的标识和候选物品j的标识输入所述特征学习模型,得到所述目标用户对应的特征向量和所述候选物品j对应的特征向量,且将所述目标数据集中的所述目标用户对应的目标第一交互节点列表和所述候选物品j对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,其中,所述物品j为所述多个候选物品中的任一候选物品;
将所述目标用户对应的特征向量、所述候选物品j对应的特征向量、所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,输入神经网络模型,得到所述目标用户对候 选物品j的打分。
可选的,所述目标第一交互节点列表包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表包括多阶目标第二交互节点列表,多阶目标第一交互节点列表中奇数阶目标第一交互节点列表用于表示目标用户与物品的交互信息,多阶目标第一交互节点列表中偶数阶目标第一交互节点列表用于表示目标用户与其他用户的交互信息,多阶目标第二交互节点列表中奇数阶目标第二交互节点列表用于表示候选物品与用户的交互信息,多阶目标第二交互节点列表中偶数阶目标第二交互节点列表用于表示候选物品与其他物品的交互信息;
所述打分模块630,用于:
将所述目标数据集中的所述目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
可选的,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;
所述打分模块630,用于:
将所述目标数据集中的所述目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
可选的,所述确定模块640,用于:
根据所述目标用户对所述多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品。
可选的,所述确定模块640,用于:
根据所述目标用户对所述多个候选物品的打分,确定对应的打分最大的预设数目个目标推荐物品;或者,
根据所述目标用户对所述多个候选物品的打分,确定对应的打分大于预设分数阈值的目标推荐物品。
可选的,如图7所示,所述获取模块610,还用于:
获取所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据;
所述生成模块620,还用于:
对所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据进行处理,得到训练数据集,所述训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对所述多个物品中一个或多个物品的打分,所述第一交互节点列表用于表示用户与其他用户或物品的交互信息,所述第二交互节点列表用于表示物品与其他物品或用户的交互信息;
所述装置还包括:
训练模块650,用于根据所述训练数据集,对打分模型进行训练。
可选的,所述多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,所述多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标; 所述打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
可选的,所述获取模块610,用于:
获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,所述用户u为对所述物品i打过分的所述多个用户中的任一用户,所述物品i为多个物品中的任一物品;
所述生成模块620,用于:
对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
可选的,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;
其中,所述训练模块650,用于:
将所述用户u的标识、所述物品i的标识输入所述特征学习模型,得到所述用户u对应的特征向量和所述物品i对应的特征向量,且将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈;
将所述用户u对应的特征向量和所述物品i对应的特征向量、所述用户u对应的隐式反馈和所述物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;
根据所述预测分数以及所述用户u对所述物品i的打分,对所述特征学习模型、所述反馈学习模型和所述神经网络模型进行调整,得到训练后的所述打分模型。
可选的,所述用户u对应的第一交互节点列表包括多阶第一交互节点列表,所述物品i对应的第二交互节点列表包括多阶第二交互节点列表,所述反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,所述用户u对应的第一交互节点列表的阶数与所述用户反馈矩阵的阶数相同,所述物品i对应的第二交互节点列表的阶数与所述物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;
所述训练模块650,用于:
将所述用户u对应的多阶第一交互节点列表、所述物品i对应的多阶第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
可选的,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;
所述训练模块650,用于:
将所述用户u的标识及对应的第一交互节点列表、所述物品i的标识及对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
需要说明的是,上述获取模块610、生成模块620、打分模块630、确定模块640、训练模块650可以由处理器实现,或者处理器配合存储器来实现,或者,处理器执行存储器 中的程序指令来实现,或者处理器配合存储器、发射器来实现。
本发明实施例中,获取目标用户的属性数据和多个候选物品的属性数据,目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识;将目标用户的属性数据和多个候选物品的属性数据进行处理,生成目标数据集,目标数据集包括目标用户的标识及对应的目标第一交互节点列表、多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,目标第一交互节点列表用于表示目标用户与其他用户或物品的交互信息,目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息;将目标数据集输入打分模型,得到目标用户对多个候选物品的打分,其中,打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,多个用户包括目标用户,多个用户中每一用户的属性数据包括对应的用户的标识,多个物品包括多个候选物品,多个物品中每一物品的属性数据包括对应的物品的标识,打分数据包括多个用户中每一用户对多个物品中一个或多个物品的打分;根据目标用户对多个候选物品的打分,确定目标推荐物品。这样,目标用户可以在服务器推荐的目标推荐物品中,选取自己想要的物品,无需在服务器中存储的所有物品中选择,从而,可以提高用户选择物品的效率。
需要说明的是:上述实施例提供的推荐物品的装置在推荐物品时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将服务器的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的推荐物品的装置与推荐物品的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
基于相同的技术构思,本发明实施例还提供了一种打分模型的训练装置,如图8所示,该装置包括:
获取模块810,用于获取所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据,具体可以实现上述步骤501中的获取功能,以及其他隐含步骤。
生成模块820,用于对所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据进行处理,得到训练数据集,所述训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对所述多个物品中一个或多个物品的打分,所述第一交互节点列表用于表示用户与其他用户或物品的交互信息,所述第二交互节点列表用于表示物品与其他物品或用户的交互信息,具体可以实现上述步骤502中的生成功能,以及其他隐含步骤。
训练模块830,用于根据所述训练数据集,对打分模型进行训练,具体可以实现上述步骤503中的训练功能,以及其他隐含步骤。
可选的,所述多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,所述多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标;所述打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
可选的,所述获取模块810,用于:
获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,所述用户u为对所述物品i打过分的所述多个用 户中的任一用户,所述物品i为多个物品中的任一物品;
所述生成模块820,用于:
对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
可选的,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;
其中,所述训练模块830,用于:
将所述用户u的标识、所述物品i的标识输入所述特征学习模型,得到所述用户u对应的特征向量和所述物品i对应的特征向量,且将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈;
将所述用户u对应的特征向量和所述物品i对应的特征向量、所述用户u对应的隐式反馈和所述物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;
根据所述预测分数以及所述用户u对所述物品i的打分,对所述特征学习模型、所述反馈学习模型和所述神经网络模型进行调整,得到训练后的所述打分模型。
可选的,所述用户u对应的第一交互节点列表包括多阶第一交互节点列表,所述物品i对应的第二交互节点列表包括多阶第二交互节点列表,所述反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,所述用户u对应的第一交互节点列表的阶数与所述用户反馈矩阵的阶数相同,所述物品i对应的第二交互节点列表的阶数与所述物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;
所述训练模块830,用于:
将所述用户u对应的多阶第一交互节点列表、所述物品i对应的多阶第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
可选的,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;
所述训练模块830,用于:
将所述用户u的标识及对应的第一交互节点列表、所述物品i的标识及对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
需要说明的是,上述获取模块810、生成模块820、训练模块830可以由处理器实现,或者处理器配合存储器来实现,或者,处理器执行存储器中的程序指令来实现,或者处理器配合存储器、发射器来实现。
上述实施例提供的打分模型的训练装置在训练打分模型时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将服务器的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另 外,上述实施例提供的打分模型的训练装置与打分模型的训练方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明一个实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (30)
- 一种推荐物品的方法,其特征在于,所述方法包括:获取目标用户的属性数据和多个候选物品的属性数据,所述目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识;将所述目标用户的属性数据和所述多个候选物品的属性数据进行处理,生成目标数据集,所述目标数据集包括所述目标用户的标识及对应的目标第一交互节点列表、所述多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,所述目标第一交互节点列表用于表示所述目标用户与其他用户或物品的交互信息,所述目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息;将所述目标数据集输入打分模型,得到所述目标用户对所述多个候选物品的打分,其中,所述打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,所述多个用户中每一用户的属性数据包括对应的用户的标识,所述多个物品中每一物品的属性数据包括对应的物品的标识,所述打分数据包括所述多个用户中每一用户对所述多个物品中一个或多个物品的打分;根据所述目标用户对所述多个候选物品的打分,确定目标推荐物品。
- 根据权利要求1所述的方法,其特征在于,所述目标用户的属性数据还包括以下数据中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,每一候选物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标。
- 根据权利要求1所述的方法,其特征在于,所述将所述目标用户的属性数据和所述多个候选物品的属性数据进行处理,生成目标数据集,包括:根据所述目标用户的标识,在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定所述目标用户对应的目标第一交互节点列表,且根据每一候选物品的标识,在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表;根据所述目标用户的标识、所述目标用户对应的目标第一交互节点列表、每一候选物品的标识、以及每一候选物品对应的目标第二交互节点列表,生成目标数据集。
- 根据权利要求1所述的方法,其特征在于,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,所述将所述目标数据集输入打分模型,得到所述目标用户对所述多个候选物品的打分,包括:将所述目标数据集中的目标用户的标识和候选物品j的标识输入所述特征学习模型,得到所述目标用户对应的特征向量和所述候选物品j对应的特征向量,且将所述目标数据集中的所述目标用户对应的目标第一交互节点列表和所述候选物品j对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,其中,所述物品j为所述多个候选物品中的任一候选物品;将所述目标用户对应的特征向量、所述候选物品j对应的特征向量、所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,输入神经网络模型,得到所述目标用户对候选物品j的打分。
- 根据权利要求4所述的方法,其特征在于,所述目标第一交互节点列表包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表包括多阶目标第二交互节点列表,多阶目标第一交互节点列表中奇数阶目标第一交互节点列表用于表示目标用户与物品的交互信息,多阶目标第一交互节点列表中偶数阶目标第一交互节点列表用于表示目标用户与其他用户的交互信息,多阶目标第二交互节点列表中奇数阶目标第二交互节点列表用于表示候选物品与用户的交互信息,多阶目标第二交互节点列表中偶数阶目标第二交互节点列表用于表示候选物品与其他物品的交互信息;所述将所述目标数据集中的所述目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈,包括:将所述目标数据集中的所述目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
- 根据权利要求4所述的方法,其特征在于,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;所述将所述目标数据集中的所述目标用户对应的目标第一交互节点列表和候选物品j对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈,包括:将所述目标数据集中的所述目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
- 根据权利要求1所述的方法,其特征在于,所述根据所述目标用户对所述多个候选物品的打分,确定目标推荐物品,包括:根据所述目标用户对所述多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品。
- 根据权利要求7所述的方法,其特征在于,所述根据所述目标用户对所述多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品,包括:根据所述目标用户对所述多个候选物品的打分,确定对应的打分最大的预设数目个目标推荐物品;或者,根据所述目标用户对所述多个候选物品的打分,确定对应的打分大于预设分数阈值的目标推荐物品。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述打分模型通过以下方法训练得到:获取所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据;对所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据进行处理,得到训练数据集,所述训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对所述多个物品中一个或多个物品的打分,所述第一交互节点列表用于表示用户与其他用户或物品的交互信息,所述第二交互节点列表用于表示物品与其他物品或用户的交互信息;根据所述训练数据集,对打分模型进行训练。
- 根据权利要求9所述的方法,其特征在于,所述多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,所述多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标;所述打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
- 根据权利要求9所述的方法,其特征在于,所述获取所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据,包括:获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,所述用户u为对所述物品i打过分的所述多个用户中的任一用户,所述物品i为多个物品中的任一物品;所述对所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据进行处理,得到训练数据集,包括:对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
- 根据权利要求11所述的方法,其特征在于,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,所述根据所述训练数据集,对打分模型进行训练,包括:将所述用户u的标识、所述物品i的标识输入所述特征学习模型,得到所述用户u对应的特征向量和所述物品i对应的特征向量,且将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈;将所述用户u对应的特征向量和所述物品i对应的特征向量、所述用户u对应的隐式反馈和所述物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;根据所述预测分数以及所述用户u对所述物品i的打分,对所述特征学习模型、所述反馈学习模型和所述神经网络模型进行调整,得到训练后的所述打分模型。
- 根据权利要求12所述的方法,其特征在于,所述用户u对应的第一交互节点列表包括多阶第一交互节点列表,所述物品i对应的第二交互节点列表包括多阶第二交互节点列表,所述反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,所述用户u对应的第一交互节点列表的阶数与所述用户反馈矩阵的阶数相同,所述物品i对应的第二交互节点列表的阶数与所述物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;所述将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈,包括:将所述用户u对应的多阶第一交互节点列表、所述物品i对应的多阶第二交互节点列表 输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
- 根据权利要求12所述的方法,其特征在于,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;所述将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈,包括:将所述用户u的标识及对应的第一交互节点列表、所述物品i的标识及对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
- 一种推荐物品的装置,其特征在于,所述装置包括:获取模块,用于获取目标用户的属性数据和多个候选物品的属性数据,所述目标用户的属性数据包括目标用户的标识,每一候选物品的属性数据包括对应候选物品的标识;生成模块,用于将所述目标用户的属性数据和所述多个候选物品的属性数据进行处理,生成目标数据集,所述目标数据集包括所述目标用户的标识及对应的目标第一交互节点列表、所述多个候选物品中每一候选物品的标识及对应的目标第二交互节点列表,所述目标第一交互节点列表用于表示所述目标用户与其他用户或物品的交互信息,所述目标第二交互节点列表用于表示候选物品与其他物品或用户的交互信息;打分模块,用于将所述目标数据集输入打分模型,得到所述目标用户对所述多个候选物品的打分,其中,所述打分模型根据多个用户的属性数据、多个物品的属性数据以及打分数据训练得到的,所述多个用户中每一用户的属性数据包括对应的用户的标识,所述多个物品中每一物品的属性数据包括对应的物品的标识,所述打分数据包括所述多个用户中每一用户对所述多个物品中一个或多个物品的打分;确定模块,用于根据所述目标用户对所述多个候选物品的打分,确定目标推荐物品。
- 根据权利要求15所述的装置,其特征在于,所述目标用户的属性数据还包括以下数据中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,每一候选物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标。
- 根据权利要求15所述的装置,其特征在于,所述生成模块,用于:根据所述目标用户的标识,在预先记录的多个用户中每一用户的标识对应的目标第一交互节点列表中,确定所述目标用户对应的目标第一交互节点列表,且根据每一候选物品的标识,在预先记录的多个候选物品中每一候选物品的标识对应的目标第二交互节点列表中,确定每一候选物品对应的目标第二交互节点列表;根据所述目标用户的标识、所述目标用户对应的目标第一交互节点列表、每一候选物品的标识、以及每一候选物品对应的目标第二交互节点列表,生成目标数据集。
- 根据权利要求15所述的装置,其特征在于,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,打分模块,用于:将所述目标数据集中的目标用户的标识和候选物品j的标识输入所述特征学习模型,得到所述目标用户对应的特征向量和所述候选物品j对应的特征向量,且将所述目标数据集中 的所述目标用户对应的目标第一交互节点列表和所述候选物品j对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,其中,所述物品j为所述多个候选物品中的任一候选物品;将所述目标用户对应的特征向量、所述候选物品j对应的特征向量、所述目标用户对应的隐式反馈和所述候选物品j对应的隐式反馈,输入神经网络模型,得到所述目标用户对候选物品j的打分。
- 根据权利要求18所述的装置,其特征在于,所述目标第一交互节点列表包括多阶目标第一交互节点列表,每一候选物品对应的目标第二交互节点列表包括多阶目标第二交互节点列表,多阶目标第一交互节点列表中奇数阶目标第一交互节点列表用于表示目标用户与物品的交互信息,多阶目标第一交互节点列表中偶数阶目标第一交互节点列表用于表示目标用户与其他用户的交互信息,多阶目标第二交互节点列表中奇数阶目标第二交互节点列表用于表示候选物品与用户的交互信息,多阶目标第二交互节点列表中偶数阶目标第二交互节点列表用于表示候选物品与其他物品的交互信息;所述打分模块,用于:将所述目标数据集中的所述目标用户对应的多阶目标第一交互节点列表和候选物品j对应的多阶目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
- 根据权利要求18所述的装置,其特征在于,所述反馈学习模型的模型参数包括:所述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;所述打分模块,用于:将所述目标数据集中的所述目标用户的标识及对应的目标第一交互节点列表、候选物品j的标识及对应的目标第二交互节点列表,输入所述反馈学习模型,得到所述目标用户对应的隐式反馈和候选物品j对应的隐式反馈。
- 根据权利要求15所述的装置,其特征在于,所述确定模块,用于:根据所述目标用户对所述多个候选物品的打分,确定对应的打分满足预设推荐条件的目标推荐物品。
- 根据权利要求21所述的装置,其特征在于,所述确定模块,用于:根据所述目标用户对所述多个候选物品的打分,确定对应的打分最大的预设数目个目标推荐物品;或者,根据所述目标用户对所述多个候选物品的打分,确定对应的打分大于预设分数阈值的目标推荐物品。
- 根据权利要求15-22任一项所述的装置,其特征在于,所述获取模块,还用于:获取所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据;所述生成模块,还用于:对所述多个用户的属性数据、所述多个物品的属性数据以及所述打分数据进行处理,得到训练数据集,所述训练数据集包括每一用户的标识及对应的第一交互节点列表、每一物品的标识及对应的第二交互节点列表、每一用户对所述多个物品中一个或多个物品的打分,所述第一交互节点列表用于表示用户与其他用户或物品的交互信息,所述第二交互节点列表用于表示物品与其他物品或用户的交互信息;所述装置还包括:训练模块,用于根据所述训练数据集,对打分模型进行训练。
- 根据权利要求23所述的装置,其特征在于,所述多个用户中每一用户的属性数据还包括以下数息中的一种或多种:性别、身高、体重、年龄、职业、收入、爱好、教育情况,所述多个物品中每一物品的属性数据还包括以下数据中的一种或多种:品牌、颜色、尺寸、价格、评论、口味、保质期、图标;所述打分数据还包括以下数据中的一种或多种:操作时间、当前使用设备、折扣情况。
- 根据权利要求23所述的装置,其特征在于,所述获取模块,用于:获取多个打分记录,多个打分记录中每一打分记录包括用户u的属性数据、物品i的属性数据、以及用户u对物品i的打分数据,所述用户u为对所述物品i打过分的所述多个用户中的任一用户,所述物品i为多个物品中的任一物品;所述生成模块,用于:对多个打分记录进行处理,得到训练数据集,训练数据集中每一训练数据包括用户u的标识及对应的第一交互节点列表、物品i的标识及对应的第二交互节点列表、用户u对物品i的打分。
- 根据权利要求25所述的装置,其特征在于,所述打分模型包括特征学习模型、反馈学习模型和神经网络模型;其中,所述训练模块,用于:将所述用户u的标识、所述物品i的标识输入所述特征学习模型,得到所述用户u对应的特征向量和所述物品i对应的特征向量,且将所述用户u对应的第一交互节点列表、所述物品i对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈;将所述用户u对应的特征向量和所述物品i对应的特征向量、所述用户u对应的隐式反馈和所述物品i对应的隐式反馈输入所述神经网络模型,得到预测分数;根据所述预测分数以及所述用户u对所述物品i的打分,对所述特征学习模型、所述反馈学习模型和所述神经网络模型进行调整,得到训练后的所述打分模型。
- 根据权利要求26所述的装置,其特征在于,所述用户u对应的第一交互节点列表包括多阶第一交互节点列表,所述物品i对应的第二交互节点列表包括多阶第二交互节点列表,所述反馈学习模型的模型参数包括:多阶用户反馈矩阵和多阶物品反馈矩阵,其中,所述用户u对应的第一交互节点列表的阶数与所述用户反馈矩阵的阶数相同,所述物品i对应的第二交互节点列表的阶数与所述物品反馈矩阵的阶数相同,多阶第一交互节点列表中奇数阶第一交互节点列表用于表示用户与物品的交互信息,多阶第一交互节点列表中偶数阶第一交互节点列表用于表示用户与其他用户的交互信息,多阶第二交互节点列表中奇数阶第二交互节点列表用于表示物品与用户的交互信息,多阶第二交互节点列表中偶数阶第二交互节点列表用于表示物品与其他物品的交互信息;所述训练模块,用于:将所述用户u对应的多阶第一交互节点列表、所述物品i对应的多阶第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
- 根据权利要求26所述的装置,其特征在于,所述反馈学习模型的模型参数包括:所 述多个用户中每一用户的反馈向量的权重,所述多个物品中每一物品的反馈向量的权重;所述训练模块,用于:将所述用户u的标识及对应的第一交互节点列表、所述物品i的标识及对应的第二交互节点列表输入所述反馈学习模型,得到所述用户u对应的隐式反馈和所述物品i对应的隐式反馈。
- 一种设备,其特征在于,所述设备包括处理器和存储器,处理器被配置为执行存储器中存储的指令;处理器执行指令使得所述设备实现如权利要求1-14任一权利要求所述的方法。
- 一种计算机可读存储介质,其特征在于,包括指令,当所述计算机可读存储介质在计算机上运行时,使得所述计算机执行所述权利要求1-14中任一权利要求所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711283557.0 | 2017-12-07 | ||
CN201711283557.0A CN109903103B (zh) | 2017-12-07 | 2017-12-07 | 一种推荐物品的方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019109724A1 true WO2019109724A1 (zh) | 2019-06-13 |
Family
ID=66751275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/109590 WO2019109724A1 (zh) | 2017-12-07 | 2018-10-10 | 一种推荐物品的方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109903103B (zh) |
WO (1) | WO2019109724A1 (zh) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111178944B (zh) * | 2019-12-16 | 2023-05-05 | 贝壳找房(北京)科技有限公司 | 房源转化率的预测方法和装置、存储介质、设备 |
CN112994923B (zh) * | 2019-12-18 | 2023-04-07 | ***通信集团浙江有限公司 | 网元选取方法及装置 |
CN111104599B (zh) * | 2019-12-23 | 2023-08-18 | 北京百度网讯科技有限公司 | 用于输出信息的方法和装置 |
CN111259222B (zh) * | 2020-01-22 | 2023-08-22 | 北京百度网讯科技有限公司 | 物品推荐方法、***、电子设备及存储介质 |
CN111612581A (zh) * | 2020-05-18 | 2020-09-01 | 深圳市分期乐网络科技有限公司 | 一种物品推荐的方法、装置、设备及存储介质 |
CN113763075A (zh) * | 2020-07-17 | 2021-12-07 | 北京沃东天骏信息技术有限公司 | 推送物品的方法、装置、设备及介质 |
CN114155051A (zh) * | 2020-09-04 | 2022-03-08 | 北京沃东天骏信息技术有限公司 | 一种物品展示方法、装置、电子设备和存储介质 |
CN112116426A (zh) * | 2020-09-21 | 2020-12-22 | 中国建设银行股份有限公司 | 一种推送物品信息的方法和装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699711A (zh) * | 2013-12-09 | 2015-06-10 | 华为技术有限公司 | 一种推荐方法及服务器 |
WO2015195663A1 (en) * | 2014-06-17 | 2015-12-23 | Alibaba Group Holding Limited | Search based on combining user relationship datauser relationship data |
CN107038609A (zh) * | 2017-04-24 | 2017-08-11 | 广州华企联信息科技有限公司 | 一种基于深度学习的商品推荐方法及*** |
CN107316234A (zh) * | 2017-07-21 | 2017-11-03 | 北京京东尚科信息技术有限公司 | 个性化商品预测方法和装置 |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8112720B2 (en) * | 2007-04-05 | 2012-02-07 | Napo Enterprises, Llc | System and method for automatically and graphically associating programmatically-generated media item recommendations related to a user's socially recommended media items |
CN103324690A (zh) * | 2013-06-03 | 2013-09-25 | 焦点科技股份有限公司 | 基于因子化条件受限玻尔兹曼机的混合推荐方法 |
CN104331459B (zh) * | 2014-10-31 | 2018-07-06 | 百度在线网络技术(北京)有限公司 | 一种基于在线学习的网络资源推荐方法及装置 |
CN107369058A (zh) * | 2016-05-13 | 2017-11-21 | 华为技术有限公司 | 一种关联推荐方法及服务器 |
CN106296305A (zh) * | 2016-08-23 | 2017-01-04 | 上海海事大学 | 大数据环境下的电商网站实时推荐***与方法 |
CN106897911A (zh) * | 2017-01-10 | 2017-06-27 | 南京邮电大学 | 一种基于用户和物品的自适应个性化推荐方法 |
CN107169586A (zh) * | 2017-03-29 | 2017-09-15 | 北京百度网讯科技有限公司 | 基于人工智能的资源组合优化方法、装置及存储介质 |
CN107341687B (zh) * | 2017-06-01 | 2021-06-08 | 华南理工大学 | 一种基于多维标签与分类排序的推荐算法 |
-
2017
- 2017-12-07 CN CN201711283557.0A patent/CN109903103B/zh active Active
-
2018
- 2018-10-10 WO PCT/CN2018/109590 patent/WO2019109724A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104699711A (zh) * | 2013-12-09 | 2015-06-10 | 华为技术有限公司 | 一种推荐方法及服务器 |
WO2015195663A1 (en) * | 2014-06-17 | 2015-12-23 | Alibaba Group Holding Limited | Search based on combining user relationship datauser relationship data |
CN107038609A (zh) * | 2017-04-24 | 2017-08-11 | 广州华企联信息科技有限公司 | 一种基于深度学习的商品推荐方法及*** |
CN107316234A (zh) * | 2017-07-21 | 2017-11-03 | 北京京东尚科信息技术有限公司 | 个性化商品预测方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN109903103B (zh) | 2021-08-20 |
CN109903103A (zh) | 2019-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019109724A1 (zh) | 一种推荐物品的方法和装置 | |
CN110781391B (zh) | 一种信息推荐方法、装置、设备及存储介质 | |
CN109547814B (zh) | 视频推荐方法、装置、服务器及存储介质 | |
US20230359663A1 (en) | Dynamic feedback in a recommendation system | |
US11017024B2 (en) | Media content rankings for discovery of novel content | |
US10949000B2 (en) | Sticker recommendation method and apparatus | |
CN110442790A (zh) | 推荐多媒体数据的方法、装置、服务器和存储介质 | |
CN110717099B (zh) | 一种推荐影片的方法及终端 | |
US10726087B2 (en) | Machine learning system and method to identify and connect like-minded users | |
US10524005B2 (en) | Facilitating television based interaction with social networking tools | |
CN111400603A (zh) | 一种信息推送方法、装置、设备及计算机可读存储介质 | |
CN109783539A (zh) | 用户挖掘及其模型构建方法、装置及计算机设备 | |
CN111259192A (zh) | 音频推荐方法和装置 | |
CN111159570B (zh) | 一种信息推荐方法及服务器 | |
Jia et al. | Multi-modal learning for video recommendation based on mobile application usage | |
CN113535991A (zh) | 一种多媒体资源推荐方法、装置、电子设备及存储介质 | |
CN117238451B (zh) | 训练方案确定方法、装置、电子设备和存储介质 | |
KR20210060375A (ko) | 유망 콘텐츠 선정 방법, 장치 및 컴퓨터프로그램 | |
CN115455280A (zh) | 一种推荐列表确定方法和服务器 | |
US20240037133A1 (en) | Method and apparatus for recommending cold start object, computer device, and storage medium | |
CN112269943B (zh) | 一种信息推荐***及方法 | |
CN115809374B (zh) | 纠正推荐***主流偏差的方法、***、设备及存储介质 | |
WO2020135420A1 (zh) | 对用户进行分类的方法和装置 | |
CN115795156A (zh) | 物料召回和神经网络训练方法、装置、设备及存储介质 | |
US20210383451A1 (en) | Iterative, multi-user selection and weighting recommendation engine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18885868 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18885868 Country of ref document: EP Kind code of ref document: A1 |