CN111178986B - User-commodity preference prediction method and system - Google Patents
User-commodity preference prediction method and system Download PDFInfo
- Publication number
- CN111178986B CN111178986B CN202010098177.5A CN202010098177A CN111178986B CN 111178986 B CN111178986 B CN 111178986B CN 202010098177 A CN202010098177 A CN 202010098177A CN 111178986 B CN111178986 B CN 111178986B
- Authority
- CN
- China
- Prior art keywords
- user
- commodity
- data
- model
- prediction
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000012549 training Methods 0.000 claims abstract description 33
- 238000007781 pre-processing Methods 0.000 claims abstract description 10
- 239000013598 vector Substances 0.000 claims description 50
- 239000011159 matrix material Substances 0.000 claims description 21
- 230000008569 process Effects 0.000 claims description 20
- 230000003993 interaction Effects 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 8
- 238000013500 data storage Methods 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 5
- 238000011478 gradient descent method Methods 0.000 claims description 4
- 230000001360 synchronised effect Effects 0.000 claims description 4
- 238000000354 decomposition reaction Methods 0.000 claims description 3
- 230000001502 supplementing effect Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 4
- 230000006399 behavior Effects 0.000 description 33
- 238000004364 calculation method Methods 0.000 description 7
- 238000013135 deep learning Methods 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 238000012512 characterization method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013475 authorization Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
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/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
-
- 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/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
- G06Q30/0202—Market predictions or forecasting for commercial activities
-
- 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/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0282—Rating or review of business operators or products
-
- 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
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0631—Item recommendations
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Engineering & Computer Science (AREA)
- Development Economics (AREA)
- Entrepreneurship & Innovation (AREA)
- General Business, Economics & Management (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 invention discloses a method and a system for predicting user-commodity preference, which relate to the technical field of computer data processing, wherein a prediction system comprises a log recall module, a data preprocessing module, a parameter control module, a model training module, a prediction result generation module and a data output module; meanwhile, the invention also adds parallel computation to shorten the training time, thereby realizing the purpose of limiting the computation consumption of the model within an acceptable range while ensuring the accuracy, ensuring the model to have commercial value and being widely applied to various recommendation systems.
Description
Technical Field
The invention relates to the technical field of computer data processing, in particular to a method and a system for predicting user-commodity preference based on deep hidden features by using parallel computing.
Background
With the development of the internet, the e-commerce platform is deeply involved in various aspects of daily life due to convenience and richness, however, when facing a wide variety of commodities, most users are often submerged in a variety of choices, and cannot quickly and conveniently find favorite commodities, which is contrary to the original purpose of convenience. It is therefore necessary to make recommendations tailored to the user's personal conditions and preferences. In most e-commerce platforms, a large number of users are active each day, and transaction records, browsing history, rating data, etc. provide the most primitive data accumulation for platform recommendations. The general method is that a huge user-commodity scoring matrix is formed by scoring commodities by users, then the favor degree of the users for the commodities is predicted through the scoring height, and because the user groups in the system are huge and the commodities are various, and each user cannot score all commodities one by one in practical application, the user-commodity scoring matrix is represented as a very sparse high-dimensional matrix under the normal condition.
According to historical scoring and behavior data of the E-commerce platform, the user (commodity) preference (characteristic) can be known and analyzed, and an effective user-commodity preference prediction model is built on the basis. And the experiment is simulated through the historical behavior data of the user, so that an important scientific basis is provided for the personalized recommendation strategy.
Currently, there are many prediction methods regarding user-commodity preferences. The matrix factorization model is a classical collaborative filtering model in recommendation systems that predicts new unknown scores by mapping users and goods into a low-dimensional vector space and then computing the vector inner product of the users and goods. However, in an actual scenario, the scoring records of the user on the commodities are not easy to obtain, or the scoring data is only a very small part of user behavior data in the recommendation system, and a large number of users do not compile and evaluate browsed or purchased commodities, so that the users and the commodities cannot be well modeled by using the single scoring data, and the corresponding prediction results cannot be highly accurate.
In recent years, deep learning algorithms have been widely used in the fields of image recognition, natural language processing, and the like because of their excellent ability to characterize the nature of data. However, in relation to the recommendation algorithm, if a complete deep neural network is directly applied to the recommendation system, the huge amount of users and commodities in the e-commerce platform will cause the number of parameters, calculation amount and memory consumption in runtime in the neural network to increase by geometric multiples relative to the classical algorithm, and the lengthy training time of the neural network will further reduce the practical value.
Disclosure of Invention
The invention aims to provide a method and a system for predicting user-commodity preference, which can be used for performing customized accurate commodity prediction and recommendation for different target users, limiting the calculation consumption of a model within an acceptable range while ensuring the accuracy, and ensuring that the model has commercial value.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for predicting user-commodity preferences, comprising the steps of:
s1, collecting log files of a user on a shopping platform, and acquiring daily behavior information data of the user from the log files;
s2, preprocessing the daily behavior information data to obtain user-commodity scoring data which can be directly used;
s3, constructing a user-commodity preference prediction model based on the deep hidden features, wherein the model is a decomposition model with the characterization capability, can mine the hidden features of users and commodities, and initializes the weight parameters of the user-commodity preference prediction model, the initialized iteration round number T =0, and defines the maximum iteration round number as Tm;
s4, for target users and commodities, calculating abstract hidden feature vectors of the users and the commodities and currently unknown user-commodity prediction scores in parallel by using a user-commodity preference prediction model;
s5, calculating the error of the currently unknown user-commodity prediction score relative to the user-commodity score data;
s6, if the user-commodity preference prediction model is converged or T = Tm, executing a step S8, otherwise, executing a step S7;
s7, performing back propagation according to the error, updating parameters in the user-commodity preference prediction model, wherein T = T +1, and skipping to the step S4;
s8, generating a final user-commodity prediction score according to abstract hidden feature vectors of the user and the commodity calculated by the current user-commodity preference prediction model;
and S9, outputting the final user-commodity prediction score and the abstract hidden feature vectors of the user and the commodity corresponding to the final user-commodity prediction score to complete the prediction of the user-commodity preference.
The technical effect of the technical scheme is as follows: the deep learning idea is introduced, abstract modeling of implicit characteristics of users and commodities is completed only by using the representation capability of the model, and meanwhile, parallel computing is added to shorten training time, so that accurate user and commodity abstraction can be performed according to the historical interaction records of users and commodities, and customized accurate commodity prediction and recommendation can be performed for different users; the accuracy is guaranteed, and meanwhile the calculation consumption of the model is limited within an acceptable range, so that the model is guaranteed to have commercial value.
Optionally, the daily behavior information data includes click behavior, browsing behavior, collecting behavior, purchasing behavior and comment behavior of the user on the shopping platform.
Specifically, the step S2 specifically includes:
recording a user set and a commodity set in the daily behavior information data as M and N respectively;
a user-commodity scoring matrix R of | M | rows and | N | columns is formed by direct scoring data in the daily behavior information data;
supplementing the data which does not contain the scores in the daily behavior information data into a user-commodity scoring matrix R to obtain a user-commodity interaction scoring matrix X:
wherein i belongs to M, and j belongs to N;
and taking the user-commodity interaction scoring matrix X as the directly-usable user-commodity scoring data.
More specifically, in step S4, the abstract hidden feature vector m of the user i i And abstract hidden feature vector n of commodity j j Is represented as follows:
wherein is V i And V j Dense vector representation of user i and commodity j output for user-commodity embedding network, W U1 And W I1 Weight matrices for the layer 1 of the user and commodity sensors, respectively, b U1 And b I1 And phi represents a ReLu activation function, which are the paradox parameters of the layer 1 of the user and the commodity sensor respectively.
More specifically, it is proposed that,
wherein emb (Θ) represents an embedding operation, fea i And id i Respectively representing attributes and ID inputs, fea, of user i j And id j Respectively representing the attribute and ID input of the commodity j, and theta represents a weight parameter in the vector process.
Specifically, in step S7, the user-commodity preference prediction model is propagated backward by using a gradient descent method, and the weight parameters of the model are updated.
In a second aspect, the present invention provides a user-commodity preference prediction system comprising:
the log recalling module is used for collecting log files of the user on the shopping platform and acquiring daily behavior information data of the user from the log files;
the data preprocessing module is used for receiving and preprocessing the daily behavior information data to obtain user-commodity scoring data which can be directly used in the model training process;
the parameter control module is used for initializing weight parameters of a user-commodity preference prediction model based on the deep hidden features, transmitting the parameters and controlling the training of the user-commodity preference prediction model;
the model training module comprises a parallel computing unit, a thread communication unit and a parameter updating unit, wherein the parallel computing unit is used for computing abstract hidden feature vectors and unknown user-commodity prediction scores of users and commodities in parallel, the thread communication unit is used for enabling threads of the parallel training unit and the parameter updating unit to be synchronous and carrying out data interaction, and the parameter updating unit is used for carrying out back propagation updating on weight parameters of the user-commodity preference prediction model;
a prediction result generation module for generating a final unknown user-commodity prediction score;
and the data output module is used for outputting the final user-commodity prediction score and the abstract hidden feature vectors of the corresponding user and the commodity.
The technical effect of the technical scheme is as follows: the system introduces a deep learning training framework, and a model training module is provided with a parallel computing unit and can realize parallel computing to shorten the training time.
Specifically, the parameter control module comprises an initialization unit and a parameter control unit; the initialization unit is used for initializing weight parameters of a user-commodity preference prediction model based on the deep hidden features, and the weight parameters comprise a parallel user-commodity embedded network and a subsequent multi-layer perceptron layer; the parameter control unit is used for transmitting parameters and controlling the training of the user-commodity preference prediction model.
More specifically, the initialization unit is configured to initialize model parameters including a parallel user-commodity embedded network and a multi-layer user-commodity perceptron layer; the user-commodity embedded network comprises the steps of initializing embedded layer sizes of users and commodities, namely, embed _ size and initial dense vector representation, wherein the embed _ size is the dimension of the initial dense representation; the number of initialization layers for the multilayer sensor layer is less than 10.
Further, the prediction system further comprises a data storage module for storing data in the prediction system.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic block diagram of a system for predicting user-commodity preferences in an embodiment;
FIG. 2 is a flowchart illustrating a method for predicting user-commodity preferences according to an embodiment;
FIG. 3 is a schematic diagram illustrating a process of predicting an unknown score value by implicit characteristics of a user i and a commodity j in the embodiment;
FIG. 4 is a comparison graph of RMSE during the analysis of the previous and subsequent data in the examples, wherein RMSE is a measure of the prediction error, and the smaller the RMSE, the higher the accuracy.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example 1
Referring to fig. 1, the present embodiment provides a user-commodity preference prediction system, including:
the log recalling module is used for collecting log files of the user on the shopping platform and acquiring daily behavior information data of the user from the log files;
the data preprocessing module is used for receiving and preprocessing daily behavior information data to obtain user-commodity scoring data which can be directly used in the model training process;
the parameter control module comprises an initialization unit and a parameter control unit, wherein the initialization unit is used for initializing related parameters related in the prediction process of the user-commodity preference based on the depth hidden features; the parameter control unit is used for controlling the training process of the parameters and the model;
the model training module comprises a parallel computing unit, a thread communication unit and a parameter updating unit, wherein the parallel computing unit is used for computing abstract hidden feature vectors and unknown user-commodity prediction scores of users and commodities in parallel, the thread communication unit is used for enabling threads of the parallel training unit and the parameter updating unit to be synchronous and performing data interaction, and the parameter updating unit is used for reversely propagating and updating weight parameters of a user-commodity preference prediction model;
the prediction result generation module is used for generating a final unknown user-commodity prediction score and storing the final unknown user-commodity prediction score into the data storage module and comprises a parameter receiving unit and a prediction result generation unit;
the data output module is used for outputting the final user-commodity prediction score and the abstract hidden feature vectors of the corresponding user and commodity;
a data storage module for storing data in the prediction system.
When the user uses the e-commerce shopping platform, a large amount of usage records interacting with the system are generated, and in the embodiment, the log recalling module collects log files generated when the user uses the platform daily from the client under the authorization of the client.
In the embodiment, the log recalling module collects log files generated when the user uses the platform daily from the client under the authorization of the client.
In this embodiment, the initialization unit is configured to initialize model parameters including concurrent embedded networks of users, goods, and subsequent multi-layer perceptron layers. The embedded network includes: initializing embedded layer sizes of users and commodities, wherein each vector is used as initial dense representation of the users or the commodities, the size of the embedded layer size is the dimensionality of the initial dense vector, and the embedded layer size is initialized by using standard normal distribution. The multilayer perceptron layer comprises: initializing the layer number layer _ size of the multilayer perceptron, and initializing the layer number layer _ size to be a positive integer less than 10; initializing the number ln of sensors of each layer of the multilayer sensor (n =1,2 \8230; layer _ size), wherein the number ln of the sensors of the last layer of the multilayer sensor determines the dimension of the end user and the commodity implicit characteristics, and initializing decreasing positive integers smaller than the embed _ size respectively; the activation function of the multi-layer perceptron is initialized, with the default being ReLu. Initializing an optimizer optim of the whole model, reversely propagating a method used in optimizing a network, and initializing the method to be SGD by default; initializing a learning rate alpha of the model, wherein the learning rate alpha is used for controlling the step length during reverse propagation, and is initialized to a smaller positive number which is 0.001 as a default; initializing dropout, randomly losing the proportion of network units in training, and initializing to be floating point numbers smaller than 1; and (3) initializing the error accuracy tol of stopping training in the training process, wherein the tol is a parameter for judging whether the training is finished, and the ton is initialized to be a very small positive number.
Example 2
Referring to fig. 2, the present embodiment provides a method for predicting user-commodity preferences, which uses the system for predicting user-commodity preferences according to embodiment 1, and includes the following steps:
s1, a log recalling module collects log files of a user on a shopping platform under the condition of permission of the user, acquires daily behavior information data of the user from the log files and provides the daily behavior information data to a user-commodity preference prediction system;
s2, a data preprocessing module of a user-commodity preference prediction system is utilized to receive daily behavior information data collected by a log recall module, process the daily behavior information data into user-commodity scoring data which can be directly used and store the user-commodity scoring data into a data storage module;
s3, constructing and initializing a user-commodity preference prediction model by combining a parameter initialization unit in a prediction system parameter control module, wherein the number of initialization iteration rounds T =0, and the maximum iteration round is defined as Tm;
s4, for the target user and the target commodity, computing abstract hidden feature vectors of the user and the target commodity in parallel by using a parallel computing unit of a user-commodity preference prediction model and a currently unknown user-commodity prediction score;
s5, calculating the error of the current unknown user-commodity prediction score relative to the user-commodity score data;
s6, if the user-commodity preference prediction model is converged or T = Tm, executing a step S8, otherwise executing a step S7;
s7, performing back propagation according to the error, updating parameters in the user-commodity preference prediction model, wherein T = T +1, and skipping to the step S4;
s8, generating a final user-commodity prediction score according to abstract hidden feature vectors of the user and the commodity calculated by the current user-commodity preference prediction model;
and S9, outputting the final user-commodity prediction score and the abstract hidden feature vectors of the user and the commodity corresponding to the final user-commodity prediction score to complete the prediction of the user-commodity preference.
When a user uses the shopping platform, a large amount of usage records interacting with the system are generated, and in the embodiment, the daily behavior information data comprises clicking behavior, browsing behavior, collecting behavior, purchasing behavior and comment behavior of the user on the shopping platform.
In the daily behavior information data, a small amount of directly available score data and a large amount of historical behavior data that does not include scores but reflects user preferences to some extent are included, so in this embodiment, step S2 specifically includes:
recording a user set and a commodity set in the daily behavior information data as M and N;
forming a user-commodity scoring matrix R of M rows and N columns by direct scoring data in the daily behavior information data;
supplementing the data which does not contain the scores in the daily behavior information data into a user-commodity scoring matrix R to obtain a user-commodity interaction scoring matrix X:
wherein i belongs to M, and j belongs to N;
and taking the user-commodity interaction scoring matrix X as directly usable user-commodity scoring data.
In this embodiment, step S3 specifically includes: and constructing a model structure as shown in the figure 3, and initializing model parameters, wherein the model structure comprises a user, a commodity embedded network and a subsequent multilayer perceptron layer in parallel. The embedded network includes: initializing embedded layer sizes of users and commodities, wherein each vector is used as initial dense representation of the users or the commodities, the size of the embedded _ size is the dimensionality of the initial dense vector, and the embedded layer sizes are initialized by using standard normal distribution. The multilayer perceptron layer comprises: initializing the layer number layer _ size of the multilayer perceptron, and initializing the layer number layer _ size to be a positive integer less than 10; initializing the number ln of sensors of each layer of the multilayer sensors (n =1,2 \8230; layer _ size), wherein the number ln of sensors of the last layer of the multilayer dry machine determines the dimension of the end user and the commodity implicit characteristics, and initializing decreasing positive integers smaller than the embed _ size respectively; the activation function of the multi-layer perceptron is initialized, and the default is initialized to ReLu. Initializing an optimizer optim of the whole model, performing back propagation on a method used in network optimization, and initializing the method to be SGD by default; initializing a learning rate alpha of the model, wherein the learning rate alpha is used for controlling the step length during reverse propagation, and is initialized to a smaller positive number which is 0.001 as a default; initializing iteration round number T =0, and defining the maximum iteration round number as Tm; initializing dropout, randomly losing the proportion of network units in training, and initializing to be floating point numbers smaller than 1; and initializing the error accuracy tol of the training stopping in the training process, wherein tol is a parameter for judging whether the training is finished and is initialized to be an extremely small positive number.
In this embodiment, the scoring result generated in step S4 is temporary data in training (used to update parameters in the user-commodity preference prediction model), and the result generated in step S8 is an accurate prediction output after the model is trained.
In S4 of this embodiment, the input of the user-product preference prediction model includes 2 parts, and feature extraction is performed on the user and the product, and the attribute data of the user, the ID of the user, the attribute data of the product, and the ID of the product are input. In the embedded layer model, the input is divided into 4 threads to process in parallel, and the standardized scaling is carried out in the variable space for continuous variables:
such that all variables fall in the (0, 1) interval; and carrying out one-hot coding on the discrete variable, and converting the discrete variable into a vector only containing 0 and 1. In addition, for extremely sparse vectors such as user and commodity ID, the model adds an embedding layer after the one-hot coding to convert the part of input into a dense vector. The essence of Embedding is a layer of fully connected neural network:
Y=WX+b
wherein, X is an extremely sparse user (commodity) ID vector subjected to unique hot coding, W is a weight coefficient matrix of the network (the matrix is smaller than the dimension of the input vector and is determined by the above-mentioned emb _ size parameter), b is bias (whether the matrix is needed or not can be determined according to the using environment), and Y is output of the network, namely, a dense vector obtained after embedding the user (commodity) ID. At the end of the embedding layer, splicing the attribute and the ID vectors obtained by respectively processing the 4 threads pairwise to obtain the dense vector representation of the original user and the original commodity:
wherein V i And V j Abstract vector representation of user and commodity, emb (theta) represents embedded operation, fea i And id i Respectively representing attributes and ID inputs, fea, of user i j And id j Respectively representing the attribute and ID input of the commodity j, and theta represents a weight parameter in the vector process.
In the process that the 4 threads respectively process the user characteristics, the user ID, the commodity ID and the commodity attribute, due to the fact that the parameter number and the processing flow are different, the calculation time consumption related to the user and the commodity attribute in the actual work is lower than that of the calculation process related to the ID, at the moment, the thread communication unit in the device is relied on to block the thread which is completed first, and the blocking thread is awakened to complete the final vector splicing work of the embedded layer after all threads are calculated.
V after vector representation of user and commodity is obtained i And V j Respectively inputting into a multi-layer perceptron layer (MLP layer) with model structure shown in figure 3, and calculating to obtain final hidden feature vectors m of users and commodities i And n j :
Wherein is V i And V j Original dense vectors, W, for user i and commodity j output by the embedding layer U1 And W I1 Weight matrices for the layer 1 of the user and commodity perceptron, respectively, b U2 And b I2 And respectively representing the bias parameters of the layer 1 of the user and the commodity sensor, phi represents a ReLu activation function, and f represents similar operation in subsequent layers with the layer 1.
In S5 of this embodiment, the calculation of the error of the currently unknown user-commodity prediction score with respect to the user-commodity score data specifically includes:
according to the hidden feature vector m of the user and the commodity output by the multilayer perceptron i And n j Calculating the corresponding model prediction score in a clicking mode:
wherein m is i And n j Respectively the hidden feature vectors of the user and the commodity output in the above steps,the score of the user i to the commodity j obtained through model calculation is represented or called as preference, and is different from the actual interaction score X ij And the error between the two parameters is used as an optimization target to solve the model parameters in the back propagation by using a gradient descent method. In the process, the synchronous work of the user of the multi-layer perceptron layer and the commodity hidden feature vector calculation thread is completed by the thread communication unit.
In obtaining a predictive scoreThereafter, the error is accumulated over the following L according to the interaction data in the known user-commodity interaction matrix X:
wherein X ij The actual rating of item j for user i,for the prediction score of the user i on the commodity j calculated by the model, | Θ | represents the regularization term of all the parameters in the model (optionally, the dropout method specified in the parameter initialization unit is used by default, as the case may be).
In step S6 of this embodiment, the error L and the allowable error tol need to be compared, and if L is smaller than tol, it indicates that the model converges; if L is larger than tol, the model is not converged, and the current training round number T and the maximum iteration round number Tm are continuously compared.
In step S7 of this embodiment, the model is back-propagated by the gradient descent method using the optimizer optim specified in the initialization unit of the parameter control module according to the error L, and the model weight parameter is updated.
In step S8 of this embodiment, the parameter receiving unit of the prediction result generation module uses the parameters transmitted by the parameter control module, and in combination with the model constructed and trained by the model training module, the prediction result generation module makes a prediction on an unknown score by using the implicit feature vectors of the user and the commodity:
the generated prediction result is stored in the data storage module of the device. Fig. 3 is a schematic diagram illustrating a process of predicting an unknown score value by using hidden features of a user i and a commodity j.
As can be seen from FIG. 4, the accuracy of the model in personalized recommendation for the user is greatly improved after the method is applied. In practical application, the commodity which is convenient for the user and meets the individual requirements of the user can be better. Specifically, as can be seen from fig. 4, the accuracy of the recommendation is improved by about 5% compared to the previous method and apparatus for prediction according to the present invention. Namely, after the prediction device and the prediction method are used, the satisfaction degree of the user can be obviously improved.
By the prediction method and the prediction process, the prediction accuracy of the model in personalized recommendation of the user can be improved, and the method and the process have important significance for promotion of platform products and experience of the user.
The invention relates to a device and a method for predicting user-commodity preference based on deep hidden features, which aim to utilize the outstanding characterization capability of deep learning, introduce a deep learning thought into a classical matrix decomposition model and utilize the characterization capability to mine the hidden features of a user and a commodity so as to provide an accurate user-commodity scoring prediction result and provide personalized and convenient recommendation service for the user; meanwhile, the invention also adds parallel computation to shorten the training time, thereby realizing the purpose of limiting the computation consumption of the model within an acceptable range while ensuring the accuracy, ensuring the model to have commercial value and being widely applied to various recommendation systems.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. A method for predicting user-commodity preferences, comprising the steps of:
s1, collecting log files of a user on a shopping platform, and acquiring daily behavior information data of the user from the log files;
s2, preprocessing the daily behavior information data to obtain user-commodity scoring data which can be directly used;
s3, constructing a user-commodity preference prediction model based on the depth implicit characteristics, wherein the model is a decomposition model with the representation capability, can mine the implicit characteristics of users and commodities, and initializes the weight parameters of the user-commodity preference prediction model, wherein the number of initialization iteration rounds T =0, and the maximum iteration round is defined as Tm;
s4, for the target user and the target commodity, calculating abstract hidden feature vectors of the user and the target commodity and a currently unknown user-commodity prediction score in parallel by using a user-commodity preference prediction model;
s5, calculating the error of the currently unknown user-commodity prediction score relative to the user-commodity score data;
s6, if the user-commodity preference prediction model is converged or T = Tm, executing a step S8, otherwise executing a step S7;
s7, performing back propagation according to the error, updating parameters in the user-commodity preference prediction model, wherein T = T +1, and skipping to the step S4;
s8, generating a final user-commodity prediction score according to abstract hidden feature vectors of the user and the commodity calculated by the current user-commodity preference prediction model;
and S9, outputting the final user-commodity prediction score and abstract hidden feature vectors of the user and the commodity corresponding to the final user-commodity prediction score to complete the prediction of the user-commodity preference.
2. The method of predicting user-commodity preferences according to claim 1, wherein the daily behavior information data includes user's click-through behavior, browsing behavior, collection behavior, purchasing behavior, and comment behavior on a shopping platform.
3. The method for predicting user-commodity preferences according to claim 2, wherein the step S2 specifically comprises:
recording a user set and a commodity set in the daily behavior information data as M and N;
a user-commodity scoring matrix R of | M | rows and | N | columns is formed by direct scoring data in the daily behavior information data;
supplementing the data which does not contain the scores in the daily behavior information data into a user-commodity scoring matrix R to obtain a user-commodity interaction scoring matrix X:
wherein i belongs to M, and j belongs to N;
and taking the user-commodity interaction scoring matrix X as the directly-usable user-commodity scoring data.
4. The method for predicting consumer-commodity preferences according to claim 3, wherein in step S4, the abstract hidden feature vector m of consumer i i And goodsAbstract hidden feature vector n of j j Is represented as follows:
wherein is V i And V j Dense vector representation of user i and commodity j output for user-commodity embedding network, W U1 And W I1 Weight matrices for the layer 1 of the user and commodity perceptron, respectively, b U1 And b I1 And phi represents a ReLu activation function, which is a bias parameter of the layer 1 of the user and the commodity sensor respectively.
5. The method of predicting user-commodity preference according to claim 4,
wherein emb (Θ) represents an embedding operation, fea i And id i Respectively representing attributes and ID inputs, fea, of user i j And id j Respectively representing the attribute and ID input of the commodity j, and theta represents a weight parameter in the vector process.
6. The method for predicting user-commodity preferences according to claim 1, wherein in step S7, the weight parameters of the model are updated by back-propagating the user-commodity preference prediction model by using a gradient descent method.
7. A user-commodity preference prediction system, comprising:
the log recalling module is used for collecting log files of the user on the shopping platform and acquiring daily behavior information data of the user from the log files;
the data preprocessing module is used for receiving and preprocessing the daily behavior information data to obtain user-commodity scoring data which can be directly used in the model training process;
the parameter control module is used for initializing weight parameters of a user-commodity preference prediction model based on the deep hidden features, transmitting the parameters and controlling the training of the user-commodity preference prediction model;
the model training module comprises a parallel computing unit, a thread communication unit and a parameter updating unit, wherein the parallel computing unit is used for computing abstract hidden feature vectors and unknown user-commodity prediction scores of users and commodities in parallel, the thread communication unit is used for enabling threads of the parallel training unit and the parameter updating unit to be synchronous and performing data interaction, and the parameter updating unit is used for updating weight parameters of the user-commodity preference prediction model in a back propagation mode;
a prediction result generation module for generating a final user-commodity prediction score;
and the data output module is used for outputting the final user-commodity prediction score and the abstract hidden feature vectors of the corresponding user and the commodity.
8. The system of predicting user-commodity preferences according to claim 7, wherein the parameter control module includes an initialization unit and a parameter control unit; the initialization unit is used for initializing weight parameters of a user-commodity preference prediction model based on the deep hidden features, and the weight parameters comprise a parallel user-commodity embedded network and a subsequent multi-layer perceptron layer; the parameter control unit is used for transmitting parameters and controlling the training of the user-commodity preference prediction model.
9. The method of predicting user-commodity preferences according to claim 7, wherein the initialization unit is configured to initialize model parameters, including a parallel user-commodity embedded network and a multi-layer user-commodity perceptron layer; the user-commodity embedded network comprises an embedded layer size, embed _ size and an initial dense vector representation, wherein the embedded layer size, embed _ size and initial dense vector representation initialize users and commodities; the number of initialization layers for the multilayer sensor layer is less than 10.
10. The system of predicting user-commodity preferences according to claim 7, further comprising a data storage module for storing data in the prediction system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010098177.5A CN111178986B (en) | 2020-02-18 | 2020-02-18 | User-commodity preference prediction method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010098177.5A CN111178986B (en) | 2020-02-18 | 2020-02-18 | User-commodity preference prediction method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111178986A CN111178986A (en) | 2020-05-19 |
CN111178986B true CN111178986B (en) | 2023-04-07 |
Family
ID=70654970
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010098177.5A Active CN111178986B (en) | 2020-02-18 | 2020-02-18 | User-commodity preference prediction method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111178986B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111651512B (en) * | 2020-05-27 | 2022-06-10 | 福建博思软件股份有限公司 | Multisource heterogeneous commodity feature weight solving method and device based on semi-supervised learning |
CN112132660B (en) * | 2020-09-25 | 2023-12-26 | 尚娱软件(深圳)有限公司 | Commodity recommendation method, system, equipment and storage medium |
CN112818256B (en) * | 2021-02-05 | 2022-06-03 | 武汉大学 | Recommendation method based on neural collaborative filtering |
CN114418629A (en) * | 2021-12-30 | 2022-04-29 | 中国电信股份有限公司 | User loss prediction method and device, electronic equipment and readable storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015041121A (en) * | 2013-08-20 | 2015-03-02 | 株式会社日立製作所 | Sales forecast system and sales forecast method |
CN104463637A (en) * | 2014-12-23 | 2015-03-25 | 北京石油化工学院 | Commodity recommendation method and device based on electronic business platform and server |
CN106600302A (en) * | 2015-10-19 | 2017-04-26 | 玺阅信息科技(上海)有限公司 | Hadoop-based commodity recommendation system |
CN107016058A (en) * | 2017-03-10 | 2017-08-04 | 浙江工业大学 | A kind of recommendation Forecasting Methodology based on attribute information preference self study |
CN107563841A (en) * | 2017-08-03 | 2018-01-09 | 电子科技大学 | A kind of commending system decomposed that scored based on user |
CN109857928A (en) * | 2018-12-25 | 2019-06-07 | 北京交通大学 | User preference prediction technique based on polynary credit evaluation |
JP6548771B1 (en) * | 2018-04-05 | 2019-07-24 | 和則 藤沢 | Consumer Goods Procurement Support System |
CN110413878A (en) * | 2019-07-04 | 2019-11-05 | 四川金赞科技有限公司 | User based on adaptive elastomeric network-commodity preference prediction meanss and method |
CN110460570A (en) * | 2019-07-03 | 2019-11-15 | 湖南匡安网络技术有限公司 | A kind of smart grid data ciphering method and decryption method with forward security |
CN110490686A (en) * | 2019-07-08 | 2019-11-22 | 西北大学 | A kind of building of commodity Rating Model, recommended method and system based on Time Perception |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107730289A (en) * | 2016-08-11 | 2018-02-23 | 株式会社理光 | A kind of user behavior analysis method and user behavior analysis device |
CN106530010B (en) * | 2016-11-15 | 2017-12-12 | 平安科技(深圳)有限公司 | The collaborative filtering method and device of time of fusion factor |
-
2020
- 2020-02-18 CN CN202010098177.5A patent/CN111178986B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015041121A (en) * | 2013-08-20 | 2015-03-02 | 株式会社日立製作所 | Sales forecast system and sales forecast method |
CN104463637A (en) * | 2014-12-23 | 2015-03-25 | 北京石油化工学院 | Commodity recommendation method and device based on electronic business platform and server |
CN106600302A (en) * | 2015-10-19 | 2017-04-26 | 玺阅信息科技(上海)有限公司 | Hadoop-based commodity recommendation system |
CN107016058A (en) * | 2017-03-10 | 2017-08-04 | 浙江工业大学 | A kind of recommendation Forecasting Methodology based on attribute information preference self study |
CN107563841A (en) * | 2017-08-03 | 2018-01-09 | 电子科技大学 | A kind of commending system decomposed that scored based on user |
JP6548771B1 (en) * | 2018-04-05 | 2019-07-24 | 和則 藤沢 | Consumer Goods Procurement Support System |
CN109857928A (en) * | 2018-12-25 | 2019-06-07 | 北京交通大学 | User preference prediction technique based on polynary credit evaluation |
CN110460570A (en) * | 2019-07-03 | 2019-11-15 | 湖南匡安网络技术有限公司 | A kind of smart grid data ciphering method and decryption method with forward security |
CN110413878A (en) * | 2019-07-04 | 2019-11-05 | 四川金赞科技有限公司 | User based on adaptive elastomeric network-commodity preference prediction meanss and method |
CN110490686A (en) * | 2019-07-08 | 2019-11-22 | 西北大学 | A kind of building of commodity Rating Model, recommended method and system based on Time Perception |
Non-Patent Citations (2)
Title |
---|
冯兴杰 ; 曾云泽 ; .基于评分矩阵与评论文本的深度推荐模型.计算机学报.(05),全文. * |
蒋伟.推荐系统若干关键技术研究.《中国优秀博硕士学位论文全文数据库(博士)信息科技辑》.2018,(第undefined期),I138-90. * |
Also Published As
Publication number | Publication date |
---|---|
CN111178986A (en) | 2020-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109299396B (en) | Convolutional neural network collaborative filtering recommendation method and system fusing attention model | |
CN112598462B (en) | Personalized recommendation method and system based on collaborative filtering and deep learning | |
CN111178986B (en) | User-commodity preference prediction method and system | |
CN112529168B (en) | GCN-based attribute multilayer network representation learning method | |
CN110717098B (en) | Meta-path-based context-aware user modeling method and sequence recommendation method | |
CN113987200B (en) | Recommendation method, system, terminal and medium for combining neural network with knowledge graph | |
CN110781409B (en) | Article recommendation method based on collaborative filtering | |
CN110659411B (en) | Personalized recommendation method based on neural attention self-encoder | |
CN109313720A (en) | The strength neural network of external memory with sparse access | |
CN112631560B (en) | Method and terminal for constructing objective function of recommendation model | |
CN111737578A (en) | Recommendation method and system | |
Lu et al. | Learning from multi-view multi-way data via structural factorization machines | |
Wang et al. | A personalized electronic movie recommendation system based on support vector machine and improved particle swarm optimization | |
CN114417172A (en) | Deep interest evolution recommendation method, device, equipment and storage medium | |
CN117252665B (en) | Service recommendation method and device, electronic equipment and storage medium | |
CN113345564B (en) | Early prediction method and device for patient hospitalization duration based on graph neural network | |
Yuan et al. | Deep learning from a statistical perspective | |
CN117194771B (en) | Dynamic knowledge graph service recommendation method for graph model characterization learning | |
CN116340635A (en) | Article recommendation method, model training method, device and equipment | |
CN115630219A (en) | Training method and device of recommendation model and computer equipment | |
CN115344794A (en) | Scenic spot recommendation method based on knowledge map semantic embedding | |
CN115687757A (en) | Recommendation method fusing hierarchical attention and feature interaction and application system thereof | |
CN114565436A (en) | Vehicle model recommendation system, method, device and storage medium based on time sequence modeling | |
CN116150462A (en) | Vector construction method and device for target object and computer equipment | |
CN115222177A (en) | Service data processing method and device, computer equipment and storage medium |
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 |