A Scene-Aware Trust Evaluation Method Based on Graph Neural Networks

By constructing a graph neural network model with dynamic heterogeneous graphs and a dual attention mechanism, the dynamic changes and semantic information of interactions are captured, solving the problems of dynamics and heterogeneity in trust prediction and achieving more accurate trust prediction.

CN119254640BActive Publication Date: 2025-10-28XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411326373.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-10-28
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

Existing trust prediction models based on graph neural networks do not support the dynamics and context awareness of trust, resulting in inaccurate prediction results and an inability to adapt to the heterogeneity and complex interactions of real-world networks.

Method used

A scene-aware trust evaluation method based on graph neural networks is designed. By constructing a dynamic heterogeneous graph and utilizing cascaded embedding layers, heterogeneous attention layers, and prediction layers, the dynamic changes and rich semantic information of interactions are captured to predict the potential trust between user nodes.

Benefits of technology

It improves the accuracy of trust prediction, can handle complex interactions, enhances the model's adaptability and robustness, solves the dynamic and heterogeneous problems of trust prediction, and improves the fineness of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254640B_ABST
    Figure CN119254640B_ABST
Patent Text Reader

Abstract

This invention discloses a scene-aware trust assessment method based on graph neural networks, relating to the field of social network security technology. The method includes: obtaining a dynamic heterogeneous graph based on timestamped interactions between nodes in a social network within a preset time interval; the nodes including user nodes and item nodes; inputting the dynamic heterogeneous graph into a trained trust prediction model based on graph neural networks to obtain the potential trust level between two user nodes in the social network, whereby the potential trust level includes scene-specific trust levels under different scenarios and the overall trust level. The trust prediction model of this invention supports the dynamic nature of trust, capturing the dynamic changes of each interaction; it can characterize the heterogeneity of real-world networks, handling complex interaction relationships based on a dual attention mechanism and capturing rich semantic information; and it supports scene-aware trust, providing fine-grained trust prediction results. These characteristics significantly improve the accuracy and practicality of the model of this invention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of social network security technology, specifically relating to a scene-aware trust assessment method based on graph neural networks. Background Technology

[0002] Trust is a complex and multifaceted concept, referring to one entity's subjective perception of another entity within a specific context. Trust possesses inherent characteristics such as subjectivity, dynamism, context-awareness, asymmetry, and transferability of conditions. Trust assessment, or trust prediction, quantifies trust by considering factors influencing it and is a key technology in cybersecurity. It has been applied across multiple domains to achieve various functions, such as anomaly detection, service management, and access control. For example, social networks face problems with fraudsters and fake ratings; trust assessment helps identify trustworthy entities and filters out malicious entities or misinformation by analyzing interactions between entities, thereby reducing potential risks.

[0003] In recent years, Graph Neural Networks (GNNs), as a novel machine learning paradigm designed specifically for graph data, have achieved remarkable performance in various tasks. The advantage of GNNs lies in their ability to fully utilize the inherent structural information in graphs through information propagation and aggregation, learning meaningful node representations (or embeddings). This capability has driven researchers to apply it to trust assessment, also known as trust prediction, because GNNs typically utilize historical interaction data to predict future trust relationships. Compared to previous trust assessment methods based on statistics, inference, and traditional machine learning, using GNNs for trust prediction offers numerous advantages. First, trust relationships between nodes can be naturally modeled as graphs, and GNNs excel at handling graph data. Second, the message passing mechanism of GNNs is fully compatible with fundamental trust properties such as conditional transferability and composability. Third, traditional machine learning models require cumbersome feature engineering, while GNNs provide an end-to-end evaluation model, greatly simplifying the trust assessment process. Therefore, applying GNNs to trust assessment shows great promise.

[0004] Most current trust prediction models based on Generative Neural Networks (GNNs) do not support the dynamic nature of trust, leading to problems in the inference process and reduced prediction accuracy. Trust is inherently dynamic; it changes with new interactions and typically decays over time. Static models cannot capture the temporal patterns in dynamic trust relationships and, by ignoring temporal information, may incorrectly use future interactions to predict previous trust relationships. Furthermore, this oversight limits the model's adaptability. Almost all models ignore the heterogeneity of real-world networks. These models focus only on homogeneous networks containing user interactions, simplifying the network structure but missing valuable semantic information. For example, in social networks, users interact not only with other users but also with various products. User reviews of products reflect their preferences, which are often closely related to trust establishment. These models do not support context-aware trust prediction, resulting in coarse and inaccurate predictions. Context awareness is one of the key characteristics of trust, indicating that trust relationships differ across different scenarios. Therefore, without context awareness, the applicability of trust prediction models will be significantly limited. Summary of the Invention

