A peer-to-peer network reputation evaluation method based on graph learning

By applying the reputation evaluation method designed by graph learning based attention mechanism in point-to-point networks, the credit evaluation error and communication overhead problems of EigenTrust algorithm in complex networks and insufficient interactions are solved, achieving higher accuracy and widespread application a reputation management model.

CN118573454BActive Publication Date: 2025-02-07NANJING UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410796019.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2025-02-07
Estimated Expiration
2044-06-19

AI Technical Summary

Technical Problem

The traditional EigenTrust algorithm has limitations in the accuracy and timeliness of reputation assessment in point-to-point networks, especially when the network topology is complex and node interaction is insufficient, resulting in large errors and high communication overhead.

Method used

A peer-to-peer network reputation evaluation method is adopted based on graph learning, and graph neural network is designed through attention mechanism, and supervised training is carried out to improve the accuracy and applicability of reputation evaluation.

Benefits of technology

In the case of increased number of nodes and graph diameter, it has a superior performance range compared to the EigenTrust algorithm, can approach or even exceed its performance level when fully interacted, and provides a wider applicability in specific scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118573454B_ABST
    Figure CN118573454B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of reputation management, and discloses a peer-to-peer network reputation evaluation method based on graph learning, including the following steps: given a communication network topology; generating node preferences, rejection probabilities, and the number of interactions; generating node features, calculating standard reputation values, and dividing training sets, test sets, and validation sets; and supervised training of graph neural networks based on an attention mechanism. The present invention adopts the above-mentioned peer-to-peer network reputation evaluation method based on graph learning, and designs a peer-to-peer network reputation evaluation method based on an attention mechanism according to the characteristics of graph learning and reputation propagation, which is conducive to the deployment of a high-precision reputation management model in real scenarios; with the increase in the number of nodes in the peer-to-peer network and the increase in the diameter of the graph, the present invention has a more superior performance range in the number of interactions, is not dependent on specific scenarios, and has a wider range of applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reputation management, and in particular to a peer-to-peer network reputation evaluation method based on graph learning. Background Art

[0002] Compared with the traditional client-server data distribution method, peer-to-peer file sharing networks enable direct communication and resource sharing between nodes without relying on centralized servers or control nodes, greatly improving the efficiency of information transmission and the robustness of the system. However, due to the openness and anonymity of the network, any individual can join freely, which provides opportunities for malicious users to spread incorrect or illegal information, undermining the reliability and security of the peer-to-peer network. To solve this problem, distributed reputation management calculates the reputation value of nodes, so that the network can effectively identify and isolate malicious nodes, becoming an effective way to reduce the harm of malicious nodes. The traditional classic algorithm EigenTrust models the subjective local reputation value between distributed nodes by counting the number of successful and failed interactions between nodes, and makes full use of the transferability of reputation to obtain the objective global reputation value of nodes.

[0003] On the other hand, as the diversity of trust relationships and the complexity of network topology gradually increase, the heuristic algorithm EigenTrust has certain limitations in terms of accuracy and timeliness of network reputation evaluation. The main reasons are as follows. First, due to the objective factors of the network environment and the subjective factors of the trust relationship, some nodes may not interact fully with other nodes, which leads to errors in their own subjective local reputation values. Second, the distributed EigenTrust algorithm requires a large amount of point-to-point transmission to iterate the local reputation value, which means that there will be a communication overhead problem that cannot be ignored.

[0004] In addition, the current research on the EigenTrust improved algorithm is relatively limited. Most of the theories and methods of the improved algorithm are proposed in a special application context, which makes it challenging to apply it in other environments. The improved reputation evaluation algorithm for EigenTrust mainly includes an improved method for pre-trust value and an improved method based on a specific environment. Among them, the improved method for the pre-trust value mainly includes an initial setting of a pre-trust value that is closer to the global reputation value and a correction of the weight of the pre-trust value during the iteration process. However, the above-mentioned technologies need to be implemented based on certain background knowledge, and their role is only to improve the convergence speed of the algorithm, and the accuracy of the algorithm cannot be improved. In addition, the improved method based on a specific environment is mainly to design an improved method based on the behavior model of the node in the network after establishing the model. However, there are limitations in the establishment of the behavior model in this method, so it cannot be applied to a wider range of reputation management scenarios. In order to solve these problems, the present invention proposes a peer-to-peer network reputation evaluation method based on graph learning. Summary of the invention

