Multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph

By using multi-time-step heterogeneous graph and knowledge graph information enhancement modules in multi-behavior sequence recommendation, the problems of insufficient data resources and incomplete modeling are solved, and higher recommendation accuracy and personalized effects are achieved.

CN119515493AActive Publication Date: 2025-02-25DALIAN MARITIME UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411493436.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-25
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The existing multi-behavior sequence recommendation method has problems such as insufficient data resources and imperfect modeling when dealing with multi-behavior timing information and user interest evolution process, resulting in poor recommendation performance and personalization effects.

Method used

Using a multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph, we use a multi-time-step heterogeneous module, a knowledge graph information enhancement module and a multi-behavior learning module, and combine time information, user information, multi-behavior information and knowledge graph information to generate embedded vectors to improve recommendation accuracy.

Benefits of technology

This method can more accurately capture the complex relationship between users, items and multiple behaviors, improve the accuracy and personalization of the recommendation system, and overcome the problem of insufficient recommendation accuracy caused by information isolation in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515493A_ABST
    Figure CN119515493A_ABST
Patent Text Reader

Abstract

The invention provides a multi-behavior sequence recommendation method based on a multi-time-step heterogeneous graph, and the method comprises the steps: constructing a multi-time-step heterogeneous module, carrying out the modeling of time information, user information, multi-behavior information and article information through employing the multi-time-step heterogeneous graph, and mining the interest of a single user; a knowledge graph information enhancement module is constructed, and the rationality and semantic information in the knowledge graph are utilized to improve the representation of users and articles; constructing a multi-behavior learning module, and integrating user and article representations of various behavior information; an embedded vector is generated through multi-time-step heterogeneous graph information, multi-behavior information and knowledge graph information in combination with users and items obtained from different perspectives. According to the technical scheme, the complex relation among the user, the article and multiple behaviors can be more accurately captured, the problem that in a traditional method, due to information isolation, the recommendation accuracy is insufficient is solved, it is ensured that the system can more comprehensively grasp the interests and behavior modes of the user, and therefore the recommendation accuracy and the personalized level are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data mining, and in particular to a multi-behavior sequence recommendation method based on a multi-time-step heterogeneous graph. Background Art

[0002] In today's era of information explosion, recommendation systems have become an indispensable component for improving user experience and personalized services. These systems aim to predict and recommend items or services that may match users' interests by analyzing their behaviors and interests. As a basic tool, recommendation systems aim to recommend the information that users are most interested in from a large number of products. The recommendation process of recommendation systems usually involves collecting and analyzing users' historical behavior data to understand their preferences and behavior patterns, so as to find items that better match their preferences. These historical behavior data can be divided into two types: single behavior and multiple behaviors. However, single behavior recommendation usually involves less data, which is prone to data sparsity or cold start problems.

[0003] In real-world scenarios, there are usually multiple types of interactions between users and items, such as viewing, adding to cart, and purchasing on e-commerce platforms, i.e., user feedback is heterogeneous, and this needs to be considered when modeling user preferences. In addition to heterogeneity, user behaviors also have a natural order. In order to make full use of sequence information, some recent studies have proposed single-behavior sequence recommendation, which begins to consider the sequence information of a class of implicit feedback from users. However, these methods obviously ignore other implicit feedback that may contain useful information.

[0004] Multi-behavior sequence recommendation is an innovative response to this problem. It can not only consider time series information but also fully consider multiple behavior information, which makes multi-behavior sequence recommendation achieve better results in recommendation performance and personalization. At present, the work on multi-behavior sequence recommendation includes neighborhood-based methods, matrix decomposition-based methods and deep learning-based methods. Neighborhood-based methods (such as ABIS, etc.) ignore users' long-term preferences and are inefficient. Matrix decomposition-based methods (such as TransRec++, etc.) face challenges in processing nonlinear features such as sequence information and high-order neighborhood information. Therefore, everyone is committed to studying methods based on deep learning. Deep learning methods include methods based on RNN, GNN, Transformer, etc. RNN-based methods (such as DIPN, etc.) can store short-term memory, but there are problems of gradient vanishing and gradient explosion. Moreover, RNN is inefficient and difficult to predict future sequence information. The Transformer model is a deep learning architecture that uses a self-attention network to reduce computational complexity and thus increase training speed. In recent years, it has been widely recognized for its excellent performance in sequence-to-sequence modeling. In recent years, there have also been related works based on Transformer, such as FLAG, etc., but the modeling of specific features of user behavior sequences is relatively insufficient. In multi-behavior sequence recommendation, in addition to the temporal relationship of the sequence, the specific attributes of users and items need to be considered to better capture the evolution of users' interests.

