Scene perception trust evaluation method based on graph neural network

By constructing dynamic heterogeneous graphs and using the embedding layer, heterogeneous attention layer and prediction layer of graph neural network, the problem that the trust prediction model does not support dynamics and scene perception is solved, and high precision and fineness of trust relationships are achieved Granularity prediction improves the accuracy and robustness of trust evaluation.

CN119254640AActive Publication Date: 2025-01-03XIDIAN UNIV

Patent Information

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

AI Technical Summary

Technical Problem

The existing trust prediction model based on graph neural networks does not support the dynamicity of trust and the scene perception, resulting in the rough and inaccurate prediction results, and it is impossible to effectively capture the semantic information of temporal patterns and heterogeneous networks.

Method used

A scene-aware trust evaluation method based on graph neural network was designed. By constructing a dynamic heterogeneous graph, using cascaded embedding layer, heterogeneous attention layer and prediction layer, the complex relationship between time information and heterogeneous network is captured to realize Dynamic and fine-grained predictions of trust relationships.

Benefits of technology

It improves the accuracy of trust prediction and the adaptability of the model, can handle real-world heterogeneous networks, improves the accuracy and robustness of trust prediction, and supports scenario-aware trust evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254640A_ABST
    Figure CN119254640A_ABST
Patent Text Reader

Abstract

The invention discloses a scene perception trust evaluation method based on a graph neural network, and relates to the technical field of social network security, the method comprises the following steps: obtaining a dynamic heterogeneous graph within a preset time interval according to interaction including timestamps among nodes in a social network, the nodes including user nodes and article nodes; and inputting the dynamic heterogeneous graph into a trained trust prediction model based on a graph neural network to obtain a potential trust degree between two user nodes in the social network, the potential trust degree comprising scene trust degrees in different scenes and an overall trust degree. The trust prediction model supports the dynamic nature of trust and can capture the dynamic variability of each interaction; the isomerism of a real world network can be represented, a complex interaction relationship is processed based on a double attention mechanism, and rich semantic information is captured; and the trust scene perceptibility is supported, and a fine-grained trust prediction result is provided. The characteristics significantly improve the precision and practicability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of social network security, and specifically relates to a scene-aware trust evaluation method based on graph neural network. Background Art

[0002] Trust is a complex and multifaceted concept that refers to the subjective perception of one entity toward another entity in a specific scenario. Trust has some inherent characteristics, such as subjectivity, dynamics, context-awareness, asymmetry, and conditional transferability. Trust assessment or trust prediction is one of the key technologies in network security, which quantifies trust by considering the factors that affect trust. It has been applied in multiple fields to achieve various functions, such as anomaly detection, service management, and access control. For example, social networks face the problem of fraudsters and false ratings, and trust assessment helps to identify trustworthy entities and filter out malicious entities or false information by analyzing the interactions between entities, thereby reducing potential risks.

[0003] In recent years, Graph Neural Network (GNN), as a new machine learning paradigm designed for graph data, has achieved excellent performance in various tasks. The advantage of GNN is that it can make full use of the inherent structural information in the graph through information propagation and aggregation to learn meaningful node representations (or embeddings). This ability drives researchers to apply it to trust assessment, also known as trust prediction, because GNN usually uses historical interaction data to predict future trust relationships. Compared with previous trust assessment methods based on statistics, reasoning, and traditional machine learning, using GNN for trust prediction has many advantages. First, the trust relationship between nodes can be naturally modeled as a graph, and GNN is good at processing graph data. Second, the message passing mechanism of GNN is fully compatible with basic trust properties such as conditional transferability and composability. Third, traditional machine learning models require cumbersome feature engineering, while GNN is different. It provides an end-to-end evaluation model, which greatly simplifies the trust assessment process. Therefore, applying GNN to trust assessment has good prospects.

