Session recommendation method based on time interval graph

文档序号:1889434 发布日期:2021-11-26 浏览:7次 中文

阅读说明:本技术 一种基于时间间隔图的会话推荐方法 (Session recommendation method based on time interval graph ) 是由 顾盼 于 2021-09-06 设计创作,主要内容包括:本发明公开了一种基于时间间隔图的会话推荐方法。该方法根据给定当前会话,对用户兴趣建模,并推荐当前用户在下一步最可能感兴趣的物品。主要由四个部分组成:第一部分是根据用户当前会话中的物品序列,构建带时间间隔属性的会话图;第二部分是使用时间间隔图神经网络更新物品向量表征;第三部分是根据用户当前会话中物品序列,获得用户兴趣向量表征;最后,根据用户兴趣表征,推荐物品。(The invention discloses a conversation recommendation method based on a time interval diagram. The method models the user interests given the current session and recommends the items that are most likely to be of interest to the current user in the next step. Mainly comprises four parts: the first part is to construct a conversation graph with time interval attribute according to the item sequence in the current conversation of the user; the second part is to use the neural network of the time interval graph to update the object vector representation; the third part is to obtain the user interest vector representation according to the item sequence in the current session of the user; and finally, recommending the item according to the user interest representation.)

1. A conversation recommendation method based on a time interval graph is characterized in that:

constructing a conversation graph with a time interval attribute according to an article sequence in the current conversation of a user; given a session s ═ v1,v2,…,v|s|}, any item vjIs a node of the session graph T, (v)j-1,vj) Representing a user clicking on an item v for a directed edge of the graph network Tj-1After clicking on item vj(ii) a And the edge attribute of the graph is click item vj-1And click on an item vjThe time interval in between;

updating the item vector representation using a time interval graph neural network; normalizing the edge attribute time interval in the conversation graph by adopting a minimum maximization normalization mode, and then discretizing the time interval; when transmitting article node information in a session graph, the node information and the side information are connected into a whole for transmission, and the specific formula is as follows:

wherein, tjRepresenting click items vjThe time of occurrence of the reaction is,andrespectively representing the maximum and minimum of the time interval in the session, ti→jRepresenting the time interval after the minimum and maximum normalization; function bucketid(ti→jDenotes the time interval t {. The) }i→jSubscripts in the set parameters; emb (t)i→j) Represents ti→jVector characterization of (c), emb (v)j) Representing an article viThe characterization of the vector is carried out,representing a concatenation of vectors;

then, the object vector representation is updated by adopting a two-layer graph network, and finally, an object v is obtainedjThe vector of (2) characterizes xjUpdating the results for the graph network, i.e.In particular toThe formula is as follows:

wherein, WpoolAnd WhIs the transition matrix, b is the vector, σ is the sigmoid function, max represents the max operation at the element level,representing a concatenation of vectors; k represents the search depth in the graph network T, the maximum value of k being the search depth L,representative node vjVector characterization at layer k, B (j) is item v in conversation graph TjA neighbor set of (2);representing an item node vjV of a neighbor nodekThe information that is transmitted to the user,fuse article nodes vjAll neighbor node information;fuse the article vjVector characterization information and article v of the previous layerjNeighbor node information;

obtaining a user interest vector representation according to an article sequence in a current session of a user; a gate control cyclic neural network is adopted to characterize the session to obtain an interest characterization; namely, the current conversation is used as the input of the gate control cyclic neural network to obtain the gate control cyclic neural networkOutput of the network as interest p of the useru

Recommending the item according to the user interest representation; article vjVector v ofjMultiplying the representation by the final vector of the user, and then calculating the item v by applying a softmax functionjThe fraction of (c):

wherein p isuAn interest vector representing the user is generated by the user,representative article vjThe possibility of becoming the next interactive item; at the same time according toThe log-likelihood function value of (a), calculating a loss function:

wherein, yjRepresents vjThe one-hot code of (a) is,the function is optimized using a gradient descent method.

2. The conversation recommendation method based on the time interval graph as claimed in claim 1, wherein: the gate control cyclic neural network comprises the following components:

zi=σ(Wxz·xi+Whz·hi-1)

ri=σ(Wxr·xi+Whr·hi-1)

