Learning resource recommendation method and system based on heterogeneous graph denoising attention network

CN119848659AActive Publication Date: 2025-04-18ANHUI UNIV

Patent Information

Application Number
CN202411881241.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-18
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

In the learning resource recommendation system, an attacker may interfere with the recommendation result by inserting noise information, reducing the accuracy of the recommendation.

Method used

Using a method based on heterogeneous pattern denoising attention network, the robustness of the recommendation system is improved by introducing propagation constraint probability and differentiable mask operation.

Benefits of technology

It significantly improves the accuracy and robustness of learning resource recommendations, effectively alleviating the impact of noise interference on recommended results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848659A_ABST
    Figure CN119848659A_ABST
Patent Text Reader

Abstract

The invention provides a learning resource recommendation method and system based on a heterogeneous graph denoising attention network. A propagation constraint probability based on a meta-path is introduced to measure a reliability relationship among students, resources and knowledge points, so that the weight of noise neighbors is effectively reduced; differential mask operation is adopted to dynamically shield low-confidence noise neighbors, so that the attention mechanism is purified, and the matching precision between students and learning resources is improved. According to the method, the multi-semantic relation among the students, the resources and the knowledge points can be more efficiently captured, noise interference is relieved, the learning resource recommendation effect is remarkably improved, accurate personalized learning support is provided for the students, and therefore the learning efficiency and effect are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent recommendation technology, and in particular to a learning resource recommendation method and system based on a heterogeneous graph denoising attention network. Background Art

[0002] With the rapid development of information technology, the number of learning resources on smart education platforms has exploded, including video courses, handouts, test questions, e-books and other forms of learning content. Faced with a huge amount of learning resources, students often need to spend a lot of time screening materials that suit their needs, and the quality and matching degree of these resources directly affect learning efficiency and effectiveness. Therefore, how to provide personalized learning resource recommendations for students by analyzing their learning behavior and knowledge status has become an important research direction in the field of smart education. In recent years, recommendation algorithms have been widely used in many fields, such as video recommendations and e-commerce recommendations, and have achieved remarkable results. Introducing them into the field of education can also effectively improve user experience and help students quickly find high-quality learning resources.

[0003] In recent years, the development of Graph Neural Network (GNN) has brought new breakthroughs to the recommendation system, especially the Heterogeneous Graph Attention Network (HAN), which is a deep learning model designed for heterogeneous graphs. It can effectively model multiple types of nodes and their complex relationships and is widely used in e-commerce, social networks and other scenarios. In learning resource recommendation, the relationship between students and learning resources (such as videos, test questions, handouts) and knowledge points constitutes a typical heterogeneous graph. For example, students establish connections with resources through learning behaviors, resources are associated with courses through knowledge points, and students can also indirectly establish connections through similar learning interests or knowledge mastery. How to make full use of these multi-type relationships is the key to building an efficient learning resource recommendation system.

[0004] A heterogeneous graph is usually represented as Where V represents the node set (such as students, learning resources, knowledge points, courses, etc.), E represents the edge set (such as the usage relationship between students and resources, the coverage relationship between resources and knowledge points), Represents a collection of node types. Represents a set of edge types. The heterogeneous graph attention network can capture the semantic relationship between nodes by introducing the meta-path. For example, the meta-path "student-resource-student" represents the connection established by students through the common use of resources. Different meta-paths carry different semantic information. The heterogeneous graph attention network assigns weights to each meta-path and uses the semantic-level attention mechanism to learn the importance of these meta-paths in the recommendation task, thereby better modeling the diverse relationships in the learning resource recommendation scenario.

[0005] However, in the evasion attack scenario, the attacker may interfere with the results of the recommendation system by deliberately inserting noise information (such as false student behavior records). This noise information may have a negative impact on the recommendation results, misleading the results generated by the model, thereby reducing the accuracy of the recommendation. Therefore, designing an effective denoising mechanism to deal with the noise inserted by the evasion attack is the key to improving the robustness and performance of the recommendation algorithm. Summary of the invention

[0006] The technical problem to be solved by the present invention is how to denoise heterogeneous graphs to improve the accuracy of learning resource recommendations.

[0007] The present invention solves the above technical problems through the following technical means:

[0008] The learning resource recommendation method based on heterogeneous graph denoising attention network includes the following steps:

[0009] S1. Collect data such as students and learning resources from the education platform, construct student-resource interaction graphs and other relationship graphs, generate heterogeneous graphs and divide them into training sets, validation sets and test sets, and initialize node features as model input;

[0010] S2. Capture the semantic relationship between nodes in heterogeneous graphs through multiple meta-paths; use node-level attention to aggregate neighbor information, and then fuse different meta-path embeddings through semantic-level attention to generate multi-semantic node representations;

[0011] S3. Introduce propagation constraint probability in meta-path aggregation and calculate neighbor confidence based on node feature similarity to identify noisy neighbors and guide the model to aggregate the information of positive neighbors;

[0012] S4. Design a differentiable masking operation to filter neighbor nodes according to confidence, mask unreliable nodes, and generate purified attention values ​​through softmax for node-level aggregation; finally, fuse node-level embeddings through semantic-level attention to generate the final representation of the node;

[0013] S5. Using semantic-level aggregated node embedding, the interaction probability between students and learning resources is predicted through dot product. The difference between positive and negative sample scores is optimized using BPR loss, and the model is trained with SGD and Adam optimizers. Finally, the performance is evaluated by adjusting parameters on the validation set and testing the set.

[0014] Furthermore, the S1 specifically includes the following contents:

[0015] S101: Collect information about students, resources, and knowledge points from the education platform and construct a student set U = {u1,u2,u3,…,u |U|}, resource set C = {c1,c2,c3,…,c |C|}, student age set A = {a1, α2, a3, …, a |A|}, and the knowledge point set B = {b1,b2,b3,…,b |B|};

[0016] S102: Construct an interaction relationship graph based on the interaction between students and learning resources; define the adjacency matrix When a student i ∈U and learning resources c j ∈C when there is interaction, let u i c j =1, otherwise set to 0; other relationship interaction diagrams are similar;

[0017] S103: Construct heterogeneous graphs, using different relationship interaction graphs to construct heterogeneous graphs Where V represents the node set, E represents the edge set, Represents a collection of node types. Represents a set of edge types;

[0018] S104: Divide the data set into training set, validation set and test set randomly; the data set is mainly divided into direct interaction data between students and learning resources. The validation set is used for intermediate model evaluation and parameter adjustment, while the test set retains the interaction behavior of each student in proportion to generate candidate resources C;

[0019] S105: Initialize node representation vectors for various types of nodes in the heterogeneous graph Where D represents the dimension of the vector; the initialized representation vectors are stored in their respective representation vector dictionaries as the initial input of the subsequent model.

