Recommendation method and device based on hypergraph and multi-behavior contrast learning, equipment and medium

By constructing hypergraph and multi-behavior comparison learning methods, the interaction and semantic information between users and items are extracted, and feature alignment and fusion are performed, which solves the problems of user-item relationship information loss and data sparseness in traditional recommendation systems, and improves the recommendation system accuracy and user experience.

CN119149808APending Publication Date: 2024-12-17CHINA ACADEMY OF ELECTRONICS AND INFORMATION TECHNOLOGY OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411117654.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

When traditional recommendation systems deal with diversified user behavior, they can easily lead to user-item relationship information loss and data sparsity, resulting in poor recommendation results, and it is difficult to explain the relationship between different users or items and between different behaviors.

Method used

Using a multi-behavior comparison learning method based on hypergraphs, it extracts semantic information, aligns and enhances features by constructing user-items and objects interaction diagrams, semantics and behavioral hypergraphs, and combines multi-dimensional interaction enhancement attention mechanisms to fusion features to improve Recommended system accuracy and interpretability.

Benefits of technology

It effectively solves the problems of data sparseness and behavior imbalance, improves the accuracy and efficiency of the recommendation system, improves the user experience, and significantly enhances the interpretability of knowledge transfer across different behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149808A_ABST
    Figure CN119149808A_ABST
Patent Text Reader

Abstract

The invention provides a recommendation method and device based on hypergraph and multi-behavior contrast learning, equipment and a medium, and the method comprises the steps: obtaining interaction data of a user and an article, carrying out the preprocessing, and obtaining user behavior data and article attribute data; constructing a hypergraph for reflecting multi-behavior interaction and semantic information between the user and the article; obtaining feature representations of the user and the article based on the hypergraph, and enhancing the feature representations of the user and the article through multi-behavior contrast learning; and performing feature fusion based on the enhanced features, and performing target behavior prediction and recommendation. According to the method, information is enhanced through the hypergraph, and the relevance between the articles and the relevance between the users are captured. According to the method, more abundant and real feature representation is obtained based on feature comparison learning of behavior enhancement, and feature fusion is performed among different behaviors, so that the problems of data sparsity, behavior imbalance and the like are effectively solved, the recommendation accuracy and efficiency are improved, the user time is saved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a recommendation method, device and medium based on hypergraph and multi-behavior contrast learning. Background Art

[0002] With the popularization of the Internet and the explosive growth of information, recommender systems (RS) have become an important application in online fields (including e-commerce, social networks, video platforms, etc.), which recommend items or services that users may be interested in by analyzing their historical behaviors and preferences. However, traditional recommendation systems rely on a single behavior (such as purchase, click) to build a user preference model, and the recommendation effect is limited when faced with real-world scenarios with diverse user behaviors.

[0003] In order to overcome the limitations of traditional recommendation systems, a multi-behavior recommendation method that considers multiple user behaviors at the same time to build a more comprehensive user preference model has emerged. This system includes traditional convolution methods and graph convolution methods. Traditional convolution models use vectors to represent users and items. Although these models are usually lightweight and easy to interpret, they may cause the loss of user-item relationship information when dealing with diverse user behaviors. Graph convolution models capture the comprehensive relationship between users and items by constructing interaction graphs. Although they are more comprehensive, they are susceptible to noise interference when data is sparse.

[0004] Some methods solve the noise interference problem in data sparse conditions by constructing hypergraphs, and more comprehensively model user and item features to improve the accuracy of recommendations. However, the inconsistency of user interaction density between different behaviors and data imbalance lead to insufficient user feature learning and sparse interaction records. The methods in related technologies use an end-to-end approach for training and prediction, which makes it difficult to explain the relationships between different users or items and between different behaviors, limiting the application scope and performance of the recommendation system. Summary of the invention

[0005] The present invention provides a recommendation method, device and medium based on hypergraph and multi-behavior contrast learning, which solves the problems of data sparsity, behavior imbalance and insufficient feature learning in the recommendation method in the related art.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In a first aspect, a recommendation method based on hypergraph and multi-behavior contrastive learning is provided, comprising:

[0008] Obtain and preprocess the interaction data between users and items to obtain user behavior data and item attribute data;

[0009] Based on user behavior data and item attribute data, a hypergraph is constructed to reflect the multi-behavior interactions and semantic information between users and items.