[0005] To address the aforementioned problems in the existing technology, this invention provides a scene-aware trust evaluation method based on graph neural networks. The technical problem to be solved by this invention is achieved through the following technical solution:

[0006] This invention provides a scene-aware trust assessment method based on graph neural networks, comprising:

[0007] Step 1: Within a preset time interval, a dynamic heterogeneous graph is obtained based on the timestamped interactions between nodes in the social network. The nodes include user nodes and item nodes.

[0008] Step 2: Input the dynamic heterogeneous graph into the trained trust prediction model based on graph neural network to obtain the potential trust degree between two user nodes in the social network. The potential trust degree includes the scene trust degree under different scenarios and the overall trust degree.

[0009] The trust prediction model based on graph neural networks includes a cascaded embedding layer, a heterogeneous attention layer, and a prediction layer. The embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph based on the initial embedding. The heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph based on the initial embedding using a dual attention mechanism. The prediction layer is used to obtain the potential trust level between two user nodes in the social network based on the final embedding of each node in the dynamic heterogeneous graph.

[0010] Compared with the prior art, the present invention has the following beneficial effects:

[0011] This invention presents a scene-aware trust assessment method based on graph neural networks. It designs a hierarchical trust prediction model based on graph neural networks, using this model to achieve scene-aware trust prediction. This model supports the dynamic nature of trust, capturing the dynamic changes in each interaction. This time sensitivity helps improve the accuracy of trust prediction. The model can characterize the heterogeneity of real-world networks, capture rich semantic information based on a dual attention mechanism, handle complex interaction relationships, and extract key information, further enhancing the accuracy of trust prediction.

[0012] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described in detail below with reference to the accompanying drawings. Attached Figure Description

[0013] Figure 1 This is a flowchart of a scene-aware trust evaluation method based on graph neural networks provided in an embodiment of the present invention;

[0014] Figure 2 This is a schematic diagram of the prediction process of a trust prediction model based on graph neural networks provided in an embodiment of the present invention. Detailed Implementation

[0015] To further illustrate the technical means and effects adopted by the present invention to achieve the intended purpose, the following describes in detail a scene-aware trust evaluation method based on graph neural networks proposed according to the present invention, in conjunction with the accompanying drawings and specific embodiments.

[0016] The foregoing and other technical contents, features, and effects of the present invention will be clearly presented in the following detailed description of specific embodiments in conjunction with the accompanying drawings. Through the description of the specific embodiments, a more in-depth and concrete understanding can be gained of the technical means and effects adopted by the present invention to achieve its intended purpose. However, the accompanying drawings are for reference and illustration only and are not intended to limit the technical solutions of the present invention.

[0017] Firstly, embodiments of the present invention provide a scene-aware trust assessment method based on graph neural networks. This method models a social network as a dynamic heterogeneous graph and further processes and analyzes it using a graph neural network-based trust prediction model. This allows the prediction of the trust relationship between any two users in a specific scene, thereby helping users discern the credibility of content posted by other users. For example, if the graph neural network-based trust prediction model predicts that user A trusts user B in scene k, then user A can believe user B's statements about scene k, thus protecting themselves from being deceived.

[0018] Please see Figure 1 , Figure 1 This is a flowchart of a scene-aware trust evaluation method based on graph neural networks provided in an embodiment of the present invention, such as... Figure 1 As shown, the scene-aware trust evaluation method based on graph neural networks in this embodiment includes:

[0019] Step 1: Obtain a dynamic heterogeneous graph based on the timestamped interactions between nodes in the social network within a preset time interval.

[0020] A network can be represented as a six-tuple. Each node Mapping function Φ to node type: Relatedly, each edge e∈ε is mapped to the edge type function Ψ: Related. If Then this network is heterogeneous; if Then this network is isomorphic.