wherein r isiIs a reset gate (resetgate), ziTo update the gate (update gate), these two gating vectors determine which information can be used as the output of the gated loop unit;is the current memory content; x is the number ofiIs the node input of the current layer, i.e. the item viThe vector characterization of (2); wxz、Whz、WxrAnd WhrRespectively, control the update gate ziAnd a reset gate riThe parameters of (1); wxhAnd WhhIs to control the pre-memory contentThe parameters of (1); as a matrix multiplication at the element level, σ is a sigmoid function; the output of the last hidden layer of the gated recurrent neural network (GRU) is the user interest pu

Technical Field

The invention belongs to the technical field of internet services, and particularly relates to a session recommendation method based on a time interval diagram.

Background

A Session (Session) is an interactive activity of a user over a period of time, and a Session-based recommendation is a recommendation of an item next clicked by the user based on the current Session. The sequence of items within a session is ordered and it is necessary to model the sequence of items. For example, buying green plants may result in the need to buy pots. Traditional conversational recommendation systems employ recurrent neural networks to model user interests, but recurrent neural networks ignore the more complex context of items in a conversation. The last clicked item and the next clicked item of an item in the session are called the context (context) of the item. In the E-commerce platform, in the same session, a user can perform repeated click browsing on the same item. The same article has a plurality of contexts, such as modeling the conversation only through a recurrent neural network, the plurality of contexts of one article are not connected, and the conversation needs to be constructed into a conversation graph when the connection between the contexts is modeled. The conversation graph can capture rich item transfer relationships in the conversation.

It is not enough to consider the sequence of the items in the session, and the different time intervals between the items in the session will result in different recommendation results. Such as: the impact of the same behavior occurring two hours ago and half an hour ago on the current must be different. Thus, the time interval between item interactions is taken into account when constructing the session graph. Firstly, the time interval is normalized by adopting a minimum maximization normalization mode, and then the time interval is discretized to learn the influence of the time interval on the user interest representation. The method comprises the steps of firstly constructing a session graph with time interval attributes based on a session, and updating item vector representations based on the session graph; then, modeling a session by using a gate control recurrent neural network (GRU) to obtain a user interest vector representation; and finally recommending the next item which is possibly interested by the user according to the user interest representation.

Disclosure of Invention

The technical problem to be solved by the invention is to model the user interest given the current session and recommend the most likely items of interest to the current user in the next step. To capture the rich item transfer relationships in a session, the current session is constructed as a session graph. And when constructing the conversation graph, the time interval between the article interactions is taken into account to learn the influence of the time interval on the user interest modeling.

A conversation recommendation method based on a time interval graph comprises the following steps:

and constructing a conversation graph with a time interval attribute according to the item sequence in the current conversation of the user. Given a session s ═ v1,v2,…,v|s|}, any item vjIs a node of the session graph T, (v)j-1,vj) Representing a user clicking on an item v for a directed edge of the graph network Tj-1Later pointHit an article vj. And the edge attribute of the graph is click item vj-1And click on an item vjThe time interval in between.

The item vector characterization is updated using a time interval graph neural network. The edge attribute time interval in the conversation graph is normalized by adopting a minimum maximization normalization mode, and then the time interval is discretized. When transmitting article node information in a session graph, the node information and the side information are connected into a whole for transmission, and the specific formula is as follows:

wherein, tjRepresenting click items vjThe time of occurrence of the reaction is,andrespectively representing the maximum and minimum of the time interval in the session, ti→jRepresenting the time interval after the minimum maximum normalization. Function bucketid(ti→jDenotes the time interval t {. The) }i→jSubscripts in set parameters, e.g. ti→j0.15, thenMeaning 0.15 falls within interval 2 [0.1, 0.2). emb (t)i→j) Represents ti→jVector characterization of (c), emb (v)j) Representing an article viThe characterization of the vector is carried out,representing the concatenation of vectors.

Then, the object vector representation is updated by adopting a two-layer graph network, and finally, an object v is obtainedjThe vector of (2) characterizes xjUpdating the results for the graph network, i.e.The concrete formula is as follows:

wherein, WpoolAnd WhIs the transition matrix, b is the vector, σ is the sigmoid function, max represents the max operation at the element level,representing the concatenation of vectors. k represents the search depth in the graph network T, the maximum value of k being the search depth L,representative node vjVector characterization at layer k, B (j) is item v in conversation graph TjIs selected.Representing an item node xjV of a neighbor nodekThe information that is transmitted to the user,fuse article nodes vjAll neighbor node information.Fuse the article vjVector of the previous layerCharacterizing information and an article vjAnd (4) neighbor node information.

And obtaining the user interest vector representation according to the item sequence in the current session of the user. And characterizing the session by adopting a gate control recurrent neural network (GRU) to obtain an interest characterization. Namely, the current session is used as the input of the gate control recurrent neural network (GRU), and the output of the gate control recurrent neural network (GRU) is obtained as the interest p of the useru

zi=σ(Wxz·xi+Whz·hi-1)

ri=σ(Wxr·xi+Whr·hi-1)

Wherein r isiIs a reset gate, ziTo update the gates (update gate), these two gating vectors determine which information can be used as the output of the gated loop unit.Is the current memory content. x is the number ofiIs the node input of the current layer, i.e. the item viIs used for vector characterization. Wxa、Wha、WxrAnd WhrRespectively, control the update gate ziAnd a reset gate riThe parameter (c) of (c). WxhAnd WhhIs to control the pre-memory contentThe parameter (c) of (c). As is the element-level matrix multiplication, σ is the sigmoid function. The output of the last hidden layer of the gated recurrent neural network (GRU) is the user interest pu

Recommending the item according to the user interest characterization. Articles are put invjVector v ofjMultiplying the representation by the final vector of the user, and then calculating the item v by applying a softmax functionjThe fraction of (c):

wherein p isuAn interest vector representing the user is generated by the user,representative article vjThe possibility of becoming the next interactive item. At the same time according toThe log-likelihood function value of (a), calculating a loss function:

wherein, yjRepresents vjThe one-hot code of (a) is,the function is optimized using a gradient descent method.

The invention has the following beneficial technical effects:

(1) the invention relates to a recommendation method based on a conversation graph, which constructs the conversation into the conversation graph and enables a model to learn more complex article transfer relations in the conversation.

(2) The invention relates to a recommendation method based on a time interval conversation graph, which can learn not only the complex article transfer relation in the conversation, but also the influence of the article time interval on the user interest.

Drawings

FIG. 1 is a flow chart of a session recommendation method based on a time interval graph according to the present invention;

FIG. 2 is a model framework diagram of a session recommendation method based on a time interval diagram according to the present invention.

Detailed Description

For further understanding of the present invention, the following describes a conversation recommendation method based on time interval diagram with reference to specific embodiments, but the present invention is not limited thereto, and those skilled in the art can make insubstantial modifications and adjustments under the core teaching of the present invention, and still fall within the scope of the present invention.

First, the variables and formulas used need to be given relevant definitions.

Definition 1. V: set of articles, and V ═ V1,v2,…,v|V|And V represents the number of items in the collection of items.

Definition 2. s: current session of current user, session is all interactive item set s ═ v in current time period1,v2,…,v|s|And | s | represents the number of items in the conversation.

Definition 3. S: set of sessions in a system, S ═ S1,s2,…,s|S|And | S | represents the number of sessions in the session set.

Definition 4. T: and constructing a conversation graph with a time interval attribute based on the item sequence interacted in the current conversation.

Definition 5, B (j) items v in conversation graph T with time interval attributejIs selected.

Definition 6.Article vjThe initialized vector characterization of (1).

Definition 7.Article vjThe updated vector representation of the session map.

Definition 8.And (4) characterizing the user interest vector.

In conjunction with the above variable definitions, the final problem is defined as: given the current session, user interests are modeled and items are recommended that are most likely to be of interest to the current user in the next step, the items being a subset of the set V. To capture the rich item transfer relationships in a session, the current session is constructed as a session graph. And when constructing the conversation graph, the time interval between the article interactions is taken into account to learn the influence of the time interval on the user interest representation.

To this end, the present invention proposes a session recommendation method based on a time interval graph, as shown in fig. 2, a forward propagation (forward propagation) part of the method is mainly composed of four parts. The first part is to construct a conversation graph with time interval attribute according to the item sequence in the current conversation of the user; the second part is to use the neural network of the time interval graph to update the object vector representation; the third part is to obtain the user interest vector representation according to the item sequence in the current session of the user; and finally, recommending the item according to the user interest representation.

