• 沒有找到結果。

Chapter 3 Concepts of Research

3.2 Maintenance of Reputation Scores

3.2.1 Storage of Reputation Scores

3.2.1.5 Usage of Complementary Nodes

When a user uploads reputation scores, on one hand it uploads its reputation to the upper nodes along its own searching path, and on the other hand it can send the reputation to its complementary node and ask the complementary node to upload the reputation score to the nodes along the searching path of the complementary node. We

n-4 n-8 n-16

take Fig.11 as example: suppose skip distance s =1, peer(15) uploads the reputation scores about peer(12) to the upper nodes along its own searching path: peer(31), peer(7), peer(11), and peer(12). And it also sends the reputation scores to its complementary node, peer(26). So peer(26) helps to upload the reputation score the nodes along the searching path: peer(10) and peer(12). Totally, there will be 7 nodes storing the reputations about peer(12) of peer(15): peer(15), peer(31), peer(7), peer(11), peer(12), peer(10), and peer(26). Fig.13 shows where peer(15) uploads its reputation scores.

12

Fig.13: The demonstration of the storage of the reputation of peer(15) about peer(12)

eceived Reputation Scores

After receiving the reputations uploaded by the lower nodes in the search tree,

3.2.2 Handling of R

how to maintain these reputations is the next question to solve. We can store all the received scores separately. But when the size of the network gets larger and larger, the

amount of reputations a peer stores may be very great. For example, when skip distance s=1, the root node of the search tree will store the reputations uploaded by all the lower nodes in the network. The storage of these received reputations will cause a heavy load. So we let peers aggregate received scores and only store the aggregated scores.

3.2.2.1 Aggregation of Reputation Scores

Each peer stores an aggregated score about a provider. When it receives the reputation scores uploaded from other peers, he combines the received scores with the value which he originally stores to generate a new aggregated score.

When combining the received scores and the stored value, the weights of these values depend on the number of nodes represented by these values. For example, suppose there are two scores to be combined. One represents the aggregated scores of four nodes and the other represents the aggregated scores of eight nodes. The more nodes a score represents, the more weight we assign to it. So the weight of the score representing eight nodes will be twice as heavy as the one of the score representing four nodes.

Suppose a peer i stores the aggregated scores of n nodes, r . When it receives the reputation score uploaded from another peer j, rj, it will aggregate the reputation with its stored value and get the new aggregated value, r′ :

* ( 1) j

r n r

r n

′ = − +

3.2.2.2 Improvement of Aggregation Function

The original aggregation scheme operates aggregation when each score is

received. But if a malicious user continuously uploads reputation score to a peer, it will cause a great computation load to the receiving peer. And the aggregated score stored in this peer will be influenced by the redundantly uploaded scores.

To improve this condition, we set a time interval (ex: 1 hour) for receiving reputations. Peers receive and buffer the reputations received in the same time interval.

In the end of this time interval, peers aggregate all the scores buffered with the originally stored value to generate the new aggregated score. For example, in the time interval t, peer i totally receives k reputations: rj1, rj2, …, rjk. In the end of interval t, peer i aggregates the k reputation scores with the previously stored value rt1:

1* ( ) 1 2 ...

t j j

t

n k r r r

r r

n

+ + + +

= jk

If the scores uploaded from some peers are much different from the scores of other peers or the average scores, we can also reduce the weight of these scores in the aggregation function. For example,

3.2.3 Gathering of Reputation Scores

In DHT-based peer-to-peer networks, users search for the wanted resources to get the information about resource providers. To avoid additional cost, we hope to let users get the information necessary for selection making when they search for the resources. So we design the scheme of “search agent” to perform the collection of reputation scores to reduce the cost of the original users.

3.2.3.1 Search Agents

In the DHT-based networks like Chord, the identifier of the resource is generated by hashing the key of the resource. Then the meta data of the resource will be stored

in the peer which the resource identifier maps to. Because the peer whose identifier is equal to the one of the resource manages the meta data of the resource, we call this peer “resource manager” of the resource. Ordinarily, resource managers own the information of the providers of the resources, such as the IDs and the IP addresses of the resource providers. If a user needs the resources, he has to search for the resource manager to get the information and know which peers provide the resources.

