CN108897823A - Personalized commercial search method and device based on deep learning attention mechanism - Google Patents
Personalized commercial search method and device based on deep learning attention mechanism Download PDFInfo
- Publication number
- CN108897823A CN108897823A CN201810645528.2A CN201810645528A CN108897823A CN 108897823 A CN108897823 A CN 108897823A CN 201810645528 A CN201810645528 A CN 201810645528A CN 108897823 A CN108897823 A CN 108897823A
- Authority
- CN
- China
- Prior art keywords
- attention mechanism
- term preference
- long
- query
- term
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000007246 mechanism Effects 0.000 title claims abstract description 79
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000013135 deep learning Methods 0.000 title claims abstract description 20
- 230000007774 longterm Effects 0.000 claims abstract description 72
- 230000006870 function Effects 0.000 claims abstract description 18
- 238000012549 training Methods 0.000 claims abstract description 10
- 230000002452 interceptive effect Effects 0.000 claims abstract description 7
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 8
- 239000013598 vector Substances 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 4
- 238000004590 computer program Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000003860 storage Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000006399 behavior Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001932 seasonal effect Effects 0.000 description 1
Classifications
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Molecular Biology (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开了一种基于深度学习注意力机制的个性化商品检索方法及装置。其中,该方法包括:构建基于注意力机制的短期偏好模型;构建基于注意力机制的长期偏好模型;查询再表示;查询再表示的过程为:融合基于注意力机制的短期偏好模型、基于注意力机制的长期偏好模型以及当前查询,通过多层全连接网络来学习三者之间的交互关系,得到重组的查询表示,并采用一个距离函数来界定所有商品与当前查询的相关程度;训练所述多层全连接网络结束后,对每个用户提交的新查询,得到所有商品与当前查询的距离值,再将所有距离值从高到低进行排序,并将前n个距离值对应的商品返回给用户,其中,n为正整数。
The invention discloses a personalized product retrieval method and device based on a deep learning attention mechanism. Among them, the method includes: constructing a short-term preference model based on the attention mechanism; constructing a long-term preference model based on the attention mechanism; The long-term preference model of the mechanism and the current query, learn the interactive relationship between the three through a multi-layer fully connected network, obtain a reorganized query representation, and use a distance function to define the degree of relevance between all commodities and the current query; training the After the end of the multi-layer fully connected network, for the new query submitted by each user, the distance value between all the products and the current query is obtained, and then all the distance values are sorted from high to low, and the products corresponding to the first n distance values are returned to the user, where n is a positive integer.
Description
技术领域technical field
本发明属于数据检索领域,尤其涉及一种基于深度学习注意力机制的个性化商品检索方法及装置。The invention belongs to the field of data retrieval, and in particular relates to a personalized product retrieval method and device based on a deep learning attention mechanism.
背景技术Background technique
随着互联网的盛行,电子商务也变得越来越受大众欢迎。当电子商务网站(如天猫)中的用户想要购买一件商品时,通常需要以检索的方式从数以百万计的商品中找到他们心仪的那一个。对于这种在线商品检索来说,一个比较常见的情况是用户首先提交查询,然后搜索引擎返回与当前查询相关的排序好的商品列表。然而,用户提交的查询一般来说仅由几个关键词组成(例如,男士长袖上衣),这也就导致了其无法准确传达用户的需求,从而造成了用户对搜索结果的不满。With the prevalence of the Internet, e-commerce has become more and more popular with the public. When users in an e-commerce website (such as Tmall) want to buy a commodity, they usually need to find the one they like from millions of commodities in a retrieval manner. For this kind of online product retrieval, a relatively common situation is that the user first submits a query, and then the search engine returns a sorted list of products related to the current query. However, the queries submitted by users are generally only composed of several keywords (for example, men's long-sleeved tops), which also leads to the inability to accurately convey the needs of users, thereby causing users to be dissatisfied with the search results.
此外,用户的购物偏好可以是非常宽泛的(由于不同的背景,比如年龄,性别,收入),或者受到当前的环境影响(比如季节,定位)。因此,对来自不同用户的同一个查询来说,返回相同的检索结果会对电子商务网站造成不同程度的经济损失。有鉴于此,考虑用户在不同情境下的购物意图来对用户提交的查询返回相关的商品,即个性化的商品检索,对满足用户当前的购物需求就显得尤为重要。In addition, users' shopping preferences can be very broad (due to different backgrounds, such as age, gender, income), or influenced by the current environment (such as seasons, location). Therefore, for the same query from different users, returning the same retrieval result will cause different degrees of economic loss to the e-commerce website. In view of this, it is particularly important to consider the user's shopping intention in different situations to return relevant products to the query submitted by the user, that is, personalized product retrieval, to meet the current shopping needs of the user.
传统的商品检索方法仅局限于查询和商品之间的简单匹配而没有将用户的自身属性考虑其中。这些方法由于忽视了众多用户个人需求的异质性,所以经常会导致搜索引擎检索性能受限,无法为用户提供满意的检索结果。Traditional item retrieval methods are limited to simple matching between queries and items without taking the user's own attributes into consideration. Because these methods ignore the heterogeneity of individual needs of many users, they often lead to limited retrieval performance of search engines and cannot provide users with satisfactory retrieval results.
Ai等人最近提出了一种个性化的商品检索方法,他们通过一个可以共同学习用户、商品和查询表示的隐空间来对用户的长期购物偏好进行建模。但是这种方法也有两种缺陷:(1)假设用户的长期购物偏好是稳定的,而实际上是会随时间而缓慢改变的;(2)没有将用户的短期购物偏好考虑在内,而用户的短期购买行为很可能会反映用户最近一段时间的购买习惯。Ai et al. recently proposed a personalized item retrieval approach, where they model users' long-term shopping preferences via a latent space that jointly learns user, item, and query representations. However, this method also has two defects: (1) it is assumed that the long-term shopping preference of the user is stable, but in fact it will change slowly over time; (2) the short-term shopping preference of the user is not taken into account, and the user The short-term purchase behavior of is likely to reflect the user's recent purchase habits.
其中,长期指的是用户内在且相对稳定的购物偏好,比如喜欢的颜色,适合的尺寸和消费能力等。同时会受到用户各自的背景影响,如年龄,婚姻,教育,收入等。与之相对,短期的购物偏好反映了用户在一个相对较短时期内的购物意图,且会受到突发事件的影响,如新产品上市,季节改变和特殊的个人节日(如生日)等。这些可以从用户最近所购买的商品属性中推断出来,与长期购物偏好相比,短期购物偏好更新地更加频繁与难以预测。Among them, the long-term refers to the user's internal and relatively stable shopping preferences, such as favorite color, suitable size and consumption ability. At the same time, it will be affected by the user's respective background, such as age, marriage, education, income, etc. In contrast, short-term shopping preferences reflect users' shopping intentions in a relatively short period of time, and are affected by unexpected events, such as new product launches, seasonal changes, and special personal festivals (such as birthdays), etc. These can be inferred from the attributes of items recently purchased by the user. Compared with long-term shopping preferences, short-term shopping preferences are updated more frequently and less predictably.
目前,在个性化商品检索方法中存在以下问题:At present, the following problems exist in the personalized commodity retrieval method:
一是准确地为用户的长期和短期购物偏好建模是极其复杂的。用户的长期购物偏好包含多个方面,例如消费能力或者喜爱的颜色和品牌,并且会随用户的背景(如收入)改变而变化。与之相对应,用户的短期购物偏好通常也是动态改变的,并且极易受到突发事件的影响;One is that accurately modeling users' long-term and short-term shopping preferences is extremely complex. A user's long-term shopping preference includes multiple aspects, such as spending power or favorite colors and brands, and will change with the user's background (such as income). Correspondingly, users' short-term shopping preferences are usually dynamically changing and are easily affected by emergencies;
二是用户通过一个仅由几个关键词组成的文本查询来描述自己的购物需求,这会导致准确定位到用户长期购物偏好中与当前查询相关的方面是不简单的。比如,一件短袖上衣的设计,而不是价格,会对有经济能力的用户影响更多。对于用户的短期偏好来说,最近购买的多个商品也会对用户的下次购买行为产生不同的影响;The second is that users describe their shopping needs through a text query consisting of only a few keywords, which makes it difficult to accurately locate the aspects of the user's long-term shopping preferences that are related to the current query. For example, the design of a short-sleeved top, rather than the price, will affect users who can afford it more. For the user's short-term preference, multiple recently purchased items will also have different impacts on the user's next purchase behavior;
三是将用户的长期、短期购物偏好与当前的查询相结合也是困难的。Third, it is also difficult to combine the user's long-term and short-term shopping preferences with the current query.
发明内容Contents of the invention
为了解决现有技术的不足,本发明的第一目的是提供一种基于深度学习注意力机制的个性化商品检索方法,其提高了检索的准确度,从而提升了用户的检索体验。In order to solve the deficiencies of the prior art, the first object of the present invention is to provide a personalized product retrieval method based on deep learning attention mechanism, which improves the accuracy of retrieval, thereby improving the user's retrieval experience.
本发明的一种基于深度学习注意力机制的个性化商品检索方法,包括:A personalized product retrieval method based on deep learning attention mechanism of the present invention, comprising:
步骤1:构建基于注意力机制的短期偏好模型;所述步骤1具体包括:Step 1: Construct a short-term preference model based on the attention mechanism; the step 1 specifically includes:
给定当前的查询,采用神经网络来估计前m个查询与当前查询之间的相关程度,并采用不同的注意力权重来表示;其中,m为正整数;Given the current query, use the neural network to estimate the degree of correlation between the first m queries and the current query, and use different attention weights to represent; where m is a positive integer;
将获得的注意力权重乘以对应的商品表示,输入至RNN模型中,输出表示基于注意力机制的短期偏好的m个向量;Multiply the obtained attention weight by the corresponding product representation, input it into the RNN model, and output m vectors representing the short-term preference based on the attention mechanism;
步骤2:构建基于注意力机制的长期偏好模型;所述步骤2具体包括:Step 2: Construct a long-term preference model based on the attention mechanism; the step 2 specifically includes:
采用最初购买的m个商品表示来初始化其长期偏好,并利用与构建基于注意力机制的短期偏好模型的相同原理,得到基于注意力机制的长期偏好模型;Initialize its long-term preference by using the initially purchased m product representations, and use the same principle as building a short-term preference model based on the attention mechanism to obtain a long-term preference model based on the attention mechanism;
之后每经过m个商品,就更新一次当前用户的长期偏好,获得更新后的基于注意力机制的长期偏好模型;After that, every time m products are passed, the current user's long-term preference is updated, and the updated long-term preference model based on the attention mechanism is obtained;
步骤3:查询再表示;其过程为:融合基于注意力机制的短期偏好模型、基于注意力机制的长期偏好模型以及当前查询,通过多层全连接网络来学习三者之间的交互关系,得到重组的查询表示,并采用一个距离函数来界定所有商品与当前查询的相关程度;Step 3: query re-representation; the process is: integrate the short-term preference model based on the attention mechanism, the long-term preference model based on the attention mechanism and the current query, and learn the interactive relationship between the three through a multi-layer fully connected network, and get A restructured query representation, using a distance function to define how relevant all items are to the current query;
步骤4:训练所述多层全连接网络结束后,对每个用户提交的新查询,得到所有商品与当前查询的距离值,再将所有距离值从高到低进行排序,并将前n个距离值对应的商品返回给用户,其中,n为正整数。Step 4: After training the multi-layer fully connected network, for each new query submitted by the user, get the distance values between all commodities and the current query, and then sort all the distance values from high to low, and sort the top n The product corresponding to the distance value is returned to the user, where n is a positive integer.
进一步的,该方法还包括:Further, the method also includes:
采用“基于成对”的学习方法来训练所述多层全连接网络。A "pair-based" learning method is employed to train the multi-layer fully connected network.
进一步的,在所述步骤1中,采用一个两层的神经网络来估计前m个查询与当前查询之间的相关程度。Further, in the step 1, a two-layer neural network is used to estimate the degree of correlation between the first m queries and the current query.
进一步的,在所述步骤3中,所述距离函数为余弦距离,或点积,或欧式距离,或曼哈顿距离。Further, in the step 3, the distance function is cosine distance, or dot product, or Euclidean distance, or Manhattan distance.
本发明的第二目的是提供一种基于深度学习注意力机制的个性化商品检索装置。The second object of the present invention is to provide a personalized product retrieval device based on deep learning attention mechanism.
本发明的一种基于深度学习注意力机制的个性化商品检索装置,包括个性化商品检索处理器,所述个性化商品检索处理器包括:A personalized commodity retrieval device based on the deep learning attention mechanism of the present invention includes a personalized commodity retrieval processor, and the personalized commodity retrieval processor includes:
短期偏好模型构建模块,其被配置为:构建基于注意力机制的短期偏好模型;所述短期偏好模型构建模块具体包括:A short-term preference model building block configured to: build a short-term preference model based on an attention mechanism; the short-term preference model building block specifically includes:
注意力权重获取子模块,其被配置为:给定当前的查询,采用神经网络来估计前m个查询与当前查询之间的相关程度,并采用不同的注意力权重来表示;其中,m为正整数;及The attention weight acquisition sub-module is configured to: given the current query, use a neural network to estimate the degree of correlation between the first m queries and the current query, and use different attention weights to represent; where m is a positive integer; and
短期偏好表示子模块,其被配置为:将获得的注意力权重乘以对应的商品表示,输入至RNN模型中,输出表示基于注意力机制的短期偏好的m个向量;The short-term preference representation sub-module is configured to: multiply the obtained attention weight by the corresponding commodity representation, input it into the RNN model, and output m vectors representing the short-term preference based on the attention mechanism;
长期偏好模型构建模块,其被配置为:构建基于注意力机制的长期偏好模型;所述长期偏好模型构建模块具体包括:A long-term preference model building block configured to: build a long-term preference model based on an attention mechanism; the long-term preference model building block specifically includes:
长期偏好初始化及构建子模块,其被配置为:采用最初购买的m个商品表示来初始化其长期偏好,并利用与构建基于注意力机制的短期偏好模型的相同原理,得到基于注意力机制的长期偏好模型;The long-term preference initialization and construction sub-module is configured to: initialize the long-term preference by using the initially purchased m commodity representations, and use the same principle as building the short-term preference model based on the attention mechanism to obtain the long-term preference model based on the attention mechanism preference model;
长期偏好更新子模块,其被配置为:之后每经过m个商品,就更新一次当前用户的长期偏好,获得更新后的基于注意力机制的长期偏好模型;The long-term preference update sub-module is configured to update the current user's long-term preference every time m products are passed, and obtain the updated long-term preference model based on the attention mechanism;
查询再表示模块,其配置为:融合基于注意力机制的短期偏好模型、基于注意力机制的长期偏好模型以及当前查询,通过多层全连接网络来学习三者之间的交互关系,得到重组的查询表示,并采用一个距离函数来界定所有商品与当前查询的相关程度;The query re-representation module is configured to: integrate the short-term preference model based on the attention mechanism, the long-term preference model based on the attention mechanism and the current query, and learn the interactive relationship between the three through a multi-layer fully connected network to obtain the reorganized query representation, and uses a distance function to define how relevant all items are to the current query;
商品返回模块,其配置为:训练所述多层全连接网络结束后,对每个用户提交的新查询,得到所有商品与当前查询的距离值,再将所有距离值从高到低进行排序,并将前n个距离值对应的商品返回给用户,其中,n为正整数。Commodity return module, which is configured to: after the training of the multi-layer fully connected network is completed, obtain the distance values between all commodities and the current query for the new query submitted by each user, and then sort all the distance values from high to low, And return the products corresponding to the first n distance values to the user, where n is a positive integer.
进一步的,所述个性化商品检索处理器还包括:Further, the personalized commodity retrieval processor also includes:
模型训练模块,其被配置为:采用“基于成对”的学习方法来训练所述多层全连接网络。A model training module configured to: use a "pair-based" learning method to train the multi-layer fully connected network.
进一步的,在所述注意力权重获取子模块中,采用一个两层的神经网络来估计前m个查询与当前查询之间的相关程度。Further, in the attention weight acquisition sub-module, a two-layer neural network is used to estimate the degree of correlation between the first m queries and the current query.
进一步的,在所述查询再表示模块中,所述距离函数为余弦距离,或点积,或欧式距离,或曼哈顿距离。Further, in the query representation module, the distance function is cosine distance, or dot product, or Euclidean distance, or Manhattan distance.
与现有技术相比,本发明的有益效果是:Compared with prior art, the beneficial effect of the present invention is:
(1)为了缓解现有方法中所面临的诸多问题,本发明能够结合用户的相对稳定的长期购物偏好和对时间敏感的短期购物偏好对商品进行个性化检索,最终提高了检索的准确度,从而提升了用户的检索体验。(1) In order to alleviate many problems faced in the existing methods, the present invention can combine the user's relatively stable long-term shopping preferences and time-sensitive short-term shopping preferences to carry out personalized retrieval of commodities, and finally improve the accuracy of retrieval, Thereby improving the user's retrieval experience.
(2)本发明能够有效地将用户的长期和短期购物偏好以及当前用户所提交的查询结合,并重新表示用户的购物需求。(2) The present invention can effectively combine the user's long-term and short-term shopping preferences and the query submitted by the current user, and re-express the user's shopping needs.
(3)本发明通过用户的长期和短期购物偏好建模中的两个各自的注意力机制,能够突出两个偏好中的与当前查询相关的因素。(3) The present invention can highlight factors relevant to the current query in the two preferences through two separate attention mechanisms in modeling the user's long-term and short-term shopping preferences.
(4)本发明提高了个性化商品检索的准确度,从而在一定程度上为电子商务网站保留更多的用户和提高收入。(4) The present invention improves the accuracy of personalized commodity retrieval, thereby retaining more users and increasing income for e-commerce websites to a certain extent.
附图说明Description of drawings
构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。The accompanying drawings constituting a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application, and do not constitute improper limitations to the present application.
图1是本发明的一种基于深度学习注意力机制的个性化商品检索方法流程图。Fig. 1 is a flowchart of a personalized product retrieval method based on deep learning attention mechanism of the present invention.
图2是本发明的个性化商品检索处理器结构示意图。Fig. 2 is a schematic structural diagram of the personalized commodity retrieval processor of the present invention.
具体实施方式Detailed ways
应该指出,以下详细说明都是例示性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be pointed out that the following detailed description is exemplary and intended to provide further explanation to the present application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used here is only for describing specific implementations, and is not intended to limit the exemplary implementations according to the present application. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural, and it should also be understood that when the terms "comprising" and/or "comprising" are used in this specification, they mean There are features, steps, operations, means, components and/or combinations thereof.
下面结合实施例子与附图对本发明的一种基于深度学习注意力机制的个性化商品检索方法做出详细说明。A personalized product retrieval method based on deep learning attention mechanism of the present invention will be described in detail below in combination with implementation examples and accompanying drawings.
如图1所示,本发明的一种基于深度学习注意力机制的个性化商品检索方法,包括如下步骤:As shown in Figure 1, a kind of personalized product retrieval method based on deep learning attention mechanism of the present invention comprises the following steps:
步骤1:构建基于注意力机制的短期偏好模型。Step 1: Build an attention-based short-term preference model.
具体地,构建基于注意力机制的短期偏好模型的过程包括:Specifically, the process of building a short-term preference model based on the attention mechanism includes:
步骤1.1:给定当前的查询,采用神经网络来估计前m个查询与当前查询之间的相关程度,并采用不同的注意力权重来表示;其中,m为正整数;Step 1.1: Given the current query, use the neural network to estimate the degree of correlation between the first m queries and the current query, and use different attention weights to represent; where m is a positive integer;
由于之前的查询(或购买的商品)并不全是与当前查询(或者目标商品)密切相关,例如,与之前提交的查询“手机”相对比,“鼠标”与“键盘”显然与当前的查询“显示屏”更加接近。由于这种之前查询与当前查询相关程度的差异原因,本发明采用了一个两层的神经网络来估计它们之间的相关程度,在这里用不同的注意力权重表示。Since the previous queries (or purchased products) are not all closely related to the current query (or the target product), for example, compared with the previously submitted query "mobile phone", "mouse" and "keyboard" are obviously related to the current query " display" closer. Due to the difference in the degree of correlation between the previous query and the current query, the present invention uses a two-layer neural network to estimate the degree of correlation between them, which is represented by different attention weights here.
步骤1.2:将获得的注意力权重乘以对应的商品表示,输入至RNN模型中,输出表示基于注意力机制的短期偏好的m个向量。Step 1.2: Multiply the obtained attention weight by the corresponding product representation, input it into the RNN model, and output m vectors representing the short-term preference based on the attention mechanism.
与查询相对应,之前的这些查询所对应的购买商品也跟用户当前的购买商品意图产生不同的影响。所以,用之前查询与当前查询的相关程度来决定之前对应查询所购买商品与当前购买意图的相关性,具体的表示是将之前获得的注意力权重乘以对应的商品表示来得到基于注意力机制的短期偏好。Corresponding to the query, the purchased products corresponding to the previous queries also have different impacts from the user's current purchase intention. Therefore, the correlation between the previous query and the current query is used to determine the correlation between the purchased product of the previous corresponding query and the current purchase intention. The specific representation is to multiply the attention weight obtained before by the corresponding product representation to obtain the attention-based mechanism short-term preferences.
在构建基于注意力机制的短期偏好模型之前,还包括:Before constructing the short-term preference model based on the attention mechanism, it also includes:
当前商品的所有的评论信息和一个文本的查询都通过一个统一的PV-DM模型来学得商品和查询的表示,再将此表示投影到同一个子空间中。All the comment information of the current product and a text query learn the representation of the product and the query through a unified PV-DM model, and then project this representation into the same subspace.
步骤2:构建基于注意力机制的长期偏好模型。Step 2: Build a long-term preference model based on attention mechanism.
用户的长期购物偏好相对于短期来说更为稳定,但也会缓慢变化。用当前用户所有的购买商品来表示长期偏好,并且对其缓慢更新。Users' long-term shopping preferences are more stable than short-term, but they will change slowly. The long-term preference is represented by all the purchased items of the current user, and it is updated slowly.
具体地,构建基于注意力机制的长期偏好模型的过程包括:Specifically, the process of building a long-term preference model based on the attention mechanism includes:
步骤2.1:采用最初购买的m个商品表示来初始化其长期偏好,并利用与构建基于注意力机制的短期偏好模型的相同原理,得到基于注意力机制的长期偏好模型;Step 2.1: Initialize the long-term preference by using the initially purchased m commodity representations, and use the same principle as building the short-term preference model based on the attention mechanism to obtain the long-term preference model based on the attention mechanism;
步骤2.1:之后每经过m个商品,就更新一次当前用户的长期偏好,获得更新后的基于注意力机制的长期偏好模型。Step 2.1: After that, update the long-term preference of the current user every time m products are passed, and obtain the updated long-term preference model based on the attention mechanism.
步骤3:查询再表示。Step 3: Query Re-Representation.
具体地,查询再表示的过程为:Specifically, the process of query re-expression is:
融合基于注意力机制的短期偏好模型、基于注意力机制的长期偏好模型以及当前查询,通过多层全连接网络来学习三者之间的交互关系,得到重组的查询表示,并采用一个距离函数来界定所有商品与当前查询的相关程度。Integrate the short-term preference model based on the attention mechanism, the long-term preference model based on the attention mechanism and the current query, learn the interactive relationship between the three through a multi-layer fully connected network, obtain a reorganized query representation, and use a distance function to Define how relevant all items are to the current query.
其中,所述距离函数为余弦距离,或点积,或欧式距离,或曼哈顿距离。Wherein, the distance function is cosine distance, or dot product, or Euclidean distance, or Manhattan distance.
步骤4:训练所述多层全连接网络结束后,对每个用户提交的新查询,得到所有商品与当前查询的距离值,再将所有距离值从高到低进行排序,并将前n个距离值对应的商品返回给用户,其中,n为正整数。Step 4: After training the multi-layer fully connected network, for each new query submitted by the user, get the distance values between all commodities and the current query, and then sort all the distance values from high to low, and sort the top n The product corresponding to the distance value is returned to the user, where n is a positive integer.
例如:n为10或者20。For example: n is 10 or 20.
在另一实施例中,该方法还包括:In another embodiment, the method also includes:
采用“基于成对”的学习方法来训练所述多层全连接网络。A "pair-based" learning method is employed to train the multi-layer fully connected network.
这样能够提高学得的多层全连接网络的鲁棒性,其中,BPR(贝叶斯个性化排序)损失函数被用于得到最后的损失,带有动量的SGD(随机梯度下降)是所采用的优化方法。This can improve the robustness of the learned multi-layer fully connected network, where the BPR (Bayesian Personalized Ranking) loss function is used to obtain the final loss, and SGD (Stochastic Gradient Descent) with momentum is used optimization method.
为了缓解现有方法中所面临的诸多问题,本发明能够结合用户的相对稳定的长期购物偏好和对时间敏感的短期购物偏好对商品进行个性化检索,最终提高了检索的准确度,从而提升了用户的检索体验。In order to alleviate many problems faced in the existing methods, the present invention can combine the user's relatively stable long-term shopping preferences and time-sensitive short-term shopping preferences to carry out personalized retrieval of commodities, and finally improve the accuracy of retrieval, thereby improving the User search experience.
本发明能够有效地将用户的长期和短期购物偏好以及当前用户所提交的查询结合,并重新表示用户的购物需求。The invention can effectively combine the user's long-term and short-term shopping preference and the query submitted by the current user, and re-express the user's shopping demand.
本发明通过用户的长期和短期购物偏好建模中的两个各自的注意力机制,能够突出两个偏好中的与当前查询相关的因素。Through two separate attention mechanisms in the long-term and short-term modeling of the user's shopping preference, the present invention can highlight factors relevant to the current query in both preferences.
本发明提高了个性化商品检索的准确度,从而在一定程度上为电子商务网站保留更多的用户和提高收入。The invention improves the accuracy of personalized commodity retrieval, thereby retaining more users and increasing income for e-commerce websites to a certain extent.
本发明还提供了一种基于深度学习注意力机制的个性化商品检索装置。The present invention also provides a personalized commodity retrieval device based on deep learning attention mechanism.
本发明的一种基于深度学习注意力机制的个性化商品检索装置,包括个性化商品检索处理器,如图2所示,所述个性化商品检索处理器包括:A personalized commodity retrieval device based on deep learning attention mechanism of the present invention includes a personalized commodity retrieval processor, as shown in Figure 2, said personalized commodity retrieval processor includes:
(1)短期偏好模型构建模块,其被配置为:构建基于注意力机制的短期偏好模型。(1) A short-term preference model building module, which is configured to: build a short-term preference model based on an attention mechanism.
所述短期偏好模型构建模块具体包括:The building block of the short-term preference model specifically includes:
(1.1)注意力权重获取子模块,其被配置为:给定当前的查询,采用神经网络来估计前m个查询与当前查询之间的相关程度,并采用不同的注意力权重来表示;其中,m为正整数。(1.1) Attention weight acquisition sub-module, which is configured to: given the current query, use a neural network to estimate the degree of correlation between the first m queries and the current query, and use different attention weights to represent; where , m is a positive integer.
由于之前的查询(或购买的商品)并不全是与当前查询(或者目标商品)密切相关,例如,与之前提交的查询“手机”相对比,“鼠标”与“键盘”显然与当前的查询“显示屏”更加接近。由于这种之前查询与当前查询相关程度的差异原因,本发明采用了一个两层的神经网络来估计它们之间的相关程度,在这里用不同的注意力权重表示。Since the previous queries (or purchased products) are not all closely related to the current query (or the target product), for example, compared with the previously submitted query "mobile phone", "mouse" and "keyboard" are obviously related to the current query " display" closer. Due to the difference in the degree of correlation between the previous query and the current query, the present invention uses a two-layer neural network to estimate the degree of correlation between them, which is represented by different attention weights here.
(1.2)短期偏好表示子模块,其被配置为:将获得的注意力权重乘以对应的商品表示,输入至RNN模型中,输出表示基于注意力机制的短期偏好的m个向量。(1.2) The short-term preference representation sub-module is configured to: multiply the obtained attention weight by the corresponding commodity representation, input it into the RNN model, and output m vectors representing the short-term preference based on the attention mechanism.
与查询相对应,之前的这些查询所对应的购买商品也跟用户当前的购买商品意图产生不同的影响。所以,用之前查询与当前查询的相关程度来决定之前对应查询所购买商品与当前购买意图的相关性,具体的表示是将之前获得的注意力权重乘以对应的商品表示来得到基于注意力机制的短期偏好。Corresponding to the query, the purchased products corresponding to the previous queries also have different impacts from the user's current purchase intention. Therefore, the correlation between the previous query and the current query is used to determine the correlation between the purchased product of the previous corresponding query and the current purchase intention. The specific representation is to multiply the attention weight obtained before by the corresponding product representation to obtain the attention-based mechanism short-term preferences.
在构建基于注意力机制的短期偏好模型之前,当前商品的所有的评论信息和一个文本的查询都通过一个统一的PV-DM模型来学得商品和查询的表示,再将此表示投影到同一个子空间中。Before constructing the short-term preference model based on the attention mechanism, all the comment information of the current product and a text query learn the representation of the product and the query through a unified PV-DM model, and then project this representation to the same child in space.
(2)长期偏好模型构建模块,其被配置为:构建基于注意力机制的长期偏好模型。(2) A long-term preference model building module, which is configured to: build a long-term preference model based on an attention mechanism.
用户的长期购物偏好相对于短期来说更为稳定,但也会缓慢变化。用当前用户所有的购买商品来表示长期偏好,并且对其缓慢更新。Users' long-term shopping preferences are more stable than short-term, but they will change slowly. The long-term preference is represented by all the purchased items of the current user, and it is updated slowly.
所述长期偏好模型构建模块具体包括:The long-term preference model construction module specifically includes:
(2.1)长期偏好初始化及构建子模块,其被配置为:采用最初购买的m个商品表示来初始化其长期偏好,并利用与构建基于注意力机制的短期偏好模型的相同原理,得到基于注意力机制的长期偏好模型;(2.1) Long-term preference initialization and construction sub-module, which is configured as follows: Initialize the long-term preference by using the initially purchased m commodity representations, and use the same principle as building the short-term preference model based on the attention mechanism to obtain the attention-based The long-term preference model of the mechanism;
(2.2)长期偏好更新子模块,其被配置为:之后每经过m个商品,就更新一次当前用户的长期偏好,获得更新后的基于注意力机制的长期偏好模型;(2.2) The long-term preference update sub-module, which is configured to update the long-term preference of the current user every time after passing through m items, and obtain the updated long-term preference model based on the attention mechanism;
(3)查询再表示模块,其配置为:融合基于注意力机制的短期偏好模型、基于注意力机制的长期偏好模型以及当前查询,通过多层全连接网络来学习三者之间的交互关系,得到重组的查询表示,并采用一个距离函数来界定所有商品与当前查询的相关程度;(3) The query re-representation module, which is configured to: integrate the short-term preference model based on the attention mechanism, the long-term preference model based on the attention mechanism and the current query, and learn the interactive relationship between the three through a multi-layer fully connected network, Get the restructured query representation, and use a distance function to define the relevance of all items to the current query;
在所述查询再表示模块中,所述距离函数为余弦距离,或点积,或欧式距离,或曼哈顿距离。In the query re-expression module, the distance function is cosine distance, or dot product, or Euclidean distance, or Manhattan distance.
(4)商品返回模块,其配置为:训练所述多层全连接网络结束后,对每个用户提交的新查询,得到所有商品与当前查询的距离值,再将所有距离值从高到低进行排序,并将前n个距离值对应的商品返回给用户,其中,n为正整数。(4) Commodity return module, which is configured as follows: After the training of the multi-layer fully connected network is completed, for the new query submitted by each user, the distance values between all commodities and the current query are obtained, and then all distance values are ranked from high to low Sort and return the items corresponding to the first n distance values to the user, where n is a positive integer.
例如:n为10或者20。For example: n is 10 or 20.
在另一实施例中,所述个性化商品检索处理器还包括:In another embodiment, the personalized commodity retrieval processor further includes:
模型训练模块,其被配置为:采用“基于成对”的学习方法来训练所述多层全连接网络。A model training module configured to: use a "pair-based" learning method to train the multi-layer fully connected network.
这样能够提高学得的多层全连接网络的鲁棒性,其中,BPR(贝叶斯个性化排序)损失函数被用于得到最后的损失,带有动量的SGD(随机梯度下降)是所采用的优化方法。This can improve the robustness of the learned multi-layer fully connected network, where the BPR (Bayesian Personalized Ranking) loss function is used to obtain the final loss, and SGD (Stochastic Gradient Descent) with momentum is used optimization method.
为了缓解现有方法中所面临的诸多问题,本发明能够结合用户的相对稳定的长期购物偏好和对时间敏感的短期购物偏好对商品进行个性化检索,最终提高了检索的准确度,从而提升了用户的检索体验。In order to alleviate many problems faced in the existing methods, the present invention can combine the user's relatively stable long-term shopping preferences and time-sensitive short-term shopping preferences to carry out personalized retrieval of commodities, and finally improve the accuracy of retrieval, thereby improving the User search experience.
本发明能够有效地将用户的长期和短期购物偏好以及当前用户所提交的查询结合,并重新表示用户的购物需求。The invention can effectively combine the user's long-term and short-term shopping preference and the query submitted by the current user, and re-express the user's shopping demand.
本发明通过用户的长期和短期购物偏好建模中的两个各自的注意力机制,能够突出两个偏好中的与当前查询相关的因素。Through two separate attention mechanisms in the long-term and short-term modeling of the user's shopping preference, the present invention can highlight factors relevant to the current query in both preferences.
本发明提高了个性化商品检索的准确度,从而在一定程度上为电子商务网站保留更多的用户和提高收入。The invention improves the accuracy of personalized commodity retrieval, thereby retaining more users and increasing income for e-commerce websites to a certain extent.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby The instructions provide steps for implementing the functions specified in the flow chart or blocks of the flowchart and/or the block or blocks of the block diagrams.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM) and the like.
上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810645528.2A CN108897823B (en) | 2018-06-21 | 2018-06-21 | Personalized commodity retrieval method and device based on deep learning attention mechanism |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810645528.2A CN108897823B (en) | 2018-06-21 | 2018-06-21 | Personalized commodity retrieval method and device based on deep learning attention mechanism |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108897823A true CN108897823A (en) | 2018-11-27 |
CN108897823B CN108897823B (en) | 2020-03-17 |
Family
ID=64345384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810645528.2A Active CN108897823B (en) | 2018-06-21 | 2018-06-21 | Personalized commodity retrieval method and device based on deep learning attention mechanism |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108897823B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110321473A (en) * | 2019-05-21 | 2019-10-11 | 山东省计算中心(国家超级计算济南中心) | Diversity preference information method for pushing, system, medium and equipment based on multi-modal attention |
CN111047394A (en) * | 2019-11-20 | 2020-04-21 | 泰康保险集团股份有限公司 | Commodity recommendation method and device, electronic equipment and computer readable medium |
CN111435378A (en) * | 2019-01-14 | 2020-07-21 | 中国人民大学 | Query result sorting method and device, electronic equipment and storage medium |
CN112700274A (en) * | 2020-12-29 | 2021-04-23 | 华南理工大学 | Advertisement click rate estimation method based on user preference |
CN113826119A (en) * | 2019-05-23 | 2021-12-21 | 谷歌有限责任公司 | Pure attention computer vision |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170127016A1 (en) * | 2015-10-29 | 2017-05-04 | Baidu Usa Llc | Systems and methods for video paragraph captioning using hierarchical recurrent neural networks |
US9830315B1 (en) * | 2016-07-13 | 2017-11-28 | Xerox Corporation | Sequence-based structured prediction for semantic parsing |
CN108090801A (en) * | 2017-11-29 | 2018-05-29 | 维沃移动通信有限公司 | Method of Commodity Recommendation, mobile terminal and server |
-
2018
- 2018-06-21 CN CN201810645528.2A patent/CN108897823B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170127016A1 (en) * | 2015-10-29 | 2017-05-04 | Baidu Usa Llc | Systems and methods for video paragraph captioning using hierarchical recurrent neural networks |
US9830315B1 (en) * | 2016-07-13 | 2017-11-28 | Xerox Corporation | Sequence-based structured prediction for semantic parsing |
CN108090801A (en) * | 2017-11-29 | 2018-05-29 | 维沃移动通信有限公司 | Method of Commodity Recommendation, mobile terminal and server |
Non-Patent Citations (1)
Title |
---|
卢湖川等: "目标跟踪算法综述", 《模式识别与人工智能》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111435378A (en) * | 2019-01-14 | 2020-07-21 | 中国人民大学 | Query result sorting method and device, electronic equipment and storage medium |
CN111435378B (en) * | 2019-01-14 | 2023-09-05 | 中国人民大学 | Method, device, electronic device and storage medium for sorting query results |
CN110321473A (en) * | 2019-05-21 | 2019-10-11 | 山东省计算中心(国家超级计算济南中心) | Diversity preference information method for pushing, system, medium and equipment based on multi-modal attention |
CN110321473B (en) * | 2019-05-21 | 2021-05-25 | 山东省计算中心(国家超级计算济南中心) | Method, system, medium and device for pushing diversity preference information based on multimodal attention |
CN113826119A (en) * | 2019-05-23 | 2021-12-21 | 谷歌有限责任公司 | Pure attention computer vision |
CN111047394A (en) * | 2019-11-20 | 2020-04-21 | 泰康保险集团股份有限公司 | Commodity recommendation method and device, electronic equipment and computer readable medium |
CN112700274A (en) * | 2020-12-29 | 2021-04-23 | 华南理工大学 | Advertisement click rate estimation method based on user preference |
Also Published As
Publication number | Publication date |
---|---|
CN108897823B (en) | 2020-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10706450B1 (en) | Artificial intelligence system for generating intent-aware recommendations | |
CN108897823A (en) | Personalized commercial search method and device based on deep learning attention mechanism | |
Kanwal et al. | A review of text-based recommendation systems | |
EP3158559B1 (en) | Session context modeling for conversational understanding systems | |
US9997157B2 (en) | Knowledge source personalization to improve language models | |
CN110879864B (en) | Context recommendation method based on graph neural network and attention mechanism | |
US20230281664A1 (en) | Serving advertisements based on partial queries | |
WO2019099310A1 (en) | Resource-efficient generation of a knowledge graph | |
US9767417B1 (en) | Category predictions for user behavior | |
CN108829847B (en) | Multi-modal modeling method based on translation and application thereof in commodity retrieval | |
US11899700B1 (en) | Categorical exploration facilitation responsive to broad search queries | |
US9767204B1 (en) | Category predictions identifying a search frequency | |
WO2014152989A2 (en) | Social entity previews in query formulation | |
CN106897914A (en) | A kind of Method of Commodity Recommendation and system based on topic model | |
US20130346404A1 (en) | Ranking based on social activity data | |
WO2020125015A1 (en) | Contextualized merchant recall | |
CN106610970A (en) | Collaborative filtering-based content recommendation system and method | |
CN111639255B (en) | Recommendation method and device for search keywords, storage medium and electronic equipment | |
CN109670161A (en) | Commodity similarity calculating method and device, storage medium, electronic equipment | |
US11995139B2 (en) | Knowledge attributes and passage information based interactive next query recommendation | |
US20160323232A1 (en) | Aggregating content associated with topics in a social network | |
CN106462588B (en) | Content creation from extracted content | |
US10540399B2 (en) | Method and system for information retrieval | |
JP7204903B2 (en) | INFORMATION PUSH METHOD, DEVICE, DEVICE AND STORAGE MEDIUM | |
WO2024040467A1 (en) | Method for generating original advertising idea, and device and system |
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 |