[0004] Most current GNN-based trust prediction models do not support the dynamics of trust, which leads to problems in the reasoning process and reduces the accuracy of predictions. Trust is dynamic in nature, it changes as new interactions occur, and usually decays over time. Static models cannot capture the temporal patterns in dynamic trust relationships, and because they ignore temporal information, they may mistakenly use future interactions to predict previous trust relationships. In addition, this oversight also limits the adaptability of the model. Almost all models ignore the heterogeneity of real-world networks. These models only focus on homogeneous networks containing interactions between users, which simplifies the network structure but misses valuable semantic information. For example, in social networks, users not only interact with other users, but also with various products. Users' evaluation information on products reflects their preferences, which are usually closely related to the establishment of trust. None of these models support scenario-aware trust prediction, resulting in rough and inaccurate prediction results. Scenario awareness is one of the key features of trust, indicating that trust relationships will be different in different scenarios. Therefore, if scenario awareness is not supported, the applicability of trust prediction models will be greatly limited. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention provides a scene perception trust evaluation method based on graph neural network. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0006] The present invention provides a scene-aware trust evaluation method based on a graph neural network, comprising:

[0007] Step 1: obtaining a dynamic heterogeneous graph according to the interactions including timestamps between nodes in the social network within a preset time interval, wherein the nodes include user nodes and item nodes;

[0008] Step 2: Input the dynamic heterogeneous graph into a trained trust prediction model based on a graph neural network to obtain the potential trust between two user nodes in the social network, where the potential trust includes scenario trust and overall trust in different scenarios;

[0009] Among them, the trust prediction model based on graph neural network includes a cascaded embedding layer, a heterogeneous attention layer and a prediction layer; wherein the embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph according to the dynamic heterogeneous graph; the heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph according to the initial embedding based on the dual attention mechanism; the prediction layer is used to obtain the potential trust between two user nodes in the social network according to 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] The scene-aware trust assessment method based on graph neural network of the present invention designs a hierarchical trust prediction model based on graph neural network, and uses the model to realize scene-aware trust prediction. The model supports the dynamics of trust and can capture the dynamic variability of each interaction. This time sensitivity helps to improve the accuracy of trust prediction. The model can characterize the heterogeneity of real-world networks, capture rich semantic information based on the dual attention mechanism, and can handle complex interaction relationships and extract key information from them, which helps to improve the accuracy of trust prediction.

[0012] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a flow chart of a scene-aware trust assessment method based on a graph neural network provided by an embodiment of the present invention;

[0014] Figure 2 It is a schematic diagram of the prediction process of a trust prediction model based on a graph neural network provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following is a detailed description of a scene-aware trust assessment method based on graph neural network proposed in accordance with the present invention in combination with the accompanying drawings and specific implementation methods.

[0016] The above and other technical contents, features and effects of the present invention are clearly presented in the following detailed description of the specific implementation modes in conjunction with the accompanying drawings. Through the description of the specific implementation modes, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the attached drawings are only for reference and explanation purposes and are not used to limit the technical solutions of the present invention.

[0017] In the first aspect, an embodiment of the present invention provides a scene-aware trust assessment method based on a graph neural network. The scene-aware trust assessment method based on a graph neural network of the present invention can predict the trust relationship between any two users in a specific scene by modeling the social network into a dynamic heterogeneous graph, and further processing and analyzing it using a trust prediction model based on a graph neural network, thereby helping users to discern the credibility of content posted by other users. For example, if the trust prediction model based on a graph neural network of the present invention predicts that user A trusts user B in scene k, then user A can trust some of user B's remarks about scene k, thereby protecting himself from being deceived.

[0018] See also Figure 1 , Figure 1 is a flow chart of a scene-aware trust assessment method based on a graph neural network provided by an embodiment of the present invention. Figure 1 As shown, the scene-aware trust assessment method based on graph neural network of this embodiment includes:

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

[0020] The network can be represented as a six-tuple Each of these nodes And the node type mapping function Φ: Associated, each edge e∈ε is associated with an edge type mapping function Ψ: If Then the network is heterogeneous; if Then the network is isomorphic.