Since all the peers which need the resources have to contact the resource managers, we appoint the resource managers to be the search agents. Search agents are responsible for collecting reputation scores about all the providers of the resources when they are free. After collecting the reputations, search agents combine the gathered scores to generate aggregated values and announce these values in the meta data stored in the resource managers. When users search for the wanted resources and reach the resource manager, they can get the information of the resource providers and also get the aggregated scores of the resource providers. Then users can make selection of resource providers according to these aggregated scores.

3.2.3.2 Collecting Reputation Scores

In our scheme of reputation storage, each peer uploads its reputation scores about the provider to the upper nodes along the search path for the provider. Therefore, when search agents collect reputation scores, we also let they gather reputation scores along their own search paths for the providers.

Because each peer uploads its own reputation to the upper nodes along the search path according to the skip distance s, we can know that if a score is uploaded to a peer n, the score must be also sent to the node which is s layers higher than peer n along the path. We take Fig.14 as example, suppose s =2, then the scores uploaded to

peer(9), peer(7), peer(3), and peer(27) must be also uploaded to peer(12).

Fig.14: The scheme of recursive storage of reputation scores with s = 2

Therefore, we can get all the inform

ger ation contained in a search path by only getting the scores stored in the node in the top s layers of the search tree. Taking the search path from peer(13) to peer(12) as example, the scores uploaded to peer(9) and peer(29) are also uploaded to peer(12) while the scores uploaded to peer(5) and peer(13) are also uploaded to peer(11). So all the information contained in the search path can be got in the peer(12) and peer(11).

The top nodes in the search path store the aggregated scores representing lar amount of lower nodes, so it will cause greater damage if the top nodes are malicious users and supply false aggregated results. So we still collect other aggregated values along the search path to verify the scores supplied by the top nodes in the search path.

We will describe the scheme of verification in later sections.

3.2.3.3 Use Complementary Nodes in Reputation Collection

Now, search agents collect reputation scores along their search path for the

es not only collect the

g.15: Requests to the complementary node for additional information

related providers. But the difference in the length of search path between the nodes in the network will still cause the variance in the amount of information gathered.

Similar to the adjustment for reputation storage, we apply the scheme of complementary nodes to the collection of reputation scores.

When a search agent collects reputation scores, he do

aggregated scores along his search path for the provider, but he also send requests to his complementary node and ask the complementary node to collect reputation scores in the same manner and return the results gathered. By the scheme of complementary nodes, even if a node has the shortest search path for the provider, it can still get information from its complementary node.

12

In Fig.15, peer(28) is the node with the shortest search path in the search tree for

.3 Verification of Collected Information

Users search for the resources and contact resource managers to get the

.3.1 Properties of Chord Search tree

As we describe in the previous sections, the structure of the search tree in Chord peer(12). In the original scheme of reputation collection without complementary nodes, peer(28) can only get information from peer(12). But if it sends requests to its complementary node, peer(13), and ask for the scores stored along the search path of peer(13), peer(12) will get the aggregated information from more node than the original condition.

3

information of the resource providers. According to the aggregated scores listed in the data stored in the resource manager, users can directly choose one of the resource providers to get the wanted resources. But if the users do not trust the scores supplied by the resource manager or want to check for the truth of these supplied scores, we need a verification scheme for users to verify their got information.

3

networks has the recursive property. Look at Fig.16 below. We can see that the 32-node search tree is divided into two 16-node trees by cutting the edge marked (-1).

And the 16-node subtree can also be divided into two 8-node trees by the edge marked (-2). From these observations, we can conclude that: by cutting an edge marked (-2k), it will generate a subtree with (N/2k+1) nodes, where N is the total number of nodes in the network.

n

Fig.16: The recursive structure of the search tree in Chord

In our schem

plementary node. The elements of the two

Scheme

torage of reputations, the number of nodes which the ggregated value stored in a peer represents depends on the size of the subtree with e of reputation collection, each peer can get the aggregated scores along the search paths of itself and its com

search paths are two edges marked (-16) and edges marked (-8), (-4), (-2), (-1) respectively. According the conclusion we make, the nodes below the edges marked (-16) must be the root of the subtree with (N/32) nodes. In the case of Fig.16, the nodes are the roots of 1-node trees, which are leaf nodes. Similarly, the node below the edge marked (-8) is the root of the subtree with (N/16) nodes, which is the root of 2-node tree.

root is the peer. That is, the score stored in the root of 16-node tree represents twice as

Fig.17: The nodes in the search paths of peer(15) and peer(26)

In Fig.17, we show the search paths of peer(15) and its complementary node,

