Recommendation system optimization method based on spectral clustering and gating loop unit
By adopting the GRU-KSC algorithm based on spectral clustering and gated loop units in the recommendation system, combined with KMC2 data representation and a two-layer GRU network model, it is solved that existing recommendation systems are difficult to use user long-term information and short-term sessions for personalized recommendations. The problem of this paper realizes more accurate product recommendations and complex data clustering analysis.
Patent Information
- Application Number
- CN202410910569.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-26
AI Technical Summary
Existing recommendation systems are difficult to effectively utilize user long-term information and short-term conversations to personalize product recommendations, and it is difficult to handle clustering analysis of complex data sets.
Using the GRU-KSC algorithm based on spectral clustering and gating loop units, spectral clustering analysis is performed through KMC2 data representation, and the two-layer GRU network model is used to capture the short-term dynamic information of users and products, and generate product cluster coded vectors and user interests. change.
It improves the personalized recommendation accuracy of the recommendation system and the clustering effect of complex data sets, can better capture user interests and behavior evolution, and improves the performance of the recommendation system.
Smart Images

Figure CN119025749A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a recommendation system optimization method based on spectral clustering and gated recurrent units, and belongs to the field of recurrent neural networks and recommendation algorithms. Background Art
[0002] Recommendation algorithms are a class of computer science and machine learning techniques used to help users discover items or content they may be interested in. In terms of electronic product recommendations, the goal of recommendation algorithms is to recommend appropriate electronic products to users based on their historical behavior, preferences, and characteristics.
[0003] Clustering algorithm is a machine learning technique used to group samples in a data set into clusters with similar characteristics. Among them, spectral clustering algorithm is a clustering method based on graph theory. Its core idea is to represent data samples as nodes in a graph and achieve clustering through spectral analysis of the graph.
[0004] The spectral clustering algorithm first represents the samples in the data set as a graph, usually an undirected graph. In this graph, each data sample corresponds to a node, and the edges between nodes represent the similarity or distance between samples.
[0005] GRU is a recurrent neural network structure consisting of multiple recurrent units. Each recurrent unit contains an important update gate and an important reset gate. The update gate is used to control which information should be passed to the next time step. It determines the weight of the new input information and the hidden state information of the previous time step. The reset gate determines how much hidden state information from the previous time step should be considered in the current time step. It helps the model forget unimportant information and thus better handle long-term dependencies. Summary of the invention
[0006] The present invention discloses a recommendation system optimization method based on spectral clustering (SC) and gated recurrent unit (GRU), namely, GRU-KSC algorithm. The GRU-KSC algorithm includes two parts, namely, KSC algorithm and HGRU model. The KSC algorithm used in the algorithm analyzes the data to generate a commodity cluster coding vector, and then uses the HGRU model to capture the dynamic interests of users and the popularity changes of items.
[0007] The specific technical solution is:
[0008] A recommendation system optimization method based on spectral clustering and gated recurrent units comprises the following steps:
[0009] (1) Spectral clustering based on Kmc2 data representation; representing data points as Kmc2 feature vectors and then applying spectral clustering techniques to achieve clustering analysis of the data;
[0010] (2) GRU-based hybrid recommendation, considering the user's behavior sequence, such as click history, purchase records, etc., to capture the user's interests and behavior evolution; using a two-layer GRU network for modeling, one layer for capturing the user's short-term dynamic information and the other layer for capturing the short-term dynamic information of items.
[0011] Specifically:
[0012] (1) The specific method of spectral clustering based on Kmc2 data representation is as follows:
[0013] The original dataset is re-represented, and the subsequent spectral clustering work is completed with the new dataset; given a dataset X = {X1, X2,..., X n}, as shown in formula (1):
[0014]
[0015] Redefine the dataset with the central points provided by k-means and select the K-nearest neighbor graph; first, given a dataset X and the number of clusters m, m << p, calculate m cluster center points through the K-means algorithm, and the dimension of each point is still p;
[0016]
[0017] Use the Euclidean distance formula to calculate the distance between each point in X and the points in C:
[0018]
[0019] Obtain an N*M matrix Dist:
[0020]
[0021] Unify the matrix according to formulas (5), (6), and (7):
[0022]
[0023] d′ ij = d ij / Sum i (6)
[0024]
[0025] Use the K-means clustering method to obtain m cluster center points.
[0026] (2) The specific method of hybrid recommendation based on GRU is:
[0027] List of user's sessions As input, we get the hidden state list of user i at time t. Indicates the information of user i clicking on a product at time t, and indicates the hidden state of user i at time t; similarly, the hidden state list of products Is through the item input list The calculated value represents the user information corresponding to clicking on product j at time t. The calculation formula of the user hidden state is shown in formula (8):
[0028]
[0029] in is the context vector of user i at time t, which is obtained by the hidden vector at time t-1. and the input at time t Calculated together;
[0030] The formula for calculating the hidden state of an item at time t is shown in formula (9). After obtaining the hidden states of the user and the item, the hidden states are decoded to obtain the relevance score of user i to item j.
[0031]
[0032] Use the multilinear difference method to decode the hidden states of users and products and calculate the correlation value S between them i,j , its formula is shown in formula (10):
[0033]
[0034] Where W is a parameter matrix of multilinear interpolation method.
[0035] The present invention adopts a spectral clustering algorithm based on Kmc2 data representation. In addition to maintaining the basic process of traditional spectral clustering, it mainly adds two parts: data representation based on Kmc2 and reselection of center points. KMC2-SpectralClustering is a clustering algorithm that combines Kmc2 data representation and spectral clustering methods. The basic idea of this algorithm is to represent data points as Kmc2 feature vectors, and then apply spectral clustering technology to realize data clustering analysis. The KMC2-Spectral Clustering algorithm combines the feature description of Kmc2 data representation and the clustering method of spectral clustering, and can be applied to data analysis and clustering tasks, providing more accurate and comprehensive clustering results, and is particularly suitable for processing complex data sets.
[0036] In order to solve the problem of using user long-term information and short-term sessions for personalized recommendation in the e-commerce field, the present invention proposes a hybrid recommendation algorithm based on GRU HGRU (Hybrid Gated Recurrent Unit). GRU is a variant of a recurrent neural network (RNN) that has memory and can effectively process sequence data. This enables the GRU-based hybrid recommendation algorithm to consider the user's behavior sequence, such as click history, purchase history, etc., to better capture the user's interests and behavior evolution. In the HGRU algorithm, the present invention uses a two-layer GRU network for modeling. One layer is used to capture the user's short-term dynamic information, and the other layer is used to capture the short-term dynamic information of the item. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of the present invention;
[0038] Figure 2 It is a flow chart of the KMC algorithm of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] The present invention discloses a recommendation system optimization method based on spectral clustering (SC) and gated recurrent unit (GRU), namely, GRU-KSC algorithm. The GRU-KSC algorithm includes two parts, namely, KSC algorithm and HGRU model. The KSC algorithm used in the algorithm analyzes the data, generates commodity cluster encoding vectors, and then uses the HGRU model to capture the dynamic interests of users and the popularity changes of items, including: (1) spectral clustering based on Kmc2 data representation; representing data points as Kmc2 feature vectors, and then applying spectral clustering technology to realize data cluster analysis; (2) hybrid recommendation based on GRU, considering the user's behavior sequence, capturing the user's interest and behavior evolution; using a two-layer GRU network for modeling, one layer is used to capture the user's short-term dynamic information, and the other layer is used to capture the short-term dynamic information of the item.
[0041] The overall flow chart of the method is as follows Figure 1 shown.
[0042] (1) Spectral clustering based on Kmc2 data representation
[0043] like Figure 2 As shown, the present invention re-represents the original data set and uses the new data set to complete the subsequent spectral clustering work. Given a p-dimensional space data set X = {X1, X2, ..., X n}, as shown in formula (1):
[0044]
[0045] Since this article needs to re - define the data set with the help of the central points provided by k - means, the K - Nearest Neighbor graph is selected in this article. First, given a data set X and the number of clusters m (m << p), m cluster center points are calculated through the K - means algorithm, and the dimension of each point is still p:
[0046]
[0047] Then, the Euclidean distance formula is used to calculate the distance between each point in X and the points in C:
[0048]
[0049] In this way, an N * M matrix Dist can be obtained:
[0050]
[0051] Then, the matrix is unified according to formulas (5), (6), and (7):
[0052]
[0053] d′ ij = d ij / Sum i (6)
[0054]
[0055] Then, the K - means clustering method needs to be used to obtain m cluster center points.
[0056] (2) Hybrid Recommendation Based on GRU
[0057] The present invention takes the user's session list as the input to obtain the list of hidden states of user i at time t represents the information of the item clicked by user i at time t represents the hidden state of user i at time t. Similarly, the list of hidden states of items
[0058] is calculated through the item input list
[0059] and represents the user information corresponding to item j clicked at time t. The calculation formula of the user hidden state is shown in formula (8):
[0060]
[0061] in is the context vector of user i at time t, which is obtained by the hidden vector at time t-1. and the input at time t Calculated together:
[0062] The formula for calculating the hidden state of an item at time t is shown in formula (9). After obtaining the hidden state of the user and the item, the hidden state needs to be decoded to obtain the relevance score of user i to item j:
[0063]
[0064] This paper uses a multilinear difference method to decode the hidden states of users and products and calculate the correlation value S between them. i,j , its formula is shown in formula (10):
[0065]
[0066] Where W is a parameter matrix of multilinear interpolation, and the number of training parameters of this matrix is much smaller than the number of parameters of training the fully connected layer. Multilinear interpolation not only greatly reduces the training parameters of the HGRU model, but also improves the recommendation effect of the entire hybrid model.
Claims
1. A recommendation system optimization method based on spectral clustering and gated recurrent units, characterized in that: It includes the following steps: (1) Spectral clustering based on Kmc2 data representation: Represent data points as Kmc2 feature vectors, and then apply spectral clustering techniques to achieve clustering analysis of the data; (2) GRU-based hybrid recommendation, considering the user's behavior sequence to capture the user's interest and behavior evolution; Use a two-layer GRU network for modeling, one layer for capturing the user's short-term dynamic information, and the other layer for capturing the short-term dynamic information of items.
2. The method for optimizing a recommendation system based on spectral clustering and gated recurrent units according to claim 1, characterized in that: (1) The specific method of spectral clustering based on Kmc2 data representation is as follows: The original data set is re-represented and the subsequent spectral clustering work is completed with the new data set. Given a p-dimensional space data set X = {X1, X2, …, X n }, as shown in formula (1): Redefine the data set with the central points provided by k-means, and select the K-nearest neighbor graph; First, given a data set X and the number of clusters m, m << p, calculate m cluster center points through the K-means algorithm, and the dimension of each point is still p; Use the Euclidean distance formula to calculate the distance between each point in X and the C points: Obtain an N*M matrix Dist: Perform uniform processing on the matrix according to formulas (5), (6), and (7): d' ij =d ij / Sum i (6) Use the K-means clustering method to obtain m cluster center points.
3. The method for optimizing a recommendation system based on spectral clustering and gated recurrent units according to claim 1, characterized in that: (2) The specific method of GRU-based hybrid recommendation is as follows: List of user's sessions As input, we get the hidden state list of user i at time t. Indicates the information of user i clicking on the product at time t, and indicates the hidden state of user i at time t; Similarly, the hidden status list of products Is through the item input list The calculated value represents the user information corresponding to clicking on product j at time t. The calculation formula of the user hidden state is shown in formula (8): in is the context vector of user i at time t, which is obtained by the hidden vector at time t-1. and the input at time t Calculated together; The calculation formula for the hidden state of an item at time t is shown in formula (9); After obtaining the hidden states of the user and the item, decode the hidden states to obtain the relevance score of user i for item j; Use the multilinear difference method to decode the hidden states of users and products and calculate the correlation value S between them i,j , its formula is shown in formula (10): In the formula, W is a parameter matrix of a multilinear interpolation method.
Citation Information
Patent Citations
Sequence recommendation method based on long-term and short-term preferences of user
CN114969533A
Supplementing a trained model using incremental data in making item recommendations
US20110029464A1