[0005] GNN is a feature extraction technology widely used in recent years. Many excellent graph neural network models have emerged. It can make full use of the high-order neighbor information of nodes and perform well in recommendation systems. In MBSR, many GNN-based recommendation works have achieved good recommendation results, such as MGNN-SPred, DMBGN, GPG4HSR, BGNN and BA-GNN. For example, the Global and Personalized Graph for Heterogeneous Sequential Recommendation (GPG4HSR) focuses on two types of behaviors, namely inspection and purchase, and takes a series of (item, behavior) pairs as input to model all sequences and each sequence from a global and local perspective, respectively. They constructed a global graph and a personalized graph, where the global graph is used to capture the relationship between heterogeneous behaviors, and the personalized graph is used to enhance the contextual representation of a single user's multi-behavior sequence to better understand the user's preferences. Summary of the invention

[0006] According to the above-mentioned technical problems such as insufficient data resources and imperfect modeling of multi-behavior time series information, a multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph is provided.

[0007] The technical means adopted by the present invention are as follows:

[0008] A multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph, comprising:

[0009] S1. Construct a multi-time-step heterogeneous module, use a multi-time-step heterogeneous graph to model time information, user information, multi-behavior information and item information, and mine the interests of a single user;

[0010] S2. Build a knowledge graph information enhancement module to improve the representation of users and items by using the rationality and semantic information in the knowledge graph;

[0011] S3, build a multi-behavior learning module to integrate user and item representations of various behavior information;

[0012] S4. Combining users and items obtained from different perspectives, an embedding vector is generated through multi-time-step heterogeneous graph information, multi-behavior information, and knowledge graph information.

[0013] Furthermore, step S1 specifically includes:

[0014] S11. Construct a single user multi-time step heterogeneous graph model:

[0015] Assuming there are T time steps, for each time step t, a single time step heterogeneous graph is constructed as follows:

[0016] Gt=(U t , I t , E t )

[0017] Among them, U t represents the set of user nodes in time step t; I t represents the set of item nodes at time step t; E t represents the edge set at time step t, representing various behaviors between users and items

[0018] Construct a multi-time step heterogeneous graph as follows:

[0019] G=(U,I,E)

[0020] in, Represents the set of user nodes in all time steps; Represents the set of item nodes in all time steps; represents the set of edges in all time steps;

[0021] In multiple single-time-step heterogeneous graphs, user nodes are connected; if there is user u in time steps t1 and t2, then there is an edge (u t1 ,u t2 );

[0022] S12, residual learning updates user representation:

[0023] Update the representation of user node u at time step t The formula is as follows:

[0024]

[0025] in, represents the representation of user node u at time step t+1; represents the original representation of user node u at time step t; represents the representation of the neighbor nodes of user u at time step t; f is a neural network used to learn and update the representation of user nodes;

[0026] To enhance data representation, contrastive learning is performed on this basis. The positive example is the representation of the user himself at adjacent time steps, and the negative sample is the representation of all other users at any time step. The loss function is established as follows:

[0027]

[0028] Where sim(a, b) represents the similarity between a and b; τ represents the parameter that controls the smoothness of the curve; U represents the set of all users; S u,t represents a set of samples randomly selected from the negative sample set of user u at time steps t and t+1;

[0029] The user's multi-behavior information sequence with time steps is put into the multi-behavior heterogeneous model to obtain the information representation with multi-behavior information and time information.