res in peer(26). And we mark the nodes along the two search paths by different colors. The two red nodes are leaf nodes, and the blue node is the root of 2-node tree. The green node is the root of 4-node tree while the yellow one is the root of 8-node tree.

After collecting the aggregated scores from these nodes, we can use the sco the two red nodes to verify each other because the weight of the two scores should be the same. Then we use the two scores from red nodes to verify the score from blue node because the sum of the weight of the two red nodes should be equal to the one of the blue node. Because the sequence of the weight of these nodes can be treated as a geometric sequence, we can always merge the scores with smaller weights to verify

4

the score with heavier weight.

The scheme of verification can not only be used by general users, it can also be

.4 Other Improvement of The Mechanism

.4.1 Temporal Change

The environments of DHT-based peer-to-peer networks are dynamic, and the

riod (Ex: one day). And when we aggregate the scores getting used by the search agents to verify the reputations they collect. Search agents collect all the aggregated scores along their search paths and the search paths of their complementary nodes. They can directly get information from the top s layers node in the two paths and then use other collected scores to verify the information.

3

3

states of peers may change temporally. Suppose something happened to a peer so that it had poor performance before. Then the reputation scores assigned to it would be lower and the score about it listed in the resource manager may be lower then other providers. If the performance of this peer recovers suddenly, we hope that the scores in the resource manager can reflect the current condition as soon as possible. So we try to reduce the influence of the scores previously stored when computing the aggregating scores.

We set a time pe

from different time periods, we reduce the weight of the scores of the previous time period. For example, suppose there are time periods: tn-1, tn (as Fig.18). In the end of tn-1, we aggregate the scores and get Raggr[tn1]. We use Raggr[tn1] as the initial value of the time interval tn to aggregate the scores received en generating the aggregated scores of the time interval t

in tn . Wh

n, we reduce the weight of Raggr[tn1]:

[ ] * [ 1]

[ ] 1

aggr n n

n

obv aggr

R t f R t

R t

f +

= + , where 0≤ < f 1

[

1

]

aggr

R t

n Raggr[tn]

tn-1 tn

The aggregation of the scores in different tim

obv[ ] R tn

Fig.18: e interval.

Chapter 4 Research Result

In this chapter, we will prove the scalability of our mechanism. We will also show some results of our research.

4.1 The Influences of Skip Distance

In our scheme of reputation storage, every peer uploads its reputation to the upper nodes along the search path. Peers determine which peers to upload according to the skip distance. After receiving the scores uploaded by other peers, each peer combines them and stores an aggregated score. The number of nodes which the aggregated score represents actually depends on the location of the peer in the search tree. In the search tree of a 2m-node Chord network, every node is the root of a subtree with 2k nodes, where k is between 0 and m. When k=0, this node must be a leaf node.

And if k=m, the node must be the root node of the search tree. A peer receives the reputations uploaded by the nodes in the subtree whose root node is it. So the numbers of nodes which an aggregated score represents is directly proportioned to the size of the subtree whose root is the keeper of the score. Another factor which will influence the number of nodes which a aggregated score represents is the skip distance. In the trees with the same size, different skip distance will cause different storage conditions so that the number of node from which a peer will receive reputations will also be different. Next, we discuss the relation between the skip distance and the number of nodes from which a peer receives reputations.

4.2 The Relations between Search Trees and Pascal Triangle

By analyzing the searching trees of Chord, we can observe that each layer of the Pascal triangle corresponds to a searching tree with a specific number of layers. And the entries in one layer of the Pascal triangle give the numbers of nodes with different depths in the corresponding searching tree. The Fig.19 below is a part of the Pascal triangle where Pld means the d-th entry in the l-th layer of the Pascal triangle:

d

Pld 0 1 2 3 4 5 6 ……

0 1 1 1 1 2 1 2 1 3 1 3 3 1 4 1 4 6 4 1 5 1 5 10 10 5 1 6 1 6 15 20 15 6 1

...

l

...

Fig.19: Pascal triangle.

As mentioned above, the l-th layer of the Pascal triangle corresponds to the searching tree with height = l (we define the height of a tree as the maximum distance from root to other nodes). And the d-th entry in this layer respectively gives the number of nodes with depth = (l - d) in this searching tree. Now we take the searching tree with 32 nodes as example. The height of the searching tree of 32-node Chord network is 5. Fig.20 shows such tree structure. It also shows the number of nodes and the number of leaf nodes in each layer with different depths. We write the information in table format (Table.1). We can see that the numbers of nodes in layers with depths

