A session recommendation method based on an adaptive session selection mechanism

By combining an adaptive session selection mechanism with graph neural networks and an improved attention network, the problem of insufficient mining of features of different types of sessions is solved, thereby improving the accuracy and personalized recommendation effect of the recommendation system.

CN115563383BActive Publication Date: 2026-03-31BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing session-based recommendation systems cannot effectively capture the characteristics and differences of different types of sessions, resulting in insufficient recommendation performance.

Method used

An adaptive session selection mechanism is adopted, which generates thresholds to filter high-frequency and low-frequency sessions. Graph neural networks and improved attention networks are used to model different types of sessions and calculate the recommendation probability of candidate items.

Benefits of technology

It improves the performance of the recommendation system, makes full use of conversation information, and achieves more accurate and personalized recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563383B_ABST
    Figure CN115563383B_ABST
Patent Text Reader

Abstract

The application relates to a session recommendation method based on an adaptive session selection mechanism and belongs to the technical field of data mining applications. The method utilizes the adaptive session selection mechanism, distinguishes high-frequency sessions and low-frequency sessions according to whether high-frequency items are contained in the sessions, trains the high-frequency sessions by using a graph neural network, and calculates the feature representation of the high-frequency sessions. For the low-frequency sessions, the improved attention network is utilized for training, the feature representation of the items in the low-frequency sessions is calculated through a self-attention layer, and the feature representation of the low-frequency sessions is calculated through a common attention layer. Finally, the recommendation probability of candidate items is calculated according to the session feature representation. The method distinguishes the session types, better models the session representation, and improves the performance of the recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a recommendation method based on an adaptive session selection mechanism, specifically a method for effectively distinguishing session types by utilizing information extracted from item frequency features, belonging to the field of data mining and application technology. Background Technology

[0002] In recent years, with the development of the Internet and social networks, recommender systems have become one of the most popular research directions in the field of data mining.

[0003] Recommender systems utilize the interaction information between users and items to mine user preferences and interests, and to infer future user behavior. Conversation-based recommender systems, in particular, extract user preferences and interests from user-generated conversation data to provide more accurate and real-time recommendations. Accurate and personalized predictions of user needs can be applied to numerous scenarios such as customer preference prediction, news recommendations, and video-on-demand, generating widespread social benefits.

[0004] While significant progress has been made in research on conversation-based recommender systems, it remains a challenging problem. The order in which users click on items during interactions is rich and abstract in its implications. By modeling this sequential information using neural networks, comprehensive user preferences can be obtained, enabling more accurate and personalized recommendations. This can positively promote research in recommendation, search, and advertising, and further accelerate the application and industrial development of conversation-based recommender systems.

[0005] Currently, existing session-based recommendation systems primarily utilize recurrent neural networks, attention mechanisms, and graph neural networks to model and predict user behavior by capturing features within the session. However, due to the different types of sessions, using only a single modeling approach for all sessions cannot effectively capture the characteristics and differences between different session types. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of existing technologies in fully exploring the characteristics and differences of different types of conversations, and to solve the technical problem of effectively capturing the characteristics and differences of different types of conversations, propose a conversation recommendation method based on an adaptive conversation selection mechanism.

[0007] First, let's explain the relevant concepts:

[0008] 1. Adaptive Session Selection: This method aims to fully utilize information within a session by generating a threshold based on the frequency of item occurrences. High-frequency and low-frequency sessions are then adaptively selected based on this threshold, and a suitable neural network is used to model the behavior of different session types. In this method, adaptive session selection is manifested in:

[0009] (1) Based on the generation threshold t of the frequency of the items, filter out the items with the highest frequency values ​​in the top 5%. Among the filtered items, select the lowest frequency of these items as the threshold t.

[0010] (2) If a session contains items that appear more frequently than the threshold t, the session is adaptively selected as a high-frequency session.

[0011] (3) If the session does not contain items that appear more frequently than the threshold t, the session is adaptively selected as a low-frequency session.

[0012] 2. High-frequency session sequence S fre

[0013] The expression is: This represents a high-frequency conversation sequence that requires feature mining, containing n items. The index n is the length of the session sequence, s fre Represents items in high-frequency conversations.

[0014] 3. Low-frequency conversation sequence S inf

[0015] The expression is: This represents a low-frequency conversation sequence that requires feature mining, containing n items. The index n is the length of the session sequence, s inf Represents items in low-frequency conversations.