[0010] Acquire feature representations of users and items based on the hypergraph, and enhance the feature representations of users and items through multi-behavior contrast learning;

[0011] Feature fusion is performed based on enhanced features to predict and recommend target behaviors.

[0012] In a first possible implementation manner of the first aspect, constructing a hypergraph for reflecting multi-behavior interactions and semantic information between users and items based on user behavior data and item attribute data includes:

[0013] Based on the user behavior data and item attribute data, construct an interaction graph between the user and the item;

[0014] Based on the user behavior data and item attribute data, extracting semantic information and constructing a semantic hypergraph;

[0015] Based on the interaction graph, construct a behavior hypergraph using the interaction relationship;

[0016] A semantically enhanced hypergraph is constructed based on the semantic hypergraph and the behavioral hypergraph.

[0017] Based on the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, acquiring feature representations of users and items based on the hypergraph, and enhancing the feature representations of users and items through multi-behavior contrast learning include:

[0018] Extracting feature representations of users and items in corresponding views from the interaction graph and the semantically enhanced hypergraph respectively;

[0019] Based on the extracted feature representations of the user and the item, aligning the feature representations of the user and the item in different views through contrastive learning;

[0020] Behavioral feature enhancement is performed based on the aligned feature representations of the user and the item.

[0021] Based on the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the enhancing of behavioral features based on the aligned feature representations of the user and the item includes:

[0022] Based on the aligned feature representations of the user and the item, feature propagation is performed through an enhanced aggregator;

[0023] Aggregate the user characteristics and item characteristics of each behavior;

[0024] The aggregated features are passed through M layers of enhanced graph convolution, and the features obtained in each layer are combined to form the final representation of the user or item.

[0025] Based on the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, performing feature fusion based on enhanced features and performing target behavior prediction and recommendation includes:

[0026] Configure a multi-dimensional interactive enhanced attention mechanism, which includes multi-dimensional independent attention heads. For each dimension:

[0027] head h =Softmax(W h (p (i,k) ||q (j,k) )+b h ),

[0028] In the formula, || represents the series operation of vectors, W h ∈R K×2d and b h ∈R K×1 represents the feature transformation matrix and offset matrix; p (i,k) represents the enhanced feature representation of the user; q (j,k) Representing enhanced features of items;

[0029] The multi-dimensional interaction enhancement is finally expressed as

[0030]

[0031] In the formula, Concat(·) is used to connect all dimensional features in series, W 0 ∈R HK×K is the output transformation matrix;

[0032] Based on the multi-dimensional interactive enhanced attention mechanism, multi-behavior feature fusion is performed, which is achieved through the following formula:

[0033]

[0034]

[0035] Among them, P i is the fused user feature, Q j is the feature of the fused item;

[0036] Target behavior prediction and recommendation are performed based on the fused features.

[0037] Based on the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the performing feature fusion based on the enhanced features and performing target behavior prediction and recommendation further includes:

[0038] The recommendation model is trained based on the fused features.

[0039] In a second aspect, a recommendation device based on hypergraph and multi-behavior contrastive learning is provided, comprising:

[0040] The data preprocessing module is used to obtain and preprocess the interaction data between users and items to obtain user behavior data and item attribute data;

[0041] A hypergraph construction module is used to construct a hypergraph that reflects the multi-behavior interactions and semantic information between users and items based on user behavior data and item attribute data;

[0042] A contrastive learning enhancement module, used for obtaining feature representations of users and items based on the hypergraph, and enhancing the feature representations of users and items through multi-behavior contrastive learning;

[0043] The feature fusion and prediction recommendation module is used to perform feature fusion and target behavior prediction and recommendation based on enhanced features.

[0044] In a first possible implementation manner of the second aspect, the hypergraph construction module is specifically configured to:

[0045] Based on the user behavior data and item attribute data, construct an interaction graph between the user and the item;

[0046] Based on the user behavior data and item attribute data, extracting semantic information and constructing a semantic hypergraph;

[0047] Based on the interaction graph, construct a behavior hypergraph using the interaction relationship;

[0048] A semantically enhanced hypergraph is constructed based on the semantic hypergraph and the behavioral hypergraph.

[0049] In a third aspect, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the recommendation method based on hypergraph and multi-behavior contrast learning as described in the first aspect.