[0005] The purpose of the present invention is to provide a peer-to-peer network reputation evaluation method based on graph learning. A peer-to-peer network reputation evaluation method based on an attention mechanism is designed according to the characteristics of graph learning and reputation propagation, which is conducive to the deployment of a high-precision reputation management model in real scenarios. With the increase in the number of nodes in the peer-to-peer network and the increase in the diameter of the graph, the present invention has a superior performance range in terms of the number of interactions compared to the EigenTrust algorithm, and its performance is close to or even exceeds its performance level when there is full interaction. The present invention does not rely on specific scenarios and has a wider applicability.

[0006] To achieve the above object, the present invention provides a peer-to-peer network reputation evaluation method based on graph learning, comprising the following steps:

[0007] S1, given communication network topology;

[0008] S2, generating node preferences, rejection probabilities, and number of interactions;

[0009] S3, generate node features, calculate standard reputation values, and divide the training set, test set, and validation set;

[0010] S4. Supervised training of graph neural networks based on attention mechanism.

[0011] Preferably, in step S1, a communication network topology structure is given, including node indexes and edge indexes, which are represented by a graph as follows: in represents the set of nodes, and E represents the set of edges;

[0012] The connection relationship of the graph is represented by the adjacency matrix, which consists of 0 and 1. The position of 1 in the matrix indicates that there is an edge between the corresponding two nodes, and they are neighbor nodes. The neighbor node set of node i is represented by express.

[0013] Preferably, in step S2, all 1s in the adjacency matrix are replaced with random numbers between 0 and 1, and then row normalization is performed to generate a node preference probability matrix P, where P satisfies P∈[0,1] n×n , [P] ij represents the probability of node i preferring node j;

[0014] A rejection probability is randomly generated for all nodes and is calculated according to The index concatenation in becomes the rejection probability vector r, where r satisfies r∈(0,1) n×1 .

[0015] Preferably, node features are generated, standard reputation values ​​are calculated, and training sets, test sets, and validation sets are divided. The specific process is as follows:

[0016] S31. Calculate the local reputation matrix C using the following formula:

[0017]

[0018] Among them, max((1-2[r] j )[P] ij ,0) is the maximum value function, which is used to eliminate negative values ​​in the local reputation value; after calculating the local reputation values ​​of all nodes, they need to be normalized;

[0019] S32, standard reputation value t ∞ It is generated based on the error-free EigenTrust algorithm and satisfies the following formula:

[0020] t ∞ =(C T ) ∞ ·t0 (2)

[0021] Among them, C T is the transposed matrix of the local reputation matrix C; after the reputation value converges, the standard reputation value also satisfies the following formula:

[0022] t ∞ =C T ·t ∞ (3)

[0023] Thus, t ∞ is the matrix C TThe normalized eigenvector corresponding to the eigenvalue of 1 is used to solve the equation system using Cramer's rule to obtain the standard credibility value t ∞ , as shown below:

[0024]

[0025] Among them, D m is the mth solution in a basis of the system of equations, obtained by the following formula:

[0026] D m =(-1) n+m ·|{d ij} (n-1)×(n-1) | (5)

[0027] Among them, |{d ij} (n-1)×(n-1) | represents the determinant operator d ij The determinant corresponding to the n-1-order square matrix is ​​transformed from the coefficient matrix of the equation system; the coefficient matrix of the equation system is denoted as A, then the determinant operator and the coefficient matrix are obtained by the following formula:

[0028]

[0029] S33, according to the preference probability matrix P and the rejection probability vector r, based on a certain number of interactions, generate an interaction success number matrix and an interaction failure number matrix, and concatenate them as node features;

[0030] S34. Select different P and r to obtain different node features, and take them as a sample. For each sample, use formula (4) to calculate the standard reputation value as the label of the sample; after generating a large number of samples, divide them into training set, test set and validation set.

[0031] Preferably, supervised training of the graph neural network is performed based on the attention mechanism as follows:

[0032] S41. Input training set and test set, set the number of multiple heads N k ;

[0033] S42, preprocessing input node features, subtracting the failure number matrix from the success number matrix, and performing row normalization after clearing the negative items in the matrix; wherein, initializing the counter k=1;

[0034] S43. Use the following formula to perform linear transformation on the features of all nodes:

[0035] x i =Wh i (8)

[0036] Among them, h irepresents the features of node i, W is a learnable weight matrix;

[0037] S44. Calculate the normalized attention coefficient between nodes through the shared attention mechanism as follows:

[0038]

