Dynamic graph recommendation method fusing heterogeneous path embedding and time decay
By integrating heterogeneous path embedding and time decay, the dynamic graph recommendation method solves the problem of dynamically changing data processing, achieves real-time updates and the stability of the recommendation system, and improves the accuracy and diversity of recommendations.
Patent Information
- Application Number
- CN202410667615.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-23
AI Technical Summary
Existing technologies cannot effectively handle dynamically changing user interaction data, resulting in recommendation systems having challenges in maintaining efficient recommendation quality.
A dynamic graph recommendation method that combines heterogeneous path embedding and time decay is used to construct a dynamic multi-path heterogeneous graph, evaluate path importance, update node representation, optimize the information dissemination process, and achieve real-time recommendation.
It realizes real-time updating of dynamic interaction graphs, improves the diversity and accuracy of recommendations, ensures the stability and accuracy of the recommendation system when the user interaction graph changes, and provides a more advanced real-time recommendation solution.
Smart Images

Figure CN118536581A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation systems, and in particular to a dynamic graph recommendation method integrating heterogeneous path embedding and time decay. Background Art
[0002] In today's era of information explosion, recommendation systems have become an indispensable part of Internet services. They provide personalized content recommendations by analyzing users' historical behaviors and preferences. With the rapid development of social media, e-commerce, and online entertainment, user interaction data show obvious dynamic and diverse characteristics. These data not only contain the interaction between users and content, but also involve complex multiplexing relationships, such as social interactions between users, and users' diverse feedback on different types of content. In addition, in actual recommendation scenarios, the neighborhood structure of nodes may change frequently, which poses a serious challenge to maintaining efficient recommendation quality.
[0003] In order to more effectively process these dynamically changing data and provide real-time recommendations, traditional static recommendation algorithms can no longer meet the requirements. Therefore, the present invention explores the application of dynamic graph neural networks in recommendation systems. Dynamic graph neural networks are a neural network architecture that can capture the evolution of graph structures over time. It can update the representation of nodes and edges in real time to adapt to the rapid changes in user behavior. Summary of the invention
[0004] The present invention provides a dynamic graph recommendation method integrating heterogeneous path embedding and time decay to solve the problem that the static recommendation algorithm in the prior art cannot meet the dynamically changing recommendation scenarios.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The dynamic graph recommendation method integrating heterogeneous path embedding and time decay includes the following steps:
[0007] Step 1: construct a dynamic multi-path heterogeneous graph, in which users and items are used as nodes, the interaction behaviors between users and items are used as edges, and each edge is assigned a timestamp indicating the time when the interaction behavior occurs;
[0008] Step 2: When a new edge is generated in the dynamic multi-path heterogeneous graph, the importance of each path in the dynamic multi-path heterogeneous graph is evaluated by the path importance measurement function, and the dynamic multi-path heterogeneous graph is updated by sampling the importance path influence strategy combined with the time decay factor;
[0009] Step 3: Construct a dynamic relationship enhancement representation updater. The dynamic relationship enhancement representation updater obtains the feature representation of each user node and item node based on the long-term and short-term behavior patterns of each user node and item node in the dynamic multi-path heterogeneous graph updated in step 2 and incorporates the specific context information of the node relationship.
[0010] Step 4: construct a dynamic time series information diffuser, which optimizes the information propagation process in the dynamic multi-path heterogeneous graph by considering the time factor and based on the feature representation of each user node and item node obtained in step 3, and then aggregates information to update the feature representation of each user node and item node;
[0011] Step 5: Based on the feature representations of the user node and item node updated in step 4, predict the score of the next interaction between the user and the item.
[0012] In the further step 2, the importance score of each path is calculated by the path importance measurement function, and the time decay factor is constructed with the timestamp generated by the path, the current timestamp and the time decay rate. After the importance score of each path is adjusted by the time decay factor, multiple paths that meet the requirements and the corresponding nodes and edges are selected according to the adjusted importance score of each path and added to the dynamic multi-path heterogeneous graph, thereby completing the update of the dynamic multi-path heterogeneous graph.
[0013] In the further step 3, the long-term memory and short-term memory of the user node and the item node are first determined; then, according to the active time and corresponding decay rate of the user node and the item node, the short-term memory of the user node and the item node is dynamically adjusted; then, the long-term memory of the user node and the item node and the dynamically adjusted short-term memory are fused to obtain the initial feature representation of the user node and the item node; finally, the node relationship-specific contextual information is integrated into the initial feature representation of the user node and the item node to obtain the final feature representation of the user node and the item node.
[0014] In a further step 5, based on the feature representations of the user nodes and item nodes updated in step 4, a bilinear model is established to calculate the user's preference scores for items, and the bilinear model is trained. The user's preference scores for each item are output through the trained bilinear model as the score of the next interaction between the user and the item.
[0015] Compared with the prior art, the present invention has the following advantages:
[0016] 1. Ability to update dynamic interaction graph in real time to capture the interaction between users and recommended items.
[0017] 2. Use fusion strategies to handle different types of user interaction behaviors and improve the diversity and accuracy of recommendations.
[0018] 3. Introduce an adaptive neighborhood disturbance processing mechanism to ensure the stability and accuracy of the recommendation system when the user interaction graph changes.
[0019] 4. Use efficient online learning algorithms to achieve real-time recommendations based on the user's real-time representation and item characteristics.
[0020] 5. Special emphasis is placed on the importance of adaptive processing of neighborhood perturbations and real-time representation learning, providing a more advanced and practical real-time recommendation solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is the dynamic multi-path heterogeneous interaction graph of the present invention.
[0022] Figure 2 It is the path sampling based on node importance of the present invention.
[0023] Figure 3 It is a schematic diagram of the process of the present invention.
[0024] Figure 4 It is the memory representation updater of the user-item node of the present invention. DETAILED DESCRIPTION
[0025] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0026] like Figure 3 As shown, this embodiment discloses a dynamic graph recommendation method integrating heterogeneous path embedding and time decay, comprising the following steps:
[0027] Step 1: Construct a dynamic multi-path heterogeneous graph such as Figure 1 As shown, the dynamic multi-path heterogeneous graph uses users and items as nodes, the interaction between users and items as edges, and each edge is assigned a timestamp indicating the time when the interaction occurred.
[0028] Let U be the set of user nodes in a dynamic multi-path heterogeneous graph, denoted as U = {u1,u2,…,u i ,…,u L}, where u i represents the i-th user node, and L is the total number of user nodes.
[0029] Let V be the set of item nodes in a dynamic multi-path heterogeneous graph, denoted by V = {v1,v2,…,v j ,…,v M}, where v j represents the jth item node, and M is the total number of item nodes.
[0030] Let E be the edge set in the dynamic multi-path heterogeneous graph, representing the interaction between users and items, denoted by E = {e1, e2, …, e k ,…,e N}, where e k represents the kth type of interactive behavior, and N is the total number of all different types of interactive behaviors, such as clicks, purchases, favorites, and shares.
[0031] Let Q be the set of node types in the dynamic multi-way heterogeneous graph, which is used to distinguish user nodes from item nodes, as well as other possible node types.
[0032] Step 2: When a new edge is generated in the dynamic multi-path heterogeneous graph, the importance of each path in the dynamic multi-path heterogeneous graph is evaluated by the path importance measurement function, and the dynamic multi-path heterogeneous graph is updated by sampling the importance path influence strategy combined with the time decay factor. The specific process is as follows:
[0033] Step 2.1: When a new edge is generated in the dynamic multi-path heterogeneous graph, for example, e = {u, v, purchase, t}, which means that user u purchased item v at time t, a path sampling strategy is first designed to sample the paths in the affected dynamic multi-path heterogeneous graph.
[0034] Specific as Figure 2 As shown in the figure, a path importance metric function S(P) is designed to evaluate the importance score of each path P in the dynamic multi-path heterogeneous graph. First, the degree importance function of user nodes and item nodes is defined. For the degree importance function D of user node u, u (u), can be defined as:
[0035] D u (u)=∑ v∈V w uv (1)
[0036] In formula (1), V is the set of item nodes, w uv is the edge weight between user u and item v.
[0037] For the item node v, the degree importance function D v (v), can be defined as:
[0038] D v (v)=∑ u∈U w uv (2)
[0039] In formula (2), U is the set of item nodes, w uv is the edge weight between user u and item v.
[0040] Next, define a comprehensive path importance scoring function that considers the degree importance of both user nodes and item nodes, as well as adjustments for edge weights and path lengths:
[0041]
[0042] In formula (3), U p and V p are the sets of user nodes and item nodes involved in path P, L(P) is the length of path P, α and β are the weight coefficients of the importance of user nodes and item nodes, and γ is the penalty coefficient of path length. In order to ensure that the scores of different paths are comparable, the scores of all paths need to be normalized:
[0043]
[0044] In formula (4), S′(P) is the normalized path importance score, and max(S(P)) is the maximum value of S(P) of all paths P. Finally, the sampling probability of each path is determined according to the normalized path importance score:
[0045]
[0046] In formula (5), P sample (P) is the sampling probability of path P, P is the set of all possible paths, S′(P) is the normalized path importance score, and S′(P′) is the normalized path importance score obtained by sampling within path P.
[0047] After sampling based on the above sampling strategy, each path in the dynamic multi-path heterogeneous graph is obtained according to the predefined multi-path element path pattern set P = {p1, p2, ..., p s}, starting from the interacting user node u and item node v, the sampled path sets are expressed as in will denote the set of k-th sampled paths starting from node u, represents the kth sampled path set starting from node v, and the sampled path set P u and P v Merge into P, P=P u ∪P v .
[0048] Step 2.2, construct a time decay factor using the timestamp generated by the path, the current timestamp and the time decay rate. After adjusting the importance score of each path by the time decay factor, select multiple paths that meet the requirements and the corresponding nodes and edges according to the adjusted importance score of each path and add them to the dynamic multi-path heterogeneous graph, thereby completing the update of the dynamic multi-path heterogeneous graph.
[0049] Specifically, according to the normalized path importance score S′(P) in step 2.1, a certain number of the most important paths are selected to update the dynamic multi-path heterogeneous graph, and the sampling selection function SelectTop k (P, S′(P)), P is the set of all possible paths, S′(P) is the normalized path importance score. Select the top k paths based on the normalized path importance score S′(P). Add the selected paths and their corresponding nodes and edges to the initial dynamic multi-path heterogeneous graph G. s In the dynamic multi-path heterogeneous graph, the influence of time factors on the importance of paths needs to be considered, so the time attenuation factor δ(t) is introduced as shown in formula (7):
[0050]
[0051] In formula (7), t is the current timestamp, t0 is the timestamp of the path generation, and α is the time decay rate. The time decay factor δ(t) is introduced to adjust the importance score S′(P) of the path. Finally, the time decay factor δ(t) is applied to the path importance score and the dynamic multi-path heterogeneous graph G is updated. s , the update operation can be expressed as shown in formula (8):
[0052] G s =G s ∪{P|P∈SelectTop k (P,S′(P))·δ(t)} (8)
[0053] Step 3: Construct a dynamic relationship enhancement representation updater such as Figure 4 As shown in the figure, the dynamic relationship enhancement representation updater is based on the long-term and short-term behavior patterns of each user node and item node in the dynamic multi-path heterogeneous graph updated in step 2, and incorporates the specific context information of the node relationship to obtain the feature representation of each user node and item node. The specific process is as follows:
[0054] Step 3.1: First, determine the long-term memory and short-term memory of the user node and item node respectively.
[0055] For any user node u and item node v in a dynamic multi-path heterogeneous graph, a pre-trained model is introduced to initialize the user and item node memory, and the graph structure information learned during the pre-training process is used to improve the quality of the initial representation and initialize the long-term memory of the user node u. and short-term memory Long-term memory of item node v and short-term memory
[0056] Step 3.2, then dynamically adjust the short-term memory of the user node and item node according to the active time and corresponding decay rate of the user node and item node.
[0057] Specifically, set the active time intervals ΔT(u) and ΔT(v) corresponding to the user node u and the item node v, respectively, and set the specific decay rate λ corresponding to the active time interval and the user node and item node type u and λ v , dynamically adjust the corresponding short-term memory, as shown in formulas (9) and (10):
[0058]
[0059] In formulas (9) and (10), is the initialized user node short-term memory, is the short-term memory of the user node after adjustment, It is the adjusted short-term memory of the item node.
[0060] Step 3.3: Then, the long-term memory of the user node and the item node and the dynamically adjusted short-term memory are fused to obtain the initial feature representation of the user node and the item node.
[0061] Specifically, for the newly added edge (u, v, r, t), where u and v represent the interacting user node and item node, r represents the edge type, and t is the interaction timestamp. The long-term memory and short-term memory adjusted in step 3.2 are merged to update the target embedding and As shown in formulas (11), (12), and (13):
[0062]
[0063] ω i (t) = exp(-β(tt′ i ) γ ), i∈{u,v} (13)
[0064] In formula (11), the target embedding of user node u after the new edge occurs is calculated The adjustment item uses a dynamic weight coefficient ω u (t) and the activation function g(·) (defined as g(x) = log(e+x)), as well as the sigmoid activation function σ(·) and the node-specific parameter α ψ(u) The product of the active time interval ΔV(u). In formula (12), the target embedding of the item node v after the new edge occurs is calculated. The memory update of user nodes and item nodes takes into account the time interval and introduces the time decay effect, while maintaining the specificity of the node type, and the same operation can be performed on different types of nodes. In formula (13), the dynamic weight coefficient ω is defined i (t) is used to measure the influence of the time interval between the current time t of the node (u or v) and the time t′ of the most recent interaction. The parameters β and γ control the decay rate and decay power. As the time interval increases, ω i (t) decreases exponentially, which means that the influence of earlier interactions on the current node state gradually weakens.
[0065] Step 3.4: Finally, the node relationship-specific contextual information is integrated into the initial feature representations of the user node and the item node to obtain the final feature representations of the user node and the item node.
[0066] Specifically, consider the calculation of a specific context embedding. For edge e of type r, calculate the context embedding and After fusion, the final feature representation of user and item nodes u and v is obtained, as shown in formulas (14), (15), (16), and (17):
[0067]
[0068] In formulas (14), (15), (16), and (17), w r is the learnable weight matrix associated with edge type r. ReLU(·) is a nonlinear activation function, b r Represents the bias term associated with edge type r.
[0069] Step 4: Construct a dynamic time series information diffuser, which optimizes the information propagation process in the dynamic multi-path heterogeneous graph by considering the time factor and based on the feature representation of each user node and item node obtained in step 3, and then aggregates information to update the feature representation of each user node and item node to reduce the fluctuation of recommendation results caused by frequent changes in node neighbors in the real-time recommendation system. The specific process is as follows:
[0070] Step 4.1, initialize the time-aware message propagator. According to the dynamic relationship enhancement representation updater in step 3, the feature representation of user node u is composed of long-term memory Short-term memory The feature representation of node v is composed of long-term memory Short-term memory These memory vectors will serve as the initial feature representation of the time-aware message propagator.
[0071] Step 4.2, design a time-aware message function. This function not only considers the feature representation of the node, but also the time factor. According to the updated target embedding calculated in step 3.3, the message function can be defined as shown in formula (18):
[0072]
[0073] In formula (18), w r and b r is the learnable weight matrix and bias term associated with edge type r, η is the message function, and are the feature representations of user node u and item node v obtained in step 3 at time t, and σ(·) is the ReLU activation function.
[0074] Step 4.3: Design a time-aware aggregation function. Through an adaptive weight adjustment mechanism, the weights in the time-aware aggregation function can be dynamically adjusted according to the interaction frequency and time proximity between nodes, as shown in formulas (19) and (20):
[0075]
[0076] α u (t)=∑ v∈N(u) w uv (t)·m v→u (t) (20)
[0077] In formula (19) and (20), t uv is the last interaction time between the user node u and the item node v, t uv′ is the last interaction time between the user node u and the item node v′, γ is the decay rate, sim(u,v) is the similarity function between the user node u and the item node v, and the time-aware aggregation function is optimized using the adaptive weight adjustment mechanism to better reflect the changes of neighbor nodes over time. v′ is the sampled neighbor node of user u, N(u) is the neighbor node of user u, sim(u,v′) calculates the similarity between u and v′, w uv (t) is the weight in the time-aware aggregation function.
[0078] Step 4.4: Use the aggregated messages to update the feature representations of the user node u and the item node v, as shown in formula (21):
[0079]
[0080] In formula (21), φ(·) is the fusion operation, which can be concatenation, weighted summation or more complex fusion strategies. The gated recurrent unit GRU is used to update the short-term memory, MLP(·) is the multi-layer perceptron function, α decay is the decay factor, controlling the update rate of long-term memory, is the long-term memory of user node u, is the short-term memory of user node u. In formula (22), is the long-term memory of item node v, is the short-term memory of item node v.
[0081] Step 5: Update the feature representation of the user node according to step 4 Feature representation of item nodes Predict the score of the next interaction between the user and the item. The specific process is as follows:
[0082] Step 5.1: Based on the feature representations of the user node and item node updated in step 4, a bilinear model is established to calculate the user's preference score for the item.
[0083] Assume that the feature vectors of user node u and item node v are x u and x v , the preference score is calculated using the bilinear model as shown in formula (22):
[0084]
[0085] In formula (22), W is the weight matrix of the bilinear mapping.
[0086] Step 5.2: Train the bilinear model and output the user's preference score for each item through the trained bilinear model as the score of the user's interaction with the item in the next moment.
[0087] Specifically, the bilinear model shown in formula (22) is trained by online learning. Whenever user node u generates feedback to the recommended item node v, the feedback is used as the target label y uv (For example, click is marked as 1, and no click is marked as 0). Design loss function As shown in formula (23):
[0088]
[0089] In formula (23), D represents the training dataset containing user-item pairs and their feedback, σ(·) is the sigmoid activation function, θ is the set of bilinear model parameters, λ is the regularization parameter, and the model parameters are updated by the gradient descent algorithm to minimize the loss function This completes the training of the bilinear model.
[0090] Finally, the trained bilinear model is used to predict the score of the user's interaction with all items in the next moment, which is used as the user's preference score for all candidate items. The items are sorted in descending order according to the preference scores, and the top-K items are recommended to the user.
[0091] The preferred embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. The embodiments described in the present invention are merely descriptions of the preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. The various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction, and such combinations should also be regarded as the contents disclosed in the present disclosure as long as they do not violate the concept of the present invention. In order to avoid unnecessary repetition, the present invention will not further describe various possible combinations.
[0092] The present invention is not limited to the specific details of the above-mentioned embodiments. Within the technical concept of the present invention and without departing from the design concept of the present invention, various modifications and improvements made to the technical solution of the present invention by technical personnel in this field should fall within the protection scope of the present invention. The technical contents for which protection is sought in the present invention have been fully recorded in the claims.
Claims
1. A dynamic graph recommendation method integrating heterogeneous path embedding and time decay. It is characterized in that The following steps are involved: Step 1: construct a dynamic multi-path heterogeneous graph, in which users and items are used as nodes, the interaction behaviors between users and items are used as edges, and each edge is assigned a timestamp indicating the time when the interaction behavior occurs; Step 2: When a new edge is generated in the dynamic multi-path heterogeneous graph, the importance of each path in the dynamic multi-path heterogeneous graph is evaluated by the path importance measurement function, and the dynamic multi-path heterogeneous graph is updated by sampling the importance path influence strategy combined with the time decay factor; Step 3: Construct a dynamic relationship enhancement representation updater. The dynamic relationship enhancement representation updater obtains the feature representation of each user node and item node based on the long-term and short-term behavior patterns of each user node and item node in the dynamic multi-path heterogeneous graph updated in step 2 and incorporates the specific context information of the node relationship. Step 4: construct a dynamic time series information diffuser, which optimizes the information propagation process in the dynamic multi-path heterogeneous graph by considering the time factor and based on the feature representation of each user node and item node obtained in step 3, and then aggregates information to update the feature representation of each user node and item node; Step 5: Based on the feature representations of the user node and item node updated in step 4, predict the score of the next interaction between the user and the item.
2. According to claim 1, the dynamic graph recommendation method integrating heterogeneous path embedding and time decay, It is characterized in that In step 2, the importance score of each path is calculated by the path importance measurement function, and the time decay factor is constructed with the timestamp generated by the path, the current timestamp and the time decay rate. After adjusting the importance score of each path by the time decay factor, multiple paths that meet the requirements and the corresponding nodes and edges are selected according to the adjusted importance score of each path and added to the dynamic multi-path heterogeneous graph, thereby completing the update of the dynamic multi-path heterogeneous graph.
3. According to claim 1, the dynamic graph recommendation method integrating heterogeneous path embedding and time decay, It is characterized in that In step 3, first determine the long-term memory and short-term memory of the user node and item node respectively; then dynamically adjust the short-term memory of the user node and item node respectively according to the active time and corresponding decay rate of the user node and item node; then fuse the long-term memory of the user node and item node respectively with the dynamically adjusted short-term memory to obtain the initial feature representation of the user node and item node respectively; finally, integrate the node relationship-specific contextual information into the initial feature representation of the user node and item node respectively to obtain the final feature representation of the user node and item node respectively.
4. According to claim 1, the dynamic graph recommendation method integrating heterogeneous path embedding and time decay, It is characterized in that In step 5, based on the feature representations of the user node and item node updated in step 4, a bilinear model is established to calculate the user's preference score for the item, and the bilinear model is trained. The user's preference score for each item is output through the trained bilinear model as the score of the next interaction between the user and the item.
Citation Information
Cited By
Intelligent marketing system based on expansion of consumption frequency and consumption scale
CN118863975A
