Knowledge collaborative recommendation method based on noise enhancement and graph attention network

By introducing noise enhancement and graph attention networks into the knowledge graph, a collaborative knowledge graph is built, and the problem of long-tail distribution in the knowledge graph is solved, reducing calculation overhead and improving recommendation effect.

CN120407944APending Publication Date: 2025-08-01AIR FORCE UNIV PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510587122.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing technology has long tail distribution problems in the knowledge graph, which leads to large calculation overhead and poor recommendation effect. The traditional method generates graphs and enhances the calculation overhead during training, making it difficult to effectively solve the unique organizational structure of the knowledge graph and the complexity of the long tail distribution.

Method used

Using a method based on noise enhancement and graph attention network, a collaborative knowledge graph is constructed, and through vectorization processing, the introduction of attention mechanisms and multi-level comparison learning algorithms are reduced to unnecessary computing overhead and improve recommendation results.

Benefits of technology

Through the combination of vectorization processing and attention mechanism, information attenuation is reduced, and sample pairs are constructed through noise vectors to perform multi-level comparison learning, improve the consistency of learning representations, improve recommendation effect and reduce calculation overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407944A_ABST
    Figure CN120407944A_ABST
Patent Text Reader

Abstract

The invention relates to a knowledge collaborative recommendation method based on noise enhancement and a graph attention network, and the method comprises the steps: constructing a collaborative knowledge graph which is represented in a triple structure form; vectorization processing is carried out on the entities and the relations of the triple, and first sorting loss in the vectorization processing process is calculated; an attention mechanism is introduced to perform weight distribution on the triad after vectorization processing, propagation embedding is performed recursively along high-order connectivity, and recursively updated entity representation of each propagation layer is obtained; adding a noise vector to the entity representation to construct a positive sample pair, and performing comparative learning on the positive sample pair by adopting a multi-stage comparative learning algorithm to obtain node enhancement representation and total comparative learning loss; and calculating an interaction probability according to the node enhancement representation to obtain a second sorting loss, calculating a target loss, obtaining a target interaction probability when the target loss is iterated to be minimum, and completing recommendation according to the target interaction probability. According to the invention, the recommendation effect is improved, and unnecessary calculation overhead is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer application technologies, and particularly to a knowledge collaborative recommendation method based on noise enhancement and graph attention network. Background Art

[0002] With the development of deep learning, graph convolutional networks have been widely applied to recommendation systems. Through graph convolutional networks, the relationships and semantic information between entities can be effectively captured, thereby improving the accuracy and personalization degree of recommendations. By performing message passing and feature learning in a knowledge graph, graph convolutional networks can learn more representative entity representations, thereby improving the performance of recommendation systems. Among them, in a knowledge graph, entities and relationships can be represented as nodes and edges in a graph, and graph convolutional networks can be used to perform information transmission and feature extraction between these nodes and edges. However, a large amount of graph data in a knowledge graph often leads to a long-tail distribution, that is, most of the relationships are concentrated in a few entity nodes.

[0003] The prior art adopts a contrastive learning method, which can derive general features from unlabeled original data to effectively solve the problem of data sparsity. Applying contrastive learning in a recommendation system has made remarkable progress, and empirical evidence shows that contrastive learning promotes the development of various embedding representations towards a more uniform distribution, thereby promoting the enhancement of long-tail items. Although the method of using contrastive learning can solve the long-tail problem in graph data to a certain extent, this method is not completely suitable for a knowledge graph. This is because a knowledge graph has a unique organizational structure, that is, the knowledge graph data is composed of triples of a head entity, a relationship, and a tail entity, and this unique organizational structure can be used to reduce redundancy. The large amount of data in a knowledge graph, combined with the complexity of modeling long-tail distributions in various graph types, constitutes an urgent challenge.

[0004] In a recommendation system based on contrastive learning, the main method for improving representations is usually to introduce structural perturbations in the graph, such as randomly deleting edges or nodes. However, during the training process, generating these graph augmentations and constructing the adjacency matrix may lead to significant computational overhead.

[0005] Therefore, it is necessary to provide a new technical solution to improve one or more problems existing in the above solution.

[0006] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0007] The purpose of the embodiments of the present disclosure is to provide a knowledge collaborative recommendation method based on noise enhancement and graph attention network, which can improve the recommendation effect while reducing unnecessary computational overhead.

[0008] According to the embodiments of the present disclosure, a knowledge collaborative recommendation method based on noise enhancement and graph attention network is provided, including:

[0009] Constructing a collaborative knowledge graph based on a user-item bipartite graph and a knowledge graph, and the collaborative knowledge graph is represented in the form of a triple structure;

[0010] Vectorizing the entities and relationships of the triple, and calculating the first ranking loss in the vectorization process;

[0011] Introducing an attention mechanism to assign weights to the vectorized triple, and recursively propagating the embeddings along the high-order connectivity to obtain the entity representations recursively updated at each propagation layer;

[0012] Adding a noise vector to the entity representation to construct positive sample pairs, and using a multi-level contrast learning algorithm to perform contrast learning on the positive sample pairs to obtain node-enhanced representations and the total contrast learning loss;

[0013] Calculating the interaction probability according to the node-enhanced representation, and obtaining the second ranking loss. Combining the first ranking loss, the total contrast learning loss and the second ranking loss to calculate the target loss. When the target loss iterates to the minimum, the target interaction probability is obtained, and the recommendation is completed according to the target interaction probability.

[0014] In an exemplary embodiment of the present disclosure, before constructing the collaborative knowledge graph based on the user-item bipartite graph and the knowledge graph, it further includes:

[0015] Collecting the interaction information between the user and the item, and constructing a user-item bipartite graph according to the interaction information between the user and the item;

[0016] Collecting a knowledge graph and constructing a knowledge graph in the form of a triple structure.

[0017] In an exemplary embodiment of the present disclosure, in the step of vectorizing the entities and relationships of the triple and calculating the first ranking loss in the vectorization process, the first ranking loss is calculated by formula (1):

[0018]