[0021] In this embodiment, the social network is a heterogeneous network, and the nodes of the social network include user nodes and item nodes. Therefore, the dynamic heterogeneous graph within a preset time interval [0, T] can be represented as: In the formula, Let ε(T) be the set of nodes that changes over time, and let ε(T) be the set of edges that changes over time, where edges represent directed trust relationships between nodes. Where e i,j (t) is node v i and node v j The edges established at time t represent interactions, where r is the edge type and Φ is the node type mapping function. Let Ψ be the set of node types, including user nodes and item nodes, and let Ψ be the edge type mapping function. It is a set of edge types, including directed trust relationships between user nodes, rating relationships between user nodes and item nodes, and rating relationships between item nodes and user nodes.

[0022] For example, the edges between users represent “likes” (trust) or “dislikes” (distrust), and the edges between users and items represent “rating” behavior. These relationships are time-informed and may include additional attributes.

[0023] In this embodiment, the directed trust relationship between user nodes is asymmetric. The directed trust relationship between user nodes and item nodes, as well as the directed trust relationship between item nodes and user nodes, are inverse relationships.

[0024] In this embodiment, the category to which each item belongs in the dynamic heterogeneous graph is defined as scene c. A collection of scenes.

[0025] Optionally, a dynamic heterogeneous graph can be constructed using a graph building layer based on the timestamped interactions between nodes in a social network.

[0026] Step 2: Input the dynamic heterogeneous graph into the trained trust prediction model based on graph neural network to obtain the potential trust between two user nodes in the social network. The potential trust includes the scene trust under different scenarios and the overall trust.

[0027] The trust prediction model based on graph neural networks includes a cascaded embedding layer, a heterogeneous attention layer, and a prediction layer. The embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph, which includes nodes, edges, and time. The heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph based on the initial embedding using a dual attention mechanism. The prediction layer is used to obtain the potential trust level between two user nodes in the social network based on the final embedding of each node in the dynamic heterogeneous graph.

[0028] In this embodiment, a dynamic heterogeneous graph is first constructed using user-item and user-user interactions with timestamps. In the embedding layer, metapaths encompassing rich semantic and contextual information are defined, and node embeddings are initialized using Metapath2vec. Temporal information and edge attributes (such as user ratings of items) are encoded for further information propagation and aggregation. In the heterogeneous attention layer, a dual attention mechanism is designed to distinguish the importance of different node types and the importance of different nodes within the same type. Trust propagation is achieved using the "message propagation" mechanism of GNNs, by giving different attention to types and nodes. A neighbor sampling strategy is also employed to select a limited but crucial set of interactions, thereby enhancing the model's scalability. Finally, in the prediction layer, a Multi-Layer Perceptron (MLP) is introduced to predict the potential trust level between any two users in a given scenario. Furthermore, by fusing trust levels from different scenarios, an overall trust level is derived to address the lack of fine-grained labels during model training.

[0029] Please see Figure 2 , Figure 2 This is a schematic diagram of the prediction process of a trust prediction model based on graph neural networks provided in an embodiment of the present invention. The following is in conjunction with... Figure 2 The prediction process of the trust prediction model based on graph neural networks in this embodiment will be described in detail.

[0030] In this embodiment, the embedding layer aims to initialize embeddings for nodes, time, and edge attributes for further learning. The initial embeddings include node embeddings, time embeddings, and edge attribute embeddings. Therefore, obtaining the initial embeddings of each element in the dynamic heterogeneous graph can include the following steps:

[0031] Step (1): Define a metapath that covers semantic and scene information based on the dynamic heterogeneous graph. Generate node embeddings using Metapath2vec based on the metapath. The node embeddings include user node embeddings and item node embeddings.

[0032] A metapath p of length s can be defined as follows: The path, where For node type, The edge type is specified. Any two nodes and any two edges in this path can have the same type. The meta-path describes node types τ1 and τ2. s+1The heterogeneity of heterogeneous networks is complex and contains rich semantic information. Applying two transformation matrices to users and items to distinguish their heterogeneity is simple and straightforward, but it doesn't incorporate scene information crucial for scene-aware trust prediction. To address this issue and fully utilize the semantic information inherent in heterogeneous networks, we extend the concept of meta-paths. The new meta-path definition is as follows: This metapath describes "two users interacting with two items belonging to the same scenario," implying that the two users have similar preferences. Then, Metapath2vec is applied to generate node embeddings. d v The node embedding dimension is [dimension value].