[0030] Further, step S2 specifically includes:

[0031] S21. Define the attention function as follows:

[0032] f att (V i , V r , V e )=exp[σ(w1(v i |||v r ||v e )+b1)]

[0033] Among them, v i Represents item node v i ;v r Represents a relationship node; v e Represents a neighbor node; uses item node v i , relationship node v r and neighbor node v eThe embedding vector is parameterized by linear transformation and activation function to calculate the attention score between each neighbor node and the current item node;

[0034] S22. Normalize the calculated attention scores to obtain the attention weight w between each neighbor node and the current item node. i,r,e ,as follows:

[0035]

[0036] S23, normalize the attention scores using the softmax function to ensure that the sum of all attention weights is 1;

[0037] S24. Update the embedding of item i The current representation of item i The neighbor nodes are added together with the weighted sum, then multiplied by the weight matrix w2, plus the bias term b2, and then a nonlinear transformation is performed to obtain The representation is as follows:

[0038]

[0039] Among them, w2 and b2 represent trainable parameters; represents the representation of item i at the lth iteration;

[0040] S25. Generate knowledge representation using the translation distance model TransR and the semantic matching model TATEC. Initialize and obtain two different graph representations G k1 and G k2 , where the translation distance model TransR and the semantic matching model TATEC are as follows:

[0041]

[0042] S26. Use the TransR-based loss function and the TATEC-based loss function to optimize the node representation of KG, wherein the TransR-based loss function and the TATEC-based loss function are as follows:

[0043]

[0044] S27. In order to reduce the impact of noise information, the consistency of the graph structure is calculated. The calculation formula is as follows:

[0045] c=s(g1(v i ), g′1(v i ))

[0046] c′=s(g2(v i ), g′2(vi ))

[0047] Where g represents a subgraph sampled by setting different seeds; s(·) represents a similarity function that calculates the consistency parameter c of all project nodes; according to the consistency score of the node, a probability calculation is performed to determine the edge retention in the interaction graph, thereby obtaining two user and project subgraphs G u1 and G u2 ;

[0048] S28, based on the obtained two pairs of viewpoint graphs with different emphasis information (G u1 ,G k1 ) and (G u2 ,G k2 ), perform contrastive learning on the node representation on a specific view, consider the embeddings of the same node in different views as positive sample pairs, and different nodes in different views as negative sample pairs, and define the following formula:

[0049]

[0050] Through knowledge-based contrastive learning tasks, the information on the project side is supplemented from the external knowledge graph to reduce the impact of external noise.

[0051] Further, step S3 specifically includes:

[0052] S31. In order to fully utilize the multi-behavior interaction graph and inject high-order connections into multi-modal relations, a behavior context-aware information encoder is used to learn user representations for individual behaviors:

[0053]

[0054] in, and Respectively represent the representations obtained by user u and item i under behavior k; MultiEnc k (·) indicates a multi-behavior encoder;

[0055] S32: Perform comparative learning between user behavior embeddings, and implement cross-type behavior dependency encoding through different embedding combinations to complete user-level information enhancement:

[0056] Different behaviors of user x are randomly selected as positive sample pairs, and the perspectives between users x and y are sampled as negative sample pairs. A self-supervised contrast loss based on InfoNCE loss is defined as follows:

[0057]

[0058] Get a user and item representation that integrates multiple behavior information.

[0059] Further, step S4 specifically includes:

[0060] S41, introduce a combination weight α and β, then the final embedding vector v of user u and item i u and v i It is expressed as:

[0061]

[0062] in, and They represent the embeddings of users and items based on multi-time-step heterogeneous graphs respectively;

[0063] and Respectively represent the embedding of users and items based on multi-behavior information; and It represents the corresponding embedding obtained using the knowledge graph information;

[0064] S42. In the optimization stage, the Bayesian personalized ranking recommendation loss is used as the main task loss to further optimize the parameters, and the BPR loss function is defined as follows:

[0065]

[0066] Among them, N u represents the observed interaction set of user u.