[0021] In this embodiment, the social network belongs to a heterogeneous network, and the nodes of the social network include user nodes and item nodes. Then, the dynamic heterogeneous graph within the preset time interval [0, T] can be expressed as: In the formula, is the set of nodes that changes over time, ε(T) is the set of edges that change over time, and the edges represent the directed trust relationships between nodes. where e i,j (t) is the node v i and node v j The edge established at time t, i.e., the interaction, r is the edge type of the established edge; Φ is the node type mapping function, is a set of node types, including user nodes and item nodes, Ψ is an 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 rated relationships between item nodes and user nodes.

[0022] For example, the edges between users represent the “like” (trust) or “dislike” (distrust) relationship, and the edges between users and items represent the “rating” behavior. These relationships are attached with time information and may contain 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 and the directed trust relationship between item nodes and user nodes are inverse relationships.

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

[0025] Optionally, a dynamic heterogeneous graph can be constructed using a graph construction layer based on the interactions including timestamps between nodes in the 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 scenario trust in different scenarios and the overall trust.

[0027] Among them, the trust prediction model based on graph neural network includes a cascaded embedding layer, a heterogeneous attention layer and a prediction layer; wherein the embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph according to the dynamic heterogeneous graph, and the elements in the dynamic heterogeneous graph include nodes, edges and time; the heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph according to the initial embedding based on the dual attention mechanism; the prediction layer is used to obtain the potential trust between two user nodes in the social network according to 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 containing timestamps. In the embedding layer, a metapath covering rich semantic and scene information is first defined, and node embedding is initialized by Metapath2vec, while encoding time information and edge attributes (such as user ratings of items) 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 in the same type. The "message propagation" mechanism of GNN is used, and trust propagation is achieved by giving different attention to types and nodes. A neighbor sampling strategy is also used to select limited but critical interactions to enhance the scalability of the model. Finally, in the prediction layer, a multi-layer perceptron (MLP) is introduced to predict the potential trust between any two users in a certain scenario. In addition, the overall trust is obtained by fusing the trust in different scenarios to solve the problem of lack of fine-grained labels in the model during training.

[0029] See also Figure 2 , Figure 2 This is a schematic diagram of a prediction process of a trust prediction model based on a graph neural network provided by an embodiment of the present invention. Figure 2 The prediction process of the trust prediction model based on graph neural network in this embodiment is described in detail.

[0030] In this embodiment, the embedding layer is intended to initialize embedding for nodes, time and edge attributes for further learning. The initial embedding includes node embedding, time embedding and edge attribute embedding. Then, obtaining the initial embedding of each element in the dynamic heterogeneous graph according to the dynamic heterogeneous graph may include the following steps:

[0031] Step (1): Based on the dynamic heterogeneous graph, a meta-path covering semantic and scene information is defined. Metapath2vec is used to generate node embeddings based on the meta-path. The node embeddings include user node embeddings and item node embeddings.

[0032] A metapath p of length s can be defined as The path of is the node type, is the edge type. Any two node types and any two edge types in this path can be the same. The meta-path describes the node types τ1 and τ s+1The complex relationship between users and items contains rich semantic information. Applying two transformation matrices for users and items to distinguish their heterogeneity is simple and clear, but it does not incorporate the scene information that is crucial for scene-aware trust prediction. To solve this problem and make full use of the semantic information contained in heterogeneous networks, we extend the concept of meta-path. The new meta-path is defined as follows: This metapath describes that “two users interacted with two items belonging to the same scene”, which means that the two users have similar preferences. Then, Metapath2vec is applied to generate node embeddings d v The node embedding dimension is .

[0033] In this embodiment, Metapath2vec is selected for two reasons: 1) the meta-path 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 meta-path.

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

[0035] Since Metapath2vec has a limitation that it cannot preserve the temporal order of interactions within a metapath, in order to solve this problem and enhance the expressiveness of the model, a temporal encoding function is introduced Δt represents the node interaction time difference, d t Embed the dimension as 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 when the node interacts. On the one hand, the representation of time data is simplified, thereby reducing the computational overhead; on the other hand, the first interaction marks the entry of the node into the network, which has historical significance.