[0039] Among them, LeakyReLU is a nonlinear activation function. is a learnable weight vector, [Wh i ||Wh j ] represents the concatenation of the linearly transformed features of node i and its neighbor node j;

[0040] S45: Determine whether the counter meets the number of times the longs are generated. If so, proceed to S46; if not, continue to repeat steps S43-S45 until the counter reaches the target number N. k = k;

[0041] S46. Calculate the node features after splicing, as shown below:

[0042]

[0043] Among them, σ(·) is a nonlinear activation function;

[0044] After calculating the node features, all node features are flattened and reduced in dimension through a linear layer composed of a learnable matrix to obtain the final output; the error between the output and the label is calculated using the loss function; the learnable parameters in the network are updated through gradient descent; the features and labels in the test set are used to input the features into the network, and the error between the output and the label is calculated using the loss function;

[0045] S47. Determine whether the error calculated in step S46 is reduced compared with the previous round. If it is reduced, repeat steps S42-S47; if it is no longer reduced, the training is completed and the model has converged.

[0046] Therefore, the present invention adopts the above-mentioned peer-to-peer network reputation evaluation method based on graph learning, and designs a peer-to-peer network reputation evaluation method based on attention mechanism according to the characteristics of graph learning and reputation propagation, which is conducive to the deployment of high-precision reputation management models in real scenarios; with the increase in the number of nodes in the peer-to-peer network and the increase in the diameter of the graph, the present invention has a more superior performance range in the number of interactions than the EigenTrust algorithm, and its performance is close to or even exceeds its performance level when there is full interaction; the present invention does not rely on specific scenarios and has a wider applicability.

[0047] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is an overall flow chart of a peer-to-peer network reputation evaluation method based on graph learning according to the present invention;

[0049] Figure 2 A schematic diagram of a flow chart of attention mechanism learning of a peer-to-peer network reputation evaluation method based on graph learning according to the present invention;

[0050] Figure 3 This is a graph showing experimental results of data sets with different numbers of nodes in an embodiment of a peer-to-peer network reputation evaluation method based on graph learning of the present invention;

[0051] Figure 4 This is a graph showing experimental results of different graph diameter data sets in an embodiment of a peer-to-peer network reputation evaluation method based on graph learning of the present invention. DETAILED DESCRIPTION

[0052] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0053] like Figure 1 As shown, the present invention provides a peer-to-peer network reputation evaluation method based on graph learning, comprising the following steps:

[0054] S1. Given a communication network topology.

[0055] Given a communication network topology, including node index and edge index, it can be represented by a graph as in represents the set of nodes, and E represents the set of edges. The connection relationship of the graph can also be represented by an adjacency matrix, which consists of 0 and 1. The position of 1 in the matrix indicates that there is an edge between the corresponding two nodes, and they are neighbor nodes. The neighbor node set of node i is represented by express.

[0056] S2, generates node preferences, rejection probabilities, and number of interactions.

[0057] Replace all 1s in the adjacency matrix with random numbers between 0 and 1, and then normalize the rows to get the preference probability matrix P, then P satisfies P∈[0,1] n×n , where [P] ij represents the probability of node i preferring node j. A rejection probability is randomly generated for all nodes and divided into The index concatenation in becomes the rejection probability vector r, then r satisfies r∈(0,1) n×1 .

[0058] S3. Generate node features, calculate standard reputation values, and divide the sets into training, test, and validation sets.

[0059] S31. Calculate the local reputation matrix C using the following formula:

[0060]

[0061] Among them, max((1-2[r] j )[P] ij ,0) is the maximum value function, which is used to eliminate negative values ​​in the local reputation value. After calculating the local reputation values ​​of all nodes, they need to be normalized.

[0062] S32, standard reputation value t ∞ It is generated based on the error-free EigenTrust algorithm and satisfies the following formula:

[0063] t ∞ =(C T ) ∞ ·t0 (2)

[0064] Among them, C T is the transposed matrix of the local reputation matrix C. After the reputation value converges, the standard reputation value also satisfies the following formula:

[0065] t ∞ =C T ·t ∞ (3)

[0066] Thus, t ∞ is the matrix C T The normalized eigenvector corresponding to the eigenvalue of 1 is used to solve the equation system using Cramer's rule to obtain the standard credibility value t ∞ , as shown below:

[0067]

[0068] Among them, D m is the mth solution in a basis of the system of equations, obtained by the following formula:

[0069] D m =(-1) n+m ·|{d ij} (n-1)×(n-1) | (5)