[0067] The present invention also provides a training method based on the multi-behavior sequence recommendation method based on the multi-time-step heterogeneous graph, comprising:

[0068] Step 1: independently train the models in the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module, and learn the initial parameter spaces of the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module on different training data;

[0069] Step 2: Connect the trained node embeddings using the combined weights α and β; for the new node embeddings, calculate the BPR loss and CL loss of the main model as the final optimized model:

[0070] argmin

[0071] =main_opt{mul_opt(L mul , V mul ), kg_opt(L kg , V kg ), time_opt(L time , V time ), V main}

[0072] Among them, main_opt represents the main optimizer, which is responsible for optimizing the parameters of the entire model; mul_opt represents the optimizer of the multi-behavior learning module, which is responsible for optimizing the parameters of the multi-behavior learning module; kg_opt represents the optimizer of the knowledge enhancement module, which is responsible for optimizing the parameters of the knowledge enhancement module; time_opt represents the optimizer of the multi-time step heterogeneous module, which is responsible for optimizing the parameters of the multi-time step heterogeneous module; L represents the loss function of each module, V represents the node representation set of each module; V main represents the final node representation set, which is composed of three module embedding combinations; the loss function L of each module is defined as follows:

[0073]

[0074] Among them, λ1 represents the weight of contrastive learning loss; represents the L2 regularization term, which is used to prevent overfitting; λ2 represents the weight of the regularization term, and Ω represents all learnable parameters of the model.

[0075] Compared with the prior art, the present invention has the following advantages:

[0076] 1. The present invention provides a multi-behavior sequence recommendation method based on a multi-time-step heterogeneous graph, which models a single user in the form of a multi-time-step heterogeneous graph, while considering time information and multi-behavior information. In a single time-step heterogeneous graph, users and items are used as nodes, and different edges represent different behaviors. Users in heterogeneous graphs of multiple time steps are connected, and the user representation is updated according to the change of the time step, which more accurately captures the complex relationship between users, items and multiple behaviors, thereby improving the accuracy of the recommendation system.

[0077] 2. The present invention provides a multi-behavior sequence recommendation method based on a multi-time-step heterogeneous graph, which integrates the data information of the user-item global graph, the multi-time-step heterogeneous individual graph, and the knowledge graph. Through this integration, the recommendation system can understand user behavior and item relationships more comprehensively and accurately, overcoming the problem of insufficient recommendation accuracy caused by information isolation in traditional methods, ensuring that the system can more comprehensively grasp the user's interests and behavior patterns, thereby improving the accuracy and personalization of recommendations.

[0078] Based on the above reasons, the present invention can be widely promoted in fields such as data mining. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0080] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0081] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0082] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0083] like Figure 1 As shown, the present invention provides a multi-behavior sequence recommendation method based on a multi-time-step heterogeneous graph, comprising:

[0084] S1. Construct a multi-time-step heterogeneous module, use a multi-time-step heterogeneous graph to model time information, user information, multi-behavior information and item information, and mine the interests of a single user;

[0085] S2. Build a knowledge graph information enhancement module to use the rationality and semantic information in the knowledge graph to improve the representation of users and items, thereby improving the accuracy and effectiveness of recommendations;

[0086] S3, build a multi-behavior learning module to integrate user and item representations of various behavior information;

[0087] S4. Combining users and items obtained from different perspectives, an embedding vector is generated through multi-time-step heterogeneous graph information, multi-behavior information, and knowledge graph information.

[0088] In specific implementation, as a preferred embodiment of the present invention, step S1 specifically includes:

[0089] S11. Construct a single user multi-time step heterogeneous graph model:

[0090] Assuming there are T time steps, for each time step t, a single time step heterogeneous graph is constructed as follows:

[0091] Gt=(U t , I t , E t )

[0092] Among them, U t represents the set of user nodes in time step t; I t represents the set of item nodes at time step t; E t represents the edge set at time step t, representing various behaviors between users and items

[0093] Construct a multi-time step heterogeneous graph as follows:

[0094] G=(U,I,E)