[0050] In a fourth aspect, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the recommendation method based on hypergraph and multi-behavior contrast learning as described in the first aspect are implemented.

[0051] This application captures the correlation between items and items and between users through hypergraph enhancement information. Based on behavior-enhanced feature contrast learning, two feature representations, interaction graph and hypergraph, are learned for each user or item, and aligned to obtain a richer and more realistic feature representation. In addition, the attention-based feature fusion network adds a graph attention mechanism to perform feature fusion between different behaviors, significantly enhancing the interpretability of knowledge transfer across different behaviors. This method performs well in multi-behavior recommendation systems, effectively solving problems such as data sparsity and behavior imbalance, improving the accuracy and efficiency of recommendations, saving users' time, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A schematic flow chart of a recommendation method based on hypergraph and multi-behavior comparative learning provided in an embodiment of the present application;

[0053] Figure 2 A schematic flow chart of another recommendation method based on hypergraph and multi-behavior comparative learning provided in an embodiment of the present application;

[0054] Figure 3 A schematic flow chart of a behavior feature enhancement step provided in an embodiment of the present application;

[0055] Figure 4 A structural block diagram of a hypergraph and multi-behavior comparative learning recommendation device provided in an embodiment of the present application;

[0056] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0057] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose, the technical solutions in the embodiments of the present application are clearly described. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present application.

[0058] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0059] The description of the method flow in the specification of the present application and the steps of the flowchart in the drawings of the present specification do not have to be strictly executed according to the step numbers, and the method steps can be executed in a different order. Moreover, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0060] The following is a detailed description of the recommendation method, device and medium based on hypergraph and multi-behavior comparative learning provided in the embodiments of the present application in combination with the accompanying drawings and preferred embodiments.

[0061] First, the application scenario of the recommendation method based on hypergraph and multi-behavior comparative learning in the embodiment of the present application is described in detail.

[0062] In related technologies, multi-behavior recommendation methods and systems still face challenges such as data sparsity and imbalanced user behaviors. Existing studies often ignore the inconsistency of user interaction density and data imbalance between different behaviors, resulting in insufficient user feature learning and sparse interaction records. For example, users have fewer interactions in some behaviors (such as purchases) and higher interaction frequencies in other behaviors (such as browsing). In addition, the impact of different behaviors on the target behavior and how they affect it are rarely explored. Existing methods are usually trained and predicted in an end-to-end manner, which makes it difficult to explain the relationship between different users or items and different behaviors, which to some extent limits the performance and application scope of the recommendation system.

[0063] Based on this, in order to solve the problem of insufficient feature learning, how to deal with data sparsity and behavior imbalance, how to overcome the information loss of traditional convolution methods and the noise interference of graph convolution models, and how to fuse the features of different behaviors and balance the global and local features to effectively improve the accuracy and application scope of the recommendation system, this application proposes a recommendation method based on hypergraph and multi-behavior contrast learning. By constructing a semantically enhanced hypergraph, using behavior-enhanced feature contrast learning, and an attention-based feature fusion network, this application effectively solves the problems of data sparsity, behavior imbalance, and insufficient feature learning. To enrich the module, the interaction relationship and semantic information between users and items are used to customize the edge relationship to learn and generate a behavior interaction hypergraph and a semantic hypergraph, and finally generate a semantically enhanced hypergraph; based on behavior-enhanced feature contrast learning, for each user (item), two feature representations are learned through the interaction graph relationship and the hypergraph relationship, and the two features of the same user or item are compared and learned to be aligned to achieve richer and more realistic features; based on feature fusion prediction, for different behaviors, by adding a graph attention mechanism, the features between different behaviors are fused to enrich the representation of users and items, which are finally used to predict the target behavior.

[0064] See also Figure 1-2 , the embodiment of the present application provides a recommendation method based on hypergraph and multi-behavior contrast learning, such as Figure 1-2 As shown, the recommended method of the embodiment of the present application includes the following steps:

[0065] Step S1, obtain and pre-process the interaction data between the user and the item to obtain user behavior data and item attribute data.

[0066] This step collects the interaction data between users and items, and obtains user behavior data and item attribute data. The collected data is cleaned, normalized, and converted to ensure data quality and consistency, providing a clean and standard data foundation for subsequent steps and improving the stability and accuracy of the model.