[0033] In this embodiment, Metapath2vec is chosen for two reasons: 1) Metapaths can connect different types of nodes and represent different relationships; 2) Metapath2vec can learn the embedding of each type of node by capturing the intricate relationships and scene information contained in the metapath.

[0034] Step (2): Based on the dynamic heterogeneous graph, the node interaction time difference is encoded using the time encoding function to obtain the time embedding. The node interaction time difference is the difference between the time when the interaction between the node and the interacting node occurs and the timestamp of the interacting node. The timestamp is the earliest time when the node interacts.

[0035] Metapath2vec has a limitation: it cannot preserve the temporal order of interactions within the metapath. To address this issue and enhance the model's expressive power, a temporal encoding function is introduced. Δt represents the time difference between node interactions, d t Embed the dimension of time.

[0036] Since each node may have multiple interactions, there will be multiple timestamps. In this embodiment, the timestamp of each node is specified as the earliest time that the node interacted. On the one hand, this simplifies the representation of time data, thereby reducing computational overhead; on the other hand, the first interaction marks the node's entry into the network and has historical significance.

[0037] In this embodiment, node interaction time differences are used instead of absolute timestamps to reduce inconsistencies caused by variations in the absolute timestamp range between different datasets and between the training and test sets. The purpose of the time encoding function is to transform continuous relative time differences into d... t Dimensional time embedding h t This ensures that time values ​​that are close on the time axis are also close in the embedding space. The time coding function can be expressed as:

[0038]

[0039] Here, ω and ρ are learnable parameters of the embedding layer. The cosine function is chosen because: 1) its inherent periodicity makes it ideal for capturing periodic time patterns; 2) its continuity and smoothness ensure that small changes in time result in small changes in the function output.

[0040] Step (3): Encode the edge attributes of each edge in the dynamic heterogeneous graph to obtain the edge attribute embedding. The edge attributes include trust score and the usefulness of the trust score.

[0041] Besides timestamps, each edge may also have other attributes, such as trust scores and the usefulness of these scores, which can help improve prediction accuracy. Therefore, these attributes must be encoded into the embedding vector. For example, if the attributes refer to trust scores w and w∈{Trust,Distrust}, they are first modeled using one-hot encoding as follows: and Since different datasets have different levels of trust, it is necessary to apply a learnable matrix to transform them into embeddings of a specified dimension, thus obtaining edge attribute embeddings. d e Embed dimensions for edge attributes.

[0042] In this embodiment, the heterogeneous attention layer aims to combine type importance (i.e., type attention) and node importance (i.e., node attention) to learn the final embedding of nodes through trust propagation and aggregation. In this embodiment, the dual attention mechanism includes a type attention mechanism and a node attention mechanism, assigning different weights to different node types and different nodes within the same type. Therefore, based on the dual attention mechanism, obtaining the final embedding of each node in the dynamic heterogeneous graph from the initial embedding can include the following steps:

[0043] Step (1): Construct the propagation information from the source node to the target node in the dynamic heterogeneous graph based on the initial embedding; where the source node is an item node or a user node when the target node is a user node, and the source node is a user node when the target node is an item node.

[0044] Assume v j As the source node, v i If the target node is the source node, then the propagation information from the source node to the target node can be represented as:

[0045] m i,j =h j +h t +h e (2);

[0046] In the formula, h j For the node embedding of the source node, ht For time embedding, h e Embedded as edge attributes.

[0047] With v j The related message is mining v j The basis for features (such as subjective attributes). It is worth noting that, in this embodiment, a message can also be constructed by concatenating these three embeddings, i.e., m i,j =h j ||h t ||h e The '||' operator represents concatenation. However, this method leads to excessively high message dimensionality, increasing computational complexity. Therefore, it is preferable to construct propagated information using an additive approach to improve efficiency.

[0048] Step (2): Obtain the source nodes of the target node, classify the source nodes of the target node according to the node type, aggregate the propagation information of the source nodes of the same node type, and obtain the node type embedding of the target node's neighbors.