[0095] in, Represents the set of user nodes in all time steps; Represents the set of item nodes in all time steps; represents the set of edges in all time steps;

[0096] In multiple single-time-step heterogeneous graphs, user nodes are connected; if there is user u in time steps t1 and t2, then there is an edge (u t1 ,u t2 );

[0097] S12, residual learning updates user representation:

[0098] Update the representation of user node u at time step t The formula is as follows:

[0099]

[0100] in, represents the representation of user node u at time step t+1; represents the original representation of user node u at time step t; Represents contextual information such as the representation of the neighbor nodes of user u at time step t; f is a neural network used to learn and update the representation of user nodes;

[0101] To enhance data representation, contrastive learning is performed on this basis. The positive example is the representation of the user himself at adjacent time steps, and the negative sample is the representation of all other users at any time step. The loss function is established as follows:

[0102]

[0103] Where sim(a, b) represents the similarity between a and b; τ represents the parameter that controls the smoothness of the curve; U represents the set of all users; S u,t represents a set of samples randomly selected from the negative sample set of user u at time steps t and t+1;

[0104] The user's multi-behavior information sequence with time steps is put into the multi-behavior heterogeneous model to obtain the information representation with multi-behavior information and time information.

[0105] In specific implementation, as a preferred embodiment of the present invention, step S2 specifically includes:

[0106] S21. Define the attention function as follows:

[0107] f att (V i , V r , V e )=exp[σ(w1(v i ||v r ||v e )+b1)]

[0108] Among them, v i Represents item node v i ;v r Represents a relationship node; v e Represents a neighbor node; uses item node v i , relationship node v r and neighbor node v e The embedding vector is parameterized by linear transformation and activation function to calculate the attention score between each neighbor node and the current item node;

[0109] S22. Normalize the calculated attention scores to obtain the attention weight w between each neighbor node and the current item node. i,r,e ,as follows:

[0110]

[0111] S23, normalize the attention scores using the softmax function to ensure that the sum of all attention weights is 1;

[0112] S24. Update the embedding of item i The current representation of item i The neighbor nodes are added together with the weighted sum, then multiplied by the weight matrix w2, plus the bias term b2, and then a nonlinear transformation is performed to obtain The representation is as follows:

[0113]

[0114] Among them, w2 and b2 represent trainable parameters; represents the representation of item i at the lth iteration;

[0115] S25. Generate knowledge representation using the translation distance model TransR and the semantic matching model TATEC. Initialize and obtain two different graph representations G k1 and G k2 , where the translation distance model TransR and the semantic matching model TATEC are as follows:

[0116]

[0117] S26. Use the TransR-based loss function and the TATEC-based loss function to optimize the node representation of KG, wherein the TransR-based loss function and the TATEC-based loss function are as follows:

[0118]

[0119] S27. In order to reduce the impact of noise information, the consistency of the graph structure is calculated. The calculation formula is as follows:

[0120] c=s(g1(v i ), g′1(v i ))

[0121] c′=s(g2(v i ), g′2(v i ))

[0122] Where g represents a subgraph sampled by setting different seeds; s(·) represents a similarity function that calculates the consistency parameter c of all project nodes; according to the consistency score of the node, a probability calculation is performed to determine the edge retention in the interaction graph, thereby obtaining two user and project subgraphs G u1 and G u2 ;

[0123] S28, based on the obtained two pairs of viewpoint graphs with different emphasis information (G u1 ,G k1 ) and (G u2 ,G k2), perform contrastive learning on the node representation on a specific view, consider the embeddings of the same node in different views as positive sample pairs, and different nodes in different views as negative sample pairs, and define the following formula:

[0124]

[0125] Through knowledge-based contrastive learning tasks, the information on the project side is supplemented from the external knowledge graph, the impact of external noise is reduced, and the problem of data sparsity is alleviated to a certain extent.

[0126] In specific implementation, as a preferred embodiment of the present invention, step S3 specifically includes:

[0127] S31. In order to fully utilize the multi-behavior interaction graph and inject high-order connections into multi-modal relations, a behavior context-aware information encoder is used to learn user representations for individual behaviors:

[0128]

[0129] in, and Respectively represent the representations obtained by user u and item i under behavior k; MultiEnc k (·) indicates a multi-behavior encoder;

[0130] S32. Use multiple perspectives to construct different representations and use them as auxiliary signals to alleviate the data sparsity of the target behavior, and choose to treat different behaviors as different perspectives. Perform comparative learning between user behavior embeddings, and achieve cross-type behavior dependency encoding through different embedding combinations to complete user-level information enhancement:

[0131] Different behaviors of user x are randomly selected as positive sample pairs, and the perspectives between users x and y are sampled as negative sample pairs. A self-supervised contrast loss based on InfoNCE loss is defined as follows:

[0132]

[0133] Get a user and item representation that integrates multiple behavior information.

[0134] In the multi-behavior learning module, the focus is on how to extract meaningful information from the various interactive behaviors between users and items, and use this to improve the performance of the recommendation system. Specifically, a relationship graph between users and items is constructed for each behavior (such as likes, comments, purchases, etc.), and information is transferred based on this graph to generate representation vectors for users and items. For each user and item, information is collected from the objects they are directly associated with (i.e., neighbor nodes). For example, for user u, all items he / she has liked are checked, and the information of these items is summarized to form a new representation of the user. Similarly, for item i, all users who have liked this item are checked, and the information of these users is summarized to form a new representation of the item. This process is repeated in a multi-layer neural network, and each layer updates the representation of users and items. At the beginning, the pre-set initial embeddings of users and items are used as input. In this embodiment, when only a single type of behavior is considered, the quality of the representation may be low due to insufficient data. To solve this problem, cross-type multi-behavior embedding aggregation is introduced to merge user or item representations of different behavior types, enrich the representation information and reduce the impact of data sparsity. In this process, transformation matrices are applied to adjust the information between different behavior types while ensuring that this information still retains its contextual relevance. In this way, a user and item representation that integrates multiple behavior information can be obtained. These representations are more comprehensive and rich, which helps to improve the accuracy and personalization level of the recommendation system.

[0135] In specific implementation, as a preferred embodiment of the present invention, step S4 specifically includes:

[0136] S41, introduce a combination weight α and β, then the final embedding vector v of user u and item i u and v i It is expressed as:

[0137]

[0138] in, and They represent the embeddings of users and items based on multi-time-step heterogeneous graphs respectively; and Respectively represent the embedding of users and items based on multi-behavior information; and It represents the corresponding embedding obtained using the knowledge graph information;

[0139] S42. In the optimization stage, the Bayesian personalized ranking recommendation loss is used as the main task loss to further optimize the parameters, and the BPR loss function is defined as follows:

[0140]

[0141] Among them, N u represents the observed interaction set of user u.

[0142] The present invention also provides a training method based on the multi-behavior sequence recommendation method based on the multi-time-step heterogeneous graph, comprising:

[0143] Step 1: independently train the models in the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module, and learn the initial parameter spaces of the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module on different training data;

[0144] Step 2: Connect the trained node embeddings using the combined weights α and β; for the new node embeddings, calculate the BPR loss and CL loss of the main model as the final optimized model:

[0145] argmmunn

[0146] =main_opt{mul_opt(L mul , V mul ), kg_opt(L kg , V kg ), time_opt(L time , V time ), V main}

[0147] Among them, main_opt represents the main optimizer, which is responsible for optimizing the parameters of the entire model; mul_opt represents the optimizer of the multi-behavior learning module, which is responsible for optimizing the parameters of the multi-behavior learning module; kg_opt represents the optimizer of the knowledge enhancement module, which is responsible for optimizing the parameters of the knowledge enhancement module; time_opt represents the optimizer of the multi-time step heterogeneous module, which is responsible for optimizing the parameters of the multi-time step heterogeneous module; L represents the loss function of each module, V represents the node representation set of each module; V main represents the final node representation set, which is composed of three module embedding combinations; the loss function L of each module is defined as follows:

[0148]

[0149] Among them, λ1 represents the weight of contrastive learning loss; represents the L2 regularization term, which is used to prevent overfitting; λ2 represents the weight of the regularization term, and Ω represents all learnable parameters of the model.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph, characterized in that: include: S1. Construct a multi-time-step heterogeneous module, use a multi-time-step heterogeneous graph to model time information, user information, multi-behavior information and item information, and mine the interests of a single user; S2. Build a knowledge graph information enhancement module to improve the representation of users and items by using the rationality and semantic information in the knowledge graph; S3, build a multi-behavior learning module to integrate user and item representations of various behavior information; S4. Combining users and items obtained from different perspectives, an embedding vector is generated through multi-time-step heterogeneous graph information, multi-behavior information, and knowledge graph information.

2. According to claim 1, a multi-behavior sequence recommendation method based on multi-time-step heterogeneous graph is characterized in that: Step S1 specifically includes: S11. Construct a single user multi-time step heterogeneous graph model: Assuming there are T time steps, for each time step t, a single time step heterogeneous graph is constructed as follows: Gt=(U t ,I t ,E t ) Among them, U t represents the set of user nodes in time step t; I t represents the set of item nodes at time step t; E t represents the edge set at time step t, representing various behaviors between users and items Construct a multi-time step heterogeneous graph as follows: G=(U,I,E) in, Represents the set of user nodes in all time steps; Represents the set of item nodes in all time steps; represents the set of edges in all time steps; In multiple single-time-step heterogeneous graphs, user nodes are connected; if there is user u in time steps t1 and t2, then there is an edge (u t1 ,u t2 ); S12, residual learning updates user representation: Update the representation of user node u at time step t The formula is as follows: in, represents the representation of user node u at time step t+1; represents the original representation of user node u at time step t; represents the representation of the neighbor nodes of user u at time step t; f is a neural network used to learn and update the representation of user nodes; To enhance data representation, contrastive learning is performed on this basis. The positive example is the representation of the user himself at adjacent time steps, and the negative sample is the representation of all other users at any time step. The loss function is established as follows: Where sim(a, b) represents the similarity between a and b; τ represents the parameter that controls the smoothness of the curve; U represents the set of all users; S u,t represents a set of samples randomly selected from the negative sample set of user u at time steps t and t+1; The user's multi-behavior information sequence with time steps is put into the multi-behavior heterogeneous model to obtain information representation with multi-behavior information and time information.

3. The method for recommending multiple behavior sequences based on a multi-time-step heterogeneous graph according to claim 1, characterized in that: Step S2 specifically includes: S21. Define the attention function as follows: f att (In i ,In r ,In e )=exp[σ(w1(v i ||in r ||in e )+b1)] Among them, v i Represents item node v i ;v r Represents a relationship node; v e Represents a neighbor node; use item node v i , relationship node v r and neighbor node v e The embedding vector is parameterized by linear transformation and activation function to calculate the attention score between each neighbor node and the current item node; S22. Normalize the calculated attention scores to obtain the attention weight w between each neighbor node and the current item node. i,r,e ,as follows: S23, normalize the attention scores using the softmax function to ensure that the sum of all attention weights is 1; S24. Update the embedding of item i The current representation of item i The neighbor nodes are added together with the weighted sum, then multiplied by the weight matrix w2, plus the bias term b2, and then a nonlinear transformation is performed to obtain The representation is as follows: Among them, w2 and b2 represent trainable parameters; represents the representation of item i at the lth iteration; S25. Generate knowledge representation using the translation distance model TransR and the semantic matching model TATEC. Initialize and obtain two different graph representations G k1 and G k2 , where the translation distance model TransR and the semantic matching model TATEC are as follows: S26. Use the TransR-based loss function and the TATEC-based loss function to optimize the node representation of KG, wherein the TransR-based loss function and the TATEC-based loss function are as follows: S27. In order to reduce the impact of noise information, the consistency of the graph structure is calculated. The calculation formula is as follows: c=s(g1(v i ),g′1(v i )) c′=s(g2(v i ),g′2(v i )) Where g represents a subgraph sampled by setting different seeds; s(·) represents a similarity function that calculates the consistency parameter c of all project nodes; according to the consistency score of the node, a probability calculation is performed to determine the edge retention in the interaction graph, thereby obtaining two user and project subgraphs G u1 and G u2 ; S28, based on the obtained two pairs of viewpoint graphs with different emphasis information (G u1 , G k1 ) and (G u2 , G k2 ), perform contrastive learning on the node representation on a specific view, consider the embeddings of the same node in different views as positive sample pairs, and different nodes in different views as negative sample pairs, and define the following formula: Through knowledge-based contrastive learning tasks, the information on the project side is supplemented from the external knowledge graph to reduce the impact of external noise.

