CN113495991A - Recommendation method and device - Google Patents
Recommendation method and device Download PDFInfo
- Publication number
- CN113495991A CN113495991A CN202010260030.1A CN202010260030A CN113495991A CN 113495991 A CN113495991 A CN 113495991A CN 202010260030 A CN202010260030 A CN 202010260030A CN 113495991 A CN113495991 A CN 113495991A
- Authority
- CN
- China
- Prior art keywords
- user
- recommended
- term
- long
- interest
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000007774 longterm Effects 0.000 claims abstract description 105
- 230000006399 behavior Effects 0.000 claims description 101
- 239000013598 vector Substances 0.000 claims description 21
- 238000004364 calculation method Methods 0.000 claims description 16
- 230000006870 function Effects 0.000 claims description 16
- 230000007246 mechanism Effects 0.000 claims description 14
- 230000003068 static effect Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000005065 mining Methods 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 4
- 238000011176 pooling Methods 0.000 claims description 4
- 230000008859 change Effects 0.000 abstract description 7
- 230000000694 effects Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 15
- 239000011159 matrix material Substances 0.000 description 11
- 238000004422 calculation algorithm Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000012549 training Methods 0.000 description 7
- 238000000354 decomposition reaction Methods 0.000 description 4
- 238000001914 filtration Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- RPNUMPOLZDHAAY-UHFFFAOYSA-N Diethylenetriamine Chemical compound NCCNCCN RPNUMPOLZDHAAY-UHFFFAOYSA-N 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000004880 explosion Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a recommendation method and device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended; obtaining long-term interest preference of a user to be recommended according to the long-term behavior data; obtaining dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; and determining a recommended object according to the preference degree of the user to be recommended on the object for recommendation. The implementation mode better reflects the influence of the user interest change on the recommendation result, so that the recommendation result is strong in interpretability, higher click estimation accuracy is brought, and the recommendation effect is obviously improved.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a recommendation method and a recommendation device.
Background
With the rapid development of internet information technology, information explosion becomes a challenge for people to take in information. The recommendation system can capture interests, hobbies and potential requirements of a user according to basic information and historical behaviors of the user under the condition that the user does not have search words to show strong intentions, predict information sets which the user may prefer, help the user filter out a large amount of irrelevant information, quickly find needed information, improve interactivity and improve information acquisition experience.
The conventional recommendation system is mainly realized based on a content collaborative filtering algorithm, a click-through rate model-based estimation algorithm and the like.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the current recommendation system only trains a recommendation model through learning of a user behavior sequence, and cannot accurately reflect the influence of the change of user interest on a recommendation result.
Disclosure of Invention
In view of this, embodiments of the present invention provide a recommendation method and apparatus, which can better reflect the influence of user interest changes on a recommendation result, so that the recommendation result is strong in interpretability, and at the same time, a higher click prediction accuracy is brought, and a recommendation effect is significantly improved.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a recommendation method.
A recommendation method, comprising: acquiring user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended; obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data; obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; and determining a recommended object according to the preference degree of the user to be recommended on the object for recommendation.
Optionally, obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data includes: and using a network based on an attention mechanism as a feature extractor, performing feature extraction on the long-term behavior data, and performing summation pooling on the extracted features to obtain the long-term interest preference of the user to be recommended.
Optionally, the attention-based network is a self-attention network.
Optionally, the method further comprises: supervised learning is performed on the output of the attention-based network to train an auxiliary loss function.
Optionally, obtaining the dynamic interest feature of the user to be recommended according to the long-term interest preference, the short-term behavior data, and the object feature includes: performing attention calculation by using the object characteristics and the short-term behavior sequence and the long-term interest preference respectively to obtain short-term interest characteristics and long-term interest characteristics of the object of the user to be recommended; and calculating the short-term interest characteristics and the long-term interest characteristics based on the self-attention mechanism network to obtain the dynamic interest characteristics of the user to be recommended.
Optionally, obtaining the preference degree of the user to be recommended for the object according to the dynamic interest feature, the object feature, and the user feature includes: splicing the dynamic interest features, the object features and the user features; and after the feature vectors obtained by splicing pass through a full connection layer, performing softmax operation to obtain the preference degree of the user to be recommended to the object.
Optionally, the user characteristics of the user to be recommended include a user static attribute characteristic and a user interest mining characteristic.
According to another aspect of the embodiments of the present invention, there is provided a recommendation apparatus.
A recommendation device, comprising: the data acquisition module is used for acquiring the user characteristics, the long-term behavior data and the short-term behavior data of the user to be recommended and the object characteristics; the first characteristic module is used for obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data; the second characteristic module is used for obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; the preference calculation module is used for obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; and the object recommending module is used for determining a recommended object according to the preference degree of the user to be recommended on the object so as to recommend the object.
According to yet another aspect of an embodiment of the present invention, an electronic device for recommendation is provided.
An electronic device for recommendation, comprising: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the recommendation method provided by the embodiment of the invention.
According to yet another aspect of embodiments of the present invention, a computer-readable medium is provided.
A computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the recommendation method provided by an embodiment of the invention.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of obtaining user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended; obtaining long-term interest preference of a user to be recommended according to the long-term behavior data; obtaining dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; the recommendation object is determined according to the preference degree of the user to be recommended to the object for recommendation, the user behavior is divided into long-term behavior and short-term behavior according to types, the long-term interest preference and the short-term impulse demand of the user can be distinguished, the influence of the user interest change on the recommendation result can be better reflected, the interpretability of the recommendation result is high, meanwhile, the click estimation accuracy is higher, and the recommendation effect is obviously improved. According to the invention, the attention calculation is carried out on the user behavior and the object, so that the interest preference degree of the user on a certain object can be captured; compared with the traditional circulating network, the method can establish direct long-distance dependence, reduce the number of long-sequence interaction times, and is more beneficial to capturing the user preference by a model so as to calculate the matching degree of the recommended object and the current user state.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a recommendation method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of the structure of a recommendation model according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a network architecture of a recommendation model according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the main blocks of a recommendation device according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
With the development of internet technology, the e-commerce era comes, large-scale recommendation systems need to quickly and accurately search out commodities required by users at present, historical behaviors (including clicking, searching, purchasing and the like) of the users are generally adopted to be directly regarded as interest points of the users, but the interests of the users are dynamically changed and can be temporarily interrupted along with the occurrence of purchasing behaviors, so that the method has important significance in mining the real interests behind the behaviors of the users and considering the dynamic changes of the interests.
At present, personalized recommendation mainly comprises content-based collaborative filtering and a prediction algorithm based on a click rate model.
Based on the collaborative filtering algorithm of the content, firstly, a user-commodity matrix vector needs to be constructed, wherein the matrix is the behavior (such as browsing, purchasing and the like) of a user to commodities, and the similarity of columns (commodity dimensions) is calculated according to the user-commodity matrix; selecting k most similar commodities of a specific commodity to form a recommendation list (a measurement mode generally adopts cosine distance); and recommending the commodities which are not acted in the specific user list. However, although simple and effective, the content-based collaborative filtering algorithm is not sufficient for the user to act on the commodity, most of which is not recorded, so that the confidence of the sparse vector interaction result is not high, and meanwhile, as the number of the users and the commodity increases, the matrix dimension rapidly grows, and the computation and storage resources quickly enter the bottleneck.
The traditional method can generate the problem of dimension explosion along with the increase of the dimensions of users or commodities, introduces a mathematical matrix decomposition method, approximately decomposes a huge relational matrix into two low-rank matrix products (such as SVD) respectively representing the users and the commodities, each commodity obtains a low-dimensional vector, each user also obtains a low-dimensional vector, and a recommendation score is obtained by using the dot product of the two vectors of the low-dimensional commodity and the user during recommendation. However, although the recommendation algorithm based on matrix decomposition can decompose the user-commodity relation matrix into two low-rank matrices, the matrix decomposition speed is slow, the matrix decomposition accuracy directly determines the recommendation accuracy, and the dimension of the hidden space of the recommendation algorithm cannot correspond to reality, so that the interpretability is poor.
Based on the estimation algorithm of the click rate model, the depth network represented by wide & deep combines the traditional feature engineering and the depth model, and focuses more on the high-order cross combination relationship among different features. The deep network represented by DIN 2 and DIEN 3 considers the user interests, proposes an attention mechanism to capture the interest relationship between the user and the target commodity, and uses the interest relationship for commodity click rate estimation to select k commodities with the largest score for recommendation. However, based on the estimation algorithm of the click rate model, the wide & deep model does not pay attention to the historical behaviors of the user, the DIN model directly considers the behaviors of the user as the user interests and does not consider the sequence relation of the user behaviors, and the DIEN adds the user sequence relation but does not display the long-term interest preference and the short-term attention point of the modeling user.
Therefore, the recommendation system commonly used in the prior art basically trains the recommendation model only by learning the user behavior sequence, and cannot accurately reflect the influence of the change of the user interest on the recommendation result, so that the recommendation result is poor in interpretability and unsatisfactory in effect.
In order to solve the technical problem in the prior art, the invention provides a recommendation method based on user dynamic interest estimation, which can take into account the long-term and short-term interest preferences of a user based on different types of historical behaviors of the user, takes the long-term and short-term interest dynamic changes of the user into consideration, and calculates the object commodity which is interested by the user by coupling the long-term and short-term interest preferences of the user.
Fig. 1 is a schematic diagram of the main steps of a recommendation method according to an embodiment of the present invention. As shown in fig. 1, the recommendation method according to the embodiment of the present invention mainly includes the following steps S101 to S105.
Step S101: acquiring user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended;
step S102: obtaining long-term interest preference of a user to be recommended according to the long-term behavior data;
step S103: obtaining dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics;
step S104: obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics;
step S105: and determining a recommended object according to the preference degree of the user to be recommended on the object for recommendation.
Taking commodity recommendation in the e-commerce field as an example, the following steps are carried out: the recommended object is a commodity. In the mainstream recommendation system, the user browsing behavior is mainly used to train the recommendation model. In an e-commerce environment, the click browsing behaviors of users are non-cost, rich and dense, while the purchasing behaviors are sparse and need to pay, the average number of browsing commodities in a month level is about 100 for ordinary users, and the purchasing quantity is single digit. Therefore, when modeling is carried out according to the interest preference of the user, the short-term behavior data such as recent click behaviors of the user and the like are taken as short-term interest features (generally, browsing data of the user in the last week is used, and the upper limit of the number of data is 100) in consideration of the actual online computing speed; and long-term behavior data of the user such as purchasing behavior is used to reflect the long-term interest preference of the user (generally, behavior data of the user purchasing commodities in the last two years is used, and the upper limit of the number of data is 300).
When recommendation is performed, the input of the recommendation system is the user characteristics, the long-term behavior data and the short-term behavior data of the user to be recommended, and the object characteristics. The user characteristics of the user to be recommended can be divided into two categories, one category is the user static attribute characteristics, for example: basic attributes of the user such as name, gender, age and the like; another class is user interest mining features, such as: and analyzing the user interest mining characteristics according to the behavior data of user attention, collection, shopping cart addition and the like. The object characteristics refer to static attribute characteristics of the object, and mainly comprise basic attributes of the number, the category, the brand and the like of the object.
For a certain user u, the purchase sequence is P ═ Pt],t∈(1,Npurchase) The browsing sequence is B ═ Bt],t∈(1,Nbrowse) (ii) a The hidden vector imbedding of the commodity feature is represented by splicing concat of static attributes of the commodity, wherein the static attributes of the commodity comprise a commodity number (sku _ id), a category (cat) and a brand (brand), and then the commodity feature is:
eitem=concat(esku,ebrand,ecate)。
in an embodiment of the present invention, in step S102, when obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data, specifically, the long-term interest preference may be: and using a network based on an attention mechanism as a feature extractor to perform feature extraction on the long-term behavior data, and performing summation pooling on the extracted features to obtain the long-term interest preference of the user to be recommended. In an embodiment of the invention, the attention-based network is a self-attention network. In addition, when the recommendation model training is performed, the supervised learning is performed on the output of the network based on the attention mechanism to accelerate the model convergence, thereby training the assist loss function.
The output of the network Attention network based on the Attention mechanism is:
and (3) outputting an input vector Q ═ K ═ V of the Self attention mechanism network Self-attention network, wherein the input vector Q ═ K ═ V of the Self attention mechanism network Self-attention mechanism network is as follows:
in connection with an embodiment of the present invention, assume that a user purchases a sequence of items P ═ Pt]Is a hidden vector
embedding is denoted as Ep=[et]And the output of the Self-attention network is represented as Hp=[ht]=SelfAttention(Ep) Then, the user long-term interest preference vector is: u. oflong=Σ[ht]. In order to accelerate the convergence of the model when the recommended model of the invention is trained, supervised learning is used for training the auxiliary loss function at the output of the Self-attention network. Specifically, each training batch has N samples, and the next commodity purchased by the user is used as currently output supervision information to construct an auxiliary Loss function Loss of model training, then:
after obtaining the long-term interest preference vector of the user, the dynamic interest feature of the user to be recommended may be obtained according to the long-term interest preference, the short-term behavior data, and the object feature in step S103, and specifically, may be performed in the following manner:
performing attention calculation on the object characteristics and the short-term behavior sequence and the long-term interest preference respectively to obtain short-term interest characteristics and long-term interest characteristics of the object of the user to be recommended;
and calculating the short-term interest characteristics and the long-term interest characteristics based on the self-attention mechanism network to obtain the dynamic interest characteristics of the user to be recommended.
Because the interest preference of the user changes with time, when the dynamic interest feature change of the user is captured, the invention uses the object feature and the short-term behavior sequence B of the user to carry out attention calculation to obtain the short-term interest feature Vec of the user on the objectshortUsing object features and long-term interest preferences u of the userlongAttention calculation is carried out to obtain the long-term interest characteristic Vec of the user on the objectlongNamely:
Vecshort=Attention(itarget,B,B);Veclong=Attention(itarget,ulong,ulong)。
the interest of the User changes along with time, the evolution process of the User interest is described by using a Self-Attention network, and the dynamic interest characteristic User of the User can be obtainedDynamicThe following were used:
UserDynamic=SelfAttention(Vechistory) Wherein Vechistory=concat(Veclong,Vecshort) Concat is a splicing operation.
After the dynamic interest characteristics of the user are obtained according to the long-term behavior data and the short-term behavior data of the user, step S104 may be executed to obtain the preference degree of the user to be recommended for the object according to the dynamic interest characteristics, the object characteristics and the user characteristics. Specifically, firstly, splicing the dynamic interest characteristics, the object characteristics and the user characteristics; then, the feature vectors obtained by splicing are subjected to full concatenationAnd after the layers are connected, performing softmax operation to obtain the preference degree of the user to be recommended to the object. Here, it should be noted that the user feature includes two parts: user static attribute feature UserprofileAnd user interest mining characteristics Veccontext. Suppose that after splicing, the resulting vector is x ═ concat (User)profile,UserDynamic,itarget,Veccontext) And the preference degree score of the user to be recommended to the object is as follows: score is softmax (RELU (Wx + b)), where W and b are model parameters.
According to the formula, each object can be scored to obtain the preference degree of the user for the object. Finally, the recommendation object can be selected and recommended according to the set preference screening rule, for example: the objects can be sorted in a descending order according to the preference of the user to each object, and the front appointed number of the objects are selected as recommended objects; and determining the object meeting the requirement of the preference degree limit value as a recommended object according to the set preference degree limit value, and the like.
In the embodiment of the present invention, when performing the recommended model training, a model training loss function needs to be calculated to accelerate the model convergence. Similarly, using supervised learning to train the model loss function, the model loss function loss can be obtained as:
loss=-y*log(score)-(1-y)log(1-score)+Lossauxiliary;
therein, LossauxiliaryIn the above-described assist loss function, y is a label of whether the current object is clicked by the user, and if the user clicks the current object, y is 1, and if the user does not click, y is 0.
FIG. 2 is a schematic diagram of a recommendation model according to an embodiment of the present invention. As shown in fig. 2, which shows the structure of the recommendation model of the embodiment of the present invention, the inputs of the model are the user long-term behavior sequence, the user short-term behavior sequence, the object characteristics and the user characteristics. During specific implementation, firstly, processing a long-term behavior sequence of a user to obtain a feature vector corresponding to long-term preference of the user; then, processing the long-term preference of the user, the short-term behavior sequence of the user and the object characteristics to obtain dynamic interest characteristics of the user; and then, inputting the dynamic interest characteristics, the object characteristics and the user characteristics of the user into the full connection layer, and outputting the preference score of the user on the object through the output layer after softmax operation.
FIG. 3 is a schematic diagram of a network structure of a recommendation model according to an embodiment of the present invention. As shown in fig. 3, a network structure corresponding to the recommendation model of the embodiment shown in fig. 2 is shown. The input of the model is a Long-term behavior sequence Long-term Preference of a User, a Short-term behavior sequence Short-term Preference of the User, an object Feature target Item, a User static attribute Feature User Profile Features in User Features and a User interest mining Feature Context. The object feature target Item is a vector obtained by splicing a product number sku _ id, a category cate, a brand, and the like.
When the recommendation model in fig. 3 is specifically executed, firstly, the Long-term behavior sequence Long-term Preference of the user is processed through the Self-Attention network to obtain a feature vector corresponding to the Long-term Preference of the user; then, obtaining a long-term interest characteristic of the user by the long-term preference of the user and the object characteristic Targe Item through an attenti on network, obtaining a Short-term interest characteristic of the user by the Short-term behavior sequence Short-term preference of the user and the object characteristic Targe Item through an Attention network, and processing the long-term interest characteristic of the user and the Short-term interest characteristic of the user through a Self-Attention network to obtain a dynamic interest characteristic of the user; and then, inputting the User dynamic interest Features, the object Features target Item, the User static attribute Features User Profile Features and the User interest mining Features Context Features into the full connection layer FCN together, and outputting the preference score of the User to the object by an OUTPUT layer OUTPUT after softmax operation.
According to another aspect of the invention, a recommendation device is also provided. Fig. 4 is a schematic diagram of main blocks of a recommendation device according to an embodiment of the present invention. As shown in fig. 4, the recommendation apparatus 400 according to the embodiment of the present invention mainly includes: a data acquisition module 401, a first feature module 402, a second feature module 403, a preference calculation module 404, and an object recommendation module 405.
The data acquisition module 401 is configured to acquire user characteristics, long-term behavior data, short-term behavior data, and object characteristics of a user to be recommended;
a first characteristic module 402, configured to obtain a long-term interest preference of the user to be recommended according to the long-term behavior data;
a second feature module 403, configured to obtain a dynamic interest feature of the user to be recommended according to the long-term interest preference, the short-term behavior data, and the object feature;
a preference calculation module 404, configured to obtain, according to the dynamic interest feature, the object feature, and the user feature, a preference degree of the user to be recommended for an object;
and the object recommending module 405 is configured to determine to recommend an object according to the preference of the user to be recommended for the object, so as to perform recommendation.
According to an embodiment of the invention, the first feature module 402 may further be configured to:
and using a network based on an attention mechanism as a feature extractor, performing feature extraction on the long-term behavior data, and performing summation pooling on the extracted features to obtain the long-term interest preference of the user to be recommended.
According to another embodiment of the invention, the attention-based network is a self-attention network.
According to yet another embodiment of the present invention, the recommendation device 400 may further include a loss calculation module for:
supervised learning is performed on the output of the attention-based network to train an auxiliary loss function.
According to yet another embodiment of the present invention, the second feature module 403 may be further configured to:
performing attention calculation by using the object characteristics and the short-term behavior sequence and the long-term interest preference respectively to obtain short-term interest characteristics and long-term interest characteristics of the object of the user to be recommended;
and calculating the short-term interest characteristics and the long-term interest characteristics based on the self-attention mechanism network to obtain the dynamic interest characteristics of the user to be recommended.
According to yet another embodiment of the invention, the preference calculation module 404 may be further configured to:
splicing the dynamic interest features, the object features and the user features;
and after the feature vectors obtained by splicing pass through a full connection layer, performing softmax operation to obtain the preference degree of the user to be recommended to the object.
In the embodiment of the invention, the user characteristics of the user to be recommended comprise user static attribute characteristics and user interest mining characteristics.
According to the technical scheme of the embodiment of the invention, the user characteristics, the long-term behavior data, the short-term behavior data and the object characteristics of the user to be recommended are obtained; obtaining long-term interest preference of a user to be recommended according to the long-term behavior data; obtaining dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; the recommendation object is determined according to the preference degree of the user to be recommended to the object for recommendation, the user behavior is divided into long-term behavior and short-term behavior according to types, the long-term interest preference and the short-term impulse demand of the user can be distinguished, the influence of the user interest change on the recommendation result can be better reflected, the interpretability of the recommendation result is high, meanwhile, the click estimation accuracy is higher, and the recommendation effect is obviously improved. According to the invention, the attention calculation is carried out on the user behavior and the object, so that the interest preference degree of the user on a certain object can be captured; compared with the traditional circulating network, the method can establish direct long-distance dependence, reduce the number of long-sequence interaction times, and is more beneficial to capturing the user preference by a model so as to calculate the matching degree of the recommended object and the current user state.
Fig. 5 shows an exemplary system architecture 500 to which the recommendation method or recommendation apparatus of an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the recommendation method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the recommendation apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device or server implementing an embodiment of the invention is shown. The terminal device or the server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a data acquisition module, a first characteristics module, a second characteristics module, a preference calculation module, and an object recommendation module. The names of the units or modules do not limit the units or modules in some cases, and for example, the data acquisition module may also be described as a "module for acquiring user characteristics, long-term behavior data, and short-term behavior data of a user to be recommended, and object characteristics".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended; obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data; obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; and determining a recommended object according to the preference degree of the user to be recommended on the object for recommendation.
According to the technical scheme of the embodiment of the invention, the user characteristics, the long-term behavior data, the short-term behavior data and the object characteristics of the user to be recommended are obtained; obtaining long-term interest preference of a user to be recommended according to the long-term behavior data; obtaining dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics; obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics; the recommendation object is determined according to the preference degree of the user to be recommended to the object for recommendation, the user behavior is divided into long-term behavior and short-term behavior according to types, the long-term interest preference and the short-term impulse demand of the user can be distinguished, the influence of the user interest change on the recommendation result can be better reflected, the interpretability of the recommendation result is high, meanwhile, the click estimation accuracy is higher, and the recommendation effect is obviously improved. According to the invention, the attention calculation is carried out on the user behavior and the object, so that the interest preference degree of the user on a certain object can be captured; compared with the traditional circulating network, the method can establish direct long-distance dependence, reduce the number of long-sequence interaction times, and is more beneficial to capturing the user preference by a model so as to calculate the matching degree of the recommended object and the current user state.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and 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 recommendation method, comprising:
acquiring user characteristics, long-term behavior data, short-term behavior data and object characteristics of a user to be recommended;
obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data;
obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics;
obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics;
and determining a recommended object according to the preference degree of the user to be recommended on the object for recommendation.
2. The method of claim 1, wherein obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data comprises:
and using a network based on an attention mechanism as a feature extractor, performing feature extraction on the long-term behavior data, and performing summation pooling on the extracted features to obtain the long-term interest preference of the user to be recommended.
3. The method of claim 2, wherein the attention-based network is a self-attention network.
4. The method of claim 2 or 3, further comprising:
supervised learning is performed on the output of the attention-based network to train an auxiliary loss function.
5. The method of claim 1, wherein obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics comprises:
performing attention calculation by using the object characteristics and the short-term behavior sequence and the long-term interest preference respectively to obtain short-term interest characteristics and long-term interest characteristics of the object of the user to be recommended;
and calculating the short-term interest characteristics and the long-term interest characteristics based on the self-attention mechanism network to obtain the dynamic interest characteristics of the user to be recommended.
6. The method according to claim 1, wherein obtaining the preference degree of the user to be recommended for the object according to the dynamic interest feature, the object feature and the user feature comprises:
splicing the dynamic interest features, the object features and the user features;
and after the feature vectors obtained by splicing pass through a full connection layer, performing softmax operation to obtain the preference degree of the user to be recommended to the object.
7. The method of claim 1, wherein the user characteristics of the user to be recommended comprise user static attribute characteristics and user interest mining characteristics.
8. A recommendation device, comprising:
the data acquisition module is used for acquiring the user characteristics, the long-term behavior data and the short-term behavior data of the user to be recommended and the object characteristics;
the first characteristic module is used for obtaining the long-term interest preference of the user to be recommended according to the long-term behavior data;
the second characteristic module is used for obtaining the dynamic interest characteristics of the user to be recommended according to the long-term interest preference, the short-term behavior data and the object characteristics;
the preference calculation module is used for obtaining the preference degree of the user to be recommended to the object according to the dynamic interest characteristics, the object characteristics and the user characteristics;
and the object recommending module is used for determining a recommended object according to the preference degree of the user to be recommended on the object so as to recommend the object.
9. An electronic device for recommendation, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010260030.1A CN113495991A (en) | 2020-04-03 | 2020-04-03 | Recommendation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010260030.1A CN113495991A (en) | 2020-04-03 | 2020-04-03 | Recommendation method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113495991A true CN113495991A (en) | 2021-10-12 |
Family
ID=77995337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010260030.1A Pending CN113495991A (en) | 2020-04-03 | 2020-04-03 | Recommendation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113495991A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114936323A (en) * | 2022-06-07 | 2022-08-23 | 北京百度网讯科技有限公司 | Graph representation model training method and device and electronic equipment |
CN117436550A (en) * | 2023-12-15 | 2024-01-23 | 深圳须弥云图空间科技有限公司 | Recommendation model training method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107562947A (en) * | 2017-09-26 | 2018-01-09 | 宿州学院 | A kind of Mobile Space-time perceives the lower dynamic method for establishing model of recommendation service immediately |
CN110008409A (en) * | 2019-04-12 | 2019-07-12 | 苏州市职业大学 | Based on the sequence of recommendation method, device and equipment from attention mechanism |
CN110060097A (en) * | 2019-04-01 | 2019-07-26 | 苏州市职业大学 | User behavior sequence of recommendation method based on attention mechanism and convolutional neural networks |
CN110334759A (en) * | 2019-06-28 | 2019-10-15 | 武汉大学 | A kind of depth sequence of recommendation method of comment driving |
CN110807156A (en) * | 2019-10-23 | 2020-02-18 | 山东师范大学 | Interest recommendation method and system based on user sequence click behaviors |
CN110929164A (en) * | 2019-12-09 | 2020-03-27 | 北京交通大学 | Interest point recommendation method based on user dynamic preference and attention mechanism |
CN110941764A (en) * | 2019-12-03 | 2020-03-31 | 腾讯科技(深圳)有限公司 | Object recommendation method and device, computer equipment and storage medium |
-
2020
- 2020-04-03 CN CN202010260030.1A patent/CN113495991A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107562947A (en) * | 2017-09-26 | 2018-01-09 | 宿州学院 | A kind of Mobile Space-time perceives the lower dynamic method for establishing model of recommendation service immediately |
CN110060097A (en) * | 2019-04-01 | 2019-07-26 | 苏州市职业大学 | User behavior sequence of recommendation method based on attention mechanism and convolutional neural networks |
CN110008409A (en) * | 2019-04-12 | 2019-07-12 | 苏州市职业大学 | Based on the sequence of recommendation method, device and equipment from attention mechanism |
CN110334759A (en) * | 2019-06-28 | 2019-10-15 | 武汉大学 | A kind of depth sequence of recommendation method of comment driving |
CN110807156A (en) * | 2019-10-23 | 2020-02-18 | 山东师范大学 | Interest recommendation method and system based on user sequence click behaviors |
CN110941764A (en) * | 2019-12-03 | 2020-03-31 | 腾讯科技(深圳)有限公司 | Object recommendation method and device, computer equipment and storage medium |
CN110929164A (en) * | 2019-12-09 | 2020-03-27 | 北京交通大学 | Interest point recommendation method based on user dynamic preference and attention mechanism |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114936323A (en) * | 2022-06-07 | 2022-08-23 | 北京百度网讯科技有限公司 | Graph representation model training method and device and electronic equipment |
CN114936323B (en) * | 2022-06-07 | 2023-06-30 | 北京百度网讯科技有限公司 | Training method and device of graph representation model and electronic equipment |
CN117436550A (en) * | 2023-12-15 | 2024-01-23 | 深圳须弥云图空间科技有限公司 | Recommendation model training method and device |
CN117436550B (en) * | 2023-12-15 | 2024-04-16 | 深圳须弥云图空间科技有限公司 | Recommendation model training method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107609152B (en) | Method and apparatus for expanding query expressions | |
CN109241403B (en) | Project recommendation method and device, machine equipment and computer-readable storage medium | |
CN110020162B (en) | User identification method and device | |
CN110163703B (en) | Classification model establishing method, file pushing method and server | |
CN110084658B (en) | Method and device for matching articles | |
CN110111167A (en) | A kind of method and apparatus of determining recommended | |
CN112116426A (en) | Method and device for pushing article information | |
CN111339406A (en) | Personalized recommendation method, device, equipment and storage medium | |
WO2023142520A1 (en) | Information recommendation method and apparatus | |
CN112650942A (en) | Product recommendation method, device, computer system and computer-readable storage medium | |
CN112749323B (en) | Method and device for constructing user portrait | |
WO2022156589A1 (en) | Method and device for determining live broadcast click rate | |
CN113495991A (en) | Recommendation method and device | |
CN115423555A (en) | Commodity recommendation method and device, electronic equipment and storage medium | |
CN113822734B (en) | Method and device for generating information | |
CN113792952A (en) | Method and apparatus for generating a model | |
CN113450167A (en) | Commodity recommendation method and device | |
CN116186541A (en) | Training method and device for recommendation model | |
CN107357847B (en) | Data processing method and device | |
US11256703B1 (en) | Systems and methods for determining long term relevance with query chains | |
WO2022161116A1 (en) | Article display method and apparatus | |
CN114036397B (en) | Data recommendation method, device, electronic equipment and medium | |
CN113327145B (en) | Article recommendation method and device | |
CN113743973B (en) | Method and device for analyzing market hotspot trend | |
CN113159877B (en) | Data processing method, device, system and computer readable 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 |