[0016] The present invention is achieved using the following technical solution.

[0017] A session recommendation method based on an adaptive session selection mechanism includes the following steps:

[0018] Step 1: Using an adaptive session selection mechanism, distinguish session types to obtain the high-frequency session sequence S. fre and low-frequency conversation sequence S inf .

[0019] The high-frequency session sequence is selected through an adaptive selection mechanism, which selects session sequences that occur more frequently than a threshold t.

[0020] The low-frequency session sequence is selected through an adaptive selection mechanism that does not include session sequences whose frequency exceeds a threshold t.

[0021] Step 2: For high-frequency conversation sequences, use graph neural networks to model them and calculate the feature representation of the high-frequency conversation sequences.

[0022] Specifically, step 2 may include the following steps:

[0023] Step 2.1: Using the first layer of the graph neural network, embed the graph nodes representing each item into the low-dimensional latent space to obtain the embedding representation of each item. Then, based on the item sequence in the high-frequency conversation and the embedding representation of each item, obtain the embedding representation of the high-frequency conversation. Where n is the length of the high-frequency session sequence, x fre An embedded representation of each item in a high-frequency conversation.

[0024] Step 2.2: Compute the feature representation E of the high-frequency conversation sequence using a graph neural network. fre The details are as follows:

[0025]

[0026]

[0027]

[0028]

[0029]

[0030] in, It is an embedded representation of high-frequency conversation sequences. A s W is an adjacency matrix, representing the in-degree and out-degree of graph nodes. a is the weight matrix of the adjacency matrix. b is the bias vector. a t This represents the context information extracted from neighboring nodes. W z W r W v U z U r U v These all represent parameters of the cyclic network structure. t It is the update gate in a graph neural network. t This is the reset gate in a graph neural network. σ represents the sigmoid function. The symbol ⊙ represents the element-wise product. This represents the new information generated by the graph neural network at the current moment. This indicates the final updated node state. This represents the embedded representation of the previous item in the current state. tanh() is the hyperbolic tangent function.

[0031] The high-frequency session sequence S fre The node representation of the last item in the list As a feature representation of high-frequency conversation sequences, the expression is:

[0032] Step 3: For low-frequency conversation sequences, model them using an improved attention network and compute feature representations of the low-frequency conversation sequences.

[0033] Specifically, step 3 includes the following steps:

[0034] Step 3.1: Using the first layer of the improved attention network, embed each item in the low-frequency conversation sequence into a low-dimensional latent space to obtain the embedding representation of each item. Then, based on the item sequence in the low-frequency conversation sequence and the embedding representation of each item, obtain the embedding representation of the low-frequency conversation sequence: The subscript n represents the length of the low-frequency conversation sequence, x inf An embedded representation of each item in a low-frequency conversation sequence.

[0035] Step 3.2: Using the self-attention layer in the improved attention network, compute the feature representation of each item in the low-frequency conversation sequence, as follows:

[0036]

[0037] Among them, W Q W K W V It is the mapping matrix of the self-attention layer. X inf H is the embedding representation of the low-frequency conversation sequence obtained in step 3.1, where d is the vector dimension of the embedding representation. inf It is a feature representation of all items in the low-frequency conversation sequence obtained from the self-attention layer. h inf is the feature representation of each item in the sequence, and n is the sequence length.

[0038] Step 3.3: Using a regular attention layer in an improved attention network, compute the feature representation E of the low-frequency conversation sequence. inf The details are as follows:

[0039]

[0040]

[0041] Where W0, W1, W2 are the weight matrices of a typical attention layer. It is the feature representation of each item obtained in step 3.2. This is the feature representation of the last item in the sequence obtained in step 3.2. α i It's the attention weight. E inf It is a feature representation of low-frequency conversation sequences obtained from a normal attention layer.

[0042] Step 4: Calculate the recommendation probability of candidate items, as follows:

[0043]

[0044]

[0045] in, This represents the predicted probability of candidate items in high-frequency conversations. This represents the predicted probability of candidate items for low-frequency conversations. It is the embedding representation of candidate items in the high-frequency conversation sequence obtained in step 2.1. E fre It is the feature representation of the high-frequency conversation sequence obtained in step 2.2. It is the embedding representation of candidate items in the low-frequency conversation sequence obtained in step 3.1. E inf It is a feature representation of the low-frequency conversation sequence obtained in step 3.3.