[0037] In this embodiment, the node interaction time difference is used instead of the absolute timestamp to reduce the inconsistency caused by the change of the absolute timestamp range between different data sets and between the training set and the test set. The purpose of the time encoding function is to convert the continuous relative time difference into d t The time embedding h t , to ensure that time values ​​close on the time axis are also close in the embedding space. The temporal encoding function can be expressed as:

[0038]

[0039] Here, ω and ρ are learnable parameters of the embedding layer. The cosine function is chosen for 1) its inherent periodicity, making it ideal for capturing periodic temporal patterns; and 2) its continuity and smoothness, ensuring 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 edge attribute embedding, where the edge attributes include trust score and usefulness of trust score.

[0041] In addition to timestamps, each edge may have other attributes, such as trust scores and the usefulness of these scores, which can help improve the accuracy of predictions. 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 and Since different datasets have different trust levels, it is necessary to apply a learnable matrix to transform them into embeddings of specified dimensions to obtain edge attribute embeddings d e Embedding 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 the propagation and aggregation of trust. In this embodiment, the dual attention mechanism includes a type attention mechanism and a node attention mechanism, and different weights are assigned to different node types and different nodes of the same type through the dual attention mechanism. Then, based on the dual attention mechanism, the final embedding of each node in the dynamic heterogeneous graph is obtained according to the initial embedding, which may 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; 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.

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

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

[0046] In the formula, h j is the node embedding of the source node, ht is the time embedding, h e is the edge attribute embedding.

[0047] With v j The associated message is mining v j It is worth noting that in this embodiment, a message can also be constructed by splicing these three embeddings, that is, m i,j =h j ||h t ||h e ,|| is a concatenation operation. However, this method will result in too high a dimension of the message, thereby increasing the computational complexity. Therefore, preferably, the propagation information is constructed in an additive manner to improve efficiency.

[0048] Step (2): Obtain the neighbor source nodes of the target node, classify the neighbor source nodes according to node type, aggregate the propagation information of the neighbor 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 τ is the node type embedding of the target node’s neighbors with node type τ, m i,j is the propagation information from the source node to the target node, d i is the degree of the target node, d j is the degree of the source node, d i and d j Normalize the impact of the message according to the connectivity of the node. Represents the set of all nodes of node type τ among the neighbor source nodes of the target node.

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

[0053] For a specific node v i, it can interact with different types of nodes, and these interactions will have different effects on it. For example, for a user node,<user,user> Neighboring user nodes that interact with each other will spread information about trust relationships.<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 τ is the type attention score of the node type τ, γ τ is the attention vector of node type τ, is the transpose operation of the vector, || is the concatenation operation, h i is the node embedding of the target node, and σ(·) is a nonlinear activation function, such as LeakyReLU.

[0057] In order to obtain the relative importance of each type, the type attention scores of all types can be normalized using the softmax function to obtain the normalized type attention scores:

[0058]

[0059] In the formula, α τ is the normalized type attention score of node type τ, a τ is the type attention score of the node type τ, a τ′ is the type attention score of the node type τ', τ' is the same as or different from τ, A collection of node types.

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

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

[0062]

[0063] Where b i,j is the neighbor source node v j For the target node v i The node attention score, η is the node attention vector, α τ′ is the normalized type attention score of the node type τ'.

[0064] Similarly, the softmax function is further applied to normalize the node attention scores to obtain the normalized node attention scores, which are calculated according to the following formula:

[0065]

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

[0067] It is important to note that the importance of temporal and edge attributes can also be learned via the double attention mechanism since they are encoded in the message.

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

[0069] In this embodiment, for a specific node v i In order to obtain its final embedding, it is necessary to aggregate all its related messages m i,j , the weight of each message is β i,j By adopting a fully connected layer, β can be extracted from this aggregate information. i,j Specifically, the final embedding of the node is calculated as follows:

[0070]

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

