A Session Recommendation Method Based on Sliding Interest Windows

Through the attention mechanism and gating mechanism based on the sliding interest window, the problem of noise information of the self-attention mechanism in session recommendation is solved, and more accurate user interest representation and click prediction are achieved.

CN115495660BActive Publication Date: 2025-07-25UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211219289.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-07-25
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

The self-attention mechanism introduces noise information from a global perspective in conversation recommendation, which cannot effectively model local interest preferences, resulting in inaccurate user interest representation.

Method used

Using a sliding interest window-based method, the attention mechanism within the local interest window is constructed, local interest preferences are captured, and a gated mechanism is used to adaptively fuse multiple local interest preferences to form user interest representations.

Benefits of technology

It alleviates noise information interference, improves the accuracy of user interest preference representation, and achieves more accurate predictions of next-minute click items.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_5
    Figure QLYQS_5
Patent Text Reader

Abstract

The present invention discloses a session recommendation method based on a sliding interest window, and belongs to the technical field of session recommendation. The method of the present invention mainly includes the following steps: initializing an item dictionary and a position dictionary to generate a high-dimensional space representation of a time-series item click sequence; constructing an attention mechanism based on an interest window to obtain local interest preferences within the interest window; sliding the interest window in the time-series item click sequence to establish a set of local interest preferences in the sequence; using a gating mechanism to adaptively fuse the set of local interest preferences to form a user interest representation; and obtaining probability values of each candidate item in the item dictionary by taking the inner product of the user interest representation and the item dictionary. The method of the present invention avoids interference of noise information in local interest preference modeling and establishes an accurate user interest representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of session recommendation, and particularly relates to a session recommendation method based on a sliding interest window. Background Art