[0046] Thus far, from step 1 to step 4, the candidate item recommendation probabilities for a given session sequence are obtained. Based on the recommendation probabilities, session recommendation based on an adaptive session selection mechanism is implemented.

[0047] Beneficial effects

[0048] The method of the present invention has the following advantages compared with the prior art:

[0049] This method fully considers the problem that the characteristics and differences of different types of conversations are not fully explored in conversation recommendation. It uses an adaptive conversation selection mechanism to effectively distinguish conversation types, making fuller use of the information in the conversation and improving recommendation performance. Attached Figure Description

[0050] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0051] The method of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0052] like Figure 1 As shown, a session recommendation method based on an adaptive session selection mechanism includes the following steps:

[0053] Step A: Adaptively select different types of sessions;

[0054] Specifically, in this embodiment, by analyzing the entire dataset, a threshold is obtained based on the frequency of items appearing in the session, which is the same as step 1 in the invention.

[0055] Step B: Generate high-frequency conversation item embeddings;

[0056] Specifically, in this embodiment, a 100-dimensional high-frequency conversation item embedding is obtained through high-frequency conversation samples, which is the same as step 2.1 in the invention.

[0057] Step C: Calculate the high-frequency session feature representation;

[0058] Specifically, in this embodiment, the steps are the same as in step 2.2 of the invention.

[0059] Step D: Generate low-frequency conversation item embeddings;

[0060] Specifically, in this embodiment, a 100-dimensional low-frequency conversation item embedding is obtained through low-frequency conversation samples, which is the same as step 3.1 in the invention.

[0061] Step E: Calculate the low-frequency session feature representation:

[0062] Specifically, in this embodiment, steps 3.2 and 3.3 of the invention are the same;

[0063] Step F: Calculate the probability of recommending candidate items;

[0064] Specifically, in this embodiment, step 4 is the same as in the invention.

[0065] Example

[0066] Taking the conversation sequence “Session 1: [Item 1, Item 3, Item 2, Item 5, Item 7]; Session 2: [Item 2, Item 6, Item 8, Item 10]; Session 3: [Item 4, Item 7, Item 9, Item 11]” as an example, this embodiment will provide a detailed explanation of the specific operation steps of the recommendation method based on the adaptive session selection mechanism described in this invention.

[0067] A session recommendation method based on an adaptive session selection mechanism, such as... Figure 1 As shown, it includes the following steps:

[0068] Step A: Adaptively select different types of sessions;

[0069] Specifically, in this embodiment, a threshold 1 is obtained based on the frequency of occurrence of items in the session. Items with a frequency exceeding 1 are designated as item 2. Since items 2 are included in sessions 1 and 2, sessions 1 and 2 are adaptively selected as high-frequency sessions. Since items 2 are not included in session 3, session 3 is adaptively selected as a low-frequency session.

[0070] Step B: Generate high-frequency conversation item embeddings;

[0071] Specifically, in this embodiment, all items in high-frequency session 1 and high-frequency session 2 are embedded into the latent space through the first layer of the graph neural network to obtain a 100-dimensional embedded representation of the items in high-frequency session 1 and high-frequency session 2.

[0072] Step C: Calculate the high-frequency session feature representation;

[0073] Specifically, in this embodiment, a graph neural network is used to train the items in high-frequency session 1 and high-frequency session 2. Each graph node corresponds to one item, and the feature representation of the graph node is obtained. The feature representation of the last item in each high-frequency session is used as the feature representation of the current session.

[0074] Step D: Generate low-frequency conversation item embeddings;

[0075] Specifically, in this embodiment, by improving the first layer of the attention network, all items in low-frequency session 3 are embedded into the latent space to obtain a 100-dimensional embedded representation of the items in low-frequency session 3.

[0076] Step E: Calculate the low-frequency session feature representation:

[0077] Specifically, in this embodiment, the feature representation of items in low-frequency session 3 is calculated using the self-attention layer in the improved attention network, and the feature representation of low-frequency session 3 is calculated using the ordinary attention layer in the improved attention network.

[0078] Step F: Calculate the probability of recommending candidate items;

[0079] Specifically, in this embodiment, the recommendation probability is calculated by performing an inner product of the feature representations of session 1, session 2, and session 3 with the candidate items, thus obtaining the item most likely to be recommended for each session.

Claims