4. The method for recommending multiple behavior sequences based on a multi-time-step heterogeneous graph according to claim 1, characterized in that: Step S3 specifically includes: S31. In order to fully utilize the multi-behavior interaction graph and inject high-order connections into multi-modal relations, a behavior context-aware information encoder is used to learn user representations for individual behaviors: in, and Respectively represent the representations obtained by user u and item i under behavior k; MultiEnc k (.) indicates a multi-behavior encoder; S32: Perform comparative learning between user behavior embeddings, and implement cross-type behavior dependency encoding through different embedding combinations to complete user-level information enhancement: Different behaviors of user x are randomly selected as positive sample pairs, and the perspectives between users x and y are sampled as negative sample pairs. A self-supervised contrast loss based on InfoNCE loss is defined as follows: Get a user and item representation that integrates multiple behavior information.

5. The method for recommending multiple behavior sequences based on a multi-time-step heterogeneous graph according to claim 1, characterized in that: Step S4 specifically includes: S41, introduce a combination weight α and β, then the final embedding vector v of user u and item i u and v i It is expressed as: in, and They represent the embeddings of users and items based on multi-time-step heterogeneous graphs; and Respectively represent the embedding of users and items based on multi-behavior information; and It represents the corresponding embedding obtained using the knowledge graph information; S42. In the optimization stage, the Bayesian personalized ranking recommendation loss is used as the main task loss to further optimize the parameters, and the BPR loss function is defined as follows: Among them, N u represents the observed interaction set of user u.

6. A training method implemented by the multi-behavior sequence recommendation method based on multi-time-step heterogeneous graphs according to any one of claims 1 to 5, characterized in that: include: Step 1: independently train the models in the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module, and learn the initial parameter spaces of the multi-time-step heterogeneous module, the multi-behavior learning module, and the knowledge enhancement module on different training data; Step 2: Connect the trained node embeddings using the combined weights α and β; for the new node embeddings, calculate the BPR loss and CL loss of the main model as the final optimized model: argmin=main_opt{mul_opt(L mul ,V mul ),kg_opt(L kg ,V kg ),time_opt(L time ,V time ),V main } Among them, main_opt represents the main optimizer, which is responsible for optimizing the parameters of the entire model; mul_opt represents the optimizer of the multi-behavior learning module, which is responsible for optimizing the parameters of the multi-behavior learning module; kg_opt represents the optimizer of the knowledge enhancement module, which is responsible for optimizing the parameters of the knowledge enhancement module; time_opt represents the optimizer of the multi-time step heterogeneous module, which is responsible for optimizing the parameters of the multi-time step heterogeneous module; L represents the loss function of each module, V represents the node representation set of each module; V main represents the final node representation set, which is composed of three module embedding combinations; the loss function L of each module is defined as follows: Among them, λ1 represents the weight of contrastive learning loss; represents the L2 regularization term, which is used to prevent overfitting; λ2 represents the weight of the regularization term, and Ω represents all learnable parameters of the model.

Citation Information

Patent Citations

  • Knowledge graph recommendation method based on comparative learning and view mining

    CN117668254A

  • Movie item recommendation processing method and device based on knowledge graph

    CN118708799A

  • Temporal knowledge graph completion method and apparatus based on recursion

    US20220207379A1