[0049] In this embodiment, the node type embedding of the target node's neighbors is calculated according to the following formula:

[0050]

[0051] In the formula, h τ Embed the node type m of the target node's neighboring nodes of type τ. i,j For information propagated from the source node to the target node, d i Let d be the degree of the target node. j d is the degree of the source node. i and d j The impact of node connectivity on messages is normalized. This represents the set of all nodes of type τ among the neighboring source nodes of the target node.

[0052] Step (3): Based on the type attention mechanism, calculate the type attention score of each node in the dynamic heterogeneous graph according to the node type embedding of the target node's neighbors and the node embedding of the target node, and then normalize it to obtain the corresponding normalized type attention score.

[0053] For a specific node v iIt can interact with different types of nodes, and these interactions will have different effects on it. For example, for a user node, [the interaction with the node will have different effects].<user,user> Interacting neighboring user nodes propagate information about trust relationships. Conversely, information from...<user,item> Interacting neighboring item nodes propagate other information, such as user preferences. Therefore, a type attention mechanism can be used to distinguish the importance of different node types or interactions.

[0054] In this embodiment, the type attention score is calculated according to the following formula:

[0055]

[0056] In the formula, a τ For node type τ, the type attention score is γ. τ Let τ be the attention vector of node type. The first operation is the transpose of a vector, || is the concatenation operation, and h is the vector transpose. i σ(·) is the node embedding of the target node, and σ(·) is a non-linear activation function, such as LeakyReLU.

[0057] To obtain the relative importance of each type, the type attention scores for all types can be normalized using the softmax function, resulting in normalized type attention scores:

[0058]

[0059] In the formula, α τ Let a be the normalized attention score for node type τ. τ For node type τ, the type attention score is a. τ′ The type attention score is for node type τ', where τ' is the same as or different from τ. It is a collection of node types.

[0060] Step (4): Based on the node attention mechanism, calculate the node attention score of each node in the dynamic heterogeneous graph according to the node embedding, propagation information and normalized type attention score of the target node, and perform normalization processing to obtain the corresponding normalized node attention score.

[0061] Since different nodes of the same type can have different effects on the target node, node attention scores are further considered. Specifically, for a specific node v... i The type is τ, and its neighbor source node v j The type is τ', and τ' is the same as or different from τ. The node attention score is calculated using formula (6):

[0062]

[0063] In the formula, b i,j For the neighbor source node v j For target node v i The node attention score, where η is the node's attention vector, and α is the node's attention score. τ′ The attention score is a normalized type for node type τ'.

[0064] Similarly, the node attention score is further normalized using the softmax function to obtain the normalized node attention score, which is calculated according to the following formula:

[0065]

[0066] In the formula, β i,j The normalized node attention score indicates that v j v i The importance of Let b be the set of source nodes that are neighbors of the target node. i,j' For the neighbor source node v j' For target node v i The node attention score.

[0067] It is important to note that the importance of time and edge attributes can also be learned through a dual attention mechanism, as they are encoded in the messages.

[0068] Step (5): Calculate the final embedding of each node in the dynamic heterogeneous graph based on the normalized node attention score and propagation information.

[0069] In this embodiment, for a specific node v i To obtain its final embedding, it is necessary to aggregate all its related messages m. i,j Each message has a weight of β. i,j By employing a fully connected layer, β can be extracted from this aggregated information. i,j The intrinsic characteristics of the node. Specifically, the final embedding of the node is calculated according to the following formula:

[0070]

[0071] In the formula, denoted as the final embedding of the node, W represents the first learning parameter of the heterogeneous attention layer, and b represents the second learning parameter of the heterogeneous attention layer.

[0072] It is worth noting that dynamic heterogeneous graphs are typically very large and contain a wealth of information. While this information is beneficial for learning meaningful embeddings, it can also introduce noise, weakening trust propagation and aggregation. Considering these factors, to enhance the model's scalability, a neighbor sampling strategy is used to obtain a subset of the target node's source neighbors when acquiring them. This means selecting a limited number of important interactions for trust propagation and aggregation. Neighbor sampling strategies include uniform sampling or recent-time sampling. Uniform sampling samples the target node's source neighbors evenly, while recent-time sampling selects the source neighbors with the most recent interaction with the target node. Since recent-time sampling is more efficient, and in the domain of trust prediction, new interactions are generally more important than historical interactions, the recent-time sampling strategy is preferred.