1. A session recommendation method based on an adaptive session selection mechanism, characterized in that, Comprising the following steps: Step 1: distinguishing the session types by using the adaptive session selection mechanism, obtaining high-frequency session sequences and low-frequency session sequences ; Among them, adaptive session selection refers to generating a threshold according to the frequency of items in the session in order to make full use of the information in the session, selecting high-frequency and low-frequency sessions according to the threshold, and then using appropriate neural networks to model the behavior of different types of sessions; According to the generation threshold t of the frequency of the items, the items with a frequency value in the top 5% are screened out, and the lowest frequency among the screened items is selected as the threshold t; if the session contains items with a frequency exceeding the threshold t, the session is adaptively selected as a high-frequency session; if the session does not contain items with a frequency exceeding the threshold t, the session is adaptively selected as a low-frequency session; High frequency session sequence, is through the adaptive selection mechanism, the selection of the session contains the frequency of more than threshold t session sequence, expression is: , the sequence has n items , subscript n is the length of the session sequence, represent the high frequency of the session in the goods; The low-frequency session sequence is selected by an adaptive selection mechanism, and the session sequence not containing the item with the frequency exceeding the threshold t is selected, and the expression is: The subscript n is the length of the session sequence, The low-frequency session sequence is selected by an adaptive selection mechanism, and the session sequence not containing the item with the frequency exceeding the threshold t is selected, and the expression is: Step 2: For high-frequency session sequences, use graph neural networks to model them, calculate the feature representation of high-frequency session sequences, including the following steps: Step 2.1: embedding each item in the high-frequency session sequence into a low-dimensional hidden space by using the first layer of the graph neural network to obtain an embedding representation of each item; then, according to the item sequence in the high-frequency session sequence and the embedding representation of each item, obtaining an embedding representation of the high-frequency session sequence wherein n is the length of the session sequence, the embedding representation representing each item in the high-frequency session sequence; Step 2.2: Compute feature representations for high-frequency session sequences using graph neural networks as follows: (1) (2) (3) (4) (5) wherein, is an embedding representation of the high-frequency session sequence; is an adjacency matrix representing the in-degree and out-degree of the graph nodes, is a weight matrix of the adjacency matrix; is a bias vector; represents context information extracted from the neighbor nodes; , , , all represent parameters of the recurrent network structure; is an update gate in the graph neural network; is a reset gate in the graph neural network; represents a sigmod function; symbol represents an element product; represents newly generated information of the graph neural network at the current time; represents the final updated node state; represents an embedding representation of the last item under the current state; is a hyperbolic tangent function; the node state of the last item in the high-frequency conversation sequence , as a feature representation of the high-frequency conversation sequence, is expressed as: ;​ Step 3: For low-frequency session sequences, use improved attention networks to model them, calculate the feature representation of low-frequency session sequences, including the following steps: Step 3.1: using the first layer of the improved attention network, embedding each item in the low-frequency session sequence into a low-dimensional hidden space to obtain an embedding representation of each item; then, according to the item sequence in the low-frequency session sequence and the embedding representation of each item, obtaining an embedding representation of the low-frequency session sequence: , subscript n is the length of the low-frequency session sequence, represents the embedding representation of each item in the low-frequency session sequence; Step 3.2: Use the self-attention layer in the improved attention network to calculate the feature representation of each item in the low-frequency session sequence, as follows: (6) wherein, , , is the mapping matrix of the self-attention layer; is the embedding representation of the low-frequency session sequence obtained in step 3.1, and d is the vector dimension of the embedding representation; is the feature representation of all items in the low-frequency session sequence obtained by the self-attention layer, , is the feature representation of each item in the sequence, and n is the length of the sequence; Step 3.3: Compute the feature representation of the low-frequency session sequence using the regular attention layer in the improved attention network as follows: (7) (8) wherein, , is a weight matrix of the common attention layer, is the feature representation of each item obtained in step 3.2; is the feature representation of the last item in the sequence obtained in step 3.2; is the attention weight; is the feature representation of the low-frequency conversation sequence obtained by the common attention layer; Step 4: Calculate the recommendation probability of the candidate items, as follows: (9) (10) wherein, represents the predicted probability for high-frequency session candidate items, represents the predicted probability for low-frequency session candidate items; is the embedding representation of candidate items in high-frequency session sequences obtained in step 2.1; is the feature representation of high-frequency session sequences obtained in step 2.2; is the embedding representation of candidate items in low-frequency session sequences obtained in step 3.1; is the feature representation of low-frequency session sequences obtained in step 3.3; According to the recommendation probability, the session recommendation based on the adaptive session selection mechanism is realized.