Recommendation method and system based on multi-behavior contrast learning

By employing a multi-behavior contrastive learning method, combined with multi-behavior interaction graphs and knowledge graphs, user item embedding representations are generated, solving the noise and data sparsity problems in existing recommendation systems and improving the accuracy and robustness of personalized recommendations.

CN118626721BActive Publication Date: 2026-07-03QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
Filing Date
2024-06-20
Publication Date
2026-07-03

Smart Images

  • Figure CN118626721B_ABST
    Figure CN118626721B_ABST
Patent Text Reader

Abstract

The application discloses a kind of recommendation method and system based on multi-behavior contrast learning, belong to recommended system technical field. Including: obtaining the multi-behavior interaction graph and knowledge graph of user;Multi-behavior interaction graph and corresponding knowledge graph are input into recommendation model and are handled, and recommendation item is obtained;Training recommendation model specifically includes: multi-behavior interaction graph data set is input into behavior perception module and is compared between behaviors and within behaviors Learning, generate multi-behavior information user item embedding representation;Knowledge graph data set is input into knowledge enhancement module and is compared in layer, and knowledge graph user item embedding representation is generated;Multi-behavior information user item embedding representation and knowledge graph user item embedding representation are associated, and the loss function based on preset is used to optimize recommendation model. It can improve the accuracy and robustness of personalized recommendation, solve the problem that existing auxiliary information exists noise and cannot extract effective information in multi-behavior, affect the accuracy of recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of recommender system technology, and in particular to a recommender method and system based on multi-behavior contrastive learning. Background Technology

[0002] The statements in this section merely refer to the background art related to this invention and do not necessarily constitute prior art.

[0003] Recommendation systems aim to provide personalized recommendations, such as personalized content, products, or services, based on user preferences and behaviors. Their purpose is to improve user experience, increase user satisfaction, and promote the activity and stickiness of websites, applications, or platforms.

[0004] Among various recommendation technologies, collaborative filtering (CF) has become one of the effective solutions for predicting user preferences and providing personalized recommendations. This method is based on an important assumption: users' interests and needs can be inferred from their interaction behavior.

[0005] Specifically, if two users perform similar interactive behaviors on a website or application—such as browsing similar pages, clicking similar links or buttons, or searching under specific categories or topics—it can be inferred that they have similar interests in the items. With the development of deep learning in recent years, neural networks have been used in collaborative filtering architectures. While these models have achieved some success, they still face challenges, such as the problem of data sparsity.

[0006] To overcome the problem of data sparsity, knowledge graphs (KGs) are incorporated into recommender systems as useful external auxiliary information, enhancing the representation of users and items by increasing the semantic relevance of items. However, most recommender methods focus only on a single type of user-item interaction. In many real-world scenarios, however, a wide variety of user behaviors exist. Focusing only on a single type of user-item interaction, where purchasing is considered the target behavior and other behaviors are considered auxiliary behaviors, fails to extract valuable information from the complex and diverse range of behaviors, impacting the accuracy of personalized recommendations.

[0007] In summary, the existing technology still has the following problems:

[0008] 1. Using auxiliary behaviors and knowledge graphs as external auxiliary information for personalized recommendations may be affected by noise. Auxiliary behaviors may contain noisy interactions, which are detrimental to learning the target task; while knowledge graphs, as external auxiliary information, may also contain irrelevant information, and the influence of noise can be amplified and amplified through GNN propagation, affecting the accuracy of personalized recommendations.

[0009] 2. Personalized behaviors are diverse, and different types of behaviors are interdependent and complementary. The degree of dependence among users also varies, which poses a challenge to the extraction of valuable information. Summary of the Invention

[0010] To address the shortcomings of existing technologies, this invention provides a recommendation method, system, electronic device, and computer-readable storage medium based on multi-behavior contrastive learning. By combining intra-behavior and inter-behavior contrastive learning, it can more comprehensively capture self-supervised signals of different behaviors and self-supervised signals of the same behavior, capturing the dependencies between user behaviors. This helps alleviate the noise problem caused by auxiliary behavior information and improves model accuracy. Simultaneously, utilizing contrastive learning data augmentation methods, a hierarchical augmentation method is proposed to solve the data noise problem of knowledge graphs, thereby further improving the robustness of recommendations.

[0011] In a first aspect, the present invention provides a recommendation method based on multi-behavior contrastive learning;