[0020] Furthermore, the S2 specifically includes the following contents:

[0021] S201: Construct a meta-path. According to the adjacency matrix generated in step S1, construct a heterogeneous graph and design four meta-paths suitable for resource recommendation: Φ UCU For students-resources-students, UAU For student-age-student, Φ CUC For resources-students-resources and CBC resource-knowledge point-resource; these meta-paths are used to extract various semantic relationships in heterogeneous graphs, providing a basis for subsequent node information aggregation;

[0022] S202: Node-level attention mechanism, through the node-level attention mechanism, capture the key information of the local node and aggregate the information of the adjacent nodes in the subgraph constructed from the specific meta-path; the node-level aggregation process is defined as follows:

[0023]

[0024] in The attention coefficient of the target node v to the neighbor node u is obtained by steps 4 and 5; represents the node-level embedding representation of the target node v obtained through the meta-path; Is a node The initial vector of is the set of neighbor nodes of node v determined by the meta-path Φ; σ is the activation function.

[0025] S203: Semantic-level attention mechanism. Since the node-level embeddings learned by each meta-path carry unique semantic information, these embeddings need to be integrated through the semantic-level attention mechanism to generate the final embedding representation of the target node. The semantic-level aggregation process is defined as follows:

[0026]

[0027] in, Represents the semantic level embedding representation of the target node v; is the node-level embedding of the node target v under the i-th meta-path; is the semantic-level attention weight, reflecting the importance of different meta-paths. The semantic-level attention mechanism can effectively integrate multi-semantic information, generate high-quality embedding representations of nodes, and further improve the model's ability to express heterogeneous graphs.

[0028] Furthermore, the S3 specifically includes the following contents:

[0029] S301: Unified mapping of node features, for type The target node v is transformed by a node type-specific feature transformation matrix W A, projecting the feature vector of the node into the public space, its feature is expressed as: Among them, h v is the projection feature of the target node v in the public space, For the target node v in the meta-path Φ i The initial eigenvector under ;

[0030] S302: Calculation of similarity between nodes. Given a meta-path Φ, nodes with similar features are more important to the target node than nodes with larger feature differences. Therefore, the similarity of adjacent nodes is defined by the dot product between node features, thereby evaluating the importance of neighbor node u to the target node v. The similarity is expressed as:

[0031] S303: Calculation of the propagation constraint probability matrix. To enhance the model's ability to model node relationships, a meta-path-based propagation constraint probability is introduced. Given a meta-path First, calculate the propagation constraint probability matrix for a single adjacency matrix: in, Edge Type The adjacency matrix of is the inverse matrix of the corresponding degree matrix; each element in the matrix Indicates the edge type from node u The propagation constraint probability to node v; by multiplying the individual propagation constraint probability matrices step by step along the meta-path, the overall propagation constraint probability matrix of the meta-path Φ can be calculated:

[0032] S304: Calculate the confidence score by combining the propagation constraint probability and similarity. The propagation constraint probability based on the meta-path can be regarded as a constraint condition in the node propagation process, which is used to guide the model to learn effective information more accurately. In order to identify the unreliable neighbors of the target node v, the node feature importance is combined. and the propagation constraint probability Define neighbor nodes The confidence vector of : in, Neighbor node Confidence score of .

[0033] Furthermore, the S4 specifically includes the following contents:

[0034] S401: Design a differentiable mask operation. For the target node v, the mask operation is modeled by constructing a mask vector, i.e., confidence:

[0035]

[0036] in, Used to control the influence of neighbor nodes on the target node v;

[0037] S402: Masking unreliable neighbor nodes. Through step S401, unreliable neighbor nodes have been identified and their mask values ​​are set to -∞. When the mask value of the neighbor node is and feature-based importance When the softmax function is applied to the sum, unreliable neighbor nodes will be effectively pruned;

[0038] S403: Generate purified attention weights, mask vectors It is used as an attention mask to filter out unreliable neighbor nodes and calculate the purified attention value through the softmax function

[0039]

[0040] S404: Node-level aggregation based on purified attention value. For the target node v, the purified attention value It is introduced into the node-level aggregation process of heterogeneous graph neural networks to shield unreliable neighbors and remove noise in heterogeneous graphs; node-level embedding vector Calculated by the following formula:

[0041]

[0042] in, is the node-level embedding representation of the target node v obtained through the meta-path Φ, h u Neighbor node The projection vector of is the set of neighbor nodes determined based on the meta-path Φ, and σ is the activation function;

[0043] S405: Use semantic-level attention mechanism to further evaluate the contribution of different meta-paths to the target node embedding; for a set of meta-paths {Φ1,Φ2,…,Φ n} and the target node v, and obtain a set of node-level embedding vectors of the node Then, the meta-path Φ∈{Φ1,Φ2,…,Φ n Importance of}:

[0044]

[0045] Where W and b represent the weight matrix and bias term of the multi-layer perceptron (MLP), respectively; q T is the attention vector used to capture the importance of semantic level;

[0046] S406: Semantic-level attention weight normalization and final node embedding, by weighting the importance of the meta-path w φ Apply the softmax function for normalization to obtain the semantic level attention weight β φ ; Finally, through semantic-level aggregation, the node-level embeddings under different meta-paths are integrated into the final embedding representation of the target node v

[0047]

[0048] Furthermore, the S5 specifically includes the following contents:

[0049] S501: Prediction of student-learning resource interaction scores. Through semantic-level aggregation, the final embedding vectors of student u and learning resource c can be obtained respectively. and The likelihood of interaction between a student and a resource is predicted by the dot product of their embedding vectors: in, The predicted score of the interaction possibility between student u and learning resource c; score The larger it is, the higher the likelihood of interaction between students and resources;

[0050] S502: For the learning resource recommendation task, a pairwise loss function of Bayesian personalized ranking is adopted;

[0051] S503: Definition of Bayesian personalized ranking loss function. For each training sample, the goal is to maximize the difference between the positive and negative sample prediction scores, thereby optimizing the model. The Bayesian personalized ranking loss function is defined as follows:

[0052]

[0053] is a set of training triplets, (u,c + ) indicates that students interact with resources, (u,c - ) indicates that the student and the resource do not interact; the functions ln(·) and sigmiod(·) refer to the logarithmic function and the sigmoid function respectively; λ is a hyperparameter that determines the weight of the regularization term; by optimizing the above BPR loss function, the model attempts to maximize the difference in the predicted scores between positive and negative samples, that is, Thus, the sorting requirements of the learning resource recommendation task are met;

[0054] S504: Model training and evaluation. During the model training process, the model parameters are optimized using the stochastic gradient descent method and the Adam optimizer.

[0055] The present invention also provides a learning resource recommendation system based on heterogeneous graph denoising attention network, comprising:

[0056] Dataset construction module: collects data such as students and learning resources from the education platform, constructs student-resource interaction graphs and other relationship graphs, generates heterogeneous graphs and divides them into training sets, validation sets, and test sets, and initializes node features as model input;

[0057] Multi-semantic node representation module: It captures the semantic relationship between nodes in heterogeneous graphs through multiple meta-paths; it uses node-level attention to aggregate neighbor information, and then fuses different meta-path embeddings through semantic-level attention to generate multi-semantic node representations;

[0058] Confidence calculation module: introduces propagation constraint probability in meta-path aggregation, and calculates neighbor confidence based on node feature similarity, thereby identifying noisy neighbors and guiding the model to aggregate information about positive neighbors;

[0059] Denoising module: Design a differentiable masking operation to filter neighbor nodes according to confidence, mask unreliable nodes, and generate purified attention values ​​through softmax for node-level aggregation; finally, fuse node-level embeddings through semantic-level attention to generate the final representation of the node;

[0060] Model optimization module: Utilize semantic-level aggregated node embedding to predict the probability of interaction between students and learning resources through dot product; use BPR loss to optimize the difference in positive and negative sample scores, and use SGD and Adam optimizers to train the model. Finally, adjust the parameters on the validation set and evaluate the performance on the test set.

[0061] Furthermore, the multi-semantic node representation module specifically includes the following contents:

[0062] S201: Construct a meta-path. According to the adjacency matrix generated in step S1, construct a heterogeneous graph and design four meta-paths suitable for resource recommendation: Φ UCU For students-resources-students, UAU For student-age-student, Φ CUC For resources-students-resources and CBC resource-knowledge point-resource; these meta-paths are used to extract various semantic relationships in heterogeneous graphs, providing a basis for subsequent node information aggregation;

[0063] S202: Node-level attention mechanism, through the node-level attention mechanism, capture the key information of the local node and aggregate the information of the adjacent nodes in the subgraph constructed from the specific meta-path; the node-level aggregation process is defined as follows:

[0064]

[0065] in The attention coefficient of the target node v to the neighbor node u is obtained by steps 4 and 5; represents the node-level embedding representation of the target node v obtained through the meta-path; Is a node The initial vector of is the set of neighbor nodes of the target node v determined by the meta-path Φ; σ is the activation function.

[0066] S203: Semantic-level attention mechanism. Since the node-level embeddings learned by each meta-path carry unique semantic information, these embeddings need to be integrated through the semantic-level attention mechanism to generate the final embedding representation of the target node. The semantic-level aggregation process is defined as follows:

[0067]

[0068] in, Represents the semantic level embedding representation of the target node v; is the node-level embedding of the target node v under the i-th meta-path; is the semantic-level attention weight, reflecting the importance of different meta-paths. The semantic-level attention mechanism can effectively integrate multi-semantic information, generate high-quality embedding representations of nodes, and further improve the model's ability to express heterogeneous graphs.

[0069] Furthermore, the confidence calculation module specifically includes the following contents:

[0070] S301: Unified mapping of node features, for type The target node v is transformed by a node type-specific feature transformation matrix W A , projecting the feature vector of the node into the public space, its feature is expressed as: Among them, h v is the projection feature of the target node v in the public space, For the target node v in the meta-path Φ i The initial eigenvector under ;

[0071] S302: Calculation of similarity between nodes. Given a meta-path Φ, nodes with similar features are more important to the target node than nodes with larger feature differences. Therefore, the similarity of adjacent nodes is defined by the dot product between node features, thereby evaluating the importance of neighbor node u to the target node v. The similarity is expressed as:

[0072] S303: Calculation of the propagation constraint probability matrix. To enhance the model's ability to model node relationships, a meta-path-based propagation constraint probability is introduced. Given a meta-path First, calculate the propagation constraint probability matrix for a single adjacency matrix: in, Edge Type The adjacency matrix of is the inverse matrix of the corresponding degree matrix; each element in the matrix Indicates the edge type from node u The propagation constraint probability to node v; by multiplying the individual propagation constraint probability matrices step by step along the meta-path, the overall propagation constraint probability matrix of the meta-path Φ can be calculated:

[0073] S304: Calculate the confidence score by combining the propagation constraint probability and similarity. The propagation constraint probability based on the meta-path can be regarded as a constraint condition in the node propagation process, which is used to guide the model to learn effective information more accurately. In order to identify the unreliable neighbors of the target node v, the node feature importance is combined. and the propagation constraint probability Define neighbor nodes The confidence vector of : in, Neighbor node Confidence score of .

[0074] Furthermore, the denoising module specifically includes the following contents:

[0075] S401: Design a differentiable mask operation. For the target node v, the mask operation is modeled by constructing a mask vector, i.e., confidence:

[0076]

[0077] in, Used to control the influence of neighbor nodes on the target node v;

[0078] S402: Masking unreliable neighbor nodes. Through step S401, unreliable neighbor nodes have been identified and their mask values ​​are set to -∞. When the mask value of the neighbor node is and feature-based importance When the softmax function is applied to the sum, unreliable neighbor nodes will be effectively pruned;

[0079] S403: Generate purified attention weights, mask vectors It is used as an attention mask to filter out unreliable neighbor nodes and calculate the purified attention value through the softmax function

[0080]

[0081] S404: Node-level aggregation based on purified attention value. For the target node v, the purified attention value It is introduced into the node-level aggregation process of heterogeneous graph neural networks to shield unreliable neighbors and remove noise in heterogeneous graphs; node-level embedding vector Calculated by the following formula:

[0082]

[0083] in, is the node-level embedding representation of the target node v obtained through the meta-path Φ, h u Neighbor node The projection vector of is the set of neighbor nodes determined based on the meta-path Φ, and σ is the activation function;

[0084] S405: Use semantic-level attention mechanism to further evaluate the contribution of different meta-paths to the target node embedding; for a set of meta-paths {Φ1,Φ2,…,Φ n} and the target node v, and obtain a set of node-level embedding vectors of the node Then, the meta-path Φ∈{Φ1,Φ2,…,Φ n Importance of}:

[0085]

[0086] Where W and b represent the weight matrix and bias term of the multi-layer perceptron (MLP), respectively; q T is the attention vector used to capture the importance of semantic level;

[0087] S406: Semantic-level attention weight normalization and final node embedding, by weighting the importance of the meta-path w Φ Apply the softmax function for normalization to obtain the semantic level attention weight β Φ ; Finally, through semantic-level aggregation, the node-level embeddings under different meta-paths are integrated into the final embedding representation of the target node v

[0088]

[0089] The advantages of the present invention are:

[0090] The present invention proposes an improved method based on the heterogeneous graph attention network. Specifically, the present invention introduces a meta-path-based propagation constraint probability to measure the reliability relationship between students and resources and knowledge points, thereby effectively weakening the influence of noise neighbors inserted by evasion attacks; at the same time, a differentiable mask operation is used to dynamically detect and shield low-confidence noise neighbors to purify the attention mechanism. In the complex scenario of evasion attacks, this method can more efficiently capture the multi-semantic relationships between students, resources, and knowledge points, and significantly alleviate the impact of noise interference on recommendation results, thereby improving the matching accuracy between students and learning resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 It is a flowchart of the method in the embodiment of the present invention. DETAILED DESCRIPTION

[0092] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in combination with the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0093] This embodiment aims to improve the accuracy of learning resource recommendations by denoising heterogeneous graphs. Specifically, a meta-path-based propagation constraint probability is introduced into the heterogeneous graph attention network to guide the learning of the recommendation model and thus weaken the weight influence of noise neighbors. At the same time, combined with differentiable mask operations, noise neighbors are accurately shielded to further remove noise in the heterogeneous graph, thereby significantly improving the accuracy of learning resource recommendations. Figure 1 As shown, the specific steps are as follows:

[0094] Step 1: Data collection and preprocessing: First, collect data in the heterogeneous graph, including students, learning resources (such as videos, handouts, test questions, etc.), knowledge points, and student-resource interactions (such as clicks, downloads, ratings, etc.). Clean the original data, remove missing values, outliers, and redundant data, and format the data into a unified structure. At the same time, divide the corresponding fields, such as node type (students, resources, knowledge points, etc.) and edge type (click, coverage, etc.). Next, build a heterogeneous graph based on the cleaned data, define node sets (such as students, learning resources, knowledge points, etc.) and edge sets (such as the interaction relationship between students and resources, the coverage relationship between resources and knowledge points, etc.). Finally, generate the initial feature vector of the node based on the information of the node in the heterogeneous graph to prepare for the subsequent input of the model.

[0095] Step 2: Define and design a heterogeneous graph attention network. According to the requirements of the learning resource recommendation task, design and construct suitable meta-paths (such as "student-resource-student", "resource-knowledge point-resource", etc.) to extract various semantic relationships contained in the heterogeneous graph. In the model design, the key information of local nodes is captured through the node-level attention mechanism, and the importance of different meta-paths is evaluated using the semantic-level attention mechanism, thereby integrating the semantic information of multiple paths. In addition, a dynamic parameter adjustment mechanism is introduced to more accurately characterize the characteristics of students and learning resources and further optimize the model performance.

[0096] Step 3: Introduce meta-path based propagation constraint probability. In order to improve the model's ability to model node relationships in heterogeneous graphs, meta-path based propagation constraint probability is introduced during the training process. Specifically, by using the meta-path propagation probability to weight the information of neighbor nodes, the model's attention to important neighbors and valid paths is enhanced, while the propagation influence of noise neighbors is effectively suppressed, thereby improving the quality of model embedding vector learning.

[0097] Step 4: Introduce differentiable masking operations to further remove noise. To further improve the denoising effect, a differentiable masking operation is introduced to effectively filter noisy neighbors and aggregate the most reliable neighbor information. This method constructs a mask vector and combines the correction mechanism of the Softmax function to filter out trusted neighbors based on the trust scores of the neighbors, while completely blocking untrustworthy neighbors. This process ensures the accuracy of noise filtering while maintaining the differentiability of the operation, allowing the model to be optimized through gradient backpropagation during training, thereby further enhancing the denoising ability and stability of the model.

[0098] Step 5: Loss function and model optimization. Design a suitable loss function according to the requirements of the recommendation task. For example, the BPR loss function can be used for the ranking recommendation task. Use the gradient descent algorithm (such as Adam) to optimize the model parameters to minimize the loss function. Evaluate the model performance on the validation set and further optimize the model performance by adjusting the hyperparameters (such as learning rate, hidden dimension, etc.). Finally, evaluate the final model performance on the test set, use common evaluation indicators (such as NDCG, Recall, etc.) to measure the recommendation effect, and verify the actual recommendation ability of the model.

[0099] Next, the above five steps are described in detail one by one:

[0100] Step one includes:

[0101] Step 101: Collect information such as students, resources, and knowledge points from the education platform and construct a student set U = {u1,u2,u3,…,u |U|}, resource set C = {c1,c2,c3,…,c |C|}, student age set A = {a1, α2, a3, …, a |A|}, and the knowledge point set B = {b1,b2,b3,…,b |B|}.

[0102] Step 102: The interaction behaviors between students and learning resources (such as clicking, downloading, rating, etc.) are used to construct an interaction relationship graph. For example, when building a student-resource interaction graph, the adjacency matrix is ​​defined as When a student i ∈U and learning resources c j ∈C when there is interaction, let u i c j =1, otherwise it is set to 0. Other relationship interaction diagrams (such as the relationship diagram between learning resources and knowledge points) can be deduced in the same way.

[0103] Step 103: Construct a heterogeneous graph using different relationship interaction graphs to construct a heterogeneous graph Where V represents the node set, E represents the edge set, Represents a collection of node types. Represents a set of edge types. For example, student node u i ∈V, the interaction edge u between students and learning resources i c j ∈E, a node of student type Interaction between students and learning resources

[0104] Step 104: Divide the data set into training set, validation set and test set at random with a ratio of 7:1:2. The data set is mainly divided into the direct interaction data between students and learning resources. The validation set is used for intermediate model evaluation and parameter adjustment, and the test set retains the interaction behavior of each student in proportion to generate candidate resources C.

[0105] Step 105: Initialize node representation vectors for various types of nodes in the heterogeneous graph Where D represents the dimension of the vector. For example, the initialization vector of the student node is The initialization vector of the resource node is Etc. The initialized representation vectors are stored in their respective representation vector dictionaries as the initial input for subsequent models.

[0106] Step 2 includes:

[0107] Step 201: Construct a meta-path. According to the adjacency matrix generated in step 1, construct a heterogeneous graph and design four meta-paths suitable for resource recommendation: Φ UCU (student-resource-student),Φ UAU(student-age-student),Φ CUC (resource-student-resource) and Φ CBC (Resource-Knowledge Point-Resource). These meta-paths are used to extract various semantic relationships in heterogeneous graphs, providing a basis for subsequent node information aggregation.

[0108] Step 202: Node-level attention mechanism, through the node-level attention mechanism, capture the key information of the local node and aggregate the information of the adjacent nodes in the subgraph constructed from the specific meta-path. The node-level aggregation process is defined as follows:

[0109]

[0110] in The attention coefficient of the target node v to the neighbor node u is obtained by steps 4 and 5; represents the node-level embedding representation of the target node v obtained through the meta-path; Is a node The initial vector of is the set of neighbor nodes of the target node v determined by the meta-path Φ; σ is the activation function.