[0067] Step S2, based on the user behavior data and the item attribute data, construct a hypergraph for reflecting the multi-behavior interactions and semantic information between the user and the item.

[0068] The hypergraph is used to enrich the multi-behavior features of item interactions to obtain customized user-item hyperedges. At the same time, semantic information is combined to provide meaningful semantic representations for the nodes in the hypergraph to obtain user-item features enriched by the hypergraph.

[0069] Specifically, step S2: based on user behavior data and item attribute data, construct a hypergraph for reflecting multi-behavior interactions and semantic information between users and items, including:

[0070] Step S201, constructing an interaction graph between users and items based on user behavior data and item attribute data.

[0071] An interaction graph between users and items is constructed based on the preprocessed data to represent the user's historical behavior.

[0072] In the specific implementation, the user behavior interaction matrix is ​​defined as:

[0073]

[0074] Convert the user behavior interaction matrix into an adjacency matrix. For each behavior, there is an adjacency matrix of the behavior. The formula for defining the adjacency matrix is:

[0075]

[0076] Where: Y k It represents the historical interaction matrix between users and items under the kth behavior. k For example, its rows and columns contain all users and items;

[0077] The adjacency matrix A k After pre-training of a multi-layer perceptron network, a behavior-shared feature matrix is ​​obtained.

[0078] A hypergraph is a data structure consisting of a set of nodes and hyperedges, where each hyperedge can connect any number of nodes. Using hyperedges as intermediate hubs, hyperedges will act as a medium for transmitting global perception information between users and objects.

[0079] Step S202: extracting semantic information based on user behavior data and item attribute data to construct a semantic hypergraph.

[0080] By calculating similarity, the semantic information of users and items is extracted, capturing the multi-dimensional correlation between users and items.

[0081] For example, to obtain the semantic information of user embedding, we use pre-trained (Word2Vec or BERT) to generate semantic embedding representations of users and items, capture the semantic similarity between users and items, and construct semantic hyperedges:

[0082] The semantic information of users and items is defined as follows:

[0083] Y (u) =BERT(u)

[0084] Y (i) =BERT(i)

[0085] Calculate the semantic similarity between users and items using cosine similarity; take user similarity as an example, and calculate it using the following formula:

[0086]

[0087] In the formula, S (u) Elements in Represents user u i and user u j The semantic similarity between them is calculated as follows:

[0088]

[0089] For each user, select the top K users with the highest semantic similarity and connect these users as a hyperedge to form a user semantic hyperedge matrix Similarly, the item semantic hyperedge matrix is That is, it corresponds to the user semantic hypergraph and the item semantic hypergraph.

[0090] Step S203: construct a behavior hypergraph based on the interaction graph and using the interaction relationship.

[0091] A behavioral hypergraph is constructed through the interactive relationship between users and items to capture the multi-dimensional correlation between users and items.

[0092] Based on user-item interaction matrix Y k Construct a user-user behavior hyperedge, taking the user as an example:

[0093] First, the similarity between users is calculated by cosine similarity, which is calculated by the following formula:

[0094]

[0095] In the formula, and Represent the interaction matrices of user u and user v respectively;

[0096] If the similarity S uv If a certain threshold is exceeded, users u and v belong to the same hyperedge. Similar users will be grouped into a group, and each group corresponds to a hyperedge. The user behavior hyperedge is finally calculated. Representation, which will be used to combine semantic hyperedges to construct user semantically enhanced comprehensive hyperedges.

[0097] Step S204: construct a semantically enhanced hypergraph based on the semantic hypergraph and the behavioral hypergraph.

[0098] The behavioral hyperedges and semantic hyperedges are combined to form a comprehensive hyperedge matrix of users and items, namely the semantically enhanced hypergraph.

[0099] The user comprehensive hyperedge matrix Γ (u) For example, the following formula is used to calculate:

[0100]

[0101] Where α is a weight parameter used to balance the influence of behavioral hyperedges and semantic hyperedges. represents the semantic hyperedge representation of the user, Represents the user's behavior hyperedge representation.

[0102] Similarly, the item comprehensive hyperedge matrix Γ (i) , calculated by the following formula:

[0103]

[0104] The semantic hyperedge representation of the item, The behavior hyperedge representation of an item.

[0105] The comprehensive hypergraph iterative feature representation of a user or item is:

[0106]