[0072] It is worth noting that the scale of dynamic heterogeneous graphs is usually very large and contains rich information. Although this information is conducive to learning meaningful embeddings, it will also introduce noise and weaken trust propagation and aggregation. Taking these factors into consideration, in order to enhance the scalability of the model, when obtaining the neighbor source nodes of the target node, a neighbor sampling strategy is used to obtain some of the neighbor source nodes of the target node, that is, limited but important interactions are selected for trust propagation and aggregation. The neighbor sampling strategy includes a uniform sampling strategy or a recent sampling strategy. The uniform sampling strategy uniformly samples the neighbor source nodes of the target node, and the recent sampling strategy selects the neighbor source nodes that have the latest interaction with the target node. Since recent sampling is more efficient and in the field of trust prediction, new interactions are usually more important than historical interactions, it is preferred to adopt the recent sampling strategy.

[0073] Through the processing of heterogeneous attention layers, it is implied in v i The trust information in the relevant messages can be propagated and aggregated under the guidance of the graph structure. Specifically, if the trust prediction model based on the graph neural network has L layers of heterogeneous attention layers, then It will merge from v i 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 between any two user nodes in a specific scenario. In this embodiment, the potential trust between two user nodes in a social network is obtained according to the final embedding of each node in the dynamic heterogeneous graph, which may 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 value of the final embeddings of the object nodes in the same scene. The reason for this is that the objects in the same scene can jointly describe the characteristics of the scene from multiple aspects, so they should be considered comprehensively to form the scene embedding.

[0077] Step (2): Based on the scene embedding and the final embedding of the two user nodes, a multi-layer perceptron is used to obtain the scene trust between the two user nodes in the social network in different scenes.

[0078] In this embodiment, the prediction process of the scene trust between two user nodes in different scenes can be expressed as:

[0079]

[0080] in, and are the final embeddings of the two user nodes, h k For a given scene c k scene embedding. is the user node v i For user node v j In scene c k Therefore, user node v i For user node v j In scene c k The scenario trust under Among them, q is a vector The index corresponding to the maximum value in . It is worth noting that due to the asymmetry of trust, Not necessarily equal to

[0081] Step (3): According to the scenario trust between two user nodes in different scenarios, the overall trust between two user nodes in the social network is obtained using a gating mechanism, a mean aggregator or a maximum aggregator.

[0082] The above-mentioned trust prediction model based on graph neural network can predict the trust between two users in any scenario, which is more fine-grained than the overall trust predicted in the prior art.

[0083] However, in the training process of the trust prediction model based on graph neural network, there is a problem of lack of trust labels in specific scenarios. In order to solve this problem, a connection is established between the scenario trust and the 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. Then, the overall trust between two user nodes in the social network is expressed as:

[0084]

[0085] in, is the number of scenes and ⊙ is the element-wise multiplication operation. is a learnable gating vector, g k is an element in the learnable gating vector, representing the scene c k By applying the softmax function, the sum of the elements in the vector is 1. is the user node v i For user node v j The probability prediction vector of the overall trust of the user node v i For user node v j The overall trust degree can be expressed as

[0086] In addition, the mean aggregator or the maximum aggregator can also be used to establish the connection between the scenario trust and the overall trust between 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 network in this embodiment has the ability to fully understand the complex interactions and node semantic information in heterogeneous graphs, which increases the difficulty of attacks by attackers. In addition, the scene perception of the model also helps to improve the robustness of the model.

[0089] It is understandable that due to the lack of trust labels in specific scenarios, in the training process of the trust prediction model based on graph neural network, the cross entropy loss function is used to calculate the loss value between the predicted overall trust between user nodes and the actual overall trust between user nodes, and the trust prediction model based on graph neural network is trained based on the back propagation of the loss value.

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

[0091]

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

[0093] The pseudo code of the overall algorithm flow of the trust prediction model based on graph neural network in the embodiment of the present invention is as follows:

[0094]

[0095]