[0012] A recommendation method based on multi-behavior contrastive learning includes:

[0013] Obtain the user's multi-behavioral interaction graph and the corresponding knowledge graph;

[0014] The multi-behavior interaction graph and the corresponding knowledge graph are input into the trained recommendation model for processing to obtain recommended items.

[0015] Training the recommendation model specifically includes:

[0016] Construct a multi-behavior interaction graph dataset and a corresponding knowledge graph dataset;

[0017] The multi-behavior interaction graph dataset is input into a preset behavior perception module to perform inter-behavior contrast learning and intra-behavior contrast learning, generating a multi-behavior information user item embedding representation.

[0018] The knowledge graph dataset is input into a preset knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user item embedding representation.

[0019] The recommendation model is optimized by associating multi-behavioral information user item embedding representations with knowledge graph user item embedding representations and based on a preset loss function.

[0020] In some implementations, inputting the multi-behavior interaction graph dataset into a preset behavior-aware module for inter-behavior contrast learning and intra-behavior contrast learning specifically involves:

[0021] The multi-behavior interaction graph is input into a pre-defined graph neural network for processing. Iterative calculations are performed with the goal of minimizing the contrastive learning loss between behaviors and the contrastive learning loss within behaviors, thereby capturing the high-order connections in the behavior interaction graph.

[0022] In some implementations, the inter-behavior contrastive learning loss is expressed as:

[0023]

[0024] In the formula, For positive sample pairs, For negative sample pairs, τ is a parameter controlling the smoothness, and s(~) is a pairwise distance function reflecting the similarity between positive and negative sample pairs.

[0025] In some implementations, the intra-behavioral contrastive learning loss is expressed as:

[0026]

[0027] In the formula, For positive sample pairs, For negative sample pairs, l represents the fixed comparison layer of the neural network, and l′ is the final output layer.

[0028] In some implementations, the step of inputting the knowledge graph dataset into a preset knowledge enhancement module for hierarchical comparative learning specifically includes:

[0029] The semantic information of the knowledge graph is learned through the TransE algorithm, and the embedded representation of each node in the knowledge graph is generated.

[0030] Based on the embedded representation of each node, the consistency of the graph structure is obtained and two user project interaction graph knowledge graph subgraphs with knowledge graph semantic information are constructed.

[0031] Structural comparative learning of user representations and item representations in two user-item interaction graphs.

[0032] Each user item interaction graph is input into a graph convolutional neural network with random noise introduced, and semantic comparison learning is performed between graph convolutional layers.

[0033] In some implementations, the step of inputting the multi-behavior interaction graph and the corresponding knowledge graph into the trained recommendation model for processing to obtain recommended items specifically includes:

[0034] The multi-behavior interaction graph is input into the trained behavior perception module for processing, generating a multi-behavior information user item embedding representation.

[0035] The knowledge graph is input into the trained knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user project embedding representation.

[0036] By combining multi-behavioral information user item embedding representation and knowledge graph user item embedding representation, user representation and item representation are obtained.

[0037] Based on user and item representations, predict the matching score between users and items, and obtain recommended items based on the matching score.

[0038] In some implementations, the behavior perception module and the knowledge enhancement module are configured in parallel, wherein the behavior perception module is a graph convolutional neural network, and the knowledge enhancement module is a graph convolutional neural network. Secondly, the present invention provides a recommendation system based on multi-behavior contrastive learning;

[0039] A recommendation system based on multi-action contrastive learning includes:

[0040] The acquisition module is configured to acquire the user's multi-behavioral interaction graph and the corresponding knowledge graph.

[0041] The recommendation module is configured to: input multi-behavior interaction graphs and corresponding knowledge graphs into a trained recommendation model for processing, and obtain recommended items;

[0042] Training the recommendation model specifically includes:

[0043] Construct a multi-behavior interaction graph dataset and a corresponding knowledge graph dataset;

[0044] The multi-behavior interaction graph dataset is input into a preset behavior perception module to perform inter-behavior contrast learning and intra-behavior contrast learning, generating a multi-behavior information user item embedding representation.

[0045] The knowledge graph dataset is input into a preset knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user item embedding representation.

[0046] The recommendation model is optimized by associating multi-behavioral information user item embedding representations with knowledge graph user item embedding representations and based on a preset loss function.