[0107] In the formula, σ(·) represents the activation function, and the feature iteration network uses LightGCN. and It represents the features of users and items obtained by graph convolution training at layer l-1, H (u) , H (i) It represents the hypergraph features that are comprehensively enhanced by the behavioral hypergraph and the semantic hypergraph.

[0108] Step S3, obtaining feature representations of users and items based on the hypergraph, and enhancing the feature representations of users and items through multi-behavior contrast learning.

[0109] See also Figure 3 Based on contrastive learning, the features of the semantically enhanced hypergraph and the interaction graph are aligned, which enhances the model's ability to collaborate from different perspectives, aligns user and item features from two different perspectives, and obtains more comprehensive user and item features for the current behavior in the fused hypergraph and interaction graph. In other words, based on behavior-enhanced feature contrastive learning, for each user (item), two feature representations are learned through interaction graph relations and hypergraph relations, and two features of the same user or item are contrastively learned and aligned to achieve richer and more realistic features.

[0110] Furthermore, step S3, based on the hypergraph, obtains the feature representation of users and items, and enhances the feature representation of users and items through multi-behavior contrast learning, including:

[0111] Step S301, extracting feature representations of users and items in corresponding views from the interaction graph and the semantically enhanced hypergraph respectively.

[0112] This step is feature extraction. In specific implementation, a graph convolutional network (GCN) can be used for preliminary feature extraction.

[0113] Step S302: Based on the extracted feature representations of users and items, the feature representations of users and items in different views are aligned through comparative learning.

[0114] This step aligns and contrasts the features learned from the interaction graph and the hypergraph, and aligns the feature representations of users and items through contrastive learning methods. Specifically:

[0115] Define the extracted behavior graph feature p b and the hypergraph feature p h ;

[0116] The formula for contrastive learning is:

[0117]

[0118] Where s(·) represents the cosine similarity and τ represents an adjustable parameter.

[0119] Step S303: Based on the aligned feature representations of users and items, behavioral feature enhancement is performed.

[0120] This step can be performed based on the corresponding behavior feature enhancement module, including:

[0121] Step S3031, based on the aligned feature representations of users and items, feature propagation is performed through an enhanced aggregator.

[0122] The feature p of the k-th behavior in the first layer after feature alignment k_u and q k_i , feature propagation is performed through the enhanced aggregator, information is collected from adjacent nodes and the feature representation of the node itself is updated. The feature iteration rule is as follows:

[0123]

[0124] In the formula, and When representing the mth layer, the features of user u and item i with multiple behaviors are integrated. and represents the features learned under the current behavior, and represents the features learned under other behaviors, N i and N u They represent the neighbor nodes of user u and item i in the graph respectively.

[0125] Step S3032, aggregate the user features and item features of each behavior.

[0126] After the features are aggregated in this step, the user and item features of each behavior are obtained. The feature aggregation formula between different behaviors is:

[0127] p k_u =∑ j∈K α j pk j_u ;

[0128] q k_i =∑ j∈K α j q kj_i ;

[0129] In the formula, α j Represents the learned feature weights of different behaviors for the target behavior;

[0130] In step S3033, the aggregated features are subjected to M layers of enhanced graph convolution, and the features obtained in each layer are combined to form the final representation of the user or item.

[0131] In this step, in order to better transmit user and item features, an enhanced graph convolution mechanism is introduced. In the enhanced graph convolution, the features obtained in each layer are aggregated to form the final representation of the user or item as follows:

[0132]

[0133] In the formula, β m Represents the adaptive feature weights of each layer;

[0134] Based on the above steps, the enhanced features of users and items after the behavior feature enhancement module are expressed as:

[0135] p (i,k) ,q (j,k) =BEG(A k ,H (u) ),

[0136] Where BEG(·) represents the behavior feature enhancement module.

[0137] Step S4, performing feature fusion based on the enhanced features and performing target behavior prediction and recommendation.

[0138] Based on feature fusion prediction, for different behaviors, by adding a graph attention mechanism, the features between different behaviors are fused to enrich the representation of users and items, which are finally used to predict the target behavior.

[0139] This application is based on the different importance of other behaviors when recommending a certain behavior to effectively represent the preferences of a given user. At the same time, in order to enhance the expressiveness of the model and capture more complex features and relationships, a multi-dimensional interaction enhanced attention mechanism is proposed to extract the transfer behavior features of users or items. This feature representation captures the correlation between users and items and enhances the understanding of their interaction.