[0073] Through the processing of heterogeneous attention layers, the underlying principle is related to v. i Trust information within relevant messages can be propagated and aggregated under the guidance of a graph structure. Specifically, if a graph neural network-based trust prediction model has L heterogeneous attention layers, then... It will merge from v i The L-hop neighbor trust information. In other words, the scope of trust propagation can be controlled by setting L.

[0074] In this embodiment, the prediction layer aims to predict the potential trust level between any two user nodes in a specific scenario. In this embodiment, obtaining the potential trust level between two user nodes in a social network based on the final embedding of each node in the dynamic heterogeneous graph can include the following steps:

[0075] Step (1): Obtain the scene embedding based on the final embedding of each node in the dynamic heterogeneous graph.

[0076] In this embodiment, the scene embedding is the average of the final embeddings of the item nodes in the same scene. The reason for this is that items in the same scene can describe the characteristics of the scene from multiple aspects, so they should be considered together to form the scene embedding.

[0077] Step (2): Based on the scene embedding and the final embedding of the two user nodes, use a multilayer perceptron to obtain the scene trust between the two user nodes in different scenarios in the social network.

[0078] In this embodiment, the prediction process of scene trust between two user nodes under different scenarios can be represented as follows:

[0079]

[0080] in, and The final embeddings of the two user nodes are h, respectively. k For a given scenario c k Scene embedding. It is user node v i For user node v j In scenario c k The probability prediction vector of the trust level in the given scenario. Therefore, user node v i For user node v j In scenario c k The level of trust in a given scenario can be represented as Where q is a vector The index corresponding to the maximum value in the middle. It is worth noting that due to the asymmetry of trust, Not necessarily equal to

[0081] Step (3): Based on the scene trust between two user nodes in different scenarios, use gating mechanism, mean aggregator or maximum value aggregator to obtain the overall trust between two user nodes in the social network.

[0082] The aforementioned trust prediction model based on graph neural networks can predict the trust level between two users in any scenario, providing a more granular prediction of overall trust level compared to existing technologies.

[0083] However, during the training of trust prediction models based on graph neural networks, there is a lack of trust labels for specific scenarios. To address this issue, a relationship is established between scenario-based trust and overall trust between users. To this end, a gating mechanism can be introduced to automatically determine the importance of each scenario in forming the overall trust. Therefore, the overall trust between two user nodes in a social network is expressed as:

[0084]

[0085] in, ⊙ represents the number of scenes, and ⊙ represents the element-wise multiplication operation. It is a learnable gated vector, g k These are elements in the learnable gated vectors, representing scene c. k The importance of a vector is determined by applying the softmax function, where the sum of the elements in the vector equals 1. It is user node v i For user node v j The probability prediction vector of the overall trust level. Similarly, user node v i For user node v j The overall level of trust can be expressed as

[0086] In addition, mean aggregators or maximum aggregators can be used to establish the relationship between contextual trust and overall trust among users. Then, the overall trust between two user nodes in the social network can be expressed as:

[0087]

[0088] The trust prediction model based on graph neural networks in this embodiment possesses the ability to comprehensively understand complex interactions and node semantic information in heterogeneous graphs, which increases the difficulty for attackers. Furthermore, the model's scene awareness also helps improve its robustness.

[0089] Understandably, due to the lack of trust labels for specific scenarios, the training process of the trust prediction model based on graph neural networks uses the cross-entropy loss function to calculate the loss value between the predicted overall trust between user nodes and the actual overall trust between user nodes. The trust prediction model based on graph neural networks is then trained by backpropagation based on the loss value.

[0090] In this embodiment, the cross-entropy loss function can be expressed as:

[0091]

[0092] In the formula, w i,j Let θ represent the overall trust level between real user nodes, Θ represent all learnable parameters in the graph neural network-based trust prediction model, and λ control regularization to prevent overfitting. The Adam optimizer can be used to update the model parameters.