[0047] Thirdly, the present invention provides an electronic device;

[0048] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps of the recommendation method based on multi-behavior contrastive learning described above.

[0049] Fourthly, the present invention provides a computer-readable storage medium;

[0050] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps of the recommendation method based on multi-behavior contrastive learning described above.

[0051] Compared with the prior art, the beneficial effects of the present invention are:

[0052] 1. The technical solution provided by this invention introduces multi-behavioral information and proposes a concise and effective multi-behavioral comparative learning framework. It utilizes the complementarity of these information in self-supervised learning tasks within and between behaviors to handle noise and capture the diversity between behaviors. The introduction of multi-behavioral information enables the model to fully capture auxiliary behavioral information and provide guidance for target behavior recommendation.

[0053] 2. The technical solution provided by this invention, by combining comparative learning, allows the model to extract higher-level features to enhance individual preferences, distinguish information gradients between different behaviors, reduce the impact of noise, and thus improve overall robustness.

[0054] 3. The technical solution provided by this invention introduces a knowledge enhancement module, using knowledge graphs to enhance project-level information. The integration of knowledge graphs improves the representativeness of projects and partially alleviates the problem of data sparsity. Furthermore, based on traditional contrastive learning methods, a hierarchical contrastive learning method is proposed to further mitigate the noise problem in knowledge graphs. Attached Figure Description

[0055] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0056] Figure 1 This is a flowchart provided for an embodiment of the present invention. Detailed Implementation

[0057] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0058] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. Furthermore, it should be understood that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0059] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0060] Example 1

[0061] Existing recommendation systems are susceptible to noise and cannot fully capture user preferences when using multi-behavioral information and knowledge graphs for user embedding and item embedding learning. Therefore, this invention provides a recommendation method based on multi-behavioral comparative learning.

[0062] Next, combined Figure 1 This embodiment provides a detailed description of a recommendation method based on multi-action contrastive learning. The recommendation method based on multi-action contrastive learning includes the following steps:

[0063] S1. Obtain the user-project multi-behavior interaction graph (multi-behavior interaction graph) and the corresponding project relationship knowledge graph (knowledge graph).

[0064] Here, the multi-behavior interaction graph is constructed based on multi-behavior information, such as browsing, favorites, and purchases, and is defined as follows:

[0065] Gu = (U, B, V)

[0066] In the formula, B = b 1 , ..., b k , ..., b K , represents the set of edges representing behavior K, specifically, if used for u i and items v j If the interaction is under behavior type k, then b ij k =1, otherwise, b ij k =0.

[0067] Knowledge graphs are used as auxiliary information for knowledge enhancement. Since knowledge graphs are heterogeneous graph structures with rich information in their edges and nodes, this embodiment designs a hierarchical comparative learning strategy to alleviate the noise problem of knowledge graphs.

[0068] In this embodiment, the knowledge graph representation obtained using project information is as follows:

[0069] G k = (H, R, T);

[0070] In the formula, H represents the head entity set, R represents the relation set, and T represents the tail entity set. Elements with the same index in these three sets are combined into a triple (h, r, t), which reflects the semantic relation r between the head entity h and the tail entity t.

[0071] S2. Input the multi-behavior interaction graph and the corresponding knowledge graph into the trained recommendation model for processing to obtain recommended items. The recommendation model includes a parallel behavior perception module and a knowledge enhancement module, both of which are graph convolutional neural networks.

[0072] As one implementation method, step S2 specifically includes:

[0073] S201. Input the multi-behavior interaction graph into the trained behavior perception module for processing to generate a multi-behavior information user item embedding representation.

[0074] As one implementation method, the training behavior awareness module specifically includes:

[0075] The constructed multi-behavior interaction graph dataset is used as the input to the training set for the graph convolutional network to compute node representations, as shown in the following formula:

[0076]

[0077] In the formula, This represents the embedding representation of user u under behavior b. Let l represent the embedding representation of item i under behavior b, and l represent a layer of the graph neural mesh.

[0078]

[0079]

[0080] In the formula, For embedding under user b's behavior, v u For the user's final embedding containing multiple behavioral information, B is the total number of behaviors, L is the number of layers in the neural network, and a b These are the learnable weight parameters for each behavior.