[0140] Step S401, configure a multi-dimensional interactive enhanced attention mechanism.

[0141] This step calculates the attention weights between different behavior features to perform feature fusion. Specifically, the multi-dimensional interactive attention mechanism is used to enhance the feature correlation of multiple behaviors. The multi-dimensional interactive enhanced attention mechanism can be divided into multi-dimensional independent attention heads. For each dimension:

[0142] head h =Softmax(W h (p (i,k) ||q (j,k) )+b h ),

[0143] In the formula, || represents the series operation of vectors, W h ∈R K×2d and b h ∈R K×1 Represents the feature transformation matrix and offset matrix;

[0144] The multi-dimensional interaction enhancement is finally expressed as

[0145]

[0146] In the formula, Conact(·) is used to connect all dimensional features in series, W 0 ∈R HK×K is the output transformation matrix.

[0147] Step S402: Based on the multi-dimensional interactive enhanced attention mechanism, multi-behavior feature fusion is performed.

[0148] The feature fusion network integrates multiple behavior features to generate a more comprehensive representation of user and item features. The features between behaviors are aggregated through the multi-dimensional interaction enhanced attention mechanism, as shown in the formula:

[0149]

[0150] Step S403: predict and recommend target behaviors based on the fused features.

[0151] Using user and item based features P i and Q j, using the prediction function to estimate the interaction probability The final predicted interaction is expressed as:

[0152]

[0153] Where P' i , Q' j are the user and item features after a simple neural network with two layers of multilayer perceptrons. cosine(·,·) measures cosine similarity.

[0154] The prediction results are obtained and applied to the recommendation algorithm.

[0155] In some possible implementations, before or after step S403, step S404 is further included to train a recommendation model based on the fused features.

[0156] This step uses the fused features to train the recommendation model, and uses optimization algorithms such as gradient descent to adjust and optimize the model parameters; based on the trained model, the target behavior is predicted and the items or services that the user may be interested in are calculated. Specifically:

[0157] Training is based on Bayesian personalized ranking, where y k and They represent the actual interaction between the user and the item under the kth behavior and the predicted value obtained by training. The cross entropy loss and the overall loss are as follows:

[0158]

[0159] Where α and β are the loss weights.

[0160] The recommendation method based on hypergraph and multi-behavior comparative learning provided in the embodiment of the present application captures the correlation between items and items and between users through hypergraph enhancement information. Based on behavior-enhanced feature comparative learning, two feature representations, interaction graph and hypergraph, are learned for each user or item, and aligned to obtain a richer and more realistic feature representation. In addition, the attention-based feature fusion network, by adding a graph attention mechanism, performs feature fusion between different behaviors, significantly enhancing the interpretability of knowledge transfer across different behaviors. This method performs well in multi-behavior recommendation systems, effectively solving problems such as data sparsity and behavior imbalance, improving the accuracy and efficiency of recommendations, saving users' time, and improving user experience.

[0161] Among them, based on behavior-enhanced feature contrast learning, two feature representations, interaction graph and hypergraph, are learned for each user or item, and aligned to obtain a richer and more realistic feature representation. Specifically, by constructing a user-item interaction graph and hypergraph, the multi-dimensional correlation between users and users, and between items and items is captured. After extracting the initial feature representation using a graph convolutional network, the features of the interaction graph and hypergraph are aligned through a contrastive learning method, and feature fusion is performed between different behaviors in combination with a behavior-level attention mechanism and a feature fusion network to further enhance the richness and authenticity of the feature representation. This significantly improves the accuracy and efficiency of the recommendation system, solves problems such as data sparsity and behavior imbalance, and optimizes the user experience.

[0162] In order to further fully illustrate the technical effects of the embodiments of the present application, this application provides specific experimental data to evaluate the effects of the schemes in the embodiments, and the specific contents are as follows.

[0163] Data composition:

[0164] The datasets used for the evaluation are as follows: Beibei dataset, which contains more than 20,000 users and about 8,000 maternal and child products, and user behaviors include browsing, adding to cart, and purchasing; Taobao dataset, which contains more than 100,000 users and nearly 100,000 products, and user behaviors include browsing, collecting, adding to cart, and purchasing; IJCAI dataset, which contains more than 400,000 users and nearly 900,000 products, and user behaviors include browsing, collecting, adding to cart, and purchasing, and covers the behavior logs before and on the "Double 11" day in the past 6 months. These datasets are all implicit interaction data, that is, whether the user has interacted with the item.