[0111] Step 203: Semantic-level attention mechanism. Since the node-level embeddings learned by each meta-path carry unique semantic information, these embeddings need to be integrated through the semantic-level attention mechanism to generate the final embedding representation of the target node. The semantic-level aggregation process is defined as follows:

[0112]

[0113] in, Represents the semantic level embedding representation of node v; is the node-level embedding of the target node v under the i-th meta-path; is the semantic-level attention weight, reflecting the importance of different meta-paths. The semantic-level attention mechanism can effectively integrate multi-semantic information, generate high-quality embedding representations of nodes, and further improve the model's ability to express heterogeneous graphs.

[0114] Step three includes:

[0115] Step 301: Unified mapping of node features. Since different types of nodes have different information features, these features are usually distributed in their own feature spaces. In order to uniformly process these differentiated information, it is necessary to map the features of different node types to a common feature space. Specifically, for nodes of type The target node v is transformed by a node type-specific feature transformation matrix W A , projecting the feature vector of the node into the public space, its feature is expressed as: Among them, h v is the projection feature of the target node v in the public space, For the target node v in the meta-path Φ i The initial eigenvector of .

[0116] Step 302: Calculate similarity between nodes. Given a meta-path Φ, nodes with similar features are more important to the target node than nodes with larger feature differences. Therefore, this embodiment defines the similarity of adjacent nodes by the dot product between node features, thereby evaluating the importance of neighbor node u to the target node v. The similarity is expressed as:

[0117] Step 303: Calculation of the propagation constraint probability matrix. To enhance the modeling capability of the model for node relationships, the propagation constraint probability based on the meta-path is introduced. First, calculate the propagation constraint probability matrix for a single adjacency matrix: in, Edge Type The adjacency matrix of is the inverse matrix of the corresponding degree matrix. Each element in the matrix Indicates the edge type from node u The propagation constraint probability to the target node v. By multiplying the individual propagation constraint probability matrices step by step along the meta-path, the overall propagation constraint probability matrix of the meta-path Φ can be calculated:

[0118] Step 304: Calculate the confidence score by combining the propagation constraint probability and similarity. The propagation constraint probability based on the meta-path can be regarded as a constraint condition in the node propagation process, which is used to guide the model to learn effective information more accurately. In order to identify the unreliable neighbors of the target node v, this embodiment combines the node feature importance and the propagation constraint probability Define neighbor nodes The confidence vector of : in, Neighbor node The confidence score of the neighbor nodes with higher confidence scores are considered to be reliable nodes, usually with higher feature similarity and propagation probability. By introducing the meta-path-based propagation constraint probability into the heterogeneous graph attention network, the model can effectively alleviate the interference of noisy nodes in the graph and better aggregate high-quality neighbor information, thereby improving the learning resource recommendation performance.

[0119] Accurately distinguishing normal edges from noisy edges introduced by evasion attacks is the core challenge in dealing with evasion attacks. To this end, this embodiment introduces a meta-path-based propagation constraint probability as a solution strategy. Specifically, this embodiment denotes this propagation constraint probability as Represents the meta path from the target node v The probability of propagating to node u. Through the prior knowledge, i.e., the propagation constraint probability, this embodiment can more accurately guide the recommendation model to perform random walks on the meta-path-based subgraph. This mechanism prompts the model to learn and generate high-quality node embeddings. It is worth noting that these prior knowledge are extracted from uncontaminated (i.e., clean) graph structures. Therefore, when they are applied to subgraphs under attack, they can play a key role in helping this embodiment effectively distinguish normal edges from noise edges inserted by evasion attacks.

[0120] For the overall propagation constraint probability P Φ This embodiment can be obtained in the following way:

[0121]

[0122] For each i in the range 1, ..., n, this embodiment defines is the inverse of the degree matrix and the adjacency matrix The product of is expressed as:

[0123]

[0124] This formula states that the propagation constraint probability associated with a given meta-path Φ is It implies two key aspects: (1) connectivity, which reflects the number of paths between target nodes v and u under the meta-path Φ and (2) degree information, which contains the degrees of all nodes along the meta-path. These degree information contain the edge information of the original graph and provide valuable prior knowledge for subsequent noise removal.

[0125] Then, this embodiment uses the elements in the propagation probability matrix As the prior estimate of the target node v and the neighboring node u under the meta-path Φ (i.e., the probability that there is an edge from node v to node u). It can be foreseen that if node u is indirectly connected to the target node v by attacking a malicious node, then as the prior estimate of the neighbor u Relatively small because It is calculated based on the clean graph, so it retains the graph structure information of the clean graph. It can be used as a basis for judging the possibility of the existence of an edge between two nodes in the noise graph in this embodiment, and it can also be regarded as an indicator to measure the importance of the edge. When the value of is low, this embodiment tends to believe that this edge may be a noise edge introduced by an attack.

[0126] Propagation probability matrix P ΦThe model is provided with a reliable information input, so that the present embodiment can evaluate the credibility of the edge in the noise graph. In step 304, in order to more accurately identify the noise edge, the present embodiment converts the propagation probability matrix P φ Combined with the feature similarity of the node. Through the combination, this embodiment calculates a confidence vector, which can be used to identify the noise edge. This is because the propagation probability matrix and the node feature similarity can both reflect the importance of the edge, and together provide a strong basis for identifying the noise edge.

[0127] Step 4 includes:

[0128] Step 401: Design a differentiable masking operation. In order to effectively reduce the attention weight of malicious neighbor nodes, this embodiment designs a differentiable masking operation to shield low-confidence neighbor nodes, thereby pruning out noisy neighbors. For the target node v, the masking operation is modeled by constructing a mask vector (i.e., confidence):

[0129]

[0130] in, It is used to control the influence of neighbor nodes on the target node v. Specifically, based on the confidence score The TOP(·) operation selects T trusted neighbors and sets their mask values ​​to 0; the remaining neighbors are considered unreliable nodes and their mask values ​​are set to -∞. Here, T represents the number of neighbor nodes that need to be retained.

[0131] Step 402: Mask unreliable neighbor nodes. Through step 401, unreliable neighbor nodes have been identified and their mask values ​​are set to -∞. and feature-based importance When the softmax function is applied to the sum, unreliable neighbor nodes will be effectively pruned. Because the softmax function converts the attention value of neighbors with a mask value of -∞ to 0, these unreliable neighbors will no longer have an impact on the aggregation process of the target node.

[0132] Step 403: Generate purified attention weights, mask vectors It is used as an attention mask to filter out unreliable neighbor nodes and calculate the purified attention value through the softmax function

[0133]

[0134] This mechanism enhances the denoising capability of the node-level attention mechanism by effectively encoding a meta-path based propagation constraint probability matrix that aggregates only the information of the most reliable neighbors.

[0135] Step 404: Based on the node-level aggregation of the purified attention value, for the target node v, the purified attention value It is introduced into the node-level aggregation process of heterogeneous graph neural networks to shield unreliable neighbors and remove noise in heterogeneous graphs. Calculated by the following formula:

[0136]

[0137] in, is the node-level embedding representation of the target node v obtained through the meta-path Φ, h u Neighbor node The projection vector of is the set of neighbor nodes determined based on the meta-path Φ, and σ is the activation function.

[0138] Step 405: Semantic-level attention mechanism. After the node-level aggregation is completed, the heterogeneous graph neural network adopts the semantic-level attention mechanism to further evaluate the contribution of different meta-paths to the target node embedding. n} and the target node v, this embodiment can obtain a set of node-level embedding vectors of the node Then, the meta-path Φ∈{Φ1,Φ2,…,Φ n Importance of}:

[0139]

[0140] Where W and b represent the weight matrix and bias term of the multi-layer perceptron (MLP), respectively; q T is the attention vector used to capture the importance of semantic level.

[0141] Step 406: Normalize the semantic level attention weights and embed the final node, by weighting the importance of the meta-path w Φ Apply the softmax function for normalization to obtain the semantic level attention weight β Φ Finally, through semantic-level aggregation, the node-level embeddings under different meta-paths are integrated into the final embedding representation of the target node v

[0142]

[0143] Step five includes:

[0144] Step 501: Prediction of student-learning resource interaction scores. Through semantic-level aggregation, this embodiment can obtain the final embedding vectors of student u and learning resource c respectively. and The likelihood of interaction between a student and a resource is predicted by the dot product of their embedding vectors: in, Represents the predicted score of the interaction possibility between student u and learning resource c. Score The larger it is, the higher the likelihood that an interaction will occur between the student and the resource.

[0145] Step 502: Adopt the Bayesian Personalized Ranking (BPR) loss function. For the learning resource recommendation task, the Bayesian Personalized Ranking (BPR) pairwise loss function is adopted. Specifically, each training sample consists of a student u, a positive sample resource c that interacts with the student, and a + , and negative sample resources c that have no interaction with students - composition.

[0146] Step 503: Definition of the BPR loss function. For each training sample, the goal is to maximize the difference between the positive and negative sample prediction scores, thereby optimizing the model. The BPR loss function is defined as follows:

[0147]

[0148] is a set of training triplets, (u,c + ) indicates that students interact with resources, (u,c - ) indicates that the student and the resource do not interact; the functions ln(·) and sigmiod(·) refer to the logarithmic function and the sigmoid function respectively; λ is a hyperparameter that determines the weight of the regularization term. By optimizing the above BPR loss function, the model attempts to maximize the difference in the predicted scores between positive and negative samples, that is, This satisfies the sorting requirements of the learning resource recommendation task.

[0149] Step 504: Model training and evaluation. During the model training process, the model parameters are optimized using the stochastic gradient descent method (SGD) and the Adam optimizer. After the training is completed, the internal parameters and related feature representations of the heterogeneous graph neural network are further adjusted using the validation set to improve the generalization ability of the model. Finally, the model performance is evaluated on the test set, and common recommendation indicators (such as NDCG, Recall, etc.) are used to measure the recommendation effect and verify the pros and cons of the method.

[0150] This embodiment aims to improve the recommendation accuracy of learning resources in evasion attack by denoising heterogeneous graphs. Specifically, a meta-path-based propagation constraint probability is introduced into the heterogeneous graph attention network to guide the learning of the recommendation model and thus weaken the weight influence of noise neighbors. At the same time, combined with differentiable mask operations, noisy neighbors are accurately shielded, and the noise in the heterogeneous graph is further removed, thereby significantly improving the robustness and accuracy of learning resource recommendations.

[0151] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A learning resource recommendation method based on heterogeneous graph denoising attention network, characterized in that: The following steps are involved: S1. Collect data such as students and learning resources from the education platform, construct student-resource interaction graphs and other relationship graphs, generate heterogeneous graphs and divide them into training sets, validation sets and test sets, and initialize node features as model input; S2. Capture the semantic relationship between nodes in heterogeneous graphs through multiple meta-paths; use node-level attention to aggregate neighbor information, and then fuse different meta-path embeddings through semantic-level attention to generate multi-semantic node representations; S3. Introduce propagation constraint probability in meta-path aggregation and calculate neighbor confidence based on node feature similarity to identify noisy neighbors and guide the model to aggregate the information of positive neighbors; S4. Design a differentiable masking operation to filter neighbor nodes according to confidence, mask unreliable nodes, and generate purified attention values ​​through softmax for node-level aggregation; finally, fuse node-level embeddings through semantic-level attention to generate the final representation of the node; S5. Using semantic-level aggregated node embedding, the interaction probability between students and learning resources is predicted through dot product. The difference between positive and negative sample scores is optimized using BPR loss, and the model is trained with SGD and Adam optimizers. Finally, the performance is evaluated by adjusting parameters on the validation set and testing the set.

2. The learning resource recommendation method based on heterogeneous graph denoising attention network according to claim 1 is characterized in that: The S1 specifically includes the following contents: S101: Collect information about students, resources, and knowledge points from the education platform and construct a student set U = {u1,u2,u3,…,u |U| }, resource set C = {c1,c2,c3,…,c |C| }, student age set A = {a1, a2, a3, …, a |A| }, and the knowledge point set B = {b1,b2,b3,…,b |B| }; S102: Construct an interaction relationship graph based on the interaction between students and learning resources; define the adjacency matrix When a student i ∈U and learning resources c j ∈C when there is interaction, let u i c j =1, otherwise set to 0; other relationship interaction diagrams are similar; S103: Construct heterogeneous graphs, using different relationship interaction graphs to construct heterogeneous graphs Where V represents the node set, E represents the edge set, Represents a collection of node types. Represents a set of edge types; S104: Divide the data set into training set, validation set and test set randomly; the data set is mainly divided into direct interaction data between students and learning resources. The validation set is used for intermediate model evaluation and parameter adjustment, while the test set retains the interaction behavior of each student in proportion to generate candidate resources C; S105: Initialize node representation vectors for various types of nodes in the heterogeneous graph Where D represents the dimension of the vector; the initialized representation vectors are stored in their respective representation vector dictionaries as the initial input of the subsequent model.