= (5, 4, 3, 2, 1, 0) are (1, 5, 10, 10, 5, 1) respectively, which is the same as the layer with l = 5 in the Pascal triangle.

Fig.20: The number of nodes in each layer of the search tree

depth Number of nodes

5 1 4 5 3 10 2 10 1 5 0 1

Table.1: The number of nodes in each layer of the search tree.

4.3 The Number of Nodes Which An Aggregated Score Represents

When skip distance = s, each peer will receive the reputations from the nodes which are s, 2s,… layers lower than it in the search tree. In the previous sections, we mentioned that the number of nodes which are several layers lower than root is relational to the Pascal triangle. Therefore, when skip distance = s, the number of nodes from which a peer will receive reputations about a certain provider can be computed by summing some certain elements in the Pascal triangle. For example, if a node is the root of a 32-node Chord search tree, and suppose s = 2, we can get the value by computing the sum of the P50, P52, and P54, which is 1 + 10 + 5 = 16. From

this, we can know that when s =2, the root of a 32-node search tree will receive the reputations from totally 16 nodes.

By continuously analysis, we compute the conditions under different values of network size and skip distance. When the size of identifiers is m, the size of the network is 2m. Table.2 lists the numbers of nodes from which the roots of trees with different sizes m receive reputations under different value of skip distance s. And Fig.21 shows the ratio of the number of reputations a node receives to the number of the tree whose root is the node.

m s=2 s=3 s=4 s=5 s=6 s=7 s=8

1 1 1 1 1 1 1 1

2 2 1 1 1 1 1 1

3 4 2 1 1 1 1 1

4 8 5 2 1 1 1 1

5 16 11 6 2 1 1 1

6 32 22 16 7 2 1 1

7 64 43 36 22 8 2 1

8 128 85 72 57 29 9 2

9 256 170 136 127 85 37 10

10 512 341 256 254 211 121 46

11 1024 683 496 474 463 331 166

12 2048 1366 992 859 926 793 496

13 4096 2731 2016 1574 1730 1717 1288

14 8192 5461 4096 3004 3095 3434 3004

15 16384 10922 8256 6008 5461 6451 6436 16 32768 21845 16512 12393 9829 11561 12872 17 65536 43691 32896 25773 18565 20129 24328 18 131072 87382 65536 53143 37130 34885 43912 19 262144 174763 130816 107883 77540 62017 76552 20 524288 349525 261632 215766 164921 116281 130816

Table.2: The result of computation under different values of m and s.

0.00%

Length of hashed identifiers in Chord

The ratio of the information stored in the root to the total number of the nodes in the network s=2

s=3

Fig.21: The ratio of the reputations stored in the root of a tree to the total number of nodes in the tree

With the increasing of the value of m, the ratio will converge to (1/s). For example, when s=8, the ratio converges to (1/8) = 12.5%. That is, the root of a tree will get reputation from (1/8) of the nodes in the network. Therefore, the more the value of s is, the less each node has to maintain. But the number of nodes which the aggregated score can represent also becomes less than the conditions with smaller value of s.

4.4 The Information Can Be Collected in the Reputation Collection

As mentioned in section 3.2.3.2, the information contained in the whole search path can be got from the nodes in the top s layers of the search path. So the next to discuss is how much information which a user can get in the scheme of reputation collection.

In the section 4.3, we describe the information contained in the aggregated scores stored in a node. So we know that the root of the whole search tree will keep the score

containing the aggregated value of the opinions of (N/s) nodes. Taking the longest search path as example, the size of the subtree below a node is a half of the size of the subtree below its parent node. In Fig.32, peer(n) is the root of the 32-node tree. while peer(n-1), peer(n-3), peer(n-7), peer(n-15), peer(n-31) are the roots of the 16-node, 8-node, 4-node, 2-node, 1-node tree respectively.

n

Fig.22: The search tree of a 32-node Chord network

along the search path, the top node keeps the information from (N/s) nodes, So

and the second node keeps the information from (N/2s). If we collect scores from the nodes in the top s layers of the search path, we can compute the amount of

non-repeated information collected by:

1 along the longest search path will converge to the aggregated opinions of 2 1

1 along the longest search path will converge to the aggregated opinions of 2 1

相關文件