[0070] Among them, |{d ij} (n-1)×(n-1) | represents the determinant operator d ijThe determinant corresponding to the n-1 order square matrix is ​​transformed from the coefficient matrix of the equation system. Let the coefficient matrix of the equation system be A, then the determinant operator and the coefficient matrix are obtained by the following formula:

[0071]

[0072] S33. According to the preference probability matrix P and the rejection probability vector r, an interaction success number matrix and an interaction failure number matrix are generated based on a certain number of interactions, and they are concatenated as node features.

[0073] S34. Different node features can be obtained by selecting different P and r, which are taken as a sample. For each sample, the standard reputation value is calculated using formula (4) as the label of the sample. After generating a large number of samples, they are divided into training set, test set and validation set.

[0074] S4. Supervise the training of graph neural network based on attention mechanism, such as Figure 2 shown.

[0075] S41. Input training set and test set, set the number of multiple heads N k .

[0076] S42, pre-processing input node features, subtracting the failure number matrix from the success number matrix, and performing row normalization after clearing negative items in the matrix; initializing counter k=1.

[0077] S43. Use the following formula to perform linear transformation on the features of all nodes:

[0078] x i =Wh i (8)

[0079] Among them, h i represents the feature of node i, and W is a learnable weight matrix.

[0080] S44. Calculate the normalized attention coefficient between nodes through the shared attention mechanism as follows:

[0081]

[0082] Among them, LeakyReLU is a nonlinear activation function. is a learnable weight vector, [Wh i ||Wh j ] indicates the concatenation of the linearly transformed features of node i and its neighbor node j.

[0083] S45: Determine whether the counter meets the number of times the longs are generated. If so, proceed to S46; if not, continue to repeat steps S43-S45 until the counter reaches the target number N. k =k.

[0084] S46. Calculate the node features after splicing, as shown below:

[0085]

[0086] Among them, σ(·) is a nonlinear activation function. After calculating the node features, all node features are flattened and reduced in dimension through a linear layer composed of learnable matrices to obtain the final output. The error between the output and the label is calculated using the loss function, and the learnable parameters in the network are updated by gradient descent. Using the features and labels in the test set, the features are input into the network, and the error between the output and the label is calculated using the loss function.

[0087] S47. Determine whether the error calculated in step S46 is reduced compared with the previous round. If it is reduced, repeat steps S42-S47; if it is no longer reduced, the training is completed and the model has converged.

[0088] Example

[0089] This embodiment illustrates the performance of the solution proposed by the present invention in combination with simulation results, and the simulation conditions are as follows:

[0090] The experiment was conducted on a computer with NVIDIA GeForce RTX 4060 GPU based on the PyTorch framework. Two different topological structures were selected for the experiment, namely, a network with 8 nodes and a network with 16 nodes generated based on the power law network, and networks with graph diameters of 4 and 7 respectively.

[0091] In the first group of experiments, the power law index of the power law network is 2, and the average degree of the nodes is 2.5; in the second group of experiments, the number of nodes is 8. All models are trained based on the data set formed by the number of successful and failed interactions generated by different preference probabilities, rejection rates, and interaction times, as well as the standard reputation value. The trained models are compared with the EigenTrust algorithm results using the validation set. The experiment is performed every 20 interactions, and the number of samples generated by the same number of interactions is 10,000.

[0092] In order to compare the accuracy of the present invention with the existing EigenTrust algorithm under the same conditions, Figure 3 and Figure 4As shown in the figure, experimental results based on networks with different numbers of nodes and different graph diameters are shown. It can be seen that compared with the traditional EigenTrust algorithm, the error of the present invention is significantly reduced when the interaction is insufficient, and as the number of network nodes increases, it can better approach the performance level of EigenTrust when the interaction is sufficient. This is because when the interaction is insufficient, the graph attention mechanism can better capture the complex trust relationship between nodes, while EigenTrust is difficult to accurately capture the complex features in the data with less interaction.

[0093] In addition, as the graph diameter increases, the reputation evaluation of nodes becomes more difficult, but the present invention still has lower errors than EigenTrust within a larger range of interaction times. This is because the increase in graph diameter means that both graph learning and EigenTrust require more iteration steps to reach a certain propagation depth, which increases the computational complexity of the model. On the other hand, due to the introduction of the attention mechanism in graph learning, the present invention can better capture the characteristics of neighbor nodes in each iteration process, so it has lower errors than EigenTrust within a larger range of interaction times, and the performance of the present invention can also be comparable to EigenTrust in the case of sufficient interaction.