3. The learning resource recommendation method based on heterogeneous graph denoising attention network according to claim 2 is characterized in that: The S2 specifically includes the following contents: S201: Construct a meta-path. According to the adjacency matrix generated in step S1, construct a heterogeneous graph and design four meta-paths suitable for resource recommendation: Φ UCU For students-resources-students, UAU For student-age-student, Φ CUC For resources-students-resources and CBC resource-knowledge point-resource; these meta-paths are used to extract various semantic relationships in heterogeneous graphs, providing a basis for subsequent node information aggregation; S202: Node-level attention mechanism, through the node-level attention mechanism, capture the key information of the local node and aggregate the information of the adjacent nodes in the subgraph constructed from the specific meta-path; the node-level aggregation process is defined as follows: in The attention coefficient of the target node v to the neighbor node u is obtained by steps 4 and 5; represents the node-level embedding representation of the target node v obtained through the meta-path; Is a node The initial vector of is the set of neighbor nodes of the target node v determined by the meta-path Φ; σ is the activation function. S203: semantic-level attention mechanism. Since the node-level embeddings learned by each meta-path carry unique semantic information, these embeddings need to be integrated through the semantic-level attention mechanism to generate the final embedding representation of the target node. The semantic level aggregation process is defined as follows: in, Represents the semantic level embedding representation of the target node v; is the node-level embedding of the target node v under the i-th meta-path; is the semantic-level attention weight, reflecting the importance of different meta-paths. The semantic-level attention mechanism can effectively integrate multi-semantic information, generate high-quality embedding representations of nodes, and further improve the model's ability to express heterogeneous graphs.

4. The learning resource recommendation method based on heterogeneous graph denoising attention network according to claim 3 is characterized in that: The S3 specifically Includes the following: S301: Unified mapping of node features, for type The target node v is transformed by a node type-specific feature transformation matrix W A , projecting the feature vector of the node into the public space, its feature is expressed as: Among them, h v is the projection feature of the target node v in the public space, For the target node v in the meta-path Φ i The initial eigenvector under ; S302: Calculation of similarity between nodes. Given a meta-path Φ, nodes with similar features are more important to the target node than nodes with larger feature differences. Therefore, the similarity of adjacent nodes is defined by the dot product between node features, thereby evaluating the importance of neighbor node u to the target node v. The similarity is expressed as: S303: Calculation of the propagation constraint probability matrix. To enhance the model's ability to model node relationships, a meta-path-based propagation constraint probability is introduced. Given a meta-path First, calculate the propagation constraint probability matrix for a single adjacency matrix: in, Edge Type The adjacency matrix of is the inverse matrix of the corresponding degree matrix; each element in the matrix Indicates the edge type from node u The propagation constraint probability to node v; by multiplying the individual propagation constraint probability matrices step by step along the meta-path, the overall propagation constraint probability matrix of the meta-path Φ can be calculated: S304: Calculate the confidence score by combining the propagation constraint probability and similarity. The propagation constraint probability based on the meta-path can be regarded as a constraint condition in the node propagation process, which is used to guide the model to learn effective information more accurately. In order to identify the unreliable neighbors of the target node v, the node feature importance is combined. and the propagation constraint probability Define neighbor nodes The confidence vector of : in, Neighbor node Confidence score of .

5. The learning resource recommendation method based on heterogeneous graph denoising attention network according to claim 4 is characterized in that: The S4 specifically includes the following contents: S401: Design a differentiable mask operation. For the target node v, the mask operation is modeled by constructing a mask vector, i.e., confidence: in, Used to control the influence of neighbor nodes on the target node v; S402: Masking unreliable neighbor nodes. Through step S401, unreliable neighbor nodes have been identified and their mask values ​​are set to -∞. When the mask value of the neighbor node is and feature-based importance When the softmax function is applied to the sum, unreliable neighbor nodes will be effectively pruned; S403: Generate purified attention weights, mask vectors It is used as an attention mask to filter out unreliable neighbor nodes and calculate the purified attention value through the softmax function S404: Node-level aggregation based on purified attention value. For the target node v, the purified attention value It is introduced into the node-level aggregation process of heterogeneous graph neural networks to shield unreliable neighbors and remove noise in heterogeneous graphs; node-level embedding vector Calculated by the following formula: in, is the node-level embedding representation of the target node v obtained through the meta-path Φ, h u Neighbor node The projection vector of is the set of neighbor nodes determined based on the meta-path Φ, and σ is the activation function; S405: Use semantic-level attention mechanism to further evaluate the contribution of different meta-paths to the target node embedding; for a set of meta-paths {Φ1,Φ2,…,Φ n } and the target node v, and obtain a set of node-level embedding vectors of the node Then, the meta-path Φ∈{Φ1,Φ2,…,Φ n Importance of}: Where W and b represent the weight matrix and bias term of the multi-layer perceptron (MLP), respectively; q T is the attention vector used to capture the importance of semantic level; S406: Semantic-level attention weight normalization and final node embedding, by weighting the importance of the meta-path w φ Apply the softmax function for normalization to obtain the semantic level attention weight β φ ; Finally, through semantic-level aggregation, the node-level embeddings under different meta-paths are integrated into the final embedding representation of the target node v 6. The learning resource recommendation method based on heterogeneous graph denoising attention network according to claim 4 is characterized in that: The S5 specifically includes the following contents: S501: Prediction of student-learning resource interaction scores. Through semantic-level aggregation, the final embedding vectors of student u and learning resource c can be obtained respectively. and The likelihood of interaction between a student and a resource is predicted by the dot product of their embedding vectors: in, Represents the predicted score of the interaction possibility between student u and learning resource c; score The larger it is, the higher the likelihood of interaction between students and resources; S502: For the learning resource recommendation task, a pairwise loss function of Bayesian personalized ranking is adopted; S503: Definition of Bayesian personalized ranking loss function. For each training sample, the goal is to maximize the difference between the positive and negative sample prediction scores, thereby optimizing the model. The Bayesian personalized ranking loss function is defined as follows: is a set of training triplets, (u,c + ) indicates that students interact with resources, (u,c - ) indicates that the student and the resource do not interact; the functions ln(·) and sigmiod(·) refer to the logarithmic function and the sigmoid function respectively; λ is a hyperparameter that determines the weight of the regularization term; by optimizing the above BPR loss function, the model attempts to maximize the difference in the predicted scores between positive and negative samples, that is, Thus, the sorting requirements of the learning resource recommendation task are met; S504: Model training and evaluation. During the model training process, the model parameters are optimized using the stochastic gradient descent method and the Adam optimizer.