[0096] The scene-aware trust assessment method based on graph neural network in the embodiment of the present invention designs a hierarchical trust prediction model based on graph neural network, and uses the model to realize scene-aware trust prediction. The model supports the dynamics of trust and can capture the dynamic variability of each interaction. This time sensitivity helps to improve the accuracy of trust prediction. The model can characterize the heterogeneity of real-world networks, capture rich semantic information based on the dual attention mechanism, handle complex interaction relationships, and extract key information from them, which helps to improve the accuracy of trust prediction. For new users with less trust interactions, the model can mine their features from their interaction relationship with items, which is expected to solve the long-standing "cold start" problem in trust assessment.

[0097] In the present invention, the problem of lack of fine-grained labels is cleverly solved by establishing a connection between scene trust and overall trust. By adopting the nearest time neighbor sampling strategy, all interactions of nodes can be avoided, thereby improving the scalability of the model and it is expected to be applied in large-scale networks.

[0098] It is understandable that the trust prediction model based on graph neural network of this embodiment can also be applied to 6G heterogeneous networks. Since the topological structure of 6G network is highly dynamic, mobile devices will frequently join or leave a network domain, and the interaction between devices will also occur at different times. Specifically, 6G heterogeneous network can be modeled as a dynamic heterogeneous graph, in which nodes represent mobile devices, access points, base stations, core network servers, etc., and edges represent the interaction between these nodes. In addition, different network domains or networking purposes can correspond to different scenarios. Then, the trust prediction model based on graph neural network can be used to predict the trust relationship between node pairs in different network domains or networking purposes, thereby assisting in identifying malicious nodes, ensuring the security and stability of the network, and providing a solid foundation for the realization of a trusted 6G network.

[0099] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant is intended to cover non-exclusive inclusion, so that the article or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the article or device including the elements. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The orientation or position relationship indicated by "up", "down", "left", "right", etc. is based on the orientation or position relationship shown in the accompanying drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention.

[0100] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A scene-aware trust assessment method based on graph neural network, characterized in that: include: Step 1: obtaining a dynamic heterogeneous graph according to the interactions including timestamps between nodes in the social network within a preset time interval, wherein the nodes include user nodes and item nodes; Step 2: Input the dynamic heterogeneous graph into a trained trust prediction model based on a graph neural network to obtain the potential trust between two user nodes in the social network, where the potential trust includes scenario trust and overall trust in different scenarios; Among them, the trust prediction model based on graph neural network includes a cascaded embedding layer, a heterogeneous attention layer and a prediction layer; wherein the embedding layer is used to obtain the initial embedding of each element in the dynamic heterogeneous graph according to the dynamic heterogeneous graph; the heterogeneous attention layer is used to obtain the final embedding of each node in the dynamic heterogeneous graph according to the initial embedding based on the dual attention mechanism; the prediction layer is used to obtain the potential trust between two user nodes in the social network according to the final embedding of each node in the dynamic heterogeneous graph.

2. The scene-aware trust assessment method based on graph neural network according to claim 1 is characterized in that: The dynamic heterogeneous graph is represented as: In the formula, is the set of nodes that changes over time, ε(T) is the set of edges that change over time, edges represent directed trust relationships between nodes, Φ is the node type mapping function, is a set of node types, including user nodes and item nodes, Ψ is an 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 rated relationships between item nodes and user nodes.

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

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

5. The scene-aware trust assessment method based on graph neural network according to claim 4 is characterized in that: Obtaining an initial embedding of each element in the dynamic heterogeneous graph according to the dynamic heterogeneous graph includes: Defining a metapath covering semantics and scene information according to the dynamic heterogeneous graph, and generating the node embedding using Metapath2vec according to the metapath, wherein the node embedding includes user node embedding and item node embedding; According to the dynamic heterogeneous graph, the node interaction time difference is encoded by using a time encoding function to obtain the time embedding, wherein the node interaction time difference is the difference between the time when the interaction between the node and the interaction node occurs and the timestamp of the interaction node, and the timestamp is the earliest time when the node interacts; The edge attribute of each edge in the dynamic heterogeneous graph is encoded to obtain the edge attribute embedding, where the edge attribute includes a trust score and the usefulness of the trust score.