[0002] Session recommendation takes the item click sequence of anonymous users as input, and realizes the prediction of the next item by modeling the user behavior pattern, which can help users quickly obtain useful information from a large amount of information and is widely used in fields such as e-commerce, live broadcast or short video. The self-attention mechanism is the mainstream method in academia for modeling user interest preferences, which captures the correlation between each item in the sequence from a global perspective to form user interest preferences. However, the self-attention mechanism will introduce noise information from the global perspective and cannot reasonably model local interest preferences (local interest preferences refer to the user's interest points within a continuous period of time, such as items of the same type). To solve this problem, the present invention proposes a session recommendation method based on a sliding interest window, which avoids interference from noise information by only capturing the item information within the sliding interest window, and uses a gating mechanism to adaptively fuse multiple local interest preferences to obtain a more reasonable and accurate user interest representation. Summary of the Invention

[0003] The object of the present invention is to overcome the defects of the above-mentioned prior art and provide a session recommendation method based on a sliding interest window.

[0004] The technical problem proposed by the present invention is solved as follows:

[0005] A session recommendation method based on a sliding interest window includes the following steps:

[0006] Step 1. Initialize the item dictionary and the position dictionary to obtain the high-dimensional space representations of the item dictionary and the position dictionary; generate the high-dimensional space representations of the items and the high-dimensional space representations of the positions in the user item click sequence, and splice them to obtain the high-dimensional space representation of the time-series item click sequence;

[0007] Step 2. Construct an interest window and apply it to the user item click sequence; perform the calculation of the scaled dot product attention mechanism inside the interest window to obtain the local interest preference within the current interest window;

[0008] Step 3. Slide the interest window from the first item to the last item in the time-series item click sequence and stop to establish a set of local interest preferences in the sequence;

[0009] Step 4. Use the gating mechanism to adaptively fuse the set of local interest preferences to form a user interest representation;

[0010] Step 5. Calculate the inner product of the user interest representation and the item dictionary to obtain the probability values of each candidate item in the item dictionary, and realize the prediction of the item that the user will click on the next moment.

[0011] Further, the specific process of Step 1 is as follows:

[0012] Step 1-1. Initialize the item dictionary and the location dictionary respectively in a way with a variance of 0.01 and a mean of 0 to obtain the high-dimensional space representation of the item dictionary and the high-dimensional space representation of the location dictionary where, x t is the high-dimensional space representation of the t-th item in the item dictionary, 1 ≤ t ≤ |V|, |V| is the size of the item dictionary, represents a |V|×d dimensional matrix, p m is the high-dimensional space representation of the m-th location in the location dictionary, 1 ≤ m ≤ |L|, |L| is the size of the location dictionary, represents a |L|×d dimensional matrix, d is the dimension of the high-dimensional space representation of the item and the location;

[0013] Step 1-2. The user item click sequence is v p represents the item clicked by the user for the p-th time, 1 ≤ p ≤ |I s |, |I s | is the number of items clicked by the user; according to the user item click sequence I s and the high-dimensional space representation X of the item dictionary, the high-dimensional space representation of the item corresponding to the user item click sequence is According to the user item click sequence I s and the high-dimensional space representation P of the location dictionary, the high-dimensional space representation of the location corresponding to the user item click sequence is where, is the high-dimensional space representation of the item clicked by the user for the p-th time, is the high-dimensional space representation of the location of the item clicked by the user for the p-th time, represents a |I s |×d dimensional matrix;

[0014] Step 1-3. Concatenate the high-dimensional space representation of the item and the high-dimensional space representation of the location in the user item click sequence to obtain the high-dimensional space representation of the time-series item click sequence seq p is the high-dimensional space representation of the item clicked by the user for the p-th time after concatenation; where, Seq = tanh([Seq item |Seq pos W1), tanh is the activation function, the transformation matrix represents a 2d×d dimensional matrix, | represents concatenation.

[0015] Furthermore, the specific process of step 2 is as follows:

[0016] Step 2-1. Construct an interest window of length 2k + 1 and apply it to the user-item click sequence; when the center of the interest window is at the j-th item of the user-item click sequence, denote the high-dimensional space representation of the item sequence within the interest window as denotes a (2k + 1)×d dimensional matrix, 1 ≤ j ≤ |I s |; S j contains the high-dimensional space representations of 2k + 1 items, where the high-dimensional space representation of the m-th item is seq m , j - k ≤ m ≤ j + k, when m < 1 or m > |I s |, let seq m be a zero vector;

[0017] Step 2-2. Use the attention mechanism based on the interest window to capture the local interest preferences within the interest window; that is, perform the calculation of the scaled dot-product attention mechanism inside the interest window. The specific calculation formula is as follows:

[0018]

[0019] where, a(seq j , S j ) represents the item information of the local same interest preference of the item sequence S j centered at the j-th item of the user-item click sequence, softmax is the activation function, and the superscript T represents transpose; The transformation matrix is used to convert the j-th item of the user-item click sequence into the query value in the scaled dot-product attention mechanism, is used to convert the high-dimensional space representation S j of the item sequence within the interest window into the key value in the scaled dot-product attention mechanism, is used to convert the high-dimensional space representation S j of the item sequence within the interest window into the value value in the scaled dot-product attention mechanism.

[0020] Furthermore, the specific calculation process of step 3 is as follows:

[0021]

[0022] where, Attend(Seq, S) represents the set of local interest preferences.

[0023] Furthermore, the specific calculation process of step 4 is as follows:

[0024] Step 4-1. Calculate the weight value vector according to the similarity of the local interest preference set with respect to the last item in the sequence. The specific calculation process is as follows:

[0025] g = σ(Attend(Seq, S)·W2 + b2)

[0026] Wherein, is the weight value vector, σ is the activation function, represents a |I s |-dimensional vector, the transformation matrix represents a d×1-dimensional matrix, and the offset parameter represents a |I s |-dimensional vector;

[0027] Step 4-2. Fuse all local interest preference information according to the weight value vector to form the user interest representation. The specific calculation process is as follows:

[0028]

[0029] Wherein, is the user interest representation, g p is the weight value of the item clicked by the user for the p-th time, represents a d-dimensional vector. Further, the specific calculation process of Step 5 is as follows:

[0030] pred = soft max(U·W3)

[0031] Wherein, the transformation matrix represents a d×|V|-dimensional matrix; is the probability value ranking result of each candidate item at the next moment, that is, the item that the user is interested in. Select the candidate item corresponding to the maximum probability as the item recommended for clicking at the next moment.

[0032] The beneficial effects of the present invention are:

[0033] The method of the present invention uses the attention mechanism based on the sliding interest window, avoids the interference of noise information by only capturing the item information within the sliding interest window, and uses the gating mechanism to adaptively fuse multiple local interest preferences to realize the prediction of the item clicked by the user at the next moment. This method alleviates the problem that the session recommendation model based on the self-attention mechanism will introduce noise information from the global perspective, and improves the accuracy of the user interest preference representation. Specific embodiments

[0034] The present invention will be further clearly and completely described below in conjunction with embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0035] This embodiment provides a session recommendation method based on a sliding interest window, including the following steps:

[0036] Step 1. Initialize the item dictionary and the position dictionary to obtain the high-dimensional space representations of the item dictionary and the position dictionary; generate the high-dimensional space representations of the items and positions of the user-item click sequence, and splice them to obtain the high-dimensional space representation of the time-series item click sequence;

[0037] The specific process of Step 1 is as follows:

[0038] Step 1-1. Initialize the item dictionary and the position dictionary respectively in a manner with a variance of 0.01 and a mean of 0 to obtain the high-dimensional space representation of the item dictionary and the high-dimensional space representation of the position dictionary where x t is the high-dimensional space representation of the t-th item in the item dictionary, 1 ≤ t ≤ |V|, |V| is the size of the item dictionary, represents a |V|×d-dimensional matrix, and p m is the high-dimensional space representation of the m-th position in the position dictionary, 1 ≤ m ≤ |L|, |L| is the size of the position dictionary, represents a |L|×d-dimensional matrix, and d is the dimension of the high-dimensional space representations of items and positions;

[0039] Step 1-2. The user-item click sequence is v p represents the item clicked by the user for the p-th time, 1 ≤ p ≤ |I s |, |I s | is the number of items clicked by the user; according to the user-item click sequence I s and the high-dimensional space representation X of the item dictionary, the high-dimensional space representation of the items in the user-item click sequence is obtained as According to the user-item click sequence I s and the high-dimensional space representation P of the position dictionary, the high-dimensional space representation of the positions in the user-item click sequence is obtained as where is the high-dimensional space representation of the item clicked by the user for the p-th time, is the high-dimensional space representation of the position of the item clicked by the user for the p-th time, represents a |I s |×d-dimensional matrix;

[0040] Step 1-3. Concatenate the high-dimensional spatial representation of items and the high-dimensional spatial representation of positions in the user item click sequence to obtain the high-dimensional spatial representation of the sequential item click sequence seq p is the high-dimensional spatial representation of the item clicked by the user for the p-th time after concatenation; where Seq = tanh([Seq item |Seq Pos W1), tanh is the activation function, and the transformation matrix represents a 2d×d-dimensional matrix, and | represents concatenation.

[0041] Step 2. Construct an interest window and apply it to the user item click sequence; calculate the scaled dot-product attention mechanism inside the interest window to obtain the local interest preference within the current interest window;

[0042] The specific process of Step 2 is as follows:

[0043] Step 2-1. Construct an interest window of length 2k + 1 and apply it to the user item click sequence; when the center of the interest window is at the j-th item of the user item click sequence, denote the high-dimensional spatial representation of the item sequence within the interest window as represents a (2k + 1)×d-dimensional matrix, 1 ≤ j ≤ |I s |; S j contains 2k + 1 high-dimensional spatial representations of items, where the high-dimensional spatial representation of the m-th item is seq m , j - k ≤ m ≤ j + k, when m < 1 or m > |I s |, let seq m be a zero vector;

[0044] Step 2-2. Use the attention mechanism based on the interest window to capture the local interest preference within the interest window; that is, calculate the scaled dot-product attention mechanism inside the interest window, and the specific calculation formula is as follows:

[0045]

[0046] where a(seq j , S j ) represents the item information of the local same interest preference of the item sequence S j centered on the j-th item of the user item click sequence, softmax is the activation function, and the superscript T represents transpose; The transformation matrix is used to convert the j-th item of the user item click sequence into the query value in the scaled dot-product attention mechanism, is used to convert the high-dimensional spatial representation of the item sequence S within the interest window jConverted into the key value in the scaled dot - product attention mechanism, For the high - dimensional space representation S of the item sequence within the interest window j Converted into the value value in the scaled dot - product attention mechanism.

[0047] Step 3. Slide the interest window from the first item to the last item in the user - item click sequence in the temporal item click sequence and stop, establishing a set of local interest preferences in the sequence;

[0048] The specific calculation process of Step 3 is as follows:

[0049]

[0050] Among them, Attend(Seq, S) represents the set of local interest preferences;

[0051] Step 4. Construct an adaptive fusion mechanism based on the set of local interest preferences to form a user interest representation;

[0052] The specific calculation process of Step 4 is as follows:

[0053] Step 4 - 1. Obtain the weight value vector according to the similarity of the set of local interest preferences with respect to the last item in the sequence. The specific calculation process is as follows:

[0054] g = σ(Attend(Seq, S)·W2 + b2)

[0055] Among them, is the weight value vector, σ is the activation function, represents the |I s | - dimensional vector, the transformation matrix represents the d×1 - dimensional matrix, the offset parameter represents the |I s | - dimensional vector;

[0056] Step 4 - 2. According to the weight value vector, fuse all local interest preference information to form a user interest representation. The specific calculation process is as follows:

[0057]

[0058] Among them, is the user interest representation, g p is the weight value of the item for the p - th click of the user, represents the d - dimensional vector.

[0059] Step 5. Obtain the probability values of each candidate item in the item dictionary by taking the inner product of the user interest representation and the item dictionary, and realize the prediction of the item that the user will click next.

[0060] The specific calculation process of Step 5 is as follows:

[0061] pred = soft max(U·W3)

[0062] Among them, the transformation matrix represents a d×|V| dimensional matrix; is the sorting result of the probability values of each candidate item, that is, the item of user interest, at the next moment. The candidate item corresponding to the maximum probability is selected as the item to be recommended for clicking at the next moment.

[0063] The method of the present invention takes the user's clicked item sequence as the research object. The method of the present invention uses an attention mechanism based on a sliding interest window, avoids noise information interference by only capturing the item information within the sliding interest window, and uses a gating mechanism to adaptively fuse multiple local interest preferences to realize the prediction of the item clicked by the user at the next moment. This method alleviates the problem that the session recommendation model based on the self-attention mechanism will introduce noise information from a global perspective and improves the accuracy of the user interest preference representation.

[0064] Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A session recommendation method based on a sliding interest window, characterized in that, It includes the following steps: Step 1. Initialize the item dictionary and the location dictionary to obtain the high-dimensional space representations of the item dictionary and the location dictionary; Generate the high-dimensional space representations of items and locations in the user item click sequence, and splice them to obtain the high-dimensional space representation of the time-series item click sequence; The specific process of Step 1 is as follows: Step 1-1. Initialize the item dictionary and the location dictionary respectively in a way with a variance of 0.01 and a mean of 0, to obtain the high-dimensional space representation of the item dictionary and the high-dimensional space representation of the location dictionary where, x t is the high-dimensional space representation of the t-th item in the item dictionary, 1 ≤ t ≤ |V|, |V| is the size of the item dictionary, represents a |V|×d dimensional matrix, p m is the high-dimensional space representation of the m-th location in the location dictionary, 1 ≤ m ≤ |L|, |L| is the size of the location dictionary, represents a |L|×d dimensional matrix, d is the dimension of the high-dimensional space representation of the item and the location; Step 1-2. The user item click sequence is v p indicating the item clicked by the user for the p-th time, where 1 ≤ p ≤ |I s |, and |I s | is the number of items clicked by the user; According to the user item click sequence I s and the high-dimensional space representation X of the item dictionary, the high-dimensional space representation of the items in the user item click sequence is According to the user item click sequence I s and the high-dimensional space representation P of the position dictionary, the high-dimensional space representation of the positions in the user item click sequence is where is the high-dimensional space representation of the item clicked by the user for the p-th time, is the high-dimensional space representation of the position of the item clicked by the user for the p-th time, represents a |I s |×d dimensional matrix; Step 1-3. Concatenate the high-dimensional space representation of the item and the high-dimensional space representation of the position in the user item click sequence to obtain the high-dimensional space representation of the time-series item click sequence seq p is the high-dimensional space representation of the item clicked by the user for the p-th time after concatenation; where Seq = tanh([Seq item |Seq pos W1), tanh is the activation function, and the transformation matrix represents a 2d×d dimensional matrix, and | represents concatenation; Step 2. Construct an interest window and apply it to the user item click sequence; calculate the scaled dot product attention mechanism inside the interest window to obtain the local interest preference within the current interest window; Step 3. Slide the interest window from the first item to the last item in the time-series item click sequence and stop to establish a set of local interest preferences in the sequence; Step 4. Use the gating mechanism to adaptively fuse the set of local interest preferences to form the user interest representation; Step 5. Calculate the probability values of each candidate item in the item dictionary by taking the inner product of the user interest representation and the item dictionary to realize the prediction of the item that the user will click next.

2. The session recommendation method based on a sliding interest window according to claim 1, wherein The specific process of Step 2 is as follows: Step 2-1. Construct an interest window of length 2k + 1 and apply it to the user's item click sequence; when the center of the interest window is at the j-th item of the user's item click sequence, denote the high-dimensional space representation of the item sequence within the interest window as which represents a (2k + 1)×d-dimensional matrix, where 1 ≤ j ≤ |I s |; S j contains the high-dimensional space representations of 2k + 1 items, where the high-dimensional space representation of the m-th item is seq m , where j - k ≤ m ≤ j + k, and when m < 1 or m > |I s |, let seq m be a zero vector; Step 2-2. Use the attention mechanism based on the interest window to capture the local interest preference within the interest window; that is, calculate the scaled dot product attention mechanism inside the interest window, and the specific calculation formula is as follows: Among them, a(seq j , S j ) represents the item information of the local same interest preference centered on the j-th item in the user item click sequence S j . soffmax is the activation function, and the superscript T represents the transpose; Transformation matrix is used to convert the j-th item in the user item click sequence into the query value in the scaled dot-product attention mechanism, is used to convert the high-dimensional space representation S of the item sequence within the interest window j into the key value in the scaled dot-product attention mechanism, is used to convert the high-dimensional space representation S of the item sequence within the interest window j into the value value in the scaled dot-product attention mechanism.

3. The session recommendation method based on a sliding interest window according to claim 2, wherein The specific calculation process of Step 3 is as follows: where Attend(Seq,S) represents the set of local interest preferences.

4. The session recommendation method based on a sliding interest window according to claim 3, wherein The specific calculation process of Step 4 is as follows: Step 4-1. Obtain the weight value vector according to the similarity of the set of local interest preferences to the last item in the sequence. The specific calculation process is as follows: g = σ(Attend(Seq, S) · W2 + b2) Among them, is the weight value vector, and σ is the activation function, represents the |I s |-dimensional vector, and the transformation matrix represents a d×1-dimensional matrix, and the offset parameter represents the |I s |-dimensional vector; Step 4-2. Fuse all local interest preference information according to the weight value vector to form the user interest representation. The specific calculation process is as follows: Among them, is the user interest representation, g p is the weight value of the item that the user clicks for the p-th time, represents a d-dimensional vector.

5. The session recommendation method based on a sliding interest window according to claim 4, wherein, The specific calculation process of Step 5 is as follows: pred = soft max(U · W3) Among them, the conversion matrix represents a d×|V| dimensional matrix; is the sorting result of the probability values of each candidate item at the next moment, that is, the items of interest to the user. The candidate item corresponding to the maximum probability value is selected as the item to be recommended for clicking at the next moment.

Citation Information

Patent Citations

  • Session recommendation method and system based on structure and semantic attention stacking

    CN113326425A

  • System and method for finding and prioritizing content based on user specific interest profiles

    US20140156681A1