[0165] Evaluation Criteria:

[0166] The hit rate (HR@N) and normalized discounted cumulative gain (NDCG@N) are used as evaluation indicators on this dataset. The hit rate (HR@N) indicates the percentage of items actually selected by users in the top N recommended results; N = {3, 5, 10}. In addition, the normalized discounted cumulative gain (NDCG@N) of the top N recommended results is used as an evaluation indicator. This indicator takes into account the relevance and ranking position of the recommended results, and calculates the cumulative gain after normalization by the position discount factor.

[0167] Comparison algorithms:

[0168] In the comparative experiment, ten relatively advanced baseline models were selected for comparison on the Beibei, Taobao and IJCAI datasets used in the present invention, including DMF, LightGCN, MATN, MBGCN, CIGF, etc. Table 1 shows the comparison of the recommendation effects of the present invention and the most advanced algorithms on the three datasets. It can be seen that the performance of the multi-behavior recommendation method based on hypergraph convolution proposed in the present invention reaches the most advanced results in terms of hit rate HR and normalized discounted cumulative return NDCG, and significantly surpasses the existing algorithms. The comparison of the recommendation performance of the three datasets is shown in Table 1:

[0169] Table 1 Comparison of recommendation performance on three datasets

[0170]

[0171]

[0172] Note: The best result is shown in bold and the second best result is underlined.

[0173] Therefore, after verification of the data set, the algorithm proposed in this paper captures the correlation between items and users through information enhancement of hypergraph construction. Through behavior enhancement, the features of the interaction graph and the hypergraph are learned and aligned to obtain a richer and more realistic representation. In addition, the addition of a graph attention mechanism and feature fusion between different behaviors significantly enhances the interpretability of cross-behavior knowledge transfer and greatly improves the accuracy and effect of the recommendation system.

[0174] See also Figure 4 , corresponding to the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior contrast learning, the present application embodiment provides a recommendation device based on hypergraph and multi-behavior contrast learning, the recommendation device comprising:

[0175] The data preprocessing module 1001 is used to obtain and preprocess the interaction data between users and items to obtain user behavior data and item attribute data;

[0176] A hypergraph construction module 1002, for constructing a hypergraph for reflecting multi-behavior interactions and semantic information between users and items based on user behavior data and item attribute data;

[0177] A contrastive learning enhancement module 1003 is used to obtain feature representations of users and items based on the hypergraph, and enhance the feature representations of users and items through multi-behavior contrastive learning;

[0178] The feature fusion and prediction recommendation module 1004 is used to perform feature fusion and target behavior prediction and recommendation based on the enhanced features.

[0179] Furthermore, the hypergraph construction module 1002 is specifically used for:

[0180] Based on the user behavior data and item attribute data, construct an interaction graph between the user and the item;

[0181] Based on the user behavior data and item attribute data, extracting semantic information and constructing a semantic hypergraph;

[0182] Based on the interaction graph, construct a behavior hypergraph using the interaction relationship;

[0183] A semantically enhanced hypergraph is constructed based on the semantic hypergraph and the behavioral hypergraph.

[0184] The above-mentioned recommendation device based on hypergraph and multi-behavior comparative learning implements the steps and various processes of the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior comparative learning, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0185] See also Figure 5 Corresponding to the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior comparative learning, the embodiment of the present application provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior comparative learning and the various processes of the embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0186] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0187] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0188] Corresponding to the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior comparative learning, the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, the steps and various processes of the above-mentioned recommendation method embodiment based on hypergraph and multi-behavior comparative learning are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0189] The processor is the processor in the electronic device described in the above embodiment of the present application. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0190] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0191] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0192] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A recommendation method based on hypergraph and multi-behavior contrastive learning, characterized in that: include: Obtain and preprocess the interaction data between users and items to obtain user behavior data and item attribute data; Based on user behavior data and item attribute data, a hypergraph is constructed to reflect the multi-behavior interactions and semantic information between users and items. Acquire feature representations of users and items based on the hypergraph, and enhance the feature representations of users and items through multi-behavior contrast learning; Feature fusion is performed based on enhanced features to predict and recommend target behaviors.