[0094] Therefore, the present invention adopts the above-mentioned peer-to-peer network reputation evaluation method based on graph learning, and designs a peer-to-peer network reputation evaluation method based on attention mechanism according to the characteristics of graph learning and reputation propagation, which is conducive to the deployment of high-precision reputation management models in real scenarios; with the increase in the number of nodes in the peer-to-peer network and the increase in the diameter of the graph, the present invention has a more superior performance range in the number of interactions than the EigenTrust algorithm, and its performance is close to or even exceeds its performance level when there is full interaction; the present invention does not rely on specific scenarios and has a wider applicability.

[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. A peer-to-peer network reputation evaluation method based on graph learning, characterized in that: The following steps are involved: S1, given communication network topology; Given a communication network topology, including node index and edge index, it can be represented by a graph as ,in Represents a collection of nodes, represents a set of edges; The connection relationship of the graph is represented by the adjacency matrix, which consists of 0 and 1. The position of 1 in the matrix indicates that there is an edge between the corresponding two nodes, and they are neighbor nodes. The neighbor node set of express; S2, generating node preferences, rejection probabilities, and number of interactions; Replace all 1s in the adjacency matrix with random numbers between 0 and 1, and then normalize it to generate a node preference probability matrix ,in satisfy , Representation Node For Node j The probability of preference; A rejection probability is randomly generated for all nodes and is calculated according to The index concatenation in becomes the rejection probability vector ,in satisfy ; S3, generate node features, calculate standard reputation values, and divide the training set, test set, and validation set; Generate node features, calculate standard reputation values, and divide the training set, test set, and validation set. The specific process is as follows: S31. Calculate the local reputation matrix using the following formula : (1); in, It is a maximum value function, which is used to eliminate negative values ​​in the local reputation value. After calculating the local reputation values ​​of all nodes, they need to be normalized. S32, Standard Credit Value It is generated based on the error-free EigenTrust algorithm and satisfies the following formula: (2); in, is the local reputation matrix The transposed matrix of ; after the reputation value converges, the standard reputation value also satisfies the following formula: (3); thereby, is a matrix The normalized eigenvector corresponding to the eigenvalue of 1 is used to solve the equation system using Cramer's rule to obtain the standard reputation value. , as shown below: (4); in, is the mth solution in a basis of the system of equations, obtained by the following formula: (5); in, Represented by the determinant operator The determinant corresponding to the n-1-order square matrix composed of is transformed from the coefficient matrix of the equation system; the coefficient matrix of the equation system is recorded as , then the determinant operator and coefficient matrix are obtained by the following formula: (6); (7); S33. According to the preference probability matrix and the rejection probability vector , based on a certain number of interactions, generate a matrix of successful interactions and a matrix of failed interactions, and concatenate them as node features; S34, choose different and Obtain different node features and treat them as a sample. For each sample, use formula (4) to calculate the standard reputation value as the sample label. After generating a large number of samples, divide them into training sets, test sets, and validation sets. S4. Supervise the training of graph neural network based on attention mechanism, as shown below: S41. Input training set and test set, and set the number of longs ; S42, preprocessing input node features, subtracting the failure number matrix from the success number matrix, and performing normalization after clearing the negative items in the matrix; wherein, the counter k is initialized to 1; S43. Use the following formula to perform linear transformation on the features of all nodes: (8); in, Representation Node Features, is a learnable weight matrix; S44. Calculate the normalized attention coefficient between nodes through the shared attention mechanism as follows: (9); in, is a non-linear activation function, is a learnable weight vector, Representation Node and its neighbor nodes j The features after linear transformation are concatenated; S45: Determine whether the counter meets the number of times the longs are generated. If so, proceed to S46; if not, continue to repeat steps S43-S45 until the counter reaches the target number. ; S46. Calculate the node features after splicing, as shown below: (10); in, is a non-linear activation function; After calculating the node features, all node features are flattened and reduced in dimension through a linear layer composed of a learnable matrix to obtain the final output; the error between the output and the label is calculated using the loss function; the learnable parameters in the network are updated through gradient descent; the features and labels in the test set are used to input the features into the network, and the error between the output and the label is calculated using the loss function; S47. Determine whether the error calculated in step S46 is reduced compared with the previous round. If it is reduced, repeat steps S42-S47; if it is no longer reduced, the training is completed and the model has converged.

Citation Information

Patent Citations

  • P2P network trust model based on EigenTrust

    CN114513517A

  • Equipment health state assessment method based on knowledge graph attention network

    CN116737949A