As shown in fig. 1, according to one embodiment of the present invention in an e-commerce, the method includes the steps of:

s100, constructing a conversation graph with time interval attributes according to the item sequence in the current conversation of the user. Given a session s ═ v1,v2,…,v|s|}, any item vjIs a node of the session graph T, (v)j-1,vj) Representing a user clicking on an item v for a directed edge of the graph network Tj-1After clicking on item vj. And the edge attribute of the graph is click item vj-1And click on an item vjThe time interval in between.

And S200, updating the item vector representation by using the time interval diagram neural network. The edge attribute time interval in the conversation graph is normalized by adopting a minimum maximization normalization mode, and then the time interval is discretized. When transmitting article node information in a session graph, the node information and the side information are connected into a whole for transmission, and the specific formula is as follows:

wherein, tjRepresenting click items vjThe time of occurrence of the reaction is,andrespectively representing the maximum and minimum of the time interval in the session, ti→jRepresenting the time interval after the minimum maximum normalization. Function bucketid(ti→jDenotes the time interval t {. The) }i→jSubscripts in set parameters, e.g. ti→j0.15, thenMeaning 0.15 falls within interval 2 [0.1, 0.2). emb (t)i→j) Represents ti→jVector characterization of (c), emb (v)j) Representing an article viThe characterization of the vector is carried out,representing the concatenation of vectors.

Then, the object vector representation is updated by adopting a two-layer graph network, and finally, an object v is obtainedjThe vector of (2) characterizes xjUpdating the results for the graph network, i.e.The concrete formula is as follows:

wherein, WpoolAnd WhIs the transition matrix, b is the vector, σ is the sigmoid function, max represents the max operation at the element level,representing the concatenation of vectors. k represents the search depth in the graph network T, the maximum value of k being the search depth L,representative node vjVector characterization at layer k, B (j) is item v in conversation graph TjIs selected.Representing an item node vjV of a neighbor nodekThe information that is transmitted to the user,fuse article nodes vjAll neighbor node information.Fuse the article vjVector characterization information and article v of the previous layerjAnd (4) neighbor node information. In the method, a two-layer graph network is adopted, so that the search depth L is 2.

And S300, obtaining the user interest vector representation according to the item sequence in the current session of the user. And characterizing the session by adopting a gate control recurrent neural network (GRU) to obtain an interest characterization. Namely, the current session is used as the input of the gate control recurrent neural network (GRU), and the output of the gate control recurrent neural network (GRU) is obtained as the interest p of the useru

zi=σ(Wxz·xi+Whz·hi-1)

ri=σ(Wxr·xi+Whr·hi-1)

Wherein r isiIs a reset gate, ziTo update the gates (update gate), these two gating vectors determine which information can be used as the output of the gated loop unit.Is the current memory content. x is the number ofiIs the node input of the current layer, i.e. the item viIs used for vector characterization. Wxa、Wna、WxrAnd WhrRespectively, control the update gate ziAnd a reset gate riThe parameter (c) of (c). WxhAnd WhhIs to control the pre-memory contentThe parameter (c) of (c). As is the element-level matrix multiplication, σ is the sigmoid function. The output of the last hidden layer of the gated recurrent neural network (GRU) is the user interest pu

And S400, recommending the item according to the user interest representation. Article vjVector v ofjMultiplying the representation by the final vector of the user, and then calculating the item v by applying a softmax functionjThe fraction of (c):

wherein p isuAn interest vector representing the user is generated by the user,representative article vjBecome intoThe likelihood of the next interactive item. At the same time according toThe log-likelihood function value of (a), calculating a loss function:

wherein, yjRepresents vjThe one-hot code of (a) is,the function is optimized using a gradient descent method.

The foregoing description of the embodiments is provided to facilitate understanding and application of the invention by those skilled in the art. It will be readily apparent to those skilled in the art that various modifications to the above-described embodiments may be made, and the generic principles defined herein may be applied to other embodiments without the use of inventive faculty. Therefore, the present invention is not limited to the above embodiments, and those skilled in the art should make improvements and modifications to the present invention based on the disclosure of the present invention within the protection scope of the present invention.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:书籍更新消息的推送方法、计算设备及计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!