2. The recommendation method based on hypergraph and multi-behavior contrastive learning according to claim 1, characterized in that: The hypergraph for reflecting the multi-behavior interactions and semantic information between users and items is constructed based on the user behavior data and item attribute data, including: Based on the user behavior data and item attribute data, construct an interaction graph between the user and the item; Based on the user behavior data and item attribute data, extracting semantic information and constructing a semantic hypergraph; Based on the interaction graph, construct a behavior hypergraph using the interaction relationship; A semantically enhanced hypergraph is constructed based on the semantic hypergraph and the behavioral hypergraph.

3. The recommendation method based on hypergraph and multi-behavior contrastive learning according to claim 2, characterized in that: Based on the hypergraph, feature representations of users and items are obtained, and feature representations of users and items are enhanced through multi-behavior contrast learning, including: Extracting feature representations of users and items in corresponding views from the interaction graph and the semantically enhanced hypergraph respectively; Based on the extracted feature representations of the user and the item, aligning the feature representations of the user and the item in different views through contrastive learning; Behavioral feature enhancement is performed based on the aligned feature representations of the user and the item.

4. The recommendation method based on hypergraph and multi-behavior contrastive learning according to claim 3, characterized in that: The behavioral feature enhancement based on the aligned feature representation of the user and the item includes: Based on the aligned feature representations of the user and the item, feature propagation is performed through an enhanced aggregator; Aggregate the user characteristics and item characteristics of each behavior; The aggregated features are passed through M layers of enhanced graph convolution, and the features obtained in each layer are combined to form the final representation of the user or item.

5. The recommendation method based on hypergraph and multi-behavior contrastive learning according to claim 4, characterized in that: Based on the enhanced features, feature fusion is performed to predict and recommend target behaviors, including: Configure a multi-dimensional interactive enhanced attention mechanism, which includes multi-dimensional independent attention heads. For each dimension: head h =Softmax(W h (p (i,k) ||q (j,k) )+b h ), In the formula, || represents the series operation of vectors, W h ∈R K×2d and b h ∈R K×1 represents the feature transformation matrix and offset matrix; p (i,k) represents the enhanced feature representation of the user; q (j,k) Representing enhanced features of items; The multi-dimensional interaction enhancement is finally expressed as In the formula, Concat(·) is used to connect all dimensional features in series, W 0 ∈R HK×K is the output transformation matrix; Based on the multi-dimensional interactive enhanced attention mechanism, multi-behavior feature fusion is performed, which is achieved through the following formula: Among them, P i is the fused user feature, Q j is the feature of the fused item; Target behavior prediction and recommendation are performed based on the fused features.

6. The recommendation method based on hypergraph and multi-behavior contrastive learning according to claim 5, characterized in that: The feature fusion based on the enhanced features and the target behavior prediction and recommendation also include: The recommendation model is trained based on the fused features.

7. A recommendation device based on hypergraph and multi-behavior contrastive learning, characterized in that: include: The data preprocessing module is used to obtain and preprocess the interaction data between users and items to obtain user behavior data and item attribute data; A hypergraph construction module is used to construct a hypergraph that reflects the multi-behavior interactions and semantic information between users and items based on user behavior data and item attribute data; A contrastive learning enhancement module, used for obtaining feature representations of users and items based on the hypergraph, and enhancing the feature representations of users and items through multi-behavior contrastive learning; The feature fusion and prediction recommendation module is used to perform feature fusion and target behavior prediction and recommendation based on enhanced features.

8. The recommendation device based on hypergraph and multi-behavior contrastive learning according to claim 7, characterized in that: The hypergraph construction module is specifically used for: Based on the user behavior data and item attribute data, construct an interaction graph between the user and the item; Based on the user behavior data and item attribute data, extracting semantic information and constructing a semantic hypergraph; Based on the interaction graph, construct a behavior hypergraph using the interaction relationship; A semantically enhanced hypergraph is constructed based on the semantic hypergraph and the behavioral hypergraph.

9. An electronic device, characterized in that: The electronic device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the recommendation method based on hypergraph and multi-behavior contrast learning as claimed in any one of claims 1 to 6.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the recommendation method based on hypergraph and multi-behavior contrast learning as described in any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Intelligent recommendation verification method fusing hypergraph and context information

    CN120045785A