[0019] Wherein, denotes the ranking loss, σ(·) denotes the Sigma function, g(h, r, t) denotes the valid triples in the collaborative knowledge graph, g(h, r, t') denotes the invalid triples, h denotes the head entity, r denotes the relationship between the head entity and the tail entity, t denotes the tail entity, and t' denotes the replaced tail entity. denotes the collaborative knowledge graph.

[0020] In an exemplary embodiment of the present disclosure, introducing an attention mechanism to assign weights to the vectorized triples and recursively propagate the embeddings along the high-order connectivity to obtain the entity representations recursively updated at each propagation layer includes:

[0021] Construct a self-network centered on any of the vectorized entities and calculate the linear combination of the self-network;

[0022] Use the attention mechanism to calculate the attention scores of the triples where the entity is located, and normalize the coefficients of all triples associated with the current entity through the softmax function;

[0023] Aggregate the representation of the current entity with the linear combination of the self-network to obtain a new representation of the current entity;

[0024] Recursively propagate the embeddings along the high-order connectivity, and obtain the entity representations recursively updated at each propagation layer through formula (2):

[0025]

[0026] where, denotes the entity representation at the l-th layer, denotes the recursive update function, denotes the entity representation at the (l - 1)-th layer, denotes the linear combination of the self-network at the (l - 1)-th layer, denotes the self-network, π(h, r, t) denotes the attention score of the triple, denotes the embedding of the tail entity t at the (l - 1)-th layer.

[0027] In an exemplary embodiment of the present disclosure, adding a noise vector to the entity representation to construct positive sample pairs includes:

[0028] Obtain two mutually related entity representations as the initial sample pair;

[0029] Add a noise vector to the initial sample pair to obtain a noisy sample pair;

[0030] The noisy sample pairs are encoded using a neural network encoder, and the encoded noisy sample pairs are mapped to obtain the positive sample pairs.

[0031] In an exemplary embodiment of the present disclosure, the noise vector can be expressed as:

[0032]

[0033] Among them, Δ represents the noise vector, ‖Δ‖2=∈, ∈ represents a small constant, ω represents the weight coefficient, ⊙ represents the element-wise product, sign(e i ) indicates that it is used to judge whether e i Sign function of positive and negative, represents the set of real numbers, and U(0,1) represents uniform distribution.

[0034] In an exemplary embodiment of the present disclosure, the collaborative knowledge graph includes three types of nodes: users, entities, and projects. The total contrastive learning loss is calculated using formula (4):

[0035]

[0036] in, represents the total contrastive learning loss, represents the contrastive learning loss obtained by contrastive learning between users, represents the contrastive learning loss obtained by contrastive learning between entities, Represents the contrastive learning loss obtained by contrastive learning between users and entities.

[0037] In an exemplary embodiment of the present disclosure, the node enhanced representation includes a user node representation and an item node representation. Before calculating the interaction probability based on the node enhanced representation, the method further includes:

[0038] The user node representation and item node representation of each propagation layer are aggregated into user representation vector and item representation vector respectively by layer aggregation method;

[0039] The interaction probability is the inner product of the user representation vector and the item representation vector.

[0040] In an exemplary embodiment of the present disclosure, the second ranking loss is calculated by formula (5):

[0041]

[0042] in, represents the BPR loss, represents the training set, represents the positive interaction between users and items, Indicates an unobserved negative interaction, u represents the user, i represents the item that has been clicked, and j represents the item that has not been clicked. Represents the interaction probability solved based on the user and item i. Represents the interaction probability solved based on the user and item j.

[0043] In an exemplary embodiment of the present disclosure, the target loss is calculated by formula (6):

[0044]

[0045] Wherein, Represents the target loss. Represents the ranking loss. Represents the BPR loss. Represents the total contrastive learning loss, ω represents the weight coefficient, λ represents the parameter, and Θ represents the set of model parameters. E represents the embedding representations of all entities and relationships, W r Represents the relationship transformation matrix. Represents the set of real numbers, W1 (l) Represents the weight matrix corresponding to the l-th layer. Represents the weight matrix corresponding to the l-th layer, {1,…,L} represents, and L represents the total number of layers.

[0046] The technical solutions provided by the present disclosure may include the following beneficial effects:

[0047] In the embodiments of the present disclosure, on the one hand, each node in the collaborative knowledge graph is vectorized, and then the attention mechanism is introduced to assign weights to the vectorized nodes to obtain recursively updated node representations, realizing knowledge-aware propagation on the constructed collaborative knowledge graph, and introducing the attention mechanism during the knowledge-aware propagation process to recursively update the node representations, which can selectively aggregate the neighbor node representations and is beneficial to reducing information attenuation during the propagation process; on the other hand, sample pairs are constructed by adding noise vectors to the recursively updated node representations, and the constructed sample pairs are subjected to contrastive learning using a multi-level contrastive learning algorithm, which can not only improve the consistency of the learned representations, thereby enhancing the node representations, but also reduce unnecessary computational overhead; at the same time, in combination with the iterative update situation of the target loss, more reliable interaction probabilities are obtained, which is beneficial to improving the recommendation effect.

[0048] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings

[0049] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0050] Figure 1 A flowchart showing the steps of a knowledge collaborative recommendation method based on noise enhancement and graph attention network in an exemplary embodiment of the present disclosure;

[0051] Figure 2 A schematic diagram showing a collaborative knowledge graph in an exemplary embodiment of the present disclosure;

[0052] Figure 3 A model diagram of a recommendation system for implementing recommendations in an exemplary embodiment of the present disclosure;

[0053] Figure 4 A framework diagram showing a contrastive learning based on noise enhancement in an exemplary embodiment of the present disclosure;

[0054] Figure 5 A visualization of data augmentation based on noise in an exemplary embodiment of the present disclosure;

[0055] Figure 6 A schematic diagram showing a comparison of the number of training times in a simulation experiment in an exemplary embodiment of the present disclosure;

[0056] Figure 7 A schematic diagram showing the number of training times and loss function values of three recommendation algorithms under the MovieLens-1M dataset in an exemplary embodiment of the present disclosure;

[0057] Figure 8 A schematic diagram showing the number of training times and loss function values of three recommendation algorithms under the Amazon-Book dataset in an exemplary embodiment of the present disclosure;

[0058] Figure 9 A schematic diagram showing the number of training times and loss function values of three recommendation algorithms under the LFM-1b dataset in an exemplary embodiment of the present disclosure. Detailed implementation manners

[0059] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0060] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0061] In this exemplary embodiment, a knowledge collaborative recommendation method based on noise enhancement and graph attention network is first provided. Referring to Figure 1 as shown, the method may include the following steps:

[0062] Step S101: Construct a collaborative knowledge graph based on the user-item bipartite graph and the knowledge graph, and the collaborative knowledge graph is represented in the form of a triple structure;

[0063] Step S102: Vectorize the entities and relationships of the triple, and calculate the first ranking loss in the vectorization process;

[0064] Step S103: Introduce an attention mechanism to assign weights to the vectorized triple, and recursively propagate the embeddings along the high-order connectivity to obtain the recursively updated entity representations of each propagation layer;

[0065] Step S104: Add a noise vector to the entity representation to construct a positive sample pair, and use a multi-level contrast learning algorithm to perform contrast learning on the positive sample pair to obtain a node-enhanced representation and a total contrast learning loss;

[0066] Step S105: Calculate the interaction probability according to the node-enhanced representation and obtain a second ranking loss. Combine the first ranking loss, the total contrast learning loss and the second ranking loss to calculate the target loss. When the target loss iterates to the minimum, obtain the target interaction probability, and complete the recommendation according to the target interaction probability.

[0067] In the embodiments of the present disclosure, on the one hand, each node in the collaborative knowledge graph is vectorized, and then an attention mechanism is introduced to assign weights to the vectorized nodes, obtaining recursively updated node representations, realizing knowledge-aware propagation on the constructed collaborative knowledge graph, and introducing an attention mechanism during the knowledge-aware propagation process to recursively update the node representations, so that neighbor node representations can be selectively aggregated, which is beneficial to reducing information attenuation during the propagation process; on the other hand, a sample pair is constructed by adding a noise vector to the recursively updated node representation, and a multi-level contrast learning algorithm is used to perform contrast learning on the constructed sample pair. In this way, not only can the consistency of the learned representation be improved, thereby enhancing the node representation, but also unnecessary computational overhead can be reduced; at the same time, in combination with the iterative update of the target loss, a more reliable interaction probability is obtained, which is beneficial to improving the recommendation effect.

[0068] It should be understood that, as shown in Figure 2 , this embodiment introduces a collaborative knowledge graph (CKG). The collaborative knowledge graph includes three types of nodes and different relationships. Among them, the three types of nodes are users, items, and entities. It should be noted that an item can also be regarded as an entity. For example, there is an interaction between user u1 and item i1, and item i1 is guided by entity e1. It should be noted that the collaborative filtering method focuses on behavioral similarity and believes that users with similar behaviors will also have similar item preferences. For example, users u4 and u5 both click on item i1. However, existing methods cannot fully capture the deeper correlation between fields and related instances. For example, it is challenging to model the following relationship path for user u1: Because these methods do not fully explore high-order connections. Inspired by the Graph Neural Network (GNN), the method provided in this embodiment focuses on discovering high-order connections and combinatorial relationships between nodes to capture the deeper correlation between fields and related instances.

[0069] Next, each step of the above method in this exemplary embodiment will be described in more detail.

[0070] Exemplarily, before constructing a collaborative knowledge graph based on a user-item bipartite graph and a knowledge graph, it further includes:

[0071] Collect interaction information between users and items, and construct a user-item bipartite graph according to the interaction information between users and items;

[0072] Collect a knowledge graph and construct a knowledge graph in the form of a triple structure.

[0073] Specifically, the interaction information between users and projects (e.g., clicks or purchases) can be described as a user-project bipartite graph, which can be defined as \(\{(u, y ui , i) | u \in U, i \in I\}\), where \(u\) and \(I\) represent the user set and the project set respectively, and \(y ui represents the interaction between the user and the project. \(y ui = 1 indicates the observed interaction between the user and the project, otherwise, \(y ui = 0 indicates the unobserved interaction between the user and the project.

[0074] It should be noted that in addition to the interaction information between users and projects, other information can also be collected, such as project attributes and external knowledge. Usually, these data of project attributes and external knowledge can include entities such as directors, actors, and genres, as shown in Figure 2 . These data can be combined to construct a knowledge graph. It should be explained that a knowledge graph is a directed graph composed of subject-attribute-object triples, and the triples can be expressed as \(\{(h, r, t) | h, t \in E, r \in R\}\), where \(h\) represents the head entity, \(t\) represents the tail entity, \(r\) represents the relationship between the head entity and the tail entity, and \(E\) and \(R\) represent the entity set and the relationship set respectively. In addition, a project-entity set \(\{(i, e) | i \in I, e \in R\}\) is also established.

[0075] In step S101, a collaborative knowledge graph is constructed based on the user-project bipartite graph and the knowledge graph. The constructed collaborative knowledge graph is used to integrate user behavior and project information into a unified graph. Each instance of user behavior is initially described as three instances. Subsequently, the user-project bipartite graph and the knowledge graph are integrated into a seamless unified graph, which is the collaborative knowledge graph. The collaborative knowledge graph is represented in the form of a triple structure and can be expressed as \(G = \{(h, r, t) | h, t \in E', r \in R'\}\), where \(E'\) represents the entity set in the collaborative knowledge graph, \(R'\) represents the relationship set in the collaborative knowledge graph, \(E' = E \cap U\), and \(R' = R \cup \{Interact\}\).

[0076] It should be noted that the method proposed in this embodiment is to estimate the probability of a user clicking on a project based on the constructed collaborative knowledge graph, that is, to calculate the interaction probability, and make recommendations according to the interaction probability.

[0077] It should also be noted that, as shown in Figure 3 , the method proposed in this application is implemented based on a model composed of a vector embedding layer, an attention embedding propagation layer, a contrast learning embedding layer, and a prediction layer.

[0078] Specifically, in step S102, the entities and relationships of the triples can be vectorized in the vector embedding layer. In this step, knowledge graph embedding is an effective method to parameterize entity and relationship into vector representations while maintaining the graph structure unchanged. For the collaborative knowledge graph, the TransR algorithm can be used for knowledge graph embedding.

[0079] Furthermore, for the triples in the collaborative knowledge graph, the translation principle can be used to learn the embeddings of entity nodes and the embeddings of the relationships between the head entity and the tail entity. where e h is the embedding of the head entity h, e t ∈R d is the embedding of the tail entity t, e r ∈R k is the embedding of the relationship r, which can capture the semantics of the triples in the collaborative knowledge graph. In the space of relationship r, and are the projective representations of e h and e t respectively. Therefore, for a given triple, its likelihood score can be obtained.

[0080] Specifically, the likelihood score of the triple is calculated by formula (7):

[0081]

[0082] where Score g(h,r,t) represents the likelihood score of the triple, W r represents the relationship transformation matrix, W r ∈R k×d , and the relationship transformation matrix W r can map entities from the d-dimensional space to the k-dimensional space.

[0083] The higher the likelihood score of the above triple, the greater the possibility of validity. Conversely, the lower the likelihood score, the lower the possibility of validity.

[0084] Optionally, in step S102, the training of the TransR algorithm takes into account the relative order between valid triples and invalid triples, and uses the first ranking loss (BPR loss) to distinguish between the two, where the first ranking loss is calculated by formula (1):

[0085]

[0086] where denotes the sorting loss, σ(·) denotes the Sigma function, g(h, r, t) denotes the valid triples in the collaborative knowledge graph, g(h, r, t') denotes the invalid triples, h denotes the head entity, r denotes the relationship between the head entity and the tail entity, t denotes the tail entity, and t' denotes the replaced tail entity. denotes the invalid triples constructed by randomly replacing one entity in the valid triples. denotes the collaborative knowledge graph.

[0087] It should be noted that the TransR algorithm is a method for knowledge graph embedding. The TransR algorithm embeds entities and relationships into different spaces. Specifically, it classifies entities into different types and maintains an entity space for each type. Relationships are represented in an independent relationship space. This design enables the model to better handle the clustering problem among entities of the same type and improve the performance of the model in dealing with complex relationships.

[0088] In one embodiment, in step S103, an attention mechanism can be introduced in the attention embedding propagation layer to assign weights to the vectorized triples, and the embedding is recursively propagated along the high-order connectivity to obtain the recursively updated entity representations of each propagation layer.

[0089] Using the graph neural network, the collaborative knowledge graph can be recursively propagated and embedded along the high-order connectivity, and the importance of nodes is distinguished by assigning corresponding weights to each node in the triples. Specifically, a single-layer network can be constructed first and then extended to a multi-layer architecture.

[0090] Specifically, step S103 includes the following steps:

[0091] Step S1031: Construct a self-network centered on any one of the vectorized entities and calculate the linear combination of the self-network;

[0092] Step S1032: Use the attention mechanism to calculate the attention scores of the triples where the entity is located, and normalize the coefficients of all triples associated with the current entity through the softmax function;

[0093] Step S1033: Aggregate the representation of the current entity and the linear combination of the self-network to obtain the new representation of the current entity;

[0094] Step S1034: Recursively propagate the embedding along the high-order connectivity, and obtain the recursively updated entity representations of each propagation layer through formula (2):

[0095]

[0096] Among them, represents the head entity representation of the l-th layer, represents the recursive update function, represents the head entity representation of the (l - 1)-th layer, represents the linear combination of the self-network of the (l - 1)-th layer, represents the self-network, π(h, r, t) represents the attention score of the triple, represents the embedding of the tail entity t of the (l - 1)-th layer.

[0097] The above steps S1031 to S1033 can be regarded as the specific implementation manners of constructing a single-layer network, and the above step S1034 can be regarded as the implementation manner of extending the single-layer network to a multi-layer architecture.

[0098] Specifically, in step S1031, based on the fact that an entity can participate in multiple triples and serves as a bridge connecting two triples and propagating information, information propagation is carried out between an entity and its neighbors. A self-network is constructed centered on a head entity h, and is used to represent the constructed self-network. The linear combination of the self-network can represent the first-order connectivity structure of the head entity. The linear combination of the self-network is calculated through formula (8):

[0099]

[0100] Among them, represents the linear combination of the self-network, π(h, r, t) represents the attention score of the triple, e t represents the embedding of the tail entity t, represents the self-network.

[0101] Specifically, in step S1032, an attention mechanism is introduced, and the attention score of the triple where the entity is located is calculated through formula (9),

[0102]

[0103] Among them, π(h, r, t) represents the attention score of the triple, W r represents the relation transformation matrix; tanh(·) represents the hyperbolic tangent function, which serves as a non-linear activation function.

[0104] This makes the attention score of the triple depend on the distance between e h and e t in the relation r space, so as to propagate more information to closer entities.

[0105] Furthermore, in step S1032, the coefficients of all triplets associated with the head entity h are normalized using the softmax function, specifically using formula (10):

[0106]

[0107] Here, π'(h, r, t) represents the normalized data, and exp(·) represents the natural exponential function.

[0108] The π'(h, r, t) obtained by the normalization process mentioned above will affect the process of assigning different weights to each relationship, which can indicate which neighbor nodes should pay more attention to capture the collaborative signal.

[0109] It should be noted that the attention score π(h, r, t) of the triplet can control the attenuation factor of each propagation, indicating the extent to which the tail entity t with relation r transfers information to the head entity h.

[0110] Specifically, in step S1033, in the final stage, the entity representation e is expressed by formula (11) h Linear combination with ego network Perform aggregation to generate a new representation of the head entity h:

[0111]

[0112] in, Represents the new representation of the aggregated head entity h.

[0113] Specifically, the bidirectional interaction aggregator is used to calculate the entity representation e h Linear combination with ego network The interaction between them realizes the aggregation processing. Among them, the bidirectional interaction aggregator is used to calculate e h and The interaction can be expressed as:

[0114]

[0115] Among them, f Bi-Interaction Represents interaction, W1 and W2 represent trainable weight matrices, W1,W2∈R d×d' , ⊙ represents element-wise product; LeakyReLU(·) represents the activation function, which is mainly used to solve nonlinear problems in neural networks.

[0116] The above two-way interaction aggregator performs e h and The additional encoding of the feature interactions between h and sensitive to the correlation between them, and more information can be conveyed through similar entities.

[0117] Specifically, in step S1034, higher-order connection details are explored by stacking additional propagation layers, and multi-hop neighbor information is collected. Among them, the information propagated for the head entity h in the l-layer self-network is defined as:

[0118]

[0119] where is the representation of the tail entity t generated from the previous information, which contains the information of the neighbors in the previous (l - 1) layers.

[0120] In the above attention embedding propagation layer, the embedding propagation process can capture higher-order connections, and the process of higher-order embedding propagation enhances representation learning by integrating attribute-based signals. Therefore, the learned representations capture richer and more subtle perspectives of the data, which helps to improve performance in various tasks.

[0121] Exemplarily, referring to Figure 4 shown in, this embodiment performs step S104 based on the noise-enhanced contrastive learning framework shown in Figure 4 . It should be noted that, generally, contrastive learning enhances the long-tail distribution of data by optimizing data representations. This embodiment embeds contrastive learning into the knowledge graph attention network, applies the contrastive loss to learn robust representations in the latent space, and learns robust representations by maximizing the consistency between different augmented views of the same node embedding.

[0122] Specifically, in step S104, a noise vector is added to the entity representation to construct positive sample pairs, including:

[0123] Step S1041: Obtain two interrelated entity representations as the initial sample pair; among them, the two interrelated entities satisfy two interrelated perspectives of the same instance, and the initial sample pair can be represented as e i and e j ;

[0124] Step S1042: Add a noise vector to the initial sample pair to obtain a noisy sample pair, and the noisy sample pair can be represented as and

[0125] Step S1043: Use a neural network encoder to encode the noisy sample pair, and perform mapping processing on the encoded noisy sample pair to obtain the positive sample pair, and the positive sample pair can be represented as z i and z j .

[0126] In the above step S1043, the neural network encoder is used to and for encoding, which can be expressed as where h i represents the encoded noisy sample, represents encoding the noisy sample pair using the neural network encoder, ResNet represents the residual network, and h i in the residual network can be understood as the output after the average pooling layer. Mapping the encoded noisy sample pair using the projection head g(·) can map the representation to the space where the contrast loss is applied, which can be specifically expressed as z i = g(h i ) = W (2) σ(W (1) h i ), where z i represents a sample in the positive sample pair, and σ(·) represents the ReLU non-linear function.

[0127] It should be noted that there is a hidden layer before the projection head, and the hidden layer provides an improved representation for contrastive learning. Then, for the positive sample pair z i and z j , the contrastive learning loss function can be defined as:

[0128]

[0129] where represents the loss function value, i, j, k represent users or entities in the gradient descent set ; z i , z j represent positive sample pairs under different noises, z i , z k represent negative sample pairs, and τ represents the temperature coefficient, which adjusts the penalty degree for negative samples, τ > 0.

[0130] The goal of contrastive learning is to promote the consistency between the positive samples z i and z j , while minimizing the similarity between negative sample pairs.

[0131] It should be noted that in order to extract representations from the collaborative knowledge graph, LightGCN can be used as the encoder. Among them, LightGCN is an optimized model for recommendation systems, a simplified version based on graph convolutional neural networks, mainly used to improve the performance and training efficiency of recommendation systems. The working method of the message passing mechanism of LightGCN is as follows:

[0132]

[0133] Among them, E represents the embedding representations of all entities and relationships, and E (0) represents the node embedding to be learned, and E (0) ∈R (M +N)×d , M and N represent the number of users and entities respectively, and l represents the number of layers. represents the normalized undirected adjacency matrix without self-loops.

[0134] Furthermore, the normalized undirected adjacency matrix without self-loops can be expressed as:

[0135]

[0136] Among them, Y represents the user-item interaction matrix, and Y ∈ R M×N . y ui = 1 represents the observed interaction, and y ui = 0 represents the unobserved interaction.

[0137] It should be noted that considering that it is crucial to adjust the uniformity of the learned representations within a specific range, and also considering the complexity and time required to modify the graph structure to achieve the controlled uniformity, this implementation focuses on manipulating the embedding space. Inspired by introducing subtle perturbations to images, this implementation directly adds random noise to the representations to achieve effective enhancement. Specifically, in step S104, this embodiment also introduces noise enhancement on the basis of contrastive learning, referring to step S1042.

[0138] It should also be noted that introducing noise enhancement to replace the traditional graph enhancement method can also solve the problems of limited computational efficiency and flexibility of the previous contrastive learning algorithms, and reduce unnecessary computational overhead.

[0139] Specifically, for step S1042, the noise vector can be expressed as:

[0140]

[0141] Among them, Δ represents the noise vector, ‖Δ‖2 = ∈, ∈ represents a small constant, ω represents the weight coefficient, ⊙ represents the element-wise product, and sign(e i ) represents the sign function used to judge the sign of the representation e i positive or negative, represents the set of real numbers, and U(0,1) represents the uniform distribution.

[0142] To facilitate the understanding of noise enhancement, the following gives a description of noise enhancement. Taking obtaining the representation e i in the d-dimensional embedding space as an example. The following is the description of noise enhancement:

[0143]

[0144] Among them, e i represents the representation obtained in the d-dimensional embedding space, and e' i represents e i after adding the noise vector Δ' i to obtain the enhanced representation, and e'' i represents e i after adding the noise vector Δ'' i to obtain the enhanced representation;

[0145] On the premise that ‖Δ‖2 = ∈, the added noise vectors Δ' i and Δ'' i are obtained. The value of ∈ causes the noise vector Δ to be numerically equivalent to a point on the hypersphere with a radius of ∈.

[0146] As shown in the reference Figure 5 in the same space, Δ' i and Δ'' i ensure that adding noise to e i has the least impact, resulting in smaller deviations and less information enhancement. In the geometric coordinate system, introducing these scaled noise vectors is equivalent to rotating them by an angle θ1 and an angle θ2. Figure 5 The enhanced representations e' i and e'' i shown in introduce subtle differences while retaining most of the original information. This strategy enables the learned representation to effectively cover the entire embedding space, thereby enhancing the model's ability to capture information-rich patterns.

[0147] To generate the perturbed representation, different noises are introduced into the aggregated embeddings of each propagation layer. This noise-included representation learning process can be formalized as:

[0148]

[0149] Among them, E' represents the learning process, and Δ (l) represents the noise vector added in the l-th layer, represents the normalized undirected adjacency matrix without self-loops in the l-th layer.

[0150] It should be noted that the collaborative knowledge graph of this embodiment includes three types of nodes: users, entities, and items. To further enhance the data representation, this embodiment adopts a three-level contrastive learning algorithm, that is, contrastive learning is performed between users and users, between entities and entities, and between user-entity (items), and corresponding multiple contrastive learning losses will be obtained.

[0151] Specifically, the total contrastive learning loss is calculated by formula (4):

[0152]

[0153] Among them, represents the total contrastive learning loss, represents the contrastive learning loss obtained by contrastive learning between users, represents the contrastive learning loss obtained by contrastive learning between entities, represents the contrastive learning loss obtained by contrastive learning between a user and an entity.

[0154] Exemplarily, after l layers of propagation, representations of multiple user nodes u can be obtained, that is, Similarly, for item node i, representations of multiple item nodes i can be obtained That is, the enhanced node representation includes the user node representation and the item node representation. Before calculating the interaction probability according to the enhanced node representation in step S105, the representations obtained in each step need to be integrated into a unified vector. Therefore, before calculating the interaction probability according to the enhanced node representation, it further includes:

[0155] Using a layer aggregation method to aggregate the user node representations and item node representations of each propagation layer into a user representation vector and an item representation vector respectively, where the user representation vector and the item representation vector are expressed as:

[0156]

[0157] Among them, represents the user representation vector, represents the initial user node representation, represents the user node representation of the l-th layer, represents the item representation vector, represents the initial item node representation, represents the item node representation of the l-th layer;

[0158] Among them, the interaction probability is the inner product of the user representation vector and the item representation vector. Taking user u and item i as an example, the interaction probability can be calculated by formula (20):

[0159]

[0160] Among them, represents the interaction probability, represents the transpose of.

[0161] It should be noted that, in order to optimize the recommendation, a second ranking loss is also adopted in the recommendation process in this embodiment. The assumption of this second ranking loss is that the observed interactions indicate stronger user preferences than the unobserved interactions, and thus should be associated with higher predicted values. Therefore, in step S105, the second ranking loss is calculated by formula (5):

[0162]

[0163] Wherein, represents the BPR loss, represents the training set, represents the positive interaction between the user and the item, represents the unobserved negative interaction. u represents the user, i represents the item that has been clicked, j represents the item that has not been clicked, represents the interaction probability solved based on the user and item i, represents the interaction probability solved based on the user and item j.

[0164] After obtaining the first ranking loss, the total contrastive learning loss, and the second ranking loss through the foregoing steps, in step S105, the objective loss can be calculated by formula (6):

[0165]

[0166] Wherein, represents the objective loss, represents the ranking loss, represents the BPR loss, represents the total contrastive learning loss, ω represents the weight coefficient, λ represents the parameter, Θ represents the set of model parameters, E represents the embedding representations of all entities and relationships, W r represents the relationship transformation matrix, represents the set of real numbers, represents the weight matrix corresponding to the l-th layer, represents the weight matrix corresponding to the l-th layer, {1,…,L} represents, L represents the total number of layers.

[0167] In the embodiments of the present application, in order to further verify the recommendation effect of the knowledge collaborative recommendation method proposed in the present application, a simulation experiment is carried out for illustration.

[0168] First, the dataset selected for the simulation experiment is introduced:

[0169] To evaluate the performance of the method proposed in this application, three publicly available large-scale datasets are selected for use: MovieLens-1M, Amazon-book, and Last-FM. These datasets differ in terms of domain, size, and sparsity, and are well-suited for validating the robustness of the model. The following is a detailed description of the above three datasets:

[0170] Regarding the MovieLens-1M dataset, the MovieLens dataset was collected from the MovieLens website. Among them, MovieLens-1M is favored for its well-balanced number of ratings and density. To maintain the quality of the dataset, this embodiment adopts a 15-core setting method, that is, users and items with at least 15 interactions are retained.

[0171] Regarding the Amazon-Book dataset, the Amazon review dataset is commonly used for product recommendation tasks. In the case of this embodiment, the Amazon book subset in this large collection is specifically selected. To maintain the quality of the dataset, the same 15-core setting is also adopted.

[0172] Regarding the LFM-1b dataset, the LFM-1b dataset utilizes artist tags from Last.fm, which are indexed using two genre and style description dictionaries obtained from Allmusic and Freebase. This dataset aims to create a preference profile for each user in LFM-1b, represented as a vector regarding genres. Each listening event in the dataset includes information such as the artist, album, song name, and timestamp. In the simulation experiment of this embodiment, the LFM-1b-tracks dataset is used, and the same 15-core setting is adopted.

[0173] It should be noted that this embodiment constructs a user-item knowledge graph for each dataset. To ensure the quality of the knowledge graph, the dataset is preprocessed to filter out entities that do not appear frequently, that is, entities that appear fewer than 15 times are filtered out. Due to the large amount of data in the LFM-1b dataset, this embodiment further processes it by randomly sampling from the filtered data. The statistical information of the three datasets has been sorted out and presented in Table 2.1.

[0174] Table 2.1 Statistical Information of the Datasets

[0175]

[0176] It should also be noted that, in order to partition the interaction history of each dataset, in this embodiment, 80% of the interaction data is randomly assigned to each user for training, and the remaining 20% is used for testing. During the training process, each user-item interaction is regarded as a positive instance. To balance the dataset, this embodiment adopts negative sampling technology, pairing positive interactions with items that the user has not participated in before.

[0177] Next, the evaluation metrics, comparison mechanism, and parameter settings of the simulation experiment are introduced:

[0178] Regarding the evaluation metrics, in the test set, items that the user has not interacted with before are regarded as negative samples. Subsequently, each recommendation method evaluates and assigns a score to the user's preference for all items. To evaluate the effectiveness and ranking quality of the top K recommendations, this embodiment adopts a series of evaluation metrics commonly used in previous studies, including Mean Reciprocal Rank (MRR@k), Hit Rate (HR@k), Normalized Discounted Cumulative Gain (NDCG@k), and Recall (Recall@k), where K is set to 10.

[0179] Regarding the comparison mechanism, to demonstrate the effectiveness of the recommendation method proposed in this embodiment, the method proposed in this embodiment is compared with the LightGCN method and other knowledge-based recommendation methods, which are specifically as follows:

[0180] LightGCN recommendation method: The adopted model simplifies the graph convolutional neural network, making the graph convolutional neural network more concise and efficient for recommendation. It includes neighborhood aggregation, which is the most critical component for collaborative filtering in the graph convolutional neural network, namely the message passing mechanism.

[0181] RippleNet recommendation method: The adopted model integrates regularization and path-based techniques by enhancing the user representation combined with additional terms along each user path.

[0182] CKE (Collaborative Knowledge Base Embedding) recommendation method: Initially proposed to integrate the knowledge base and additional information (such as images and texts) to enhance the recommendation performance. This recommendation method is used to jointly learn the latent representation and the semantic representation of items in the knowledge base in collaborative filtering.

[0183] CKFG (Collaborative Knowledge Filtering Graph) recommendation method: By using the TransE algorithm on the knowledge graph containing users and items, the traditional recommendation task is transformed into predicting the reliability of triples.

[0184] KGCN (Knowledge Graph Convolutional Network) recommendation method: Apply graph convolutional neural network to the knowledge graph. By mining the correlation attributes between items on the knowledge graph, the correlation between items can be effectively captured.

[0185] KGAT (Knowledge Graph Attention Network) recommendation method: Based on the graph convolutional neural network, the graph attention network is first proposed to be combined with the knowledge graph, and high-order connections are explicitly incorporated into the end-to-end knowledge graph attention network.

[0186] For parameter settings, this simulation experiment specifically uses TensorFlow to implement the method proposed in this application, and the Adam optimizer is used for all models. Among them, TensorFlow is an end-to-end open-source machine learning platform. The batch size is fixed at 1024, and the learning rate is configured as 0.001. The model parameters are initialized using the default Xavier initializer, the dimension is set to 64, and the batch size is set to 2048, which is common in related research. According to the experimental results, the temperature is empirically set to 0.2. In addition, an early stopping strategy is also set. If Recall@10 does not improve in 50 consecutive epochs on the validation set, the training will stop.

[0187] To demonstrate the excellent performance of the method proposed in this application, the performance evaluation results are shown in Table 2.2:

[0188] Table 2.2 Performance Evaluation Results

[0189]

[0190] Combined with Table 2.2, it can be seen that:

[0191] The method proposed in this application always performs excellently on all datasets. Especially on the MovieLens-1M, Amazon-Book, and LFM-1b datasets, the method proposed in this application is 5.51%, 21.47%, and 5.79% higher than the strongest baseline in recall@10 respectively, and 4.02%, 23.53%, and 5.50% higher than the strongest baseline in NDCG@10 respectively. The detailed results, including the best noise settings, will be presented in Table 2.5. On the Amazon-Book dataset, the improvement is particularly significant, which may be due to the large number of items and users, making the training more challenging. The method proposed in this application enhances the embedding representation through contrastive learning, which is especially suitable for this diverse dataset and brings more significant improvements.

[0192] The LightGCN recommendation method simplifies the design of graph convolutional neural networks, but has relatively low performance, indicating that it is not directly applicable to the knowledge graph scenario. The method proposed in this application draws inspiration from its representation learning ideas and has been improved, and these ideas can be effectively applied to knowledge graphs.

[0193] Other comparison methods are designed for knowledge graph recommendation. The importance of the RippleNet recommendation method lies in emphasizing the importance of incorporating neighboring items to improve user representation, thus reducing redundancy. The RippleNet recommendation method emphasizes the benefits of capturing high-order connections or neighbors in the model. However, due to its simpler model and faster convergence speed, the results are slightly lower than other models.

[0194] On all datasets, the KGAT recommendation method always outperforms other mechanisms. In addition, in the simulation phase of this study, the efficiency of model training was improved by optimizing Shuffling BN. The CFKG recommendation method and the CKE recommendation method only utilize the embeddings of aligned entities and model connections at the triple granularity, without dealing with high-order connections, so they lag behind the KGAT recommendation method. In addition, the KGAT recommendation method incorporates the GAT recommendation method on the basis of the KGCN recommendation method to explore the importance of nodes and assign different weights. This enhancement significantly improves the recommendation performance, as demonstrated by the experimental results.

[0195] The following also presents a comparison in terms of training performance, as shown in Figure 6 It can be seen that compared with the LightGCN recommendation method, the CKFG recommendation method, the KGEN recommendation method, and the KGAT recommendation method, the NA-KGACL recommendation method requires fewer training cycles to converge. For the MovieLens-1M dataset, the RippleNet recommendation method converges in fewer training cycles, while the training cycles of the CKE recommendation method are similar to those of the NA-KGACL recommendation method. For the Amazon-Book dataset, the model adopted by the RippleNet recommendation method also converges faster. This is because the model adopted by the RippleNet recommendation method adds terms for each user's path to enrich the user representation, resulting in faster convergence, but at the cost of higher training loss.

[0196] As shown in Figures 7 to 9 the loss functions of the NA-KGACL recommendation method, the RippleNet recommendation method, and the CKE recommendation method on the above three datasets are shown. It can be seen that although the model adopted by the RippleNet recommendation method converges faster, its training loss is significantly higher than the method proposed in this application. In addition, the training loss of the CKE recommendation method is also higher than that of the NA-KGACL recommendation method. Figure 8The latter half of the two model curves is magnified, providing a clearer view of the loss curve.

[0197] To demonstrate the excellent performance of the method proposed in this application, performance comparisons under different noises are also given. The simulation experiments tested four types of noises, namely Gaussian noise, uniform noise, Poisson noise, and Laplace noise, and the relevant experimental results are listed in Table 2.3.

[0198] For Gaussian noise, this noise follows a Gaussian distribution (normal distribution), which is characterized by the fact that the values are concentrated near the mean, and as the distance from the mean increases, the probability density gradually decreases.

[0199] For uniform noise, the values of this noise are uniformly distributed within a given interval. Different from Gaussian noise, uniform noise has a flat probability density function, indicating that all values within the defined range have an equal probability of occurrence.

[0200] For Poisson noise, this noise follows a Poisson distribution, and its variance is proportional to the mean of the noise.

[0201] For Laplace noise, this noise follows a Laplace distribution, which is characterized by having a higher probability density near the mean, and as the distance from the mean increases, the probability density drops rapidly.

[0202] Table 2.3 Performance comparison results of different noises and noise-free

[0203]

[0204] The simulation experiment results show that different datasets exhibit different sensitivities to different types of noises. For the MovieLens-1M dataset, adding Gaussian noise has the most significant effect, increasing Recall@10 by 1.85%. In the Amazon-Book dataset, Poisson noise is proven to be the most effective, increasing Recall@10 by 1.9%. In contrast, the LFM-1b dataset is the most sensitive to uniform noise, achieving a 5.38% improvement in Recall@10.

[0205] In addition to exploring the effects of different types of noises, through simulation experiments, it is also studied how adding noise affects the recommendation performance, that is, whether it enhances or hinders the recommendation. The last row of Table 2.3 shows the results without noise-enhanced training. The research results show that noise enhancement is crucial for effective contrast learning, because the key metric Recall@10 shows a significant improvement effect when applying noise.

[0206] This application explores the semantic relationships of high-order connections and long-tail distributions in a collaborative knowledge graph to enhance knowledge-aware recommendations. The technical solutions in this application model high-order connections in the knowledge graph in an end-to-end manner; in addition, a multi-level contrastive learning algorithm is adopted to establish positive and negative sample pairs, improving the data representation from multiple perspectives. In this way, it is not necessary to rely on inefficient graph augmentation techniques, but rather a simple and effective noise-based embedding enhancement method is used to generate views for contrastive learning. Through simulation experiments, comprehensive experiments are conducted on three large-scale datasets to verify the effectiveness and robustness of the method proposed in this application.

[0207] Regarding the system in the above embodiments, the specific manners in which each unit performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0208] It should be noted that although several units of the system for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the present disclosure. Those of ordinary skill in the art can understand and implement it without creative efforts.

[0209] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.

Claims

1. A knowledge collaborative recommendation method based on noise enhancement and graph attention network, characterized in that Including: Construct a collaborative knowledge graph based on the user-item bipartite graph and the knowledge graph, and the collaborative knowledge graph is represented in the form of a triple structure; Vectorize the entities and relationships of the triple, and calculate the first ranking loss in the vectorization process; Introduce an attention mechanism to assign weights to the triple after vectorization, and recursively propagate the embedding along the high-order connectivity to obtain the entity representations recursively updated at each propagation layer; Add a noise vector to the entity representation to construct a positive sample pair, and use a multi-level contrast learning algorithm to perform contrast learning on the positive sample pair to obtain the node enhanced representation and the total contrast learning loss; Calculate the interaction probability according to the node enhanced representation, and obtain the second ranking loss. Combine the first ranking loss, the total contrast learning loss and the second ranking loss to calculate the target loss. When the target loss iterates to the minimum, obtain the target interaction probability, and complete the recommendation according to the target interaction probability.

2. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein Before constructing the collaborative knowledge graph based on the user-item bipartite graph and the knowledge graph, it further includes: Collect the interaction information between the user and the project, and construct a user-item bipartite graph according to the interaction information between the user and the project; Collect the knowledge graph and construct a knowledge graph in the form of a triple structure.

3. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein In the step of vectorizing the entities and relationships of the triple and calculating the first ranking loss in the vectorization process, the first ranking loss is calculated by formula (1): Among them, represents the sorting loss, σ(·) represents the Sigma function, g(h, r, t) represents the valid triples in the collaborative knowledge graph, g(h, r, t') represents the invalid triples, h represents the head entity, r represents the relationship between the head entity and the tail entity, t represents the tail entity, and t' represents the replaced tail entity. represents the collaborative knowledge graph.

4. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein, The step of introducing an attention mechanism to assign weights to the triple after vectorization and recursively propagating the embedding along the high-order connectivity to obtain the entity representations recursively updated at each propagation layer includes: Construct a self-network centered on any one of the vectorized entities, and calculate the linear combination of the self-network; Use the attention mechanism to calculate the attention score of the triple where the entity is located, and normalize the coefficients of all triples associated with the current entity through the softmax function; Aggregate the representation of the current entity with the linear combination of the self-network to obtain a new representation of the current entity; Recursively propagate the embedding along the high-order connectivity, and obtain the entity representations recursively updated at each propagation layer through formula (2): Among them, represents the entity representation of the l-th layer, represents the recursive update function, represents the entity representation of the (l - 1)-th layer, represents the linear combination of the self-network of the (l - 1)-th layer, represents the self-network, π(h, r, t) represents the attention score of the triple, represents the embedding of the tail entity t of the (l - 1)-th layer.

5. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, characterized in that The step of adding a noise vector to the entity representation to construct a positive sample pair includes: Obtain two mutually related entity representations as the initial sample pair; Add a noise vector to the initial sample pair to obtain a noisy sample pair; Use a neural network encoder to encode the noisy sample pair, and perform mapping processing on the encoded noisy sample pair to obtain the positive sample pair.

6. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 5, characterized in that The noise vector can be expressed as: where, Δ represents a noise vector, ‖Δ‖2 = ∈, ∈ represents a tiny constant, ω represents a weight coefficient, ⊙ represents an element-wise product, and sign(e i ) represents a sign function used to judge the sign of e i positive or negative, represents the set of real numbers, and U(0,1) represents a uniform distribution.

7. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, characterized in that The collaborative knowledge graph includes three types of nodes: users, entities, and projects. The total contrast learning loss is calculated by formula (4): Among them, represents the total contrastive learning loss, represents the contrastive learning loss obtained by contrastive learning between user and user, represents the contrastive learning loss obtained by contrastive learning between entity and entity, represents the contrastive learning loss obtained by contrastive learning between user and entity.

8. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein The node enhanced representation includes the user node representation and the project node representation. Before calculating the interaction probability according to the node enhanced representation, it further includes: Adopt a layer aggregation method to aggregate the user node representations and project node representations of each propagation layer into a user representation vector and a project representation vector respectively; Among them, the interaction probability is the inner product of the user representation vector and the item representation vector.

9. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein Calculate the second ranking loss through formula (5): Among them, represents the BPR loss, represents the training set, represents the positive interaction between the user and the item, represents the unobserved negative interaction. u represents the user, i represents the item that has been clicked, and j represents the item that has not been clicked. represents the interaction probability solved based on the user and item i, represents the interaction probability solved based on the user and item j.

10. The knowledge collaborative recommendation method based on noise enhancement and graph attention network according to claim 1, wherein Calculate the target loss through formula (6): Among them, represents the target loss, represents the ranking loss, represents the BPR loss, represents the total contrastive learning loss, ω represents the weight coefficient, λ represents the parameter, and Θ represents the set of model parameters. E represents the embedding representations of all entities and relationships, and W r represents the relationship transformation matrix, represents the set of real numbers, represents the weight matrix corresponding to the l-th layer, represents the weight matrix corresponding to the l-th layer, and {1, …, L} represents, where L represents the total number of layers.