[0081] In this embodiment, auxiliary signals are used to supplement the target behavior data, enhancing the capture of user preferences. Each target behavior is treated as a view, and comparative learning of behavior representations is performed across users. This enables cross-type behavior learning through different embedding combinations and achieves information enhancement between user behaviors. The loss function is defined as follows:

[0082]

[0083] in, For positive sample pairs, For negative sample pairs, τ is a parameter controlling the smoothness, and s(~) is a pairwise distance function reflecting the similarity between positive and negative sample pairs.

[0084] Here, positive sample pairs refer to the embedding representations of the same user under different behaviors (b, b'), while negative samples are the embedding representations of different users under different behaviors.

[0085] High-proportion noise interactions in auxiliary behaviors can lead to more noise being implicitly transferred to the target behavior, resulting in the loss of the target behavior's inherent semantics. As one implementation method, this embodiment designs an internal contrastive learning framework that incorporates introduced random noise and utilizes different convolutional layers for contrastive learning to mitigate the impact of noise in auxiliary behaviors.

[0086]

[0087]

[0088] The loss function is expressed as:

[0089]

[0090] in, For positive sample pairs, For negative sample pairs, l represents the fixed comparison layer of the neural network, and l′ is the final output layer.

[0091] Here, positive samples are representations of the same user in the comparison layer l and the final output layer l' of the convolutional layer, while negative samples are representations of different users. This is mainly achieved by utilizing... Conduct comparative learning tasks.

[0092] S202: Input the knowledge graph into the trained knowledge enhancement module for hierarchical comparative learning to generate user item embedding representations of the knowledge graph. Here, S201 and S202 can be executed in parallel.

[0093] As one implementation method, the training knowledge enhancement module specifically includes:

[0094] (1) Construct a knowledge graph dataset corresponding to the multi-behavior interaction graph dataset, and use the TransE algorithm to study the relevant semantics of the knowledge graph, as shown below:

[0095] f d =||v h +v t -v r ||;

[0096]

[0097] In the formula, h represents, t represents, r represents, and f represents d G represents the L1 norm-based similarity measure between embedded vectors. k Let L represent a knowledge graph, lnσ represent a function of the natural logarithm, and L... TE The TransE loss function is first used during training, utilizing L... TE Loss learning utilizes semantic information from the knowledge graph before performing other tasks. h Indicates the embedding of h, v t Indicates the embedding of t, v r Let r represent the embedding of r, and t′ be a random negative sample of t.

[0098] To explicitly represent target behaviors and higher-order relationships in a knowledge graph, the following formula was used for node representation:

[0099]

[0100] In the formula, N i It is the adjacent entity of item i based on different types of relations r(e,i) in the knowledge graph, v e It is its vector representation, W∈R d×2d This represents the learnable parameter weight matrix. This indicates that the project is embedded.

[0101] Then, graph structure enhancement and semantic enhancement strategies are employed to further mitigate the noise impact on the knowledge graph. The specific process is as follows:

[0102] (1) Randomly discard any side of the knowledge graph and calculate the structural consistency in the knowledge graph, as shown below:

[0103] c = s(g(v) i ), g′(v i )),

[0104] In the formula, g(v i ), g′(v i ) represents two knowledge graph subgraphs generated after randomly discarding edges from the knowledge graph.

[0105] (2) Calculate the estimated probability of the interaction edge between the discarding user u and item i, as follows:

[0106]

[0107] In the formula, ρ u,i ρ represents the estimated probability of discarding the interaction edge between user u and item i. τ Let μ be the cutoff probability. ρ′ This represents the mean.

[0108] (3) Using the calculated estimated probability ρ u,i Two user-item interaction graph subgraphs for the target behavior are constructed and input into a graph convolutional network to obtain an embedded representation with knowledge graph information.

[0109] Traditional structural augmentation typically employs edge-dropping strategies to mitigate some noise. However, due to the inherent randomness, this approach has limitations in noise reduction. Therefore, in this embodiment, a semantic augmentation strategy is used to compute user and item representations with semantic information, as follows:

[0110]

[0111] in, This represents the representation of user u in layer l. This represents the representation of item i in layer l. In this embodiment, a random noise vector is added. and To improve the model's resistance to interference and its robustness.

[0112] By leveraging the collaborative supervision of two generated user-item interaction graph subgraphs, comparative learning is performed on the user / item representations of a specific view. Based on InfoNCE loss, the loss function for graph structure-enhanced contrastive learning is defined as follows in this embodiment:

[0113]

[0114] in, For positive sample pairs, These are negative sample pairs.

[0115] The loss function for semantic enhancement contrastive learning is represented as follows:

[0116]

[0117] As one implementation method, when training the recommendation model described above, BPR loss is chosen as the loss function to optimize the model. Specifically, it assumes that observed interactions that indicate more user preferences should be assigned higher prediction values ​​than unobserved interactions, as shown below:

[0118]

[0119] Furthermore, to better learn information from different perspectives, firstly, two modules are trained separately. Then, the user representations and item representations trained by the two modules are correlated, and the relevant contrastive learning loss and BPR loss are calculated together.

[0120]

[0121] Where Ω represents the learnable model parameters, and L... cl It is the sum of contrastive learning, and λ1 and λ2 are their weight hyperparameters.

[0122] S203. Combine the user item embedding representation of multi-behavioral information with the user item embedding representation of knowledge graph to obtain user representation and item representation.

[0123] Through S201 and S202 above, two different methods of generating user item embedding representations were obtained: one containing various behavioral information, and the other containing rich knowledge graph information. These embedding representations obtained from different perspectives contain information with different focuses, and are combined to form the final representation, as shown below:

[0124]

[0125] Among them, v u Representing user representation, v i This indicates the project's characteristics.

[0126] S204. Based on user and item representations, predict the matching score between users and items, and obtain recommended items based on the matching score.

[0127] Specifically, the inner product of user representation and item representation is used to predict their matching score, and items with high matching scores are recommended to users.

[0128] Next, to verify the advancement of the method described in this embodiment, experiments were conducted on different datasets, as shown below:

[0129] Table 1 Dataset

[0130]

[0131] Table 2 Experimental Results

[0132]

[0133] Table 2 lists the performance evaluation results of all methods on different datasets. Since the datasets vary significantly in data volume and sparsity, this demonstrates the good versatility of the method described in this embodiment. Its significant performance improvement is mainly attributed to three aspects:

[0134] (1) The introduction of multi-behavioral information enables the model to fully capture auxiliary behavioral information and provide guidance for target behavior recommendation.

[0135] (2) By combining comparative learning, the model can extract higher-level features to enhance individual preferences, distinguish information gradients between different behaviors, reduce the impact of noise, and thus improve overall robustness.

[0136] (3) The integration of knowledge graphs improved the representativeness of the project and partially alleviated the problem of data sparsity.

[0137] Example 2

[0138] This embodiment discloses a recommendation system based on multi-behavior contrastive learning, including:

[0139] The acquisition module is configured to acquire the user's multi-behavioral interaction graph and the corresponding knowledge graph.

[0140] The recommendation module is configured to: input multi-behavior interaction graphs and corresponding knowledge graphs into a trained recommendation model for processing, and obtain recommended items;

[0141] Training the recommendation model specifically includes:

[0142] Construct a multi-behavior interaction graph dataset and a corresponding knowledge graph dataset;

[0143] The multi-behavior interaction graph dataset is input into a preset behavior perception module to perform inter-behavior contrast learning and intra-behavior contrast learning, generating a multi-behavior information user item embedding representation.

[0144] The knowledge graph dataset is input into a preset knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user item embedding representation.

[0145] The recommendation model is optimized by associating multi-behavioral information user item embedding representations with knowledge graph user item embedding representations and based on a preset loss function.

[0146] It should be noted that the acquisition module and recommendation module described above correspond to the steps in Embodiment 1. The examples and application scenarios implemented by these modules and their corresponding steps are the same, but they are not limited to the content disclosed in Embodiment 1. It should also be noted that these modules, as part of the system, can be executed in a computer system, such as a set of computer-executable instructions.

[0147] Example 3

[0148] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, as well as computer instructions stored in the memory and running on the processor. When the computer instructions are executed by the processor, they complete the steps of the recommendation method based on multi-behavior contrastive learning described above.

[0149] Example 4

[0150] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions, which, when executed by a processor, complete the steps of the recommendation method based on multi-behavior contrastive learning described above.