[0093] The pseudocode for the overall algorithm flow of the trust prediction model based on graph neural networks in this embodiment of the invention is shown below:

[0094]

[0095]

[0096] This invention presents a scene-aware trust assessment method based on graph neural networks. A hierarchical trust prediction model based on graph neural networks is designed to achieve scene-aware trust prediction. This model supports the dynamic nature of trust, capturing the dynamic changes in each interaction. This time sensitivity helps improve the accuracy of trust prediction. The model can characterize the heterogeneity of real-world networks, capture rich semantic information based on a dual attention mechanism, handle complex interaction relationships, and extract key information, further enhancing the accuracy of trust prediction. For new users with limited trust interactions, this model can mine their features from their interactions with items, potentially solving the long-standing "cold start" problem in trust assessment.

[0097] This invention cleverly solves the problem of lacking fine-grained labels by establishing a connection between scene trust and overall trust. By adopting the nearest neighbor sampling strategy, it can avoid using all node interactions, thereby improving the scalability of the model and making it promising for application in large-scale networks.

[0098] It is understandable that the trust prediction model based on graph neural networks in this embodiment can also be applied to 6G heterogeneous networks. Due to the highly dynamic nature of the 6G network topology, mobile devices frequently join or leave a network domain, and interactions between devices occur at different times. Specifically, a 6G heterogeneous network can be modeled as a dynamic heterogeneous graph, where nodes represent mobile devices, access points, base stations, core network servers, etc., and edges represent interactions between these nodes. Furthermore, different network domains or network connection purposes can correspond to different scenarios. Therefore, the trust prediction model based on graph neural networks can be used to predict the trust relationships between node pairs under different network domains or network connection purposes, thereby assisting in the identification of malicious nodes, ensuring network security and stability, and providing a solid foundation for realizing a trusted 6G network.

[0099] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that an article or device comprising a list of elements includes not only those elements but also other elements not expressly listed. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device comprising said element. Terms such as "connected" or "linked" are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect. The orientations or positional relationships indicated by terms such as "upper," "lower," "left," and "right" are based on the orientations or positional relationships shown in the accompanying drawings and are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention.

[0100] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A scene-aware trust assessment method based on graph neural networks, characterized in that, include: Step 1: Within a preset time interval, a dynamic heterogeneous graph is obtained based on the timestamped interactions between nodes in the social network. The nodes include user nodes and item nodes. Step 2: Input the dynamic heterogeneous graph into the trained trust prediction model based on graph neural network to obtain the potential trust degree between two user nodes in the social network. The potential trust degree includes the scene trust degree under different scenarios and the overall trust degree. The trust prediction model based on graph neural networks includes a cascaded embedding layer, a heterogeneous attention layer, and a prediction layer. The embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph. The heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph based on the initial embedding using a dual attention mechanism. The prediction layer is used to obtain the potential trust level between two user nodes in the social network based on the final embedding of each node in the dynamic heterogeneous graph, including: obtaining a scene embedding based on the final embedding of each node in the dynamic heterogeneous graph; the scene embedding is the average of the final embeddings of item nodes in the same scene. Based on the scene embedding and the final embedding of the two user nodes, the scene trust degree between the two user nodes in the social network under different scenarios is obtained using a multilayer perceptron. Based on the scene trust between the two user nodes in different scenarios, the overall trust between the two user nodes in the social network is obtained by using a gating mechanism, a mean aggregator, or a maximum value aggregator.

2. The scene-aware trust assessment method based on graph neural networks according to claim 1, characterized in that, The dynamic heterogeneity graph is represented as follows: In the formula, A set of nodes that changes over time. Let be a time-varying set of edges, where each edge represents a directed trust relationship between nodes. For node type mapping functions, It is a collection of node types, including user nodes and item nodes. For edge type mapping functions, It is a set of edge types, including directed trust relationships between user nodes, rating relationships between user nodes and item nodes, and rating relationships between item nodes and user nodes.

3. The scene-aware trust assessment method based on graph neural networks according to claim 2, characterized in that, In the dynamic heterogeneous graph, the category to which each item belongs is defined as a scene. , , A collection of scenes.

4. The scene-aware trust assessment method based on graph neural networks according to claim 1, characterized in that, The initial embedding includes node embedding, temporal embedding, and edge attribute embedding.

