CN110415081A - A kind of matching recommended method of the user individual product based on content - Google Patents

A kind of matching recommended method of the user individual product based on content Download PDF

Info

Publication number
CN110415081A
CN110415081A CN201910685469.6A CN201910685469A CN110415081A CN 110415081 A CN110415081 A CN 110415081A CN 201910685469 A CN201910685469 A CN 201910685469A CN 110415081 A CN110415081 A CN 110415081A
Authority
CN
China
Prior art keywords
user
product
hidden factor
history
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910685469.6A
Other languages
Chinese (zh)
Other versions
CN110415081B (en
Inventor
宋彬
马梦迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Electronic Science and Technology
Original Assignee
Xian University of Electronic Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Electronic Science and Technology filed Critical Xian University of Electronic Science and Technology
Priority to CN201910685469.6A priority Critical patent/CN110415081B/en
Publication of CN110415081A publication Critical patent/CN110415081A/en
Application granted granted Critical
Publication of CN110415081B publication Critical patent/CN110415081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The matching recommended method of the invention discloses a kind of user individual product based on content, overcome proposed algorithm in the prior art still need to the problem of improving because.The invention contains the random batch method of sampling Step 1: based on user;Step 2: the consumer products matching process based on content: establishing network;Orderly user id, historical record product id list are obtained based on the random batch method of sampling of user by batch input, the set of target product id and label are trained on training set, verifying collection, test set, adjustment, assessment network model respectively;Specific user and its historical record are inputted, predicts it to all scorings for not watching film and sequence, the recommendation results of final output top-N using the consumer products matching network based on content.The present invention uses lightweight neural network, greatly reduces training time and Tracking Device Requirement, sampling process is easy and mode input has more randomness, and prediction result generalization ability is stronger.

Description

A kind of matching recommended method of the user individual product based on content
Technical field
The present invention relates to proposed algorithm field, the matching more particularly to a kind of user individual product based on content is pushed away Recommend method.
Background technique
With the development of Internet era, information overload phenomenon is got worse, and the product selection that user faces is more and more, Competition between product is increasing.Proposed algorithm is a kind of algorithm for matching user and product.Good proposed algorithm not only may be used To save user time, increase user satisfaction, the receptance of product can also be increased, turnover is pulled to increase.
Existing proposed algorithm is typically shifted to an earlier date by collaborative filtering pre- from consumer products interactive information matrix Training obtains the hidden factor of product and the hidden factor of user, reuses the hidden factor training recommended models that pre-training obtains and then is pushed away Recommend result.However consumer products interactive information matrix constantly changes, and needs to re-start pre-training at regular intervals and instruct again Practice, this makes, and recommender system training process is complicated, recommendation results real-time is low, but also there are problems that cold start-up, i.e., can not be directed to New user and new product are recommended.
It can be seen that there is also problems for existing proposed algorithm, need to improve.
Summary of the invention
The present invention overcomes in the prior art, proposed algorithm still needs to the problem of improving, and provides a kind of training time with short The matching recommended method of user individual product based on content.
The technical solution of the invention is as follows, provides a kind of user individual product based on content having follow steps Matching recommended method: Step 1: the random batch method of sampling based on user, Step 2: the consumer products based on content Method of completing the square,
The wherein random batch method of sampling based on user, includes the following steps:
Step 1.1 sorts out interactive information file, user information file, product information file and partition testing collection and instruction Practice collection;
User information and product information are encoded to numerical value vector by step 1.2;
Step 1.3, for each user, taking at random for random amount carried out to its historical record, and to taking result Historical record and target product are determined in the form of leave-one-out repeatedly;
Step 1.4, the user id for exporting ordered arrangement, historical record product id list, target product id, label set;
The wherein consumer products matching process based on content, includes the following steps:
Step 2.1 establishes network;
Step 2.1.1, the input position of user id, historical record product id list, target product id, corresponding position are reserved The information of input obtains the coding of corresponding user information, historical record product information and target product information by searching layer;
Step 2.1.2, the coding of user information, historical record product information and target product information is passed through into u net respectively The hidden factor space of network, p network and q network mapping to identical dimensional;
Step 2.1.3, it is produced according to the hidden factor of target product and the hidden factor pair user's history record of user's history record product The hidden factor progress of product is adaptive weighted to obtain the hidden factor of user's history preference;
Step 2.1.4, indicate that hidden Factors Weighting obtains user and draws a portrait using the hidden factor of user's history preference and user;
Step 2.1.5, pass through full articulamentum prediction and matching score using user's portrait and the hidden factor of target product;
Step 2.1.6, using coeff and biasing amendment matching score;
Step 2.2 obtains orderly user id, historical record based on the random batch method of sampling of user by batch input Product id list, the set of target product id and label, respectively training, adjustment, assessment on training set, verifying collection, test set Network model;
Step 2.3, input specific user and its historical record, are predicted using the consumer products matching network based on content It is to all scorings for not watching film and sequence, the recommendation results of final output top-N.
Preferably, assume that certain user has N historical record in the step 1.3, be randomly generated 1 to the random number between N X indicates the number that will be sampled in historical record;X times is in the historical record of the user without the stochastical sampling put back to, and is adopted Sample obtains x historical record product id;For the product id in x historical record, the historical record of each position is selected in turn Product id is corresponding label, remaining history of historical record product id as user as target product id, corresponding scoring Record finally obtains N number of comprising user id, historical record product id list, the sequence of target product id and label.
Preferably, the consumer products matching process based on content comprises the steps of:
Step 2.1.1, the user id that the random batch method of sampling based on user will be used to sample, historical record produce The first three items of product id, target product id list and label input network, obtain user information, user's history note by searching layer Record the coding of product content information and ownership goal product content information, it is assumed that the user has n historical record;According to new user The personal information of offer is recommended, its historical information is sky at this time, the historical record product feature vector of input be full 0 to Amount;
Step 2.1.2, input content information coding maps to obtain corresponding hidden factor representation by neural network, shares three Group content map network, wherein user information coding mapping to user is indicated that hidden factor space, p network go through user by u network Records of the Historian record product content information coding is mapped to the hidden factor space of user's history record product, and q network believes target product content Coding mapping is ceased to the hidden factor space of target product;
Wherein each network is made of one or more layers full Connection Neural Network, the calculating side of every layer of full Connection Neural Network Method such as formula (1);
Y=f (Wx+b) (I)
Wherein y is the output of this layer of neural network, and x is the input of this layer of neural network, and W is weight matrix, and shape is (output vector dimension, input vector dimension), b are bias vectors, and shape is (output vector dimension, 1), and f is activation primitive; Wherein W and b is can to train variable, is updated by gradient descent method, using one layer of feedforward neural network, hidden factor length, that is, defeated The length of layer y is set as 16 out, and activation primitive is set as relu;
Step 2.1.3: the hidden factor of each target product and the hidden factor of user's history record product are carried out in formula (2) first Operation;
Wherein p and q is the hidden factor of user's history record product and the hidden factor of target product respectively,It is user's history record The mode that the hidden factor of product and the hidden factor of target product combine, herein splices p and q;F () represents one layer of neural network, the layer The output of neural network is the vector that a length is 16, does inner product operation with it using the h vector that length is 16, obtains one Scalar y represents the percentage contribution that the user's history record product predicts target product;H in formula (2), W, b are that can instruct Experienced variable is updated using gradient descent method, has obtained n percentage contribution (y1, y2..., yn), wherein each user's history The hidden factor pair of record product answers one;
Underneath with the softmax function in formula (3) by within percentage contribution specification to (0,1) section, and guarantee them Sum be approximately equal to 1;
By obtaining n weight coefficient (weight after adaptive weighted network1, wqeight2..., weightn), wherein Each hidden factor pair of user's history record product answers one, and the β of denominator is in (0,1) section, and manually adjusting the hyper parameter is 0.85;
The hidden factor is recorded to the user's history that corresponding length is 16 using weight coefficient and is weighted summation, is obtained final The hidden factor of user's history preference that length is 16;
Step 2.1.4: the hidden factor of user's history preference and user indicate that the hidden factor is all made of the vector of 16 dimensions, first with The hidden factor of user's history preference and user, which is calculated, in formula (4) and formula (5) indicates the general ratio of the hidden factor;
A=hTf(Wph+b) (4)
B=hTf(Wpp+b) (5)
Wherein phIt is the hidden factor of user's history preference of input, ppIt is that user indicates the hidden factor, a and b are user's history respectively The hidden factor of preference and user indicate ratio scalar corresponding to the hidden factor;W in two formulas, b, h are that two variables are shared Trainable variable, by gradient decline algorithm be updated;
Obtaining the hidden factor of user's history preference and user using formula (6) indicates the weighting of the hidden factor, i.e. user's portrait u;Such as Historical record is not present in some user of fruit, and the user's portrait adjust automatically obtained herein, which becomes user, indicates the hidden factor, without Extra operation;
Step 2.1.5: user's portrait and the hidden factor of target product are stitched together, by two layers neural network, Wherein the neuronal quantity of middle layer is 16, and activation primitive uses relu;The neuronal quantity of output layer is 1, is not used any Activation primitive;
Step 2.1.6: coeff and biasing amendment matching score are used;
It predicts that obtained matching score prediction output after amendment is real score score, corrected Journey such as formula (7):
Score=coeff*prediction+bi+bu+b (7)
Wherein bi、bu, b be that product scoring biasing, user score biasing and overall score biasing respectively, each user and product Possess independent scoring biasing, overall score biasing be it is shared, be obtained by gradient descent method training it is trainable Parameter;The method such as formula (8) that coeff is calculated:
Wherein | R+| user's history record number is represented, α is the hyper parameter within (0,1) section, is set as herein 0.15;
Step 2.2 implements the random batch method of sampling based on user to per user, obtains orderly user id, goes through History record product id, target product id, label set are trained model, adjust, assessing;That is building loss function training Model
The historical record of user includes the product for occurring to interact with the user, and label is user for product to be predicted Scoring, training is lost using mean square error, such as formula (9);
Wherein N represents the size of batch, outputiThe scoring of i-th of prediction is represented, it is corresponding that y represents product to be predicted Label;It calculates the loss of each batch and the parameter of whole network is updated using gradient decline back-propagation algorithm, one A epoch refers to carrying out the once random batch method of sampling based on user to each user and input network to be trained, It is every to pass through an epoch, matching degree prediction and Calculation Estimation index are carried out to each user using test set data, prediction produces Timesharing is judged, the evaluation index used is root-mean-square error, such as formula (10);
Wherein N is the quantity for all scorings predicted, outputiIt is to every an example score in predicting as a result, y is outputi Corresponding label, if the corresponding RMSE of the epoch is also smaller than the smallest evaluation index in the epoch in trained history, Save model at this time;
Step 2.3, input specific user and its historical record, are predicted using the consumer products matching network based on content It is to all scorings for not watching film and sequence, the recommendation results of final output top-N;I.e. with the optimal mould after training Type is that some user recommends, and reads the parameter of the model, by the personal information of user according to pretreatment user when training The mode of people's information is processed into the form of vector, by the content information of user's history product according to prefinished products content when training The mode of information is processed into the form of vector, and using all and user, there is no excessively interactive products as production to be predicted Its content information is processed into the form of vector by product in the way of prefinished products content information when training, to user and often The matching degree of a product to be predicted does primary prediction, is ranked up according to matching degree to all products to be predicted, takes top-N Recommendation results the user is recommended.
Compared with prior art, the present invention is based on the matching recommended methods of the user individual product of content with following excellent Point: the random batch method of sampling based on user, and the consumer products matching process based on content, using the nerve of lightweight Network greatly reduces training time and Tracking Device Requirement, has used according to userspersonal information and product content letter The method that breath predicts the hidden factor avoids complicated pre-training and retraining process, avoids cold start-up problem, allows to With new user and new product, stochastical sampling is done based on user, so that sampling process is easy and mode input is made to have more randomness, Keep prediction result generalization ability stronger.
Detailed description of the invention
Fig. 1 is that the present invention is based on the user personalities based on content in the matching recommended method of the user individual product of content Change product matching network and the relation schematic diagram using the random batch method of sampling based on user;
Fig. 2 is that the present invention is based on the user personalities based on content in the matching recommended method of the user individual product of content Change product matching network structural schematic diagram;
Fig. 3 is trained based on interior the present invention is based on using in the matching recommended method of the user individual product of content The consumer products matching network of appearance generates the process schematic of recommendation results.
Specific embodiment
With reference to the accompanying drawings and detailed description to the present invention is based on the matching of the user individual product of content recommendations Method is described further: the specific implementation step of the random batch method of sampling based on user is as follows:
Step 1: sorting out interactive information file, user information file, product information file and partition testing collection and training Collection.
Data set used should include no less than 100000 consumer products intersection records and corresponding individual subscriber letter Breath and product content information;By taking common data sets MovieLens 100k film recommending data collection as an example, which includes 943 For a user (1-943) to scoring (1-5) data of 1682 films (1-1682), at least there are 20 evaluations notes in each user Record, sorts out three files from data set used:
Ratings: every data line includes [user id, film id, scoring];
User: every data line includes [user id, user's gender, age of user, user's occupation];
Item: every data line includes [film id, movies category, film age];
Wherein user's occupation set are as follows: administrator, artist, doctor, educator, engineer, entertainment、executive、healthcare、homemaker、lawyer、librarian、marketing、none、 other,programmer,retired,salesman,scientist,student,technician,writer.Totally 21 Occupation, each user have an occupation.
Movies category include: unknown, Action, Adventure, Animation, Children's, Comedy, Crime、Documentary、Drama、Fantasy、Film-Noir、Horror、Musical、Mystery、Romance、Sci- Fi, Thriller, War, Western, totally 19 class, each film may belong to multiple classifications.
Randomly select rating file 80% is used as training set, in addition 10% is used as test set, remaining 10% conduct Verifying collection, wherein training set is used to training pattern after the method for random batch sampling is processed, and test set is used in training Assessment models generalization ability in the process, and hyper parameter, controlled training time etc. are adjusted according to the model performance concentrated in verifying.
Step 2: user information and product information are encoded to numerical value vector.
This step be in order to by the information processing of the personal information of user and film at the numerical value that can participate in Computing Vector form.For user information: user information and user's occupation belong to classification information, the two information are carried out one-hot Coding, i.e. vector length are equal to classification size, and corresponding position is arranged to 1 if belonging to corresponding classification, are not belonging to corresponding class It is other, corresponding position is arranged to 0.Such as gender is divided into male, two class of female, then it is 2 that this partial information, which is encoded into a length, Vector, if gender be male if be encoded into [0,1], [1,0] is encoded into if gender is female.For user's occupational information The vector that length is 21 is encoded into using identical method;Age of user belongs to numerical information, there are size relation between information, It scales it between 0 to 1.Specific scalable manner is (age of user-minimum age of user)/(maximum age of user-minimum use The family age).It is scaling to guarantee that gradient when training neural network is maintained within normal range (NR) in this way.Finally by each user The coded representation of information according to [gender, occupation, age] sequential concatenation together, formed a length be 24 numerical value to Amount.
For film information: movies category information belongs to classification information, is encoded using one-hot coding form, tool Body coding mode is encoded with reference to user's gender, ultimately forms the numerical value vector that length is 19;Film age information belongs to numerical value letter Breath, scale it between 0 to 1, specific scalable manner referring to age of user scalable manner.By the numeric coding of film information Get up according to the sequential concatenation in [movies category, film age], finally obtains the numerical value vector that a length is 20.
For the information of missing, the numerical value of corresponding position is set as 0.
Step 3: for each user, taking at random for random amount being carried out to its historical record, and anti-to result is taken Second mining determines historical record and target product with the form of leave-one-out.
Assuming that certain user has N historical record, then the step of following random batch samples is carried out:
It is randomly generated 1 to the random number x between N, indicates the number that will be sampled in historical record;
X times is in the historical record of the user without the stochastical sampling put back to, sampling obtains x historical record product id;
For the product id in x historical record, the historical record product id of each position is selected to produce as target in turn Product id, corresponding scoring are corresponding label, remaining historical record of historical record product id as user.It finally obtains N number of The sequence of (user id, historical record product id, target product id, label);
The advantages of method of this historical record for taking random amount at random, is, can produce more diversified instruction Practice data, includes the case where there is no historical data, be conducive to the recommendation scene for coping with various situations.
Step 4: exporting user id, the historical record product id list, target product id, label set of ordered arrangement.
Finally sampling obtained batch includes N number of identical user id, and N number of historical record product id gathers (each set In include N-1 historical record product), N number of mutually different target product id, N number of label, and its position should be mutual right It answers.
Consumer products matching process based on content is as shown in Fig. 2, specific implementation step is as follows:
Step 1: reserving the input position of user id, historical record product id list, target product id, corresponding position input Information through lookup layer obtain the coding of corresponding user information, historical record product information and target product information.
As shown in Fig. 2, (user id, the historical record that the random batch method of sampling based on user will be used to sample Product id, target product id, label) first three items input network, through lookup layer obtain (user information, user's history record Product content information, ownership goal product content information), assume that the user has n historical record in the figure.
It is to be noted here that the present invention has the effect of reply is cold-started, i.e., as new user, i.e. the not no use of historical record When family enters system, as long as it provides personal information, the present invention can still make recommendation to it.Its historical information is sky at this time, The historical record product feature vector of input should be full 0 vector.The random batch method of sampling based on user mentioned before In, may take historical record is empty batch, sets 0 for historical record id at this time, the corresponding product content found Vector is full 0 vector.Cold start-up problem is had also contemplated into when so training, avoids complicated batch selection course And training process, greatly reduce computation complexity and training time.
Step 2: the coding of user information, historical record product information and target product information is passed through into u network, p respectively The hidden factor space of network and q network mapping to identical dimensional.
Input content information maps to obtain corresponding hidden factor representation by neural network, wherein sharing three groups of content maps Network, wherein user information is mapped to user by u network indicates hidden factor space, and p network is by user's history record product content For information MAP to the hidden factor space of user's history record product, it is hidden that target product content information is mapped to target product by q network Factor space.The output for paying attention to u network, p network, q network is identical dimensional, that is, the hidden factor dimension being mapped to is equal , the length taken in experiment is 16.If some input user's history record product content information be full 0 vector, no matter p What the parameter of network idol is, the hidden factor of the history of output is all the hidden factor of full 0.
Wherein each network is made of one or more layers full Connection Neural Network, the calculating side of every layer of full Connection Neural Network Method such as formula (1).
Y=f (Wx+b)
Wherein y is the output of this layer of neural network, and x is the input of this layer of neural network, and W is weight matrix, and shape is (output vector dimension, input vector dimension), b are bias vectors, and shape is (output vector dimension, 1), and f is activation primitive, Including but not limited to relu/tanh/sigmoid function.Wherein W and b is can to train variable, can be by gradient descent method come more Newly.
We use one layer of feedforward neural network, hidden factor length, that is, output layer y length in this step in an experiment 16 are set as, activation primitive is set as relu.
Step 3: hidden according to the hidden factor of target product and the hidden factor pair user's history record product of user's history record product Factor progress is adaptive weighted to obtain the hidden factor of user's history preference.
Operation first to each (the hidden factor of target product, the hidden factor of user's history record product) to carrying out in formula (2).
Wherein p and q respectively represents the hidden factor of user's history record product and the hidden factor of target product,It is user's history note The mode that the hidden factor of product and the hidden factor of target product combine, including but not limited to splicing, corresponding element multiplication etc. are recorded, in experiment We take the mode of p and q splicing.F () represents one layer of neural network, and the output of this layer of neural network is a length For 16 vector, inner product operation is done with it using the h vector that length is 16, obtains a scalar y, represents user's history record The percentage contribution that product predicts target product.H in formula (2), W, b are trainable variables, be can be used under gradient Drop method updates.
By this single stepping, we have just obtained n percentage contribution ((y1, y2..., yn)), wherein each user's history The hidden factor pair of record product answers one.
Next using the softmax function in formula (3) by within percentage contribution specification to (0,1) section, and guarantee it Sum be approximately equal to 1.
This mode adaptive weighted to historical record is considered for for specific product, different history is remembered Record contribution is different, such as when our target product is romance movie, the science fiction film in historical record is for prediction As a result advisory opinion is obviously little, and network at this moment can reduce the weighted value of this historical record.Adaptively added by this After weighing network, we have just obtained n weight coefficient (weight1, weight2..., weightn), wherein each user goes through The hidden factor pair of history record product answers one.Here the β of denominator is in (0,1) section, is the hyper parameter reality for needing to manually adjust 0.85 is set as in testing.The weight of the every historical record for the user that this hyper parameter keeps historical record item number excessive is not close In 0 number, the similar op for having reduced or remitted computer may bring error.
Finally we record the hidden factor to the user's history that corresponding length is 16 using weight coefficient and are weighted summation, Obtain the hidden factor of user's history preference that final length is 16.
Step 4: indicating that hidden Factors Weighting obtains user and draws a portrait using the hidden factor of user's history preference and user.
It is worth noting that, the hidden factor of user's history preference and user indicate that the hidden factor should be identical dimensional, test In all use 16 dimension vectors.
The hidden factor of user's history preference and user, which is calculated, first with formula (4) and formula (5) indicates the general of the hidden factor Ratio.
A=hTf(Wph+b)
B=hTf(Wpp+b)
Wherein phIt is the hidden factor of user's history preference of input, ppIt is that user indicates the hidden factor, a and b are user's history respectively The hidden factor of preference and user indicate ratio scalar corresponding to the hidden factor.W in two formulas, b, h are that two variables are shared Trainable variable, can by gradient decline algorithm be updated.
Obtaining the hidden factor of user's history preference and user using formula (6) indicates the weighting of the hidden factor, i.e. user's portrait u.Such as Historical record is not present in some user of fruit, and the user's portrait adjust automatically obtained here, which becomes user, indicates the hidden factor, without Extra operation.
Step 5: passing through full articulamentum prediction and matching score using user's portrait and the hidden factor of target product.
Here matching score refers to drawing a portrait using user and the hidden factor of target product passes through certain and the use is calculated Matching degree of the family to the target product.This calculating process can be calculating Euclidean distance, be also possible to seek inner product, can also be with It is using multilayer neural network.It is taken in experiment and the two is stitched together, by two layers neural network, wherein middle layer Neuronal quantity be 16, activation primitive use relu;The neuronal quantity of output layer is 1, does not use any activation primitive.
Step 6: using coeff and biasing amendment matching score.
Predict that obtained matching score prediction needs to export after amendment as real score score.Makeover process such as formula (7):
Score=coeff*prediction+bi+bu+b (7)
Wherein bi、bu, b be respectively product scoring biasing, user score biasing and overall score biasing.These three biasings represent Specific products be scored preference, user scores whole scoring preference in preference and system, that predicts after amendment comments Branch is more accurate, and each user and product possess independent scoring biasing, and it is by ladder that overall score biasing, which is shared, The trainable parameter that degree descent method training obtains.The method such as formula (8) that coeff is calculated:
Wherein | R+| user's history record number is represented, α is the hyper parameter within (0,1) section, is set as in experiment 0.15.This set balance before to the sum of the weight of every historical record of user more than historical record item number setting greater than one It sets, is effectively that score in predicting is more accurate.
Step 7: building loss function.
It is an object of the invention to predict the matching degree of product and user, occur in a manner of predicting scoring.The historical record of user includes the product for occurring to interact with the user, label It is scoring of the user for product to be predicted.Training is lost using mean square error, such as formula (9).
Wherein N represents the size of batch, outputiThe scoring of i-th of prediction is represented, it is corresponding that y represents product to be predicted Label.
It is described to whole network here.
Step 8: training pattern.
Random batch sampling method is used to all users, obtains the several batches of user, is carried out using these batches primary Training is called an epoch.
For each batch, the loss of batch and the parameter using gradient decline back-propagation algorithm to whole network are calculated It is updated.This experiment uses adam majorized function, and learning rate is set as 0.00024.
One epoch of every training carries out matching degree prediction to each user using test set data and Calculation Estimation refers to Mark notices that user's history record used herein is no longer historical record obtained through stochastical sampling, but all in training set Historical record.
Predict product scoring when, the evaluation index that should be used be mean square error (Root Mean Squard Error, RMSE), the calculation formula of the index such as formula (10).
Wherein N is the quantity for all scorings predicted, outputiIt is to every an example score in predicting as a result, y is outputi Corresponding label.If the corresponding RMSE of the epoch is also smaller than the smallest evaluation index in the epoch in trained history, that Save model at this moment.The training of 1000 epoch is carried out in total.
The case where training effect declines in order to avoid time-consuming excessive occurs, we when each epoch terminates into Row is early to stop strategy.Early stopping strategy makes when performance of the model on verifying collection is begun to decline, and deconditioning is to save the time.Using To stop strategy be the evaluation index recorded on nearest four epoch test sets morning, if model is being tested in this four epoch Evaluation index on collection constantly declines, then just jumping out circulation, deconditioning.
Specific simulation process is as follows, tests the hardware condition used:
Processor: Intel (R) Core (TM) i7-7700 CPU@3.60GHz 3.60GHz
Video card: 1070 Ti (8GB) of Nvidia GeForce GTX
RAM:8.00GB
System type: × 64
Test the software condition used:
Linux:16.04
Python:3.6.7
tensorflow-gpu:1.11.0
pandas:0.23.4
numpy1.15.2
By carrying out hyper parameter tuning on verifying collection, described hyper parameter value is all optimized parameter value, finally RMSE is obtained on test set reaches 0.9315.
Step 9: specific user being recommended using model.
After training, the model of preservation should be model optimal in training process.When we are some user progress When recommendation, the parameter of the model saved is read out, by the personal information of user according to pretreatment user when training The mode of people's information is processed into the form of vector, by the content information of user's history product according to prefinished products content when training The mode of information is processed into the form of vector, and using all and user, there is no excessively interactive products as production to be predicted Its content information is processed into the form of vector by product in the way of prefinished products content information when training, to user and often The matching degree of a product to be predicted does primary prediction, is ranked up according to matching degree to all products to be predicted, takes top-N Recommendation results the user is recommended.

Claims (3)

1. a kind of matching recommended method of the user individual product based on content, it is characterised in that: contain following steps, step One, the random batch method of sampling based on user, Step 2: the consumer products matching process based on content,
The wherein random batch method of sampling based on user, includes the following steps:
Step 1.1 sorts out interactive information file, user information file, product information file and partition testing collection and training set;
User information and product information are encoded to numerical value vector by step 1.2;
Step 1.3, for each user, taking at random for random amount carried out to its historical record, and to taking result repeatedly Historical record and target product are determined in the form of leave-one-out;
Step 1.4, the user id for exporting ordered arrangement, historical record product id list, target product id, label set;
The wherein consumer products matching process based on content, includes the following steps:
Step 2.1 establishes network;
Step 2.1.1, the input position of user id, historical record product id list, target product id, corresponding position input are reserved Information through lookup layer obtain the coding of corresponding user information, historical record product information and target product information;
Step 2.1.2, the coding of user information, historical record product information and target product information is passed through into u network, p respectively The hidden factor space of network and q network mapping to identical dimensional;
Step 2.1.3, hidden according to the hidden factor of target product and the hidden factor pair user's history record product of user's history record product Factor progress is adaptive weighted to obtain the hidden factor of user's history preference;
Step 2.1.4, indicate that hidden Factors Weighting obtains user and draws a portrait using the hidden factor of user's history preference and user;
Step 2.1.5, pass through full articulamentum prediction and matching score using user's portrait and the hidden factor of target product;
Step 2.1.6, using coeff and biasing amendment matching score;
Step 2.2 obtains orderly user id, historical record product based on the random batch method of sampling of user by batch input Id list, the set of target product id and label are trained on training set, verifying collection, test set, adjustment, assessment network respectively Model;
Step 2.3, input specific user and its historical record, predict that its is right using the consumer products matching network based on content All scorings for not watching film and sequence, the recommendation results of final output top-N.
2. the matching recommended method of the user individual product according to claim 1 based on content, it is characterised in that: institute It states and assumes that certain user has N historical record in step 1.3, be randomly generated 1 to the random number x between N, expression will be remembered in history The number sampled in record;X times is in the historical record of the user without the stochastical sampling put back to, sampling obtains x historical record Product id;For the product id in x historical record, select the historical record product id of each position as target product in turn Id, corresponding scoring is corresponding label, remaining historical record of historical record product id as user finally obtains N number of packet Id containing user, historical record product id list, the sequence of target product id and label.
3. the matching recommended method of the user individual product according to claim 1 based on content, it is characterised in that: institute The consumer products matching process based on content is stated to comprise the steps of:
Step 2.1.1, the user id that the random batch method of sampling based on user will be used to sample, historical record product The first three items of id, target product id list and label input network, obtain user information, user's history record by searching layer The coding of product content information and ownership goal product content information, it is assumed that the user has n historical record;It is mentioned according to new user The personal information of confession is recommended, its historical information is sky at this time, and the historical record product feature vector of input is full 0 vector;
Step 2.1.2, input content information coding maps to obtain corresponding hidden factor representation by neural network, shares in three groups Hold mapping network, wherein user information coding mapping to user is indicated that hidden factor space, p network remember user's history by u network Record product content information coding is mapped to the hidden factor space of user's history record product, and q network compiles target product content information Code is mapped to the hidden factor space of target product;
Wherein each network is made of one or more layers full Connection Neural Network, and the calculation method of every layer of full Connection Neural Network is such as Formula (1);
Y=f (Wx+b) (1)
Wherein y is the output of this layer of neural network, and x is the input of this layer of neural network, and W is weight matrix, and shape is (output Vector dimension, input vector dimension), b is bias vector, and shape is (output vector dimension, 1), and f is activation primitive;Wherein W It is that can train variable with b, is updated by gradient descent method, using one layer of feedforward neural network, hidden factor length, that is, output layer y Length be set as 16, activation primitive is set as relu;
Step 2.1.3: the fortune in formula (2) is carried out to the hidden factor of each target product and the hidden factor of user's history record product first It calculates;
Wherein p and q is the hidden factor of user's history record product and the hidden factor of target product respectively,It is user's history record product The mode that the hidden factor and the hidden factor of target product combine, herein splices p and q;F () represents one layer of neural network, this layer of nerve The output of network is the vector that a length is 16, does inner product operation with it using the h vector that length is 16, obtains a scalar Y represents the percentage contribution that the user's history record product predicts target product;H in formula (2), W, b are trainable Variable is updated using gradient descent method, has obtained n percentage contribution (y1, y2..., yn), wherein each user's history records The hidden factor pair of product answers one;
Underneath with the s in formula (3)oFtmax function guarantees their peace treaty within percentage contribution specification to (0,1) section Equal to 1;
By obtaining n weight coefficient (weight after adaptive weighted network1, weight2..., weightn), wherein each The hidden factor pair of user's history record product answers one, and the β of denominator is in (0,1) section, and manually adjusting the hyper parameter is 0.85;
The hidden factor is recorded to the user's history that corresponding length is 16 using weight coefficient and is weighted summation, obtains final lengths For the 16 hidden factor of user's history preference;
Step 2.1.4: the hidden factor of user's history preference and user indicate that the hidden factor is all made of the vector of 16 dimensions, first with formula (4) and the hidden factor of user's history preference and user is calculated in formula (5) indicates the general ratio of the hidden factor;
A=hTf(Wph+b) (4)
B=hTf(Wpp+b) (5)
Wherein phIt is the hidden factor of user's history preference of input, ppIt is that user indicates the hidden factor, a and b are user's history preference respectively The hidden factor and user indicate ratio scalar corresponding to the hidden factor;W in two formulas, b, h be two variables it is shared can Trained variable is updated by the algorithm that gradient declines;
Obtaining the hidden factor of user's history preference and user using formula (6) indicates the weighting of the hidden factor, i.e. user's portrait u;If certain Historical record is not present in a user, and the user obtained herein draws a portrait adjust automatically as the hidden factor of user's expression, without extra Operation;
Step 2.1.5: user's portrait and the hidden factor of target product are stitched together, by two layers neural network, wherein The neuronal quantity of middle layer is 16, and activation primitive uses relu;The neuronal quantity of output layer is 1, does not use any activation Function;
Step 2.1.6: coeff and biasing amendment matching score are used;
Predict that obtained matching score prediction output after amendment is real score score, makeover process is such as Formula (7):
Score=coeff*prediction+bi+bu+b (7)
Wherein bi、bu, b be respectively product scoring biasing, user score biasing and overall score biasing, each user and product possess Independent scoring biasing, overall score biasing are shared, are the trainable parameter obtained by gradient descent method training; The method such as formula (8) that coeff is calculated:
Wherein | R+| user's history record number is represented, α is the hyper parameter within (0,1) section, is set as 0.15 herein;
Step 2.2 implements the random batch method of sampling based on user to per user, obtains orderly user id, history note Record product id, target product id, label set are trained model, adjust, assessing;Construct loss function training pattern
The historical record of user includes the product for occurring to interact with the user, and label is user's commenting for product to be predicted Point, training is lost using mean square error, such as formula (9);
Wherein N represents the size of batch, outputiThe scoring of i-th of prediction is represented, y represents the corresponding label of product to be predicted; It calculates the loss of each batch and the parameter of whole network is updated using gradient decline back-propagation algorithm, one Epoch refers to carrying out the once random batch method of sampling based on user to each user and input network to be trained, often By an epoch, matching degree prediction and Calculation Estimation index are carried out to each user using test set data, predict product When scoring, the evaluation index used is root-mean-square error, such as formula (10);
Wherein N is the quantity for all scorings predicted, outputiIt is to every an example score in predicting as a result, y is outputiInstitute is right The label answered saves if the corresponding RMSE of the epoch is also smaller than the smallest evaluation index in the epoch in trained history Model at this time;
Step 2.3, input specific user and its historical record, predict that its is right using the consumer products matching network based on content All scorings for not watching film and sequence, the recommendation results of final output top-N;It is with the optimal models after training Some user recommends, and reads the parameter of the model, by the personal information of user according to pretreatment individual subscriber letter when training The mode of breath is processed into the form of vector, by the content information of user's history product according to prefinished products content information when training Mode be processed into the form of vector, using all and user, there is no excessively interactive products as product to be predicted, will Its content information is processed into the form of vector when training in the way of prefinished products content information, to user and each to pre- The matching degree for surveying product does primary prediction, is ranked up according to matching degree to all products to be predicted, takes the recommendation of top-N As a result the user is recommended.
CN201910685469.6A 2019-07-27 2019-07-27 Content-based matching recommendation method for user personalized products Active CN110415081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910685469.6A CN110415081B (en) 2019-07-27 2019-07-27 Content-based matching recommendation method for user personalized products

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910685469.6A CN110415081B (en) 2019-07-27 2019-07-27 Content-based matching recommendation method for user personalized products

Publications (2)

Publication Number Publication Date
CN110415081A true CN110415081A (en) 2019-11-05
CN110415081B CN110415081B (en) 2022-03-11

Family

ID=68363479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910685469.6A Active CN110415081B (en) 2019-07-27 2019-07-27 Content-based matching recommendation method for user personalized products

Country Status (1)

Country Link
CN (1) CN110415081B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308686A (en) * 2020-11-26 2021-02-02 江苏科源网络技术有限公司 Intelligent recommendation method
CN112784123A (en) * 2021-02-25 2021-05-11 电子科技大学 Cold start recommendation method for graph network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119112A (en) * 1997-11-19 2000-09-12 International Business Machines Corporation Optimum cessation of training in neural networks
CN108763362A (en) * 2018-05-17 2018-11-06 浙江工业大学 Method is recommended to the partial model Weighted Fusion Top-N films of selection based on random anchor point
CN109446430A (en) * 2018-11-29 2019-03-08 西安电子科技大学 Method, apparatus, computer equipment and the readable storage medium storing program for executing of Products Show

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6119112A (en) * 1997-11-19 2000-09-12 International Business Machines Corporation Optimum cessation of training in neural networks
CN108763362A (en) * 2018-05-17 2018-11-06 浙江工业大学 Method is recommended to the partial model Weighted Fusion Top-N films of selection based on random anchor point
CN109446430A (en) * 2018-11-29 2019-03-08 西安电子科技大学 Method, apparatus, computer equipment and the readable storage medium storing program for executing of Products Show

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XIANGNAN HE; ZHANKUI HE; JINGKUAN SONG; ZHENGUANG LIU; YU-GANG J: ""NAIS_ Neural Attentive Item Similarity Model for Recommendation"", 《 IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING 》 *
黄立威: ""基于深度学习的推荐系统研究综述"", 《计算机学报》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112308686A (en) * 2020-11-26 2021-02-02 江苏科源网络技术有限公司 Intelligent recommendation method
CN112784123A (en) * 2021-02-25 2021-05-11 电子科技大学 Cold start recommendation method for graph network
CN112784123B (en) * 2021-02-25 2023-05-16 电子科技大学 Cold start recommendation method for graph network

Also Published As

Publication number Publication date
CN110415081B (en) 2022-03-11

Similar Documents

Publication Publication Date Title
US11494644B2 (en) System, method, and computer program for recommending items using a direct neural network structure
CN109670121A (en) Project level and feature level depth Collaborative Filtering Recommendation Algorithm based on attention mechanism
JPH05342191A (en) System for predicting and analyzing economic time sequential data
Polyzou et al. Scholars Walk: A Markov Chain Framework for Course Recommendation.
CN110717098A (en) Meta-path-based context-aware user modeling method and sequence recommendation method
CN112861006B (en) Recommendation method and system for fusion element path semantics
CN113128369A (en) Lightweight network facial expression recognition method fusing balance loss
Shao et al. Degree planning with plan-bert: Multi-semester recommendation using future courses of interest
CN112699310A (en) Cold start cross-domain hybrid recommendation method and system based on deep neural network
CN108596765A (en) A kind of Electronic Finance resource recommendation method and device
CN110415081A (en) A kind of matching recommended method of the user individual product based on content
CN115760271A (en) Electromechanical commodity personalized recommendation method and system based on graph neural network
Sadabadi et al. A linear programming technique to solve fuzzy multiple criteria decision making problems with an application
Mahmoodi et al. A developed stock price forecasting model using support vector machine combined with metaheuristic algorithms
CN110222838B (en) Document sorting method and device, electronic equipment and storage medium
CN113849725B (en) Socialized recommendation method and system based on graph attention confrontation network
CN114154839A (en) Course recommendation method based on online education platform data
Katsikopoulos et al. A simple model for mixing intuition and analysis
Leathart et al. Temporal probability calibration
CN116204723A (en) Social recommendation method based on dynamic hypergraph representation learning
Drif et al. A sentiment enhanced deep collaborative filtering recommender system
CN115600017A (en) Feature coding model training method and device and media object recommendation method and device
Olden Predicting stocks with machine learning. stacked classifiers and other learners applied to the oslo stock exchange
CN110956528B (en) Recommendation method and system for e-commerce platform
Kwon et al. Improving RNN based recommendation by embedding-weight tying

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant