A recommendation system and a recommendation method based on self-supervised learning and a knowledge graph
By combining self-supervised learning and knowledge graphs, a graph neural network model is constructed to dynamically adjust entity ratings, solving the data sparsity problem in recommendation systems, improving the interpretability and accuracy of the system, and enhancing the robustness of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2023-05-23
- Publication Date
- 2026-05-15
AI Technical Summary
Existing recommendation systems have shortcomings in dealing with data sparsity, resulting in a low probability of recommending newly listed items and low-interaction items, a severe long-tail effect, and manual labeling is resource-intensive and prone to errors.
Self-supervised learning is used to augment the knowledge graph. Positive and negative sample pairs are constructed through negative sampling, a relative similarity loss function is defined, a graph neural network model is built, and a multi-head attention mechanism is combined to calculate entity features and dynamically adjust entity scores to alleviate the data sparsity problem.
It improves the interpretability, accuracy, and robustness of the recommendation system, reduces data sparsity, enhances the model's generalization ability, and stabilizes the model's performance.
Smart Images

Figure CN116521999B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of recommender system technology, specifically relating to a recommender system and its recommendation method based on self-supervised learning and knowledge graph. Background Technology
[0002] With the rapid development of recommender systems in the era of big data, existing recommender systems have achieved remarkable results in terms of accuracy and diversity. However, they still have shortcomings in interpretability. Knowledge graphs, as a highly interpretable cognitive tool, have become a hot topic in the field of intelligent cognition, and combining knowledge graphs with recommender systems has also become a popular research direction. Due to the large amount of unlabeled data in recommender systems, and the inherent limitations of knowledge graphs as graphs and current knowledge extraction methods, the data sparsity problem is becoming increasingly prominent. Data sparsity refers to the problem in recommender systems where, compared to the massive number of items, the number of items that interact with users is very small, resulting in a very sparse behavior matrix. Data sparsity leads to newly listed items, low-interaction items, or even items with no interaction being less likely to be recommended, exacerbating the long-tail effect. An effective solution is manual data labeling, but this solution requires a large amount of human resources, and the errors and noise inherent in manual labeling can also affect the recommendation performance of the system.
[0003] To address the above problems, this invention proposes a recommendation system and method based on self-supervised learning and knowledge graphs, building upon knowledge graph feature extraction, to alleviate the data sparsity problem. Summary of the Invention
[0004] To overcome the shortcomings of existing recommender systems, this invention proposes a recommender system and method based on self-supervised learning and knowledge graphs. The system augments the knowledge graph through self-supervised learning, constructs positive and negative sample pairs using an efficient negative sampling method, and determines the similarity between two samples by defining a relative similarity loss function. Subsequently, a graph neural network model based on the knowledge graph is constructed, and entity features are calculated using a multi-head attention mechanism. Finally, entity scores are dynamically adjusted based on the relative similarity metric, improving the performance of the recommender system and alleviating the data sparsity problem.
[0005] To address the problems of the prior art, the present invention adopts the following technical solution:
[0006] In a first aspect, the present invention provides a recommendation method based on self-supervised learning and knowledge graphs, comprising the following steps:
[0007] Step (1): Construct a knowledge graph;
[0008] Step 1.1: Obtain user behavior data;
[0009] Step 1.2: Take users, items, user inherent attribute features and item inherent attribute features in user behavior data as entities, and extract the above entity relationships to finally obtain the entity-relationship-entity triple knowledge graph;
[0010] Step (2): The original knowledge graph is augmented using a self-supervised learning module to obtain the augmented knowledge graph D;
[0011] Step (3): Learn the optimal feature representation of entities through a knowledge graph-based graph neural network module;
[0012] 3.1: Feature extraction is performed on the knowledge graph D to obtain the similarity scores of the head entity h and the tail entity t in the relation space of relation r;
[0013] 3.2: Construct a graph attention network layer based on a knowledge graph. This layer includes C attention channels, and each attention channel contains M attention mechanisms. Assign the features of the nodes in the graph attention network layer to the corresponding head entity h and tail entity t in the knowledge graph D.
[0014] Step (4): Dynamically adjust the scores of the triples through the dynamic scoring module, and obtain the final recommendation results based on the scores.
[0015] Secondly, the present invention provides a recommendation system, comprising:
[0016] The data acquisition module acquires user behavior data;
[0017] The knowledge graph construction module builds a triplet knowledge graph of entity-relationship-entity from user behavior data;
[0018] The self-supervised learning module performs data augmentation on the original knowledge graph to obtain knowledge graph D;
[0019] The graph neural network module learns the best feature representation of entities through a graph neural network based on a knowledge graph, and then assigns the features to the corresponding head and tail entities in the knowledge graph D.
[0020] The dynamic scoring module dynamically adjusts the scores of the triples to obtain the final recommendation results.
[0021] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described thereon.
[0022] Fourthly, the present invention provides a computing device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method described above.
[0023] Compared with the prior art, the present invention has the following advantages:
[0024] 1. Explainability: The entities, entity attributes, and relationships contained in the knowledge graph help the recommendation system better understand the user's needs and interests, while also helping the user understand the decision-making process and prediction results of the recommendation system, thereby improving the transparency, accuracy, and explainability of the recommendation system.
[0025] 2. To alleviate data sparsity, the original dataset is augmented using a self-supervised learning model to reduce its sparsity. The Dropout method is used to improve the model's generalization ability and reduce model bias caused by data sparsity.
[0026] 3. Robustness: A large number of triple caches are constructed through self-supervised learning as non-real triples. These triples are compared with the original dataset triples through relative similarity measurement. A self-attention graph neural network is established and the model performance is stabilized through a multi-head attention mechanism. Finally, the influence weight of non-real triples on the model is dynamically adjusted through the probability score of the triples, making the model closer to the real environment and effectively improving the robustness of the recommendation system. Attached Figure Description
[0027] Figure 1 This is an overall flowchart of the recommendation system based on self-supervised learning and knowledge graph in this invention;
[0028] Figure 2 This is an overall flowchart of the self-supervised learning module in this invention;
[0029] Figure 3 This is an overall flowchart of the knowledge graph-based graph neural network module;
[0030] Figure 4 The figure shows the results of the sparsity experiment of the method of the present invention on the Sports dataset; where (a) is HR@20 and (b) is NDCG@20.
[0031] Figure 5 The figures show the results of the sparsity experiment of the method of the present invention on the Toys dataset; where (a) is HR@20 and (b) is NDCG@20.
[0032] Figure 6 The figure shows the results of the sparsity experiment of the method of the present invention on the Yelp dataset; where (a) is HR@20 and (b) is NDCG@20. Detailed Implementation
[0033] The following description, in conjunction with the accompanying drawings, further illustrates a recommendation system and method based on self-supervised learning and knowledge graphs provided by this invention.
[0034] See Figure 1 This invention first uses a self-supervised learning module to augment the original dataset, constructs positive and negative sample pairs and distinguishes samples by using a negative sampling method and a relative similarity metric, then establishes a graph neural network model based on a knowledge graph and integrates a multi-head attention mechanism to obtain entity features, and uses a dynamic scoring module to make the model closer to the real world environment, thereby improving the performance of the recommendation system and mitigating the impact of data sparsity.
[0035] See Figure 2 and Figure 3 The above are flowcharts of the self-supervised learning module and structural diagrams of the knowledge graph-based graph neural network module in this invention.
[0036] A recommendation method based on self-supervised learning and knowledge graphs includes the following steps:
[0037] Step (1): Construct a knowledge graph;
[0038] Step 1.1: Obtain user behavior data; the user behavior data includes users, items, user inherent attribute characteristics, and item inherent attribute characteristics;
[0039] The user's inherent attributes refer to the user's gender, age, occupation, and interests;
[0040] The inherent attributes of the item refer to its price and size;
[0041] Step 1.2: Take users, items, user inherent attribute features and item inherent attribute features in user behavior data as entities, and extract the above entity relationships to finally obtain the entity-relationship-entity triple knowledge graph;
[0042] The entity relationships include the relationships between users, the interaction relationships between users and items, the relationships between items, the relationships between users' inherent attributes, and the relationships between items' inherent attributes.
[0043] Step (2): Perform data augmentation on the original knowledge graph using a self-supervised learning module. See [link to relevant documentation]. Figure 2 Specifically, the following steps are included:
[0044] Step 2.1: Obtain the head entity-relation binary set H from the knowledge graph of step (1) using a partial sampling method. (h,r) Sum of entity-relation binary sets T (t,r) ;
[0045] Step 2.2: Match the head entity-relation binary set H (h,r) The head entity h is obtained by uniform random sampling; based on the entity relationships in the knowledge graph, the head entity h is spliced with the set T. (t,r) The tail entity in the graph is used to construct a new triple (h,r,t) from the head entity-relation-tail entity; then it is determined whether the probability p(h|(t,r)) of the new triple is higher than the threshold threshold1. If it is, the new knowledge graph is updated; otherwise, the current new triple is deleted.
[0046] The calculation of the probability p(h|(t,r)) of the new triplet is as follows:
[0047]
[0048] f(h,r,t)=||h+rt||1 (2)
[0049] Where exp represents the exponential function, f(h,r,t) represents the scoring function of the new triple (h,r,t), r represents the entity relation, and t represents the tail entity;
[0050] Step 2.3: Repeat steps 2.1 to 2.2 until the number of new triples reaches q, where q≥1;
[0051] Step 2.4: Apply the relative similarity loss function. SM Further measure the degree of similarity among the new triples;
[0052] The specific formula for the relative similarity loss function is as follows:
[0053] loss SM =αloss rsm +βloss rd +γloss rct (3)
[0054] α, β, and γ are hyperparameters used to control component weights. In this embodiment, they are set to α = 0.5, β = 0.4, and γ = 0.1.
[0055] The loss rsm As a relative similarity measure, it represents the overall degree of similarity between entities, and the specific formula is as follows:
[0056]
[0057] Among them, t + t represents the tail entity that is a positive sample in the new triplet. -This indicates the tail entity that is a negative sample in the new triplet. The positive sample is a triplet whose probability of being true is higher than the threshold 2, and the negative sample is a triplet whose probability of being true is lower than the threshold 2, where threshold 2 > threshold 1. and Let h represent the head entity and t represent the tail entity respectively. + Tail entity t - The corresponding relationship, σ(·), is defined as follows:
[0058]
[0059] Where g(·) represents the softmax function; α(·) represents a non-linear activation function;
[0060] The loss rd The relative distance represents the sum of differences across all dimensions between the features of two entities. The specific formula is as follows:
[0061]
[0062]
[0063]
[0064] Where KLD(h||M h,t ) represents the head entities h and M h,t The relative entropy, KLD(t||M h,t ) represents tail entities t and M h,t The relative entropy, M h,t This represents the average of the head entity h and the tail entity t, where K represents the number of dimensions;
[0065] The loss rct This is a relative constraint term used to limit the complexity of the model and prevent overfitting. The specific formula is as follows:
[0066]
[0067] Where τ represents the hyperparameter controlling the relative constraint term;
[0068] Step 2.5: By optimizing the relative similarity loss function value, the best features of each entity in the new triplet are obtained. The probability of each new triplet is recalculated using formula (1). Then, the new triplets with a probability of less than the threshold are deleted. The new triplets are merged with the original knowledge graph to obtain the data-enhanced knowledge graph D.
[0069] Step (3): Learn the optimal feature representation of entities through a knowledge graph-based graph neural network module, specifically including the following steps:
[0070] Step 3.1: Perform feature extraction on the knowledge graph D to obtain the similarity score f2(h,r,t) of the head entity h and the tail entity t in the relation space of relation r;
[0071] Step 3.1.1: First, calculate the weight matrix M of the head entity h, tail entity t, and relation r in the entity space. rh and M rt The specific formula is as follows:
[0072] M rh =rh T +E,M rt =rt T +E (10)
[0073] Where E represents the identity matrix;
[0074] Step 3.1.2: Transfer the head entity h and tail entity t in the entity space through their respective weight matrices M. rh and M rt Transform into relational space to obtain and The specific calculations are as follows:
[0075] h r =M rh h, t r =M rt t (11)
[0076] Step 3.1.3: Optimize the similarity score f2(h,r,t) using the translation principle. The specific formula is as follows:
[0077]
[0078] Where f2(h,r,t) is the similarity score of the head entity h and the tail entity t in the relation space of relation r;
[0079] Step 3.2: Construct a knowledge graph-based graph attention network layer, which includes C attention channels, and each attention channel contains M attention mechanisms;
[0080] Step 3.2.1: Construct an undirected graph using the triple relations in the knowledge graph D, where node n represents all head entities h and all tail entities t, and the edges represent the corresponding relations r. Input node n into the attention mechanisms of each attention channel, perform parameterized shared linear transformation using the weight matrix, and then perform self-attention mechanism processing to calculate the attention coefficient between the i-th node and the j-th node. The specific formula is as follows:
[0081]
[0082] in Features of the i-th node under the m-th attention mechanism within the c-th attention channel. Features of the j-th node under the m-th attention mechanism within the c-th attention channel. Let be the attention intensity between the i-th node and the j-th node under the m-th attention mechanism within the c-th attention channel, indicating the importance of the i-th node to the j-th node within the c-th attention channel; the self-attention mechanism α(.) is a single-layer feedforward neural network, W1 c This represents the weight matrix within the c-th attention channel;
[0083] Step 3.2.2: Apply the softmax function to... The normalization process is performed using the following formula:
[0084]
[0085] in Let N represent the normalized attention coefficients of the i-th and j-th nodes under the m-th attention mechanism in the c-th channel, where σ represents the activation function and N is the normalized value. i This represents the adjacency domain of the i-th node;
[0086] Step 3.2.3: Through attention coefficient The linear combination of the features corresponding to the nodes is calculated, and a non-linear function is used to update the node features as the output features. Simultaneously, a multi-head attention mechanism is used to stabilize the learning process of the self-attention mechanism. M independent self-attention mechanisms are used to learn the node features. Finally, the M independent self-attention mechanisms are concatenated, averaged, and processed through a non-linear activation function layer to obtain the final output features of the current attention channel. The specific formula is as follows:
[0087]
[0088] Where M represents the number of independent self-attention mechanisms. This represents the attention coefficients of the i-th node and the j-th node in the m-th attention mechanism. This represents the weight matrix in the m-th attention mechanism within the c-th attention channel;
[0089] Step 3.2.4: After obtaining the node features generated by each attention channel, concatenate the original features of the node with the features from all attention channels to obtain the final output. The specific formula is as follows:
[0090]
[0091] in, Let represent the feature of the i-th node obtained in the c-th attention channel, where C represents the number of attention channels;
[0092] Step 3.2.5: Assign the node's features to the head entity h and tail entity t in the corresponding knowledge graph D.
[0093] Step (4): Dynamically adjust the scores of the triple (h,r,t) through the dynamic scoring module;
[0094] Step 4.1: First, calculate the score of the triple (h,r,t). The specific scoring function formula is as follows:
[0095]
[0096] Where vec(·) represents the vectorization operation. and Let h and r represent the 2D features obtained by splitting the one-dimensional features in half, respectively. ω represents the convolution kernel, * represents the convolution operation, W is the weight matrix, and f is a non-linear activation function, usually the ReLU function.
[0097] Step 4.2: The triples constructed by the self-supervised learning module are called non-real triples. The triples in the original knowledge graph are called true triples P, and the following weight function is defined:
[0098]
[0099] in This represents the similarity metric value obtained by the target triplet in the self-supervised learning module. When the target triplet is a true triplet, the weight function result is 1. When the target triplet is not a true triplet, the weight function will adjust the final score of the triplet based on the similarity metric value obtained by the triplet in the self-supervised learning module.
[0100] Step 4.3: Combine the similarity metric and the weights formed by the non-real triples with the model scoring function to obtain the final scoring formula, and obtain the final recommendation result based on the score;
[0101] ψ′ (h,r,t)=ρ(h,r,t)ψ (h,r,t) (19)
[0102] Where ψ′ (h,r,t) This indicates the score after weighting adjustments.
[0103] The experiment uses the PyTorch framework to implement the method of this invention. The learning rate is set to 0.001, the batch size to 128, and the number of iterations to 1000. The Adam optimizer is used for mini-batch training with a learning rate of 10⁻⁶. During training, a Dropout layer with a ratio of 0.5 is added to the neural network model. Each batch has different data sample sizes depending on the dataset, and all vector embedding dimensions are set to 64. This embodiment is tested on highly sparse datasets such as Sports, Toys, and Yelp. Comparative experiments with algorithms such as SASRes, BERT4Rec, S3Rec, and SRMA are shown in Table 1. Sparseness experiments are also conducted on three datasets with different sparsity settings; the results are shown in [Table 1]. Figure 4 , Figure 5 and Figure 6 The experimental results above show that the model of the present invention can effectively alleviate the data sparsity problem while maintaining a certain accuracy improvement.
[0104] Table 1 compares our method with existing methods on the dataset.
[0105]
[0106] The above description of the embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
[0107] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A recommendation method based on self-supervised learning and knowledge graphs, characterized in that... Includes the following steps: Step (1): Construct a knowledge graph; Step 1.1: Obtain user behavior data; the user behavior data includes users, items, user inherent attribute characteristics, and item inherent attribute characteristics; Step 1.2: Take users, items, user inherent attribute features and item inherent attribute features in user behavior data as entities, and extract the above entity relationships to finally obtain the entity-relationship-entity triple knowledge graph; The entity relationships include the relationships between users, the interaction relationships between users and items, the relationships between items, the relationships between users' inherent attributes, and the relationships between items' inherent attributes. Step (2): Data augmentation of the original knowledge graph is performed using a self-supervised learning module, specifically including the following steps: Step 2.1: Obtain the head entity-relation binary set from the knowledge graph of step (1) using partial sampling. End-entity-relation binary set ; Step 2.2: Head Entity-Relation Binary Set Head entity is obtained by uniform random sampling Based on the entity relationships in the knowledge graph, the entities are spliced together. With sets The tail entity in the structure constructs a new triplet of head entity-relation-tail entity. Then determine the probability of the new triplet being formed. If the value is higher than the threshold 1, update to the new knowledge graph; otherwise, delete the current new triplet. The probability of the formation of the new triplet The calculation is as follows: (1) (2) in Represents an exponential function. Indicates the new triplet The scoring function, Indicates entity relationship, Indicates the tail entity; Step 2.3: Repeat steps 2.1 to 2.2 until the number of new triples reaches q, where q≥1; Step 2.4: Using the relative similarity loss function Further measure the degree of similarity among the new triples; The specific formula for the relative similarity loss function is as follows: (3) in , , These are all hyperparameters used to control component weights; The As a relative similarity measure, it represents the overall degree of similarity between entities, and the specific formula is as follows: (4) in, This represents the tail entity that is a positive sample in the new triplet. This indicates the tail entity that is a negative sample in the new triplet. The positive sample is a triplet whose probability of being true is higher than the threshold 2, and the negative sample is a triplet whose probability of being true is lower than the threshold 2, where threshold 2 > threshold 1. and Represent the head entity h and the tail entity respectively. Tail entity Corresponding relationship The definition is as follows: (5) in, This represents the softmax function; Represents a non-linear activation function; The The relative distance represents the sum of differences across all dimensions between the features of two entities. The specific formula is as follows: (6) ; (7) (8) in Representing the head entity h and The relative entropy, Represents the tail entity t and The relative entropy, This represents the average of the head entity h and the tail entity t, where K represents the number of dimensions; The This is a relative constraint term used to limit the complexity of the model and prevent overfitting. The specific formula is as follows: (9) in These represent the hyperparameters that control the relative constraint terms; Step 2.5: By optimizing the relative similarity loss function value, the best features of each entity in the new triplet are obtained. The probability of each new triplet is recalculated using formula (1). Then, new triplets with a probability of less than the threshold are deleted. The new triplets are merged with the original knowledge graph to obtain the data-enhanced knowledge graph D. Step (3): Learn the optimal feature representation of entities through a knowledge graph-based graph neural network module, specifically including the following steps: Step 3.1: Perform feature extraction on the knowledge graph D to obtain the head entity h and tail entity t in the relation. Similarity scoring within the relation space ; Step 3.2: Construct a graph attention network layer based on the knowledge graph. This layer includes C attention channels, and each attention channel contains M attention mechanisms. Assign the features of the nodes in the graph attention network layer to the corresponding head entity h and tail entity t in the knowledge graph D. Step (4): Dynamically adjust the triplet through the dynamic scoring module. The final recommendation result is obtained based on the rating.
2. The method according to claim 1, characterized in that... The inherent attributes of the user mentioned in step 1.1 refer to the user's gender, age, occupation, and interests; the inherent attributes of the item refer to the item's price and size.
3. The method according to claim 1, characterized in that... Step 3.1 specifically involves: Step 3.1.1: First, calculate the weight matrices of the head entity h, tail entity t, and relation r in the entity space. and The specific formula is as follows: , (10) Where E represents the identity matrix; Step 3.1.2: Transfer the head entity h and tail entity t in the entity space through their respective weight matrices. and Transform into relational space to obtain and The specific calculations are as follows: , (11) Step 3.1.3: Optimize similarity scoring using the translation principle The specific formula is as follows: (12) in That is, the head entity h and the tail entity t in the relation Similarity score within the relation space.
4. The method according to claim 1, characterized in that... Step 3.2 specifically involves: Step 3.2.1: Construct an undirected graph using the triple relations in the knowledge graph D, where node n represents all head entities h and all tail entities t, and the edges represent the corresponding relations r. Input node n into the attention mechanisms of each attention channel, perform parameterized shared linear transformation using the weight matrix, and then perform self-attention mechanism processing to calculate the attention coefficient between the i-th node and the j-th node. The specific formula is as follows: (13) in Features of the i-th node under the m-th attention mechanism within the c-th attention channel. Features of the j-th node under the m-th attention mechanism within the c-th attention channel. Let be the attention intensity between the i-th node and the j-th node under the m-th attention mechanism within the c-th attention channel, indicating the importance of the i-th node to the j-th node within the c-th attention channel; self-attention mechanism It is a single-layer feedforward neural network. This represents the weight matrix within the c-th attention channel; Step 3.2.2: Apply the softmax function to... The normalization process is performed using the following formula: (14) in This represents the normalized attention coefficients of the i-th and j-th nodes under the m-th attention mechanism in the c-th channel. This represents the adjacency domain of the i-th node; Step 3.2.3: Through attention coefficient The linear combination of the features corresponding to the nodes is calculated, and a non-linear function is used to update the node features as the output features. Simultaneously, a multi-head attention mechanism is used to stabilize the learning process of the self-attention mechanism. M independent self-attention mechanisms are used to learn the node features. Finally, the M independent self-attention mechanisms are concatenated, averaged, and processed through a non-linear activation function layer to obtain the final output features of the current attention channel. The specific formula is as follows: (15) Where M represents the number of independent self-attention mechanisms. This represents the weight matrix in the m-th attention mechanism within the c-th attention channel. Indicates the activation function; Step 3.2.4: After obtaining the node features generated by each attention channel, concatenate the original features of the node with the features from all attention channels to obtain the final output. The specific formula is as follows: (16) in, Let represent the feature of the i-th node obtained in the c-th attention channel, where C represents the number of attention channels; Step 3.2.5: Assign the node's features to the head entity h and tail entity t in the corresponding knowledge graph D.
5. The method according to claim 1 or 4, characterized in that... Step (4) specifically involves: Step 4.1: First, based on the triplet The score for the triple is calculated using the following formula: (17) in Indicates vectorization operation, and These represent the 2D features obtained by halving the one-dimensional features of the head entity h and the relation r, respectively. Represents the convolution kernel. This represents the convolution operation, where W is the weight matrix. It is a non-linear activation function, typically using the ReLU function; Step 4.2: The triples constructed by the self-supervised learning module are called non-real triples. The triples in the original knowledge graph are called real triples. Define the following weight function: (18) in This represents the similarity metric value obtained by the target triplet in the self-supervised learning module. When the target triplet is a true triplet, the weight function result is 1. When the target triplet is not a true triplet, the weight function will adjust the final score of the triplet based on the similarity metric value obtained by the triplet in the self-supervised learning module. Step 4.3: Combine the similarity metric and the weights formed by the non-real triples with the model scoring function to obtain the final scoring formula, and obtain the final recommendation result based on the score; (19) in This indicates the score after weighting adjustments.
6. A recommendation system that implements the method of any one of claims 1-5, characterized in that... include: The data acquisition module acquires user behavior data; The knowledge graph construction module builds a triplet knowledge graph of entity-relationship-entity from user behavior data; The self-supervised learning module performs data augmentation on the original knowledge graph to obtain knowledge graph D; The graph neural network module learns the best feature representation of entities through a graph neural network based on a knowledge graph, and then assigns the features to the corresponding head and tail entities in the knowledge graph D. The dynamic scoring module dynamically adjusts the scores of the triples to obtain the final recommendation results.
7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-5.
8. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-5.