Graph convolution recommendation method and device considering user project demand relationship
By encoding user timestamps and adjusting interest models, the problem of difficult to capture user demand changes in graph neural network recommendations is solved, and the accuracy of the recommendation system and the ability to capture periodic features are improved.
Patent Information
- Application Number
- CN202411165192.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-23
AI Technical Summary
Existing graph neural network recommendation methods are difficult to effectively and accurately capture and quantify the changing relationship between users' demand for projects over time, resulting in the impact of recommendation accuracy.
By encoding the user's prediction timestamp, a time-encoded vector is generated, a pre-trained user interest model is input to obtain the confidence score of the degree of interest, and these scores are used to adjust the basic prediction score of the graph convolution network model, and then the recommended sorting is recommended. sequence.
It improves the recommendation accuracy of the recommendation system, accurately captures the time changes of the user's demand relationship for the project, and enhances the ability to capture periodic features.
Smart Images

Figure CN119066269A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of recommendation systems, and in particular to a graph convolution recommendation method and device that considers the relationship between user-item requirements. Background Art
[0002] The recommendation system is a method of data feature mining. Based on the user's historical interaction records, the recommendation system can predict the items that the user may be interested in, including but not limited to: commodities, movies, music, short videos, etc. The recommendation system can analyze potential behavior patterns from a large amount of user data information, which plays a great role in the user's Internet experience and the precise provision of corporate needs. Since the interaction record modeling of the recommendation system is highly matched with the graph model, the recommendation method based on graph neural network has become the main research direction.
[0003] The current mainstream graph neural network recommendation method establishes a corresponding graph structure by recording the interaction between users and projects, and then performs convolution operations to obtain the latent feature encoding of users and projects, and determines the predicted score of users for projects based on the distance between the latent feature encoding of users and projects. Currently, few graph neural network recommendation methods consider the changing relationship between the degree of user demand for projects over time, and few solutions clearly define the specific quantitative method of the degree of user demand for projects. In the operation of real society, group or individual behavior is generally subject to time cycle constraints. For example, individuals' commuting, transportation, entertainment preferences, etc. have clear periodic characteristics. Therefore, for users, there is a high probability that their demand for projects has a periodic characteristic relationship. Such a periodic relationship can be called the user's demand cycle for projects from the user's perspective, and the project's life cycle for users from the project's perspective. It can be seen that considering the user-project demand relationship is necessary for the performance of the recommendation system.
[0004] An existing method to consider the relationship between the degree of user demand for items and time is to consider the user interaction sequence as a user interaction function curve with time as the horizontal axis and the items of interaction as the vertical axis. The predicted rating of the user for the item output by the graph neural network recommendation method is adjusted according to the user interaction function curve. However, this method has the following difficulties:
[0005] (1) Items need to be quantified into numerical values before they can be used as the vertical axis value of the function. The conventional method is to use the form of item ID for quantification. However, the manual setting of item ID has a significant impact on the final result. For example, the obtained user interaction function curve fluctuates too much, the information is confusing, and it is difficult to extract effective function features, thus destroying the potential time characteristics.
[0006] (2) The timeline is too sparse. It is difficult to ensure that the amount of user interaction data can support dense and uniform function requirements, and the user's interaction with a single item may also be sparse.
[0007] It can be seen that the existing methods cannot effectively and accurately capture and quantify the changing relationship between users' demand for projects and time.
[0008] In addition, a reasonable interactive graph structure needs to be designed in the graph neural network recommendation method, because the design of the graph structure directly affects the final model performance. A too simple graph structure may make it impossible to extract deep features, while an overly complex graph structure may lead to overfitting and a significant increase in computational overhead. Summary of the invention
[0009] The present invention aims to at least solve the technical problem in the prior art that it is impossible to effectively and accurately capture and quantify the changing relationship between the user's demand for a project over time, which affects the accuracy of recommendations, and provide a graph convolution recommendation method and device that takes into account the user-project demand relationship.
[0010] In order to achieve the above-mentioned purpose of the present invention, according to the first aspect of the present invention, the present invention provides a graph convolution recommendation method that considers the user-project demand relationship, including: encoding the user's prediction timestamp to obtain the user's time coding vector, wherein the time coding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector; inputting the user's time coding vector into a pre-trained user interest model corresponding to the user, and obtaining a confidence score of the user's interest level in each project category at the prediction timestamp; generating graph structure data according to the user-project interaction record; inputting the graph structure data into a pre-trained graph convolutional network model, and obtaining the user's basic prediction score for each project; adjusting the user's basic prediction score for the project using the user's interest level confidence score for the project category to which each project belongs at the prediction timestamp, and obtaining the user's adjusted prediction score for each project; sorting the user's adjusted prediction scores for the projects from high to low, and recommending the first K1 projects in the sorted sequence to the user, where K1 is a positive integer.
[0011] In order to achieve the above-mentioned purpose of the present invention, according to the second aspect of the present invention, the present invention provides a graph convolution recommendation device considering the user-project demand relationship, which is used to implement the graph convolution recommendation method considering the user-project demand relationship described in the first aspect of the present invention, including: a time encoding module, encoding the user's prediction timestamp to obtain the user's time encoding vector, wherein the time encoding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector; a user interest model module, inputting the user's time encoding vector into a pre-trained user interest model corresponding to the user, and obtaining the user's interest confidence score for each project category at the prediction timestamp; a graph structure data generation module, generating graph structure data according to the user-project interaction record; a basic prediction score acquisition module, inputting the graph structure data into a pre-trained graph convolution network model, and obtaining the user's basic prediction score for each project; a score adjustment module, adjusting the user's basic prediction score for the project using the user's interest confidence score for the project category to which each project belongs at the prediction timestamp, and obtaining the user's adjusted prediction score for each project; a recommendation module, sorting the user's adjusted prediction scores for the projects from high to low, and recommending the first K1 projects in the sorting sequence to the user, where K1 is a positive integer.
[0012] The present invention encodes the timestamp that the user needs to predict to obtain a time coding vector, and the time coding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector, which reflects a periodic relationship. The time coding vector is input into a trained user interest model, and the user's demand cycle for project categories is adaptively captured through the user interest model to obtain a confidence score of the user's interest level for each project category at the prediction timestamp, and quantify the relationship between the user's demand level for project categories and time. The trained graph convolutional network model is used to analyze the graph structure data to obtain the user's basic prediction score for each project; the user's confidence score of the interest level for each project category at the prediction timestamp is used to adjust the user's basic prediction score for each project under the project category, so that the obtained adjusted prediction score adds the time change of the user's demand relationship for the project, thereby improving the recommendation accuracy of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flow chart of a graph convolution recommendation method considering the user-item demand relationship in a preferred embodiment of the present invention;
[0014] Figure 2 is a framework diagram of a user interest model in a preferred embodiment of the present invention;
[0015] Figure 3 It is a framework diagram of a graph convolutional network model in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0016] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0017] In the description of the present invention, it is necessary to understand that the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0018] In the description of the present invention, unless otherwise specified and limited, it should be noted that the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the internal connection between two components. It can be a direct connection or an indirect connection through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to the specific circumstances.
[0019] The execution subject of the graph convolution recommendation method considering the user-project demand relationship provided by the present invention includes but is not limited to at least one of the electronic devices such as the server and the terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the graph convolution recommendation method considering the user-project demand relationship can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0020] The present invention discloses a graph convolution recommendation method considering the relationship between user-item requirements. In a preferred embodiment, referring to Figure 1 As shown, the following steps are included:
[0021] Step A includes:
[0022] Step A1, encode the predicted timestamp of the user to obtain the time encoding vector of the user, where the time encoding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector.
[0023] Step A2: Input the user's time coding vector into a pre-trained user interest model corresponding to the user to obtain the confidence score of the user's interest level in each item category at the predicted timestamp. Each user has a pre-trained user interest model.
[0024] Step B comprises:
[0025] Step B1, generate graph structure data based on user-project interaction records. User-project interaction records include interaction records between multiple users and multiple projects, specifically, including timestamps, project categories, project numbers, and other information when each user interacts with each project. The interaction record between a user u∈U and a project i∈I at timestamp t is a triple (u, i, t). For each user u, sort its interaction records with the project in ascending order of time, and obtain the following data results:
[0026]
[0027] where i 1 ,i 2 ,…,i q is the item that user u has interacted with, t 1 ,t 2 ,…,t q is the interaction timestamp for .
[0028] Step B2: Input the graph structure data into the pre-trained graph convolutional network model to obtain the user's basic prediction score for each item.
[0029] Step C, using the user's interest confidence score for the project category to which each project belongs at the prediction timestamp to adjust the user's basic prediction score for the project, to obtain the user's adjusted prediction score for each project. Specifically, the adjustment method is preferably but not limited to: multiplying or adding the user's basic prediction score for a project by the confidence score of the interest level of the project category to which the project belongs, to obtain the adjusted prediction score.
[0030] Step D: Sort the adjusted predicted scores of the items by the user from high to low, and recommend the first K1 items in the sorted sequence to the user, where K1 is a positive integer. Specifically, for user u, after executing the above steps AD, the adjusted predicted scores of all items by user u are obtained, and the first K1 highest predicted score items are extracted as the recommendation set and provided to user u.
[0031] In this embodiment, Figure 1An execution order of each step is given, namely, step A, B, C, and D. It should be noted that the execution order of each step can also be step B, A, C, and D, and can also be step A and B executed in parallel, and then step C and D executed.
[0032] In this embodiment, in order to simply and effectively encode the predicted timestamp or timestamp into a time code vector with a periodic relationship, a timestamp encoding method is provided. Preferably, the timestamp encoding method in step A1 includes:
[0033] Step A01: Divide the predicted timestamp t of the user by the first conversion coefficient T 0 The quotient is rounded down to obtain the integer time value f trans (t):
[0034]
[0035] Among them, f trans (t) is an integer in hours; T 0 >0.
[0036] Step A02: take the remainder of the integer time value divided by 24 as the hour time feature hour; round down the quotient of the integer time value divided by 24 to obtain the first intermediate value Take the remainder of the first middle value divided by 7 as the day of week feature dayOfWeek; round down the quotient of the integer time value divided by 2184 to obtain the second middle value Take the remainder of the second middle value divided by 4 as the quarterly time feature quarter. Specifically:
[0037] hour=f trans (t)mod24
[0038]
[0039] dayOfWeek and quarter do not actually refer to the actual day of the week or quarter, but are a numbering system. Since these numbers can be aligned with real-world values through sequential shifts, they also have potential features.
[0040] Step A03, respectively perform vector conversion on the hour time feature hour, the week time feature dayOfWeek, and the quarter time feature quarter to obtain the hour time feature vector H hour , the time of week feature vector H dayOfWeek , quarterly time feature vector H quarter It is preferred but not limited to use one-hot encoding to convert hourly time features, weekly time features, and quarterly time features into vector representations:
[0041] H hour =one-hot(hour,24)
[0042] H dayOfWeek =one-hot(dayOfWeek,7)
[0043] H quarter =one-hot(quarter,4)
[0044] Step A04, concatenate the hour time feature vector, the week time feature vector, and the quarter time feature vector to obtain the user's time coding vector H t :
[0045] H t =[H hour ;H dayOfWeek ;H quarter ].
[0046] In this embodiment, the user interest model preferably but not limited to adopts the existing multi-layer perceptron structure, including a cascaded input layer, one or more fully connected layers and an output unit. Among them, the input layer is used to convert the user's time coding vector into an input representation; more than one fully connected layer learns the input representation to obtain hidden layer representations respectively, and each fully connected layer serves as a hidden layer; the output unit converts the hidden layer representation output by the last fully connected layer into a confidence score of the user's interest in all project categories at timestamp t. The training process of the user interest model corresponding to each user is: extract the user's project category-timestamp sequence arranged in ascending time order from the user-project interaction record; encode the timestamp in the project category-timestamp sequence to obtain a time coding vector sequence, use the time coding vector sequence as training data, and encode the project category in the project category-timestamp sequence arranged in ascending time order as the true label, construct a binary cross entropy loss function, and use the training data to train the user interest model corresponding to the user until the function value of the binary cross entropy loss function converges (the change is less than the preset change threshold), and after completing the training, obtain the trained user interest model corresponding to the user.
[0047] In this embodiment, the graph structure data may include a user-project interaction graph, in which a node set includes a user node and a project node, and there is an edge between the interacting user node and the project node. The graph convolutional network model is preferably, but not limited to, an existing GCN network model, i.e., a graph convolutional neural network model. The technical solution for obtaining project scores by using a graph convolutional network model disclosed in the Chinese patent with publication number CN116070034A may also be referred to, which will not be described in detail here.
[0048] In a preferred embodiment, in order to more accurately predict the item categories that a user may be interested in at a specific timestamp, and to have a simple and efficient learning effect, refer to Figure 2 As shown, the user interest model combines the time identity auxiliary matrix to extract the user's demand cycle characteristics. In this embodiment, the user interest model adopts a multi-layer perceptron structure, including an input layer, one or more fully connected layers and an output unit;
[0049] The input layer combines the temporal identity auxiliary matrix and the temporal encoding vector of user u Get input representation
[0050]
[0051] Where t represents the timestamp; the time identity auxiliary matrix includes the hour identity auxiliary matrix and the week identity auxiliary matrix ∥ indicates matrix concatenation operation; input indicates is the input feature of the first fully connected layer. and It can be initialized by Gaussian distribution, and updated by back propagation through minimizing the objective function through the user interest loss function during the user interest model training process. More than one fully connected layer learns the input representation to obtain the hidden layer representation. Assuming that the user interest model includes L layers (1 input layer and L-1 fully connected layers), the hidden layer representation of the output of the fully connected layer at the l+1th layer is for:
[0052]
[0053] in, represents the hidden layer representation or input representation of the l-th layer output; σ l+1 represents the activation function of the fully connected layer at the l+1th layer; FC l+1 represents the fully connected layer at the l+1th layer.
[0054] The output unit converts the hidden layer representation output by the last fully connected layer into a confidence score of the user's interest in each item category at timestamp t. The output unit is an activation function layer, preferably but not limited to a Sigmoid function, and outputs the confidence vector of the user's interest in the item category at timestamp t, such as the confidence vector of the user u's interest in the item category at timestamp t
[0055]
[0056] The hidden layer representation representing the Lth layer output of the user interest model. includes the confidence scores of user u’s interest in all item categories at timestamp t.
[0057] In a preferred embodiment, in order to encourage the user interest model to learn the similarities between project categories, it is further possible to accurately predict the project categories that the user may be interested in at a specific timestamp, and to have a simple and efficient learning effect. Figure 2 , the training method of the user interest model corresponding to user u includes:
[0058] Step 01: Based on the user-project interaction records, obtain the project category-timestamp sequence of user u in ascending order of time
[0059]
[0060] Among them, t 1 ,t 2 ,t q They represent the timestamps of the interaction between user u and the item in the user-item interaction record; c 1 、c 2 、c q They represent user u at timestamp t 1 ,t 2 ,t q The items interacted during the interaction belong to the item category, and each item category has more than one item; U represents the user set obtained through the user-item interaction records.
[0061] Step 02, encode the timestamps in the item category-timestamp sequence to obtain a time encoding vector sequence:
[0062] Step 03: Build and initialize the user interest model. Build a network of the user interest model based on the multi-layer perceptron network structure and initialize the parameters of the fully connected layer in the user interest model.
[0063] Step 04, with the goal of minimizing the user interest loss function, the user interest model is trained using the temporal coding vector sequence to obtain a user interest model corresponding to user u. During the training process, the gradient descent method is used to update the fully connected layer parameters in the user interest model and optimize the temporal identity auxiliary matrix.
[0064] In this embodiment, the user interest loss function is:
[0065]
[0066] Where T represents the timestamp set of the time-coded vector sequence; y u,tRepresents the real interest level vector of user u in the project category at timestamp t. The real interest level vector includes the real interest level of user u in all project categories at timestamp t. Specifically, based on the project category-timestamp sequence of user u, the real interaction project category of user u at each timestamp is obtained. The real interest level of the project category that user u actually interacted with at timestamp t is set to 1, and the real interest level of the project category that user u did not actually interact with at timestamp t is set to 0. At this time, the real interest level vector of user u in the project category at timestamp t is a sequence composed of the real interest levels (0 or 1) of all project categories. represents the confidence vector of the user u's interest level in the project category at timestamp t output by the user interest model. The confidence vector of interest level includes the confidence scores of the user u's interest level in all project categories at timestamp t; L BCE (,) represents the binary cross entropy loss function; λ represents the regularization coefficient.
[0067] And the regularization term R of user u at timestamp t u,t for:
[0068]
[0069] i and j both represent the project category index; Respectively d is the confidence score of user u’s interest in the i-th item category and the j-th item category at timestamp t; H (c i ,c j ) means to find the item category c i and project category c j The encoded Hamming distance, |C| represents the number of item categories contained in the item category set C.
[0070] In a preferred embodiment, in order to make the coding of project categories ensure that similar project categories have a closer distance, the present invention provides a project category coding method, the method comprising:
[0071] Step a, constructing a project category similarity matrix based on user-project interaction records. Further preferably, it includes:
[0072] Step a01, based on the user-item interaction records, obtain the category similarity between any two item categories, item category c i and project category c j The category similarity between is:
[0073]
[0074] in, Represents the user-item interaction record with item category c i The set of users that have interacted; Represents the user-item interaction record with item category c j The set of users that have interacted; Indicates that the interaction record is also related to item category c i and project category c j The number of users who have interacted; Indicates the interaction record with item category c i The number of users that have interacted.
[0075] Step a02: The category similarities between all item categories form the item category similarity matrix S∈R |C|×|C| , the size of the item category similarity matrix is |C|×|C|. |C| represents the size of the item category set.
[0076] Step b, perform eigenvalue decomposition on the item category similarity matrix to obtain the eigenvector matrix U and the eigenvalue diagonal matrix Σ: S = UΣU T . Among them, U∈R |C|×|C| ;Σ∈R |C|×|C| .
[0077] Step c: Select the first K2 largest eigenvalues from the eigenvalue diagonal matrix Σ and the eigenvectors corresponding to the eigenvector matrix U to form a pseudo matrix U k ∈R |C|×K2 , each item category in the pseudo matrix includes K2-dimensional elements, K2 is a positive integer. That is, K2 eigenvalues are selected from the eigenvalue diagonal matrix Σ in descending order, and the K2 eigenvectors corresponding to these K2 eigenvalues are extracted from the eigenvector matrix U to form the pseudo matrix U k .
[0078] Step d: for the pseudo matrix U k Normalization is performed, and each element of the normalized pseudo-matrix is mapped to the range of {0, 1} using a sign function. After the mapping is completed, each item category is encoded into a K2-dimensional binary code, with each dimension being 0 or 1.
[0079] Normalized pseudo matrix The element at position (i,j) in the row and column for:
[0080]
[0081] The sign function sign(.) maps each element of the normalized pseudo-matrix to the range of {0, 1} in the following way: Mapping to H c,ij :
[0082]
[0083] In this embodiment, through steps b to d, the item categories are mapped to the vertices of a hypercube with K2 dimensions.
[0084] In a preferred embodiment, referring to Figure 3 As shown, in the user-item interaction graph of the recommendation system, the information carried by the nodes is their IDs, and there is no semantic information except the identification function. In order to enable the graph convolution process to capture features from distant nodes, preferably, in step B1, the graph structure data is generated according to the user-item interaction records, including:
[0085] Step B11, extracting user set U, item set I and user-item interaction graph based on user-item interaction records, wherein the nodes of the user-item interaction graph include user nodes and item nodes, and edges are connected between interacting user nodes and item nodes.
[0086] Step B12, obtain the adjacency matrix A∈R of the user-item interaction graph (|U|+|I|)×(|U|+|I|) , and standardize the adjacency matrix to obtain the standard adjacency matrix |U| represents the number of users included in the user set U. |I| represents the number of items included in the item set I.
[0087]
[0088] Where D represents the degree matrix of the adjacency matrix A, Represents the inverse matrix of the arithmetic square root of the degree matrix D. The above standardized formula can avoid the numerical scaling problem in the graph convolution process.
[0089] Step B13, calculating the user similarity between any two users and the project similarity between any two projects based on the standard adjacency matrix.
[0090] The user similarity between user u and user v is calculated as follows:
[0091]
[0092] The item similarity between items m and n is calculated as follows:
[0093]
[0094] in, Represents the standard adjacency matrix The row vector of the row where user u is located; Represents the standard adjacency matrix The row vector of the row where user v is located; Represents the standard adjacency matrix The column vector of the column where item m is located; Represents the standard adjacency matrix The column vector of the column where item n is located; ∥·∥ means to find the L2 norm of the orientation vector.
[0095] Step B14, select the top-K3 most similar pairs of nodes from all user similarities and all project similarities, add similarity edges between each pair of nodes in the top-K3 pairs of nodes, and generate a user similarity graph and a project similarity graph. Specifically, K3 is a positive integer, and the user similarity of all user node pairs in the user set is calculated, and the project similarity of all project node pairs in the project set is calculated. K3 pairs of nodes are selected from all user similarities and all project similarities according to the similarity value from large to small. K3 pairs of nodes may include both user node pairs and project node pairs. After adding similarity edges to the user node pairs in the K3 pairs of nodes, a user similarity graph is formed, and after adding similarity edges to the project node pairs in the K3 pairs of nodes, a project similarity graph is formed. Refer to Figure 3 shown.
[0096] Step B15, as Figure 3 As shown, the user-item interaction graph, the user similarity graph and the item similarity graph constitute the graph structure data.
[0097] In this implementation, in order to enable the graph convolution process to capture features from distant nodes, similar edges between similar users and similar items are designed and added. Figure 3 , we obtain user similarity graphs and item similarity graphs, which can help graph convolutional networks extract feature information from similar nodes faster and more accurately.
[0098] In a preferred embodiment, in step B2, the graph structure data is input into a pre-trained graph convolutional network model to obtain the user's basic predicted score for each item, including:
[0099] Step B21, use standard normal distribution to initialize the embedding vectors of each user and each item in the graph structure data:
[0100] The embedding vector of user u is initialized as:
[0101] The embedding vector of item m is initialized as:
[0102] Step B22, input the graph structure data of the initialized user embedding vector and the item embedding vector into the graph convolutional network model, and the graph convolutional network model obtains the feature representation of the user and the item respectively; wherein the feature representation of user u is e u for:
[0103] The feature representation e of item m m for:
[0104] Step B23, based on the distance relationship between the feature representation vectors of the user and the item, calculate the basic prediction score of the user for each item, where the basic prediction score of user u for item m is for:
[0105] in, Represents the embedded representation of user u output by the kth layer of the graph convolutional network model, when k is greater than 0:
[0106]
[0107] The embedding representation of item m that is the output of the kth layer of the graph convolutional network model:
[0108]
[0109] Among them, K represents the maximum value of the graph convolutional network model layer index; U represents the user set; I represents the item set; α k Represents the weight coefficient of the kth layer of the graph convolutional network model; N u Represents the set of neighbor nodes of user u in the graph structure data; N m Represents the set of neighbor nodes of item m in the graph structure data; S u The set of similar user nodes (i.e., connected neighbor user nodes) of user u in the user similarity graph representing the graph structure data; S v The set of similar user nodes (i.e., connected neighbor user nodes) of user v in the user similarity graph representing the graph structure data; S m The set of similar project nodes (i.e., connected neighboring project nodes) of project m in the project similarity graph representing the graph structure data; S n A set of similar item nodes (i.e., connected neighbor item nodes) of item n in an item similarity graph representing graph structured data.
[0110] In this embodiment, the training process of the graph convolutional network model may include: obtaining user-project interaction records corresponding to different historical timestamps, generating multiple graph structure data according to the above-mentioned graph structure data generation method and using them as training sets; using user-project interaction records corresponding to different historical timestamps as real label data; constructing the network structure of the above-mentioned graph convolutional network model and initializing network parameters; and using the training set and real label data to perform supervised training on the initialized graph convolutional network model.
[0111] In this implementation, similar users and similar projects are analyzed, similar edges between nodes are added according to the similarity, and the graph convolution process is explicitly guided to extract the potential feature representation of users and projects more quickly. This structural design can avoid the situation where a few convolutions cannot obtain high-order information of the graph structure and multiple convolutions will extract too messy feature information, and to a certain extent can reduce the long-tail distribution problem of unpopular projects in the recommendation system that cannot be paid attention to. The simplified network structure and calculation method can maintain high computing performance even under large-scale data volumes.
[0112] In a preferred embodiment, in step C, user u's adjusted predicted score for item m is for:
[0113]
[0114] in, represents the basic prediction score of user u for item m; γ represents the enhancement adjustment factor, γ≥1; β represents the suppression adjustment factor, β∈[0,1]; It represents the confidence score of user u’s interest in the i-th item category to which item m belongs at timestamp t.
[0115] In this embodiment, due to the correlation between periodic functions and trigonometric functions and the common sense laws of social operations, in the adjustment method provided in this embodiment, it is assumed that user interest follows a triangular change pattern, in which the peak value of the function corresponds to an interest confidence score of 1 for the project category, and the lowest value corresponds to a score of 0. Specifically, when the confidence score of the user u's interest in the project category to which the project belongs is close to 1, it indicates that the user u currently has a high interest in the projects of this category. Therefore, the basic prediction score is enhanced by multiplying it by an enhancement adjustment factor γ greater than 1. On the contrary, when the confidence score of the user u's interest in the project category to which the project belongs is close to 0, it indicates that the user u currently has a low interest in the projects of this category. In this case, the basic prediction score is suppressed by multiplying it by a suppression adjustment factor β less than 1. By introducing the minimum and maximum adjustment factors β and γ, the magnitude of the score adjustment can be flexibly controlled to avoid excessive penalties or rewards.
[0116] The present invention also discloses a graph convolution recommendation device that considers the user-project demand relationship, which is used to implement the above-mentioned graph convolution recommendation method that considers the user-project demand relationship. In a preferred embodiment, the device includes:
[0117] A time coding module encodes the predicted timestamp of the user to obtain the time coding vector of the user, wherein the time coding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector;
[0118] The user interest model module inputs the user's time encoding vector into the pre-trained user interest model corresponding to the user to obtain the confidence score of the user's interest level in each item category at the predicted timestamp;
[0119] A graph structure data generation module, which generates graph structure data based on user-project interaction records;
[0120] The basic prediction score acquisition module inputs the graph structure data into the pre-trained graph convolutional network model to obtain the user's basic prediction score for each project;
[0121] The score adjustment module adjusts the user's basic prediction score for the project by using the user's confidence score of the project category to which each project belongs at the prediction timestamp, and obtains the user's adjusted prediction score for each project;
[0122] The recommendation module sorts the user's adjusted predicted scores of the items from high to low, and recommends the first K1 items in the sorted sequence to the user, where K1 is a positive integer.
[0123] In this embodiment, the time coding module, the user interest model module, the graph structure data generation module, the basic prediction score acquisition module, the score adjustment module, and the recommendation module correspond one by one to step A1, step A2, step B1, step B2, step C, and step D, respectively, and will not be repeated here.
[0124] The present invention considers the change of the demand relationship of users for projects over time and designs a user interest model. A method for encoding and converting timestamp data is designed and trained to reduce the messy multi-dimensional timestamp data to obtain feature encoding with a periodic relationship. A K2-dimensional cube mapping method for encoding and converting project categories is designed and trained to ensure that similar project categories are closer, thereby ensuring that similar project categories have a closer distance. Based on the user's historical interaction records, the interaction time and project category are feature encoded, and combined with the time identity matrix and the MLP model in the user interest model, the user's demand cycle for the project can be adaptively captured, thereby realizing the prediction of the project category that the user may be interested in at a specific time.
[0125] The present invention designs a graph structure convolutional network, and by analyzing similar users and similar projects, adding similar edges between nodes according to similar weights, explicitly guiding the graph convolution process, and extracting the potential feature representation of users and projects faster. Through such a structural design, it is possible to avoid the situation where a few convolutions cannot obtain high-order information of the graph structure and multiple convolutions will extract too messy feature information, and to a certain extent, it can reduce the long-tail distribution problem of unpopular projects in the recommendation system that cannot be paid attention to. The simplified network structure and calculation method can maintain high computing performance under large-scale data volumes.
[0126] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", "an implementation", "a preferred implementation" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0127] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A graph convolution recommendation method considering the relationship between user-item requirements, It is characterized in that include: Encoding the predicted timestamp of the user to obtain a time coding vector of the user, wherein the time coding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector; Input the user's time encoding vector into the pre-trained user interest model corresponding to the user to obtain the confidence score of the user's interest level in each item category at the predicted timestamp; Generate graph structure data based on user-project interaction records; Input the graph structure data into the pre-trained graph convolutional network model to obtain the user's basic prediction score for each item; The user's basic prediction score for the project is adjusted using the user's confidence score of the project category to which each project belongs at the prediction timestamp to obtain the user's adjusted prediction score for each project; Sort the user's adjusted predicted scores of the items from high to low, and recommend the first K1 items in the sorted sequence to the user, where K1 is a positive integer.
2. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 1, It is characterized in that The step of encoding the predicted timestamp of the user to obtain the time coding vector of the user includes: Rounding down the quotient of the predicted timestamp of the user divided by the first conversion coefficient to obtain an integer time value; Take the remainder of the integer time value divided by 24 as the hour time feature; The quotient of the integer time value divided by 24 is rounded down to obtain the first intermediate value, and the remainder of the first intermediate value divided by 7 is taken as the day of the week time feature; The quotient of the integer time value divided by 2184 is rounded down to obtain the second middle value, and the remainder of the second middle value divided by 4 is taken as the quarterly time feature; Perform vector conversion on the hourly time feature, the weekly time feature, and the quarterly time feature respectively to obtain the hourly time feature vector, the weekly time feature vector, and the quarterly time feature vector; The user's time coding vector is obtained by concatenating the hourly time feature vector, the weekly time feature vector, and the quarterly time feature vector.
3. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 1, It is characterized in that The user interest model adopts a multi-layer perceptron structure, including an input layer, one or more fully connected layers and an output unit; The input layer combines the temporal identity auxiliary matrix and the temporal encoding vector of user u. Get input representation Where t represents the time stamp; the time identity auxiliary matrix includes the hour identity auxiliary matrix and the week identity auxiliary matrix ∥ indicates matrix concatenation operation; The one or more fully connected layers learn the input representations to obtain hidden layer representations respectively; The output unit converts the hidden layer representation output by the last fully connected layer into a confidence score of the user's interest in each item category at timestamp t.
4. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 3 or 2, It is characterized in that The training method of the user interest model corresponding to user u includes: Based on the user-project interaction records, obtain the project category-timestamp sequence of user u in ascending time order; Encode the timestamps in the item category-timestamp sequence to obtain a time coding vector sequence; Build and initialize user interest model; The user interest model is trained using the time coding vector sequence with the goal of minimizing the user interest loss function to obtain the user interest model corresponding to user u; Among them, the user interest loss function is: Where T represents the timestamp set of the time-coded vector sequence; y u,t represents the real interest level vector of user u in the project category at timestamp t, and the real interest level vector includes the real interest level of user u in all project categories at timestamp t; represents the confidence vector of the user u's interest level in the project category at timestamp t output by the user interest model. The confidence vector of interest level includes the confidence scores of the user u's interest level in all project categories at timestamp t; L BCE (,) represents the binary cross entropy loss function; λ represents the regularization coefficient; The regularization term R of user u at timestamp t u,t for: i and j both represent the project category index; Respectively The confidence score of user u's interest in the i-th item category and the j-th item category at timestamp t; d H (c i ,c j ) means to find the item category c i and project category c j The encoded Hamming distance, |C| represents the number of item categories contained in the item category set C.
5. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 4, It is characterized in that Methods for obtaining project category codes include: Constructing item category similarity matrix based on user-item interaction records; Perform eigenvalue decomposition on the item category similarity matrix to obtain the eigenvector matrix and eigenvalue diagonal matrix; Select the eigenvectors in the eigenvector matrix corresponding to the first K2 largest eigenvalues from the eigenvalue diagonal matrix to form a pseudo-matrix, wherein each item category in the pseudo-matrix includes K2-dimensional elements, and K2 is a positive integer; The pseudo-matrix is normalized, and each element of the normalized pseudo-matrix is mapped to the range of {0, 1} using a sign function. After the mapping is completed, each item category is encoded into a K2-dimensional binary code.
6. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 5, It is characterized in that The constructing of the project category similarity matrix based on the user-project interaction records includes: Based on the user-item interaction records, the category similarity between any two item categories is obtained, and the item category c i and project category c j The category similarity between is: in, Represents the user-item interaction record with item category c i The set of users that have interacted; Represents the user-item interaction record with item category c j The set of users that have interacted; The category similarities between all item categories constitute the item category similarity matrix, and the size of the item category similarity matrix is |C|×|C|.
7. The graph convolution recommendation method considering the user-item demand relationship as described in claim 1, 2, 3, 5 or 6, It is characterized in that The generating of graph structure data according to the user-project interaction record includes: Extracting user sets, item sets and user-item interaction graphs based on user-item interaction records, wherein the nodes of the user-item interaction graphs include user nodes and item nodes; Obtain the adjacency matrix of the user-item interaction graph, and standardize the adjacency matrix to obtain a standard adjacency matrix; Calculate the user similarity between any two users based on the standard adjacency matrix, and calculate the project similarity between any two projects; Select the top-K3 most similar pairs of nodes from all user similarities and all project similarities, add similarity edges between each pair of nodes in the top-K3 pairs of nodes, and generate user similarity graphs and project similarity graphs; The user-item interaction graph, user similarity graph, and item similarity graph constitute graph structure data.
8. The graph convolution recommendation method considering the user-item demand relationship as claimed in claim 7, It is characterized in that The graph structure data is input into the pre-trained graph convolutional network model to obtain the user's basic prediction score for each project, including: The graph convolutional network model obtains feature representations of users and items respectively; Among them, the feature representation of user u is e u for: The feature representation e of item m m for: Calculate the user's basic prediction score for each item, where user u's basic prediction score for item m for: in, Represents the embedded representation of user u output by the kth layer of the graph convolutional network model, when k is greater than 0: The embedding representation of item m that represents the output of the kth layer of the graph convolutional network model: Among them, K represents the maximum value of the graph convolutional network model layer index; U represents the user set; I represents the item set; α k Represents the weight coefficient of the kth layer of the graph convolutional network model; N u Represents the set of neighbor nodes of user u in the graph structure data; N m Represents the set of neighbor nodes of item m in the graph structure data; S u The set of similar user nodes of user u in the user similarity graph representing the graph structure data; S v The set of similar user nodes of user v in the user similarity graph representing graph structure data; S m The similar project node set of project m in the project similarity graph representing the graph structure data; S n A set of similar project nodes of project n in a project similarity graph representing graph structured data.
9. The graph convolution recommendation method considering the user-item demand relationship according to any one of claims 1, 2, 3, 5, 6, or 8, It is characterized in that Adjusted predicted rating of user u for item m for: in, represents the basic prediction score of user u for item m; γ represents the enhancement adjustment factor, γ≥1; β represents the suppression adjustment factor, β∈[0,1]; It represents the confidence score of user u’s interest in the i-th item category to which item m belongs at timestamp t.
10. A graph convolution recommendation device considering user-item demand relationship, used to implement the graph convolution recommendation method considering user-item demand relationship according to any one of claims 1-9, It is characterized in that include: A time coding module encodes the predicted timestamp of the user to obtain the time coding vector of the user, wherein the time coding vector includes an hourly time feature vector, a weekly time feature vector, and a quarterly time feature vector; The user interest model module inputs the user's time encoding vector into the pre-trained user interest model corresponding to the user to obtain the confidence score of the user's interest level in each item category at the predicted timestamp; A graph structure data generation module, which generates graph structure data based on user-project interaction records; The basic prediction score acquisition module inputs the graph structure data into the pre-trained graph convolutional network model to obtain the user's basic prediction score for each project; The score adjustment module adjusts the user's basic prediction score for the project by using the user's confidence score of the project category to which each project belongs at the prediction timestamp, and obtains the user's adjusted prediction score for each project; The recommendation module sorts the user's adjusted predicted scores of the items from high to low, and recommends the first K1 items in the sorted sequence to the user, where K1 is a positive integer.
Citation Information
Patent Citations
Information recommendation method and system based on knowledge graph and graph convolutional network
CN112765490A
Recommendation method of spatial adaptive graph convolutional network
CN113590976A
Graph convolutional network recommendation method combining adaptive period and interest quantity factor
CN116070034A
Multi-interest sequence recommendation method, system and equipment
CN116776004A
Recommendation method, device and system based on self-adaptive user interest change period
CN117132356A