[0151] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0152] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0153] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0154] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0155] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A recommendation method based on multi-behavior contrast learning, characterized in that, include: Obtain the user's multi-behavioral interaction graph and the corresponding knowledge graph; Multiple behaviors include browsing, saving, and purchasing; The multi-behavior interaction graph and the corresponding knowledge graph are input into the trained recommendation model for processing to obtain recommended items; wherein, training the recommendation model specifically includes: Construct a multi-behavior interaction graph dataset and a corresponding knowledge graph dataset; The multi-behavior interaction graph dataset is input into a preset behavior perception module to perform inter-behavior contrast learning and intra-behavior contrast learning, generating a multi-behavior information user item embedding representation. The knowledge graph dataset is input into a preset knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user item embedding representation. The recommendation model is optimized by associating multi-behavioral information user item embedding representations with knowledge graph user item embedding representations and based on a preset loss function. The step of inputting the knowledge graph dataset into a preset knowledge enhancement module for hierarchical comparative learning specifically includes: learning the semantic information of the knowledge graph through the TransE algorithm to generate the embedding representation of each node in the knowledge graph; obtaining the consistency of the graph structure based on the embedding representation of each node and constructing two user-item interaction graph knowledge graph subgraphs with semantic information of the knowledge graph; performing structural comparative learning on the user representation and item representation in the two user-item interaction graphs; inputting each user-item interaction graph into a graph convolutional neural network and introducing random noise, and performing semantic comparative learning between graph convolutional layers; The process of inputting the multi-behavior interaction graph and the corresponding knowledge graph into the trained recommendation model to obtain recommended items specifically includes: inputting the multi-behavior interaction graph into the trained behavior perception module for processing to generate a multi-behavior information user-item embedding representation; inputting the knowledge graph into the trained knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user-item embedding representation; combining the multi-behavior information user-item embedding representation and the knowledge graph user-item embedding representation to obtain user representation and item representation; predicting the matching score between users and items based on the user representation and item representation; and obtaining recommended items based on the matching score.

2. The multi-behavior contrast learning based recommendation method of claim 1, wherein, The multi-behavior interaction graph dataset is input into a preset behavior-aware module for inter-behavior contrast learning and intra-behavior contrast learning, specifically as follows: The multi-behavior interaction graph is input into a pre-defined graph neural network for processing. Iterative calculations are performed with the goal of minimizing the contrastive learning loss between behaviors and the contrastive learning loss within behaviors, thereby capturing the high-order connections in the behavior interaction graph.

3. The multi-behavior contrast learning based recommendation method of claim 2, wherein, The inter-behavior contrastive learning loss is expressed as: , wherein, is a positive sample pair, is a negative sample pair, B is the total number of behaviors, is a parameter controlling the smoothness, is a pair-wise distance function reflecting the similarity of positive and negative sample pairs.

4. The recommendation method based on multi-behavior contrastive learning as described in claim 2, characterized in that, The intra-behavioral contrastive learning loss is expressed as: , In the formula, For positive sample pairs, For negative sample pairs, B is the total number of rows. Represents a fixed comparison layer in a neural network. This is the final output layer.

5. The multi-behavior contrast learning based recommendation method of claim 1, wherein, The behavior perception module and the knowledge enhancement module are configured in parallel. The behavior perception module is a graph convolutional neural network, and the knowledge enhancement module is a graph convolutional neural network.

6. A recommendation system based on multi-behavior contrastive learning, implemented with the recommendation method of any one of claims 1-5, characterized in that, include: The acquisition module is configured to acquire the user's multi-behavioral interaction graph and the corresponding knowledge graph. The recommendation module is configured to: input multi-behavior interaction graphs and corresponding knowledge graphs into a trained recommendation model for processing, and obtain recommended items; Training the recommendation model specifically includes: Construct a multi-behavior interaction graph dataset and a corresponding knowledge graph dataset; The multi-behavior interaction graph dataset is input into a preset behavior perception module to perform inter-behavior contrast learning and intra-behavior contrast learning, generating a multi-behavior information user item embedding representation. The knowledge graph dataset is input into a preset knowledge enhancement module for hierarchical comparative learning to generate a knowledge graph user item embedding representation. The recommendation model is optimized by associating multi-behavioral information user item embedding representations with knowledge graph user item embedding representations and based on a preset loss function.

7. An electronic device, comprising: It includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, which, when executed by the processor, perform the recommendation method based on multi-behavior contrastive learning as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, perform the recommendation method based on multi-behavior contrastive learning as described in any one of claims 1-5.