6. The scene-aware trust assessment method based on graph neural network according to claim 1 is 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: Constructing propagation information from a source node to a target node in the dynamic heterogeneous graph according to the initial embedding; 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 neighbor source nodes that interact with the target node, classify the neighbor source nodes according to node types, aggregate propagation information of neighbor source nodes of the same node type, and obtain node type embedding of the target node neighbors; Based on the type attention mechanism, according to the node type embedding of the target node's neighbors and the node embedding of the target node, the type attention score of each node in the dynamic heterogeneous graph is calculated and normalized to obtain the corresponding normalized type attention score; Based on the node attention mechanism, according to the node embedding of the target node, the propagation information and the normalized type attention score, the node attention score of each node in the dynamic heterogeneous graph is calculated and normalized to obtain the corresponding normalized node attention score; The final embedding of each node in the dynamic heterogeneous graph is calculated according to the normalized node attention score and the propagation information.

7. The scene-aware trust assessment method based on graph neural network according to claim 6 is characterized in that: The node type embedding of the target node's neighbors is calculated according to the following formula: In the formula, h τ is the node type embedding of the target node’s neighbors with node type τ, m i,j is the propagation information from the source node to the target node, d i is the degree of the target node, d j is the degree of the source node, Represents the set of all nodes of node type τ among the neighbor source nodes of the target node; The type of attention score is calculated according to the following formula: In the formula, a τ is the type attention score of the node type τ, γ τ is the attention vector of node type τ, T is the transpose operation of the vector, || is the concatenation operation, and h i is the node embedding of the target node, σ(·) is the nonlinear activation function; The normalized type attention score is calculated according to the following formula: In the formula, α τ is the normalized type attention score of node type τ, a τ is the type attention score of the node type τ, a τ′ is the type attention score of the node type τ', is a node type collection; The node attention score is calculated according to the following formula: b i,j =σ(η T ·a τ′ [h i ||m i,j ]); Where b i,j is the neighbor source node v j For the target node v i The node attention score, η is the node attention vector, α τ′ is the normalized type attention score of the node type τ'; The normalized node attention score is calculated according to the following formula: In the formula, β i,j is the normalized node attention score, is the set of neighbor source nodes of the target node, b i,j' is the neighbor source node v j' For the target node v i Node attention score of The final embedding of the node is calculated according to the following formula: In the formula, is the final embedding of the node, W is the first learning parameter of the heterogeneous attention layer, and b is the second learning parameter of the heterogeneous attention layer.

8. The scene-aware trust assessment method based on graph neural network according to claim 6 is characterized in that: When acquiring neighbor source nodes interacting with the target node, a neighbor sampling strategy is used to acquire part of the neighbor source nodes interacting with the target node, wherein 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 network according to claim 7 is characterized in that: Obtaining the potential trust between two user nodes in the social network according to the final embedding of each node in the dynamic heterogeneous graph includes: Obtaining a scene embedding according to the final embedding of each node in the dynamic heterogeneous graph; the scene embedding is the average value of the final embeddings of the object nodes in the same scene; According to the scenario embedding and the final embedding of the two user nodes, a scenario trust between the two user nodes in the social network in different scenarios is obtained using a multi-layer perceptron; According to the scenario 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 aggregator.

10. The scene-aware trust assessment method based on graph neural network 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 between user nodes and the actual overall trust between user nodes, and the trust prediction model based on the graph neural network is trained by back propagation based on the loss value.

Citation Information

Patent Citations

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

    CN113792110A

  • Trust evaluation method based on graph neural network

    CN116628911A

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

    CN117354806A

Cited By

  • Attack technique and tactics identification method based on topology awareness graph attention network

    CN120185857A

  • An attack skill and tactic identification method based on a topology-aware graph attention network

    CN120185857B

  • Social network data mining method and system based on graph neural network

    CN120430880A