7. A learning resource recommendation system based on heterogeneous graph denoising attention network, characterized in that: include: Dataset construction module: collects data such as students and learning resources from the education platform, constructs student-resource interaction graphs and other relationship graphs, generates heterogeneous graphs and divides them into training sets, validation sets, and test sets, and initializes node features as model input; Multi-semantic node representation module: It captures the semantic relationship between nodes in heterogeneous graphs through multiple meta-paths; it uses node-level attention to aggregate neighbor information, and then fuses different meta-path embeddings through semantic-level attention to generate multi-semantic node representations; Confidence calculation module: introduces propagation constraint probability in meta-path aggregation, and calculates neighbor confidence based on node feature similarity, thereby identifying noisy neighbors and guiding the model to aggregate information about positive neighbors; Denoising module: Design a differentiable masking operation to filter neighbor nodes based on confidence, mask unreliable nodes, and generate purified attention values ​​through softmax for node-level aggregation; Finally, the node-level embeddings are fused through semantic-level attention to generate the final representation of the node; Model optimization module: Utilize semantic-level aggregated node embedding to predict the probability of interaction between students and learning resources through dot product; use BPR loss to optimize the difference in positive and negative sample scores, and use SGD and Adam optimizers to train the model. Finally, adjust the parameters on the validation set and evaluate the performance on the test set.

8. The learning resource recommendation system based on heterogeneous graph denoising attention network according to claim 7 is characterized in that: The multi-semantic node representation module specifically includes the following contents: S201: Construct a meta-path. According to the adjacency matrix generated in step S1, construct a heterogeneous graph and design four meta-paths suitable for resource recommendation: Φ UCU For students-resources-students, UAU For student-age-student, Φ CUC For resources-students-resources and CBC resource-knowledge point-resource; these meta-paths are used to extract various semantic relationships in heterogeneous graphs, providing a basis for subsequent node information aggregation; S202: Node-level attention mechanism, through the node-level attention mechanism, capture the key information of the local node and aggregate the information of the adjacent nodes in the subgraph constructed from the specific meta-path; the node-level aggregation process is defined as follows: in The attention coefficient of the target node v to the neighbor node u is obtained by steps 4 and 5; represents the node-level embedding representation of the target node v obtained through the meta-path; Is a node The initial vector of is the set of neighbor nodes of node v determined by the meta-path Φ; σ is the activation function. S203: semantic-level attention mechanism. Since the node-level embeddings learned by each meta-path carry unique semantic information, these embeddings need to be integrated through the semantic-level attention mechanism to generate the final embedding representation of the target node. The semantic level aggregation process is defined as follows: in, Represents the semantic level embedding representation of the target node v; is the node-level embedding of the target node v under the i-th meta-path; is the semantic-level attention weight, reflecting the importance of different meta-paths. The semantic-level attention mechanism can effectively integrate multi-semantic information, generate high-quality embedding representations of nodes, and further improve the model's ability to express heterogeneous graphs.

9. The learning resource recommendation system based on heterogeneous graph denoising attention network according to claim 8 is characterized in that: The confidence calculation module specifically includes the following contents: S301: Unified mapping of node features, for type The target node v is transformed by a node-type-specific feature transformation matrix W A , projecting the feature vector of the node into the public space, its feature is expressed as: Among them, h v is the projection feature of the target node v in the public space, For the target node v in the meta-path Φ i The initial eigenvector under ; S302: Calculation of similarity between nodes. Given a meta-path Φ, nodes with similar features are more important to the target node than nodes with larger feature differences. Therefore, the similarity of adjacent nodes is defined by the dot product between node features, thereby evaluating the importance of neighbor node u to the target node v. The similarity is expressed as: S303: Calculation of the propagation constraint probability matrix. To enhance the model's ability to model node relationships, a meta-path-based propagation constraint probability is introduced. Given a meta-path First, calculate the propagation constraint probability matrix for a single adjacency matrix: in, Edge Type The adjacency matrix of is the inverse matrix of the corresponding degree matrix; each element in the matrix Indicates the edge type from node u The propagation constraint probability to node v; by multiplying the individual propagation constraint probability matrices step by step along the meta-path, the overall propagation constraint probability matrix of the meta-path Φ can be calculated: S304: Calculate the confidence score by combining the propagation constraint probability and similarity. The propagation constraint probability based on the meta-path can be regarded as a constraint condition in the node propagation process, which is used to guide the model to learn effective information more accurately. In order to identify the unreliable neighbors of the target node v, the node feature importance is combined. and the propagation constraint probability Define neighbor nodes The confidence vector of : in, Neighbor node Confidence score of .

10. The learning resource recommendation system based on heterogeneous graph denoising attention network according to claim 4, characterized in that: The denoising module specifically includes the following contents: S401: Design a differentiable mask operation. For the target node v, the mask operation is modeled by constructing a mask vector, i.e., confidence: in, Used to control the influence of neighbor nodes on the target node v; S402: Masking unreliable neighbor nodes. Through step S401, unreliable neighbor nodes have been identified and their mask values ​​are set to -∞. When the mask value of the neighbor node is and feature-based importance When the softmax function is applied to the sum, unreliable neighbor nodes will be effectively pruned; S403: Generate purified attention weights, mask vectors It is used as an attention mask to filter out unreliable neighbor nodes and calculate the purified attention value through the softmax function S404: Node-level aggregation based on purified attention value. For the target node v, the purified attention value It is introduced into the node-level aggregation process of heterogeneous graph neural networks to shield unreliable neighbors and remove noise in heterogeneous graphs; node-level embedding vector Calculated by the following formula: in, is the node-level embedding representation of the target node v obtained through the meta-path Φ, h u Neighbor node The projection vector of is the set of neighbor nodes determined based on the meta-path Φ, and σ is the activation function; S405: Use semantic-level attention mechanism to further evaluate the contribution of different meta-paths to the target node embedding; for a set of meta-paths {Φ1,Φ2,…,Φ n } and the target node v, and obtain a set of node-level embedding vectors of the node Then, the meta-path Φ∈{Φ1,Φ2,…,Φ n Importance of}: Where W and b represent the weight matrix and bias term of the multi-layer perceptron (MLP), respectively; q T is the attention vector used to capture the importance of semantic level; S406: Semantic-level attention weight normalization and final node embedding, by weighting the importance of the meta-path w Φ Apply the softmax function for normalization to obtain the semantic level attention weight β Φ ; Finally, through semantic-level aggregation, the node-level embeddings under different meta-paths are integrated into the final embedding representation of the target node v 。

Citation Information

Patent Citations

  • Knowledge graph completion method and system based on triplex semantic aggregation of isoproton graph

    CN116842185A

  • Project evaluation and review method and system fused with natural language processing

    CN118780767A

  • Multi-modal knowledge graph completion method based on neighborhood semantic enhancement

    CN118966347A

  • Wind power knowledge graph entity unification method and system

    CN119004227A

  • Learning neural network architectures by backpropagation using differentiable masks

    US20240296331A1

Cited By

  • Rumor simulation analysis method and system based on large language model agent

    CN120509434A

  • Resource regulation and control method for semantic perception guidance and structure denoising in computing power network

    CN122387679A