A conversation recommendation method and system based on dual-channel attention weighted network
By using a dual-channel attention-weighted network in the conversation recommendation system, combined with the modeling of items, categories and operations, the problem of insufficient utilization of item category information and multi-type operation information in the prior art is solved, more accurate and reasonable user interest modeling is achieved, and the item recommendation effect is optimized.
Patent Information
- Application Number
- CN202211018277.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-08-24
AI Technical Summary
When modeling user interests, the prior art lacks the utilization of item category information and multiple types of operation information, resulting in inaccurate interest modeling and failure to consider the different attention of users under different operation types at the same time, resulting in unreasonable interest modeling.
Using a session recommendation method based on a dual-channel attention-weighted network, a dictionary of item name sequence, item category sequence and user operation sequence is constructed, and the items, categories and operations are modeled using a gated recurrent unit neural network, and user-category interest is extracted in combination with the attention mechanism, and the user-category interest is fused to form a global conversation representation to realize user interest representation.
By incorporating category and operation information, the interaction between users and items is analyzed from item granularity and category granularity, the interests of users under different operations are captured, and more accurate and reasonable user interest modeling is achieved, thereby optimizing the product recommendation effect.
Smart Images

Figure CN115393012B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of conversation recommendation, and in particular to a conversation recommendation method and system based on a dual-channel attention weighted network. Background Art
[0002] The session-based recommendation system regards the interaction information between anonymous users and items over a period of time as a session, models the user's interests in limited behaviors to capture the user's preferences, and thus predicts the items that the target user is interested in at the next moment. It plays an increasingly important role in informed consumption, services, and decision-making, and has been widely used in multiple online platforms such as Tmall and JD.com.
[0003] Most recent related works use convolutional neural networks, graph neural networks, etc., and use item-granular attention mechanisms to model user interests for a single user operation type (click) sequence and predict the items that the user may be interested in next time. Summary of the invention
[0004] The applicant has found through analysis that the existing method of using item-granular attention mechanism to model user interests for a single user operation type (click) sequence and predicting the items that the user may be interested in next time has been proven to be effective, but there are still the following two problems, which affect the accuracy and rationality of its user interest modeling: First, the lack of utilization of item category information and multi-type operation information leads to inaccurate modeling of user interests; second, the failure to simultaneously consider the different attention shown by users to item granularity and category granularity under different operation types makes the modeling of user interests unreasonable. To this end, the technical problem to be solved by the present invention is to provide a conversational recommendation method that can analyze the interaction behavior between users and items from the item granularity and category granularity respectively, and at the same time capture the interests of users in different operations at the item granularity and category granularity, so as to realize the prediction of the user clicking on the item at the next moment.
[0005] The technical solution adopted by the present invention to solve the above technical problems is a conversation recommendation method based on a dual-channel attention weighted network, the steps of which are as follows:
[0006] Step S10: construct a dictionary of item name sequence, item category sequence, user operation sequence and corresponding sequence, i.e., item dictionary, category dictionary and operation dictionary, according to the user interaction sequence formed by the item name, item category and operation type of the user interaction in a session, and record the position of the item category that appears most times in this session;
[0007] Step S20: Initialize three dictionaries respectively to form high-dimensional spatial representations of corresponding sequences respectively, use three gated recurrent unit neural networks to model items, categories and operations respectively, and update the high-dimensional spatial representations of item name sequences, item category sequences and user operation sequences;
[0008] Step S30: concatenate the high-dimensional space representation of the item name sequence with the high-dimensional space representation of the user operation sequence to obtain an item-operation representation sequence, and extract the user-item interest from it using an attention mechanism;
[0009] Step S40: concatenate the high-dimensional space representation of the item category sequence and the high-dimensional space representation of the user operation sequence to obtain a category-operation representation sequence, and extract the user-category interest from it using an attention mechanism;
[0010] Step S50: Establish a user interest fusion mechanism based on dual-channel attention weighting, fuse the user-item interest and the user-category interest to obtain a global representation of the session, and combine it with the local representation of the session to form a user interest representation to predict the item that the user will click on next.
[0011] The beneficial effect of the present invention is that it incorporates category and operation information, analyzes the interaction behavior between users and items from the item granularity and category granularity respectively, and captures the user's interests in different operations at the item granularity and category granularity at the same time, modeling the user's interests more accurately and reasonably, thereby optimizing the item recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The figure is a flow chart of the steps of the method of the present invention. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] See also Figure 1 , the present invention provides a technical solution:
[0015] The present invention provides the following technical solution: a conversation recommendation method based on structural and semantic attention stacking, wherein the specific steps of the conversation recommendation method are as follows:
[0016] Step 1: Based on the user interaction sequence formed by the item names, item types, and operation types of the user interactions in a session, construct a dictionary of item name sequences, item category sequences, user operation sequences, and corresponding sequences, namely, an item dictionary, a category dictionary, and an operation dictionary, and record the position of the item category that appears most frequently in this session;
[0017] Step 1-1, User Interaction Sequence Where m is the number of user interactions, from which the item name sequences are constructed as The item category sequence is The user operation sequence is in, Item name sequence I s The kth name in is the item category sequence C s The kth category in is the kth operation in the user operation sequence, 1≤k≤m;
[0018] Step 1-2, in item category sequence C s Find the category with the highest number of occurrences and the last interactive item corresponding to that category The position of the item in the item name sequence is recorded as the point of interest position pos;
[0019] Step 2: Initialize three dictionaries respectively to form high-dimensional spatial representations of the corresponding sequences, use three gated recurrent unit neural networks to model items, categories, and operations respectively, and update the high-dimensional spatial representations of item name sequences, item category sequences, and user operation sequences;
[0020] Step 2-1: Initialize the item dictionary, category dictionary, and operation dictionary with a variance of 0.01 and a mean of 0, and obtain the high-dimensional representations DIC of the item dictionary, category dictionary, and operation dictionary respectively. I , DIC C , DIC B , respectively extract the high-dimensional space representation of the item name sequence High-dimensional space representation of item category sequences High-dimensional space representation of user operation sequences is the high-dimensional representation of the kth item in the item name sequence, is the high-dimensional representation of the kth category in the item category sequence, is the high-dimensional representation of the kth operation in the user operation sequence, 1≤k≤m, is an m×d-dimensional matrix, where d is the dimension of the high-dimensional space representation;
[0021] Step 2-2, use three gated recurrent unit networks to model items, categories, and operations respectively, and update the high-dimensional space representation of item name sequence, item category sequence, and user operation sequence. The calculation formula is as follows:
[0022]
[0023] Among them GRU I , GRU C , GRU B Represent the gated recurrent unit functions applied to the item name sequence, item category sequence, and user operation sequence, respectively. are the updated high-dimensional space representations of the k-th item, category, and operation, respectively;
[0024] Step 3: Concatenate the high-dimensional spatial representation of the item name sequence with the high-dimensional spatial representation of the user operation sequence to obtain the item-operation representation, and use the attention mechanism to extract the user-item interest from it;
[0025] Step 3-1: Represent the item name sequence in high-dimensional space High-dimensional space representation of user operation sequences Splice in the column direction to get the item-operation representation sequence Where Concat is a vector column-wise concatenation function. Represents the concatenation of the kth column vector in the item-operation representation sequence;
[0026] Step 3-2: According to the position of the point of interest pos, from the item-operation representation sequence IB e In the example, take out the item interest point representation
[0027] Step 3-3, extract the interest point representation of each item-operation representation in the item-operation representation sequence The user-item interest between is calculated as follows:
[0028]
[0029] in, σ represents the Sigmoid activation function;
[0030] Step 4: Concatenate the high-dimensional spatial representation of the item category sequence with the high-dimensional spatial representation of the user operation sequence to obtain the category-operation representation, and use the attention mechanism to extract the user-category interest from it;
[0031] Step 4-1: Represent the high-dimensional space of the item category sequence High-dimensional space representation of user operation sequences Concatenate in the column direction to get the category-operation representation sequence Represents the concatenation of the kth column vector in the category-operation representation sequence;
[0032] Step 4-2: According to the position of the point of interest pos, from the category-operation representation sequence CB e In the example, we take out the category interest point representation
[0033] Step 4-3, extract the category-operation representation sequence for each category-operation representation for the category interest point representation The user-category interest between is calculated as follows:
[0034]
[0035] in,
[0036] Step 5: Establish a user interest fusion mechanism based on dual-channel attention weighting, fuse the user-item interest and the user-category interest to obtain the global representation of the session, and combine it with the local representation of the session to form a user interest representation to predict the item that the user will click on next.
[0037] Step 5-1: Construct a user interest fusion mechanism based on dual-channel attention weighting, combine the obtained user-item interest and user-category interest, and obtain the user fusion interest α=w ib ×α ib +w cb ×α cb ,in
[0038] Step 5-2: The user's interest level is integrated to obtain the global representation of the session. Get the high-dimensional space representation of the item name sequence I h The last item is the local representation of the session, and the user interest representation is obtained by combining the global representation and the local representation in [;] indicates splicing;
[0039] Step 5-3, combining the user interest representation with the high-dimensional space representation of the item name sequence, predicts the item that the user will click next. The calculation formula is as follows:
[0040]
[0041] in It is the probability ranking result of the items that the user is interested in at the next moment, and the item corresponding to the maximum probability is selected as the recommended item to be clicked at the next moment. Softmax is the activation function, and T represents the matrix transpose.
[0042] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A conversation recommendation method based on dual-channel attention weighted network, It is characterized in that The following steps are involved: Step S10: construct a dictionary of item name sequence, item category sequence, user operation sequence and corresponding sequence, i.e., item dictionary, category dictionary and operation dictionary, according to the user interaction sequence formed by the item name, item category and operation type of the user interaction in a session, and record the position of the item category that appears most times in this session; Step S20: Initialize three dictionaries respectively to form high-dimensional spatial representations of corresponding sequences respectively, use three gated recurrent unit neural networks to model items, categories and operations respectively, and update the high-dimensional spatial representations of item name sequences, item category sequences and user operation sequences; Step S30: concatenate the high-dimensional space representation of the item name sequence with the high-dimensional space representation of the user operation sequence to obtain an item-operation representation sequence, and extract the user-item interest from it using an attention mechanism; Step S40: concatenate the high-dimensional space representation of the item category sequence and the high-dimensional space representation of the user operation sequence to obtain a category-operation representation sequence, and extract the user-category interest from it using an attention mechanism; Step S50: Establish a user interest fusion mechanism based on dual-channel attention weighting, fuse the user-item interest and the user-category interest to obtain a global representation of the session, and combine the local representation of the session to form a user interest representation to predict the item that the user will click on next moment; The specific steps of step S30 are as follows: Step S301: represent the updated item name sequence in high-dimensional space High-dimensional space representation of the updated user operation sequence Splice in the column direction to get the item-operation representation sequence Where Concat is a vector column-wise concatenation function. Represents the concatenation of the kth column vector in the item-operation representation sequence; Step S302: According to the position of the point of interest pos, from the item-operation representation sequence IB e In the example, take out the item interest point representation Step S303, calculating the interest point representation of each item-operation representation in the item-operation representation sequence The user-item interest between ib : Among them, q i , W 1 , W 2 、c i The parameters are obtained through network training. T represents matrix transpose, and σ represents the Sigmoid activation function.
2. The method according to claim 1, It is characterized in that Step S10 is specifically as follows: Step S101, user interaction sequence Where m is the total number of user interactions, from which the item name sequences are constructed as follows: The item category sequence is The user operation sequence is Item name sequence I s The kth name in is the item category sequence C s The kth category in is the kth operation in the user operation sequence, 1≤k≤m; Step S102, in the item category sequence C s Find the category with the highest number of occurrences and the last interactive item corresponding to that category Remember this item In item name sequence I s The position in is the position of the point of interest pos.
3. The method according to claim 2, It is characterized in that Step S20 is specifically as follows: Step S201, the item dictionary, category dictionary and operation dictionary are initialized respectively with a variance of 0.01 and a mean of 0, and high-dimensional representations DIC of the item dictionary, category dictionary and operation dictionary are obtained respectively. I , DIC C , DIC B , respectively extract the high-dimensional space representation of the item name sequence High-dimensional space representation of item category sequences High-dimensional space representation of user operation sequences is the real number field, d is the dimension of the high-dimensional space representation, is the high-dimensional representation of the kth item in the item name sequence, is the high-dimensional representation of the kth category in the item category sequence, is the high-dimensional representation of the kth operation in the user operation sequence; Step S202: Use three gated recurrent unit networks to model items, categories, and operations, respectively, and update the high-dimensional spatial representation of the item name sequence, item category sequence, and user operation sequence to obtain the updated high-dimensional spatial representation of the item name sequence, item category sequence, and user operation sequence. h , C h , B h : Among them GRU I , GRU C , GRU B Respectively represent the gated recurrent unit functions applied to the item name sequence, item category sequence, and user operation sequence; are the updated high-dimensional space representations of the k-th item, category, and operation, respectively.
4. The method according to claim 3, It is characterized in that Step S40 is specifically as follows: Step S401: represent the updated item category sequence in high-dimensional space High-dimensional space representation of the updated user operation sequence Concatenate in the column direction to get the category-operation representation sequence Represents the concatenation of the kth column vector in the category-operation representation sequence; Step S402: According to the position of the point of interest pos, from the category-operation representation sequence CB e Extract the category interest point representation Step S403: extract the category interest point representation for each category-operation representation in the category-operation representation sequence The user-category interest between cb : Among them, q c , W 3 , W 4 、c c The parameters are obtained through network training.
5. The method according to claim 4, Features: Step S50 is specifically as follows: Step S501: construct a user interest fusion mechanism based on dual-channel attention weighting, combine the acquired user-item interest and user-category interest, and calculate the user fusion interest α=w ib ×α ib +w cb ×α cb , where the parameters are obtained through network training Step S502: Obtain a global representation of the session by integrating the user's interest level Take the high-dimensional space representation of the updated item name sequence I h The last term i hm is the local representation of the session s t , Combining global representation with local representation to get user interest representation Where W h The parameters are obtained through network training. [;] indicates a concatenation operation; Step S503, combining the user interest representation with the high-dimensional space representation of the item name sequence to predict the item that the user will click next time: in It is the probability ranking result of the items that the user is interested in at the next moment, and the item corresponding to the maximum probability is selected as the recommended item to be clicked at the next moment. Softmax is the activation function.
Citation Information
Patent Citations
Session recommendation method based on heterogeneous graph of hierarchical attention mechanism
CN113704438A
Graph neural network recommendation method based on time interval enhancement
CN113821724A