5. The scene-aware trust assessment method based on graph neural networks according to claim 4, characterized in that, The initial embedding of each element in the dynamic heterogeneity graph is obtained based on the dynamic heterogeneity graph, including: Based on the dynamic heterogeneous graph definition, a metapath covering semantic and scene information is defined, and the node embedding is generated using Metapath2vec based on the metapath. The node embedding includes user node embedding and item node embedding. Based on the dynamic heterogeneous graph, the node interaction time difference is encoded using a time encoding function to obtain the time embedding. The node interaction time difference is the difference between the time of interaction between the node and the interacting node and the timestamp of the interacting node. The timestamp is the earliest time when the node interacts. The edge attributes of each edge in the dynamic heterogeneous graph are encoded to obtain the edge attribute embedding, and the edge attributes include trust score and the usefulness of the trust score.

6. The scene-aware trust evaluation method based on graph neural networks according to claim 1, characterized in that, Based on the dual attention mechanism, the final embedding of each node in the dynamic heterogeneous graph is obtained according to the initial embedding, including: Based on the initial embedding, propagation information from the source node to the target node in the dynamic heterogeneous graph is constructed; wherein, when the target node is a user node, the source node is an item node or a user node, and when the target node is an item node, the source node is a user node; Obtain the neighboring source nodes that interact with the target node, classify the neighboring source nodes according to node type, aggregate the propagation information of neighboring source nodes of the same node type, and obtain the node type embedding of the target node's neighbors. Based on the type attention mechanism, the type attention score of each node in the dynamic heterogeneous graph is calculated and normalized according to the node type embedding of the target node's neighbors and the node embedding of the target node, so as to obtain the corresponding normalized type attention score. Based on the node attention mechanism, the node attention score of each node in the dynamic heterogeneous graph is calculated and normalized according to the node embedding of the target node, the propagation information and the normalized type attention score, so as to obtain the corresponding normalized node attention score. The final embedding of each node in the dynamic heterogeneous graph is calculated based on the normalized node attention score and the propagation information.

7. The scene-aware trust assessment method based on graph neural networks according to claim 6, characterized in that, The node type embedding of the target node's neighbors is calculated according to the following formula: ; In the formula, The node type of the target node's neighbors is Node type embedding, For information propagated from the source node to the target node, The degree of the target node. The degree of the source node. This indicates that the target node's neighboring source nodes are of type 1. The set of all nodes; The attention score for that type is calculated according to the following formula: ; In the formula, For node type Type attention score, For node type Attention vector, This is the transpose operation for a vector. For splicing operations, Node embedding for the target node. It is a non-linear activation function; The normalized attention score is calculated according to the following formula: ; In the formula, For node type Normalized type attention score, For node type Type attention score, For node type Type attention score, A collection of node types; The node attention score is calculated according to the following formula: ; In the formula, For neighboring source nodes For the target node The node attention score, Let be the attention vector of the node. For node type Normalized type attention score; The normalized node attention score is calculated according to the following formula: ; In the formula, To normalize the node attention score, Let be the set of source nodes that are neighbors of the target node. For neighboring source nodes For the target node The node attention score; The final embedding of the node is calculated according to the following formula: ; In the formula, For the final embedding of the node, The first learned parameter for the heterogeneous attention layer. This is the second learning parameter for the heterogeneous attention layer.

8. The scene-aware trust assessment method based on graph neural networks according to claim 6, characterized in that, When acquiring neighboring source nodes that interact with the target node, a neighbor sampling strategy is used to acquire some neighboring source nodes that interact with the target node. The neighbor sampling strategy includes a uniform sampling strategy or a recent time sampling strategy.

9. The scene-aware trust assessment method based on graph neural networks according to claim 1, characterized in that, During the training process of the trust prediction model based on the graph neural network, the cross-entropy loss function is used to calculate the loss value between the predicted overall trust level between user nodes and the actual overall trust level between user nodes, and the trust prediction model based on the graph neural network is trained by backpropagation based on the loss value.

Citation Information

Patent Citations

  • Device trust value evaluation method based on social internet of things

    CN113792110A

  • Underwater acoustic sensor network trust model construction method based on graph neural network

    CN117354806A