P2P信任模型中资源利用平衡策略
2014-05-08郑晓健李彤付铁威
郑晓健+李彤+付铁威
摘要: P2P节点中存在的日益严重的搭便车行为对网络的健壮性、可用性、服务响应速度和生命周期等造成了很大影响。设计合理而有效的P2P信任模型来抑制搭便车行为已成为研究的重点。因此借鉴社会经济发展策略,提出基于资源利用均衡的信誉评价方法即对资源贡献大,以及贡献与消费平衡的节点赋予高信誉度。促使节点在贡献资源时要考虑其他节点的需求,消费资源时则要衡量自身提供资源的能力;同时为新节点提供基本信誉度来保障其尽早开展资源交易。仿真实验表明搭便车行为受到有效抑制,网络资源的利用率明显提高。
Abstract: The increasingly serious free riding behavior is prevalent in almost all P2P networks, which reduces the robustness, availability, service response speed, and lifetime of P2P networks. Research of the reasonable and effective P2P trust model to prohibit free-riders to contribute more to the system has become an important direction. Therefore, in reference to the social economic development strategy, the method of reputation equilibrium based on resources utilization is proposed, which a high degree of credibility is given the resource contribution nodes and the contribution and consumption balance nodes. The nodes consider other nodes' demand to contribute resources and measure their ability to consume resource. At the same time,it provides basic credibility to protect its resources for the new node as soon as possible to carry out transactions. Simulation results show that the free riding behavior is effectively restrainer and the resource utilization rate is increased.
关键词: P2P网络;资源利用率;信任模型;搭便车
Key words: P2P networks;resource utilization rate;trust model;free riding
中图分类号:TP393.0 文献标识码:A 文章编号:1006-4311(2014)11-0024-03
1 概述
P2P网络的可扩展性、公平性和稳定性依赖于节点资源的共享[1,10,11],而资源共享要消耗内存和带宽,许多节点因此不愿意上传其他节点请求的资源,只希望享受其他节点提供的资源服务,于是出现了所谓搭便车(free-riding)现象。P2P网络的节点匿名和自愿提供资源特性使搭便车现象普遍存在[2]。据测算,目前P2P网络中20%的热心节点承担了近90%的资源服务流量[2,12]。尽管搭便车行为使履行网络服务的责任压向热心节点一边,会使某些节点因不堪负荷而退出,同时却促进了这些节点资源的重复利用,对视频和购物网站等以提供信息为主的节点恰好是有益处的。
传统信任模型对搭便车行为一直保持低容忍度,采用的是鼓励贡献、限制消费的信誉激励策略[3,4]。激励机制一般分为基于信誉模型的激励机制、基于博弈论的激励机制以及基于社交网络或经济模型的激励机制三类[3]。基于信誉的激励机制具有计算复杂度较低的优点,因此被研究者普遍采用。信誉激励是一种反馈机制,节点通过贡献资源来积累信誉,积累到一定额度后才能从目标节点获得资源[4],这确实在一定程度上限制了搭便车行为,但也给新加入的节点贡献资源设置了门槛。因为现存节点缺乏对新节点的了解,不会轻易要求其上传资源,所以新节点即便愿意贡献资源也很难在短期内通过积累信誉度来到达目的。
本文借鉴社会经济发展的策略,提出基于资源利用平衡度的信誉评价模型(Resource utilization balance model,RUB),将提高节点信息资源利用率作为目标,鼓励贡献,并以消费促贡献,构建节点信息资源贡献和消费平衡发展的评价机制,即给到达资源贡献与资源消费平衡的节点予更高的信誉度,因此节点贡献资源时会考虑其他节点的需求,消费资源时则要衡量自身的提供资源的能力而不盲目消费;为愿意贡献、乐于消费信息的新节点提供基本信誉度,保障其尽快开展正常的活动。
2 相关工作
人们在搭便车问题上的研究重点是如何保证系统的公平性,以及信誉度维护,并不考虑服务质量和资源利用性,如文献[5]以上传文件数来衡量系统公平性;文献[6]用博弈论根据公平性指数对用户提供分级服务;文献[7,8]采用审计、竞价等社会经济学机制抑制搭便车行为。但是由于利益的驱使网络中总是存在搭便车节点和其他不法行为的节点,于是人们引入信任机制来保证P2P系统的服务效能,即根据每个用户在交易中的行为表现为其赋予一个信誉度,服务节点总是选择较高信誉度的客户节点为其提供服务,客户节点也总是选择较高信誉度的服务节点来获取服务,从而抑制搭便车节点的活动或降低被欺骗的可能,交易过后,双方节点对交易进行评价,系统根据交易状况来更新服务节点的信誉度[9]。不难发现,传统信誉度作为评价节点搭便车行为的重要指标,主要反映节点的资源贡献或消费能力[4,9],并不直接关注资源利用率。endprint
3 资源利用平衡度激励模型
3.1 模型基本思想
RUB的设计思想是:
①资源贡献和消费平衡的节点可以获得高信誉度,促使节点信息资源更新速度快,更受其他节点欢迎;
②对确有提供资源服务和使用愿望的新节点提供基本信誉度,辅助其尽快获得参与资源贡献和消费活动的权利;
③信誉度随时间不断衰减;
④对长期处于搭便车和资源消费过度的节点给予惩罚。
3.2 信誉的度量
资源的利用率受节点行为的影响呈现出动态性,为了便于对资源利用率的监测,将节点生存周期划分为n个观察期P={Ti|Ti=
①资源贡献和消费平衡度。用于反映各观察期节点资源的利用情况。因此设节点在Ti的资源贡献和消费的平衡度为:?姿i=1-■+2·1-■(1)
其中Sd?叟0为资源贡献量,Sc?叟0为资源消费量,K为资源贡献阈值。由(1)式计算节点的?姿i∈[0,4),可知:a)当?姿i∈[0,1)时,资源贡献量未超过贡献阈值,资源消耗量也未超过贡献量,表明节点的活跃程度不高,处于休眠状态;b)当?姿i∈[1,2)时,资源贡献量超过贡献阈值,资源消耗量未超过贡献量,表明节点有共享资源的愿望,处于贡献状态;c)当?姿i∈[2,3)时,资源贡献量未超过贡献阈值,但资源消耗量已超过贡献量,表明节点有搭便车嫌疑,处于倾向状态;d)当?姿i∈[3,4)时,资源贡献量超过贡献阈值,资源消耗量超过贡献量,表明节点有共享资源的愿望,但资源消耗可能过大,处于消费状态。在b)或d)时,节点均有共享资源的愿望,但消费和贡献差不能过大。因此设■i=■,若■i∈[0,?浊]则认为节点处于平衡状态(?浊平衡阈值),否则为非平衡状态即处于b)为非平衡贡献状态,处于d)为非平衡消费状态。总之,形成节点状态集:ST={B,C,A,S,T},其中平衡状态B、非平衡消费状态C、非平衡贡献状态A、休眠状态S、倾向状态T。
②信誉度。反映节点从创建到当前观察期在资源利用和行为方面的表现。因此设网络对象信誉度为:
TRi=■■?琢i(st)·?姿i·?棕n-1·Kn-t(st),1?燮t,st∈{B,C,A,S,T} ?子,0?燮t?燮1
(2)
其中?琢i(st)∈[0,1]为状态因子,■?琢i(st)=1,?琢i(B)>?琢2(C)>?琢3(A)>?琢4(S)>?琢5(T)>0,TRi∈[0,1],?子∈[0,1]为新节点的基本信誉度,?棕∈[0,1]为时间衰减因子,K(st)为惩罚因子,K(B)=K(S)=K(A)=1,0 ③激励和惩罚。按照前述原则,用信誉度阈值?滋将节点信誉度分成两类:a)若TRi>?滋,表明到目前为止的n个观察期内节点处于平衡状态,具有很高的资源利用率;b)若TRi?燮?滋,表明到目前为止的n个观察期内节点资源贡献相对消费来说较少,资源利用率较低即属于搭便车者。 ④资源利用率,为节点贡献资源量与其拥有的资源总量之比。 3.3 激励和惩罚算法 网络中的每个节点设置数据结构:资源贡献量Sd,资源消费量Sc,资源信誉度Tr,状态持续周期K,计时器Timer,高优先级服务队列q1和低优先级服务队列q2。包括节点资源请求程序,接收客户节点C发出的资源查询请求(C,TR,Q),按TR类型,将(C,TR,Q)放入服务队列q1或q2;计时器中断服务程序,按照多级轮循方式从服务队列q1,q2提取资源查询请求(C,TR,Q),并完成服务请求,若已经到达审查时段,就按照(1)、(2)式计算本节点的信誉度,算法如下: Response resource request algorithm Begin 接收(C,TR,Q) if(TR>?滋) (C,TR,Q)插入服务队列q1 else 根据节点负荷情况按概率p将(C,TR,Q)插入服务队列q2 End Response timer request algorithm Begin if(q1非空) 从q1队首取(C,TR,Q),并响应(C,TR,Q) else if(q2非空) 从q2队首取(C,TR,Q),并响应(C,TR,Q) 更新节点资源贡献量Sd和资源消费量Sc if(timer==tr) 按照 (1) 、(2) 式计算节点的信誉度并保存至Tr End 4 仿真实验 实验的目的是验证RUB在应用中对搭便车节点的抑制效果,并评估其资源利用率。本文采用自己编写的模拟器构造Gnutella结构的P2P网络来完成实验。设定实验网络是理想网络即任一个节点可以随意地找到所需节点。节点数为2000个,节点资源为共享文件,数量为20000个并按照Zipf分布存储到节点。每个节点平均完成100次交易,每次交易是从还未被访问过的文件中随机选择其一并下载,交易成功即让节点拥有该文件,交易失败就不增加节点的文件。 实验是对比网络中存在不同比例的搭便车节点时,采用RUB激励机制和没有任何激励机制的系统的影响,结果如图1所示。可以看出,两类节点的交易成功率上,平衡节点呈逐步上升趋势,而搭便车节点则呈下降趋势。这是因为随着平衡节点和搭便车节点比例变化,平衡节点数相对减少,节点的响应速度加快,而一些搭便车节点被拒绝或因数量增加查询请求被延缓,响应超时所至。对于新节点在刚参与交易时就获得了较高的成功率。实验说明RUB激励机制对搭便车节点查询请求的抑制作用产生了明显效果。同时实验比较了在激励机制作用下两类节点的资源利用率情况,结果如图2所示。可以看出,随着观察期的加长平衡节点的资源利用率明显提高,说明得到其他节点给予的良好服务,而搭便车节点资源利用率提高缓慢,获得的服务质量不佳。
5 结束语
针对P2P网络存在的搭便车现象,从调整节点信誉评价方法入手提出以平衡资源的贡献和消费、提高资源利用率为基础的激励和惩罚机制。通过该机制来抑制搭便车行为,体现了公平原则,还提高了资源利用率。对于新节点参与交易的积极性给予了保护。实验表明,该激励机制保证了平衡节点获得较高的下载成功率,同时也鼓励了贡献节点,惩罚了搭便车行为。
参考文献:
[1]Adar E, Huberman B. Free riding on Gnutella[J]. First Monday, 2000, 5(10): 32-35.
[2]LIU Jian-hui, WANG Jun, JI Chang-peng,et al. Balanced Algorithm to Suppress Free-riding in P2P Network[J]. Computer Science, 2013,40(7):36-38.
[3]YU Yijiao, JIN Hai.A Survey on Overcoming Free Riding in Peer-to-Peer Networks[J].Chinese Journal of Computers,2008(1) : 1-15.
[4]LEI Fang, LIU Huiyuan, WANG Chang, et al. Reputation-based incentive mechanism for enhancing P2P network service stability[J]. Journal of Chongqing University of Posts and Telecommunications( Natural Science Edition), 2013,25(5):675-679.
[5]KUNG H T, WU C H. Differentiated admission for peer-to-peer systems: incentivizing peers to contribute their resources [EB/OL].(2003-12-21)[2005-03-03]. http: //www. sims. berkeley. edu/research/conferences/p2pecon/papers/s5-kung. pd.f.
[6]MA R TB,LEE SCM,LUI JC S,etal.A game theoretic approach to provide incentive and service differentiation in P2P networks[J]. ACM S igmetrics Performance Evaluation Review,2004,32(1):189-198.
[7]LANG K T, VRAGOV R.A pricing mechanism for digital content distribution over peer-to-peer networks[C] //Proc of the 38th Annual Hawaii International Conference on System Sciences. Hawai:i [s. n. ],2005.
[8]HALES D, EDMONDS B. Applying a socially inspired technique(tags) to improve cooperation in P2P networks[J].IEEE Trans on System: System and Humans,2005,35(3): 385-395.
[9]ZHUANG Lei,CHANG Yu-cun, DONG Xi-guang. Incentive mechanism in peer-to-peer file sharing system[J].Application Research ofComputers,2009,26(1):266-268.
[10]ZHANG Yu,SCHAAR Mihaela van der. Designing Incentives for P2P Multimedia Sharing[C]//IEEE Communications Society subject matter experts for publication.Berkeley: ACM Press,2011: 1-6.
[11]WANG Miao, TAO Fei, ZHANG Yu-Jun,et.Accurate and Adaptive Reputation Mechanism for P2P File Sharing Network[J]. Journal of Software,2011,22(10):2346-2357.
[12]LI Li-miao, CHEN Zhi-gang, GUI Jin-song,et. P2P Network Trust Model Based on Priority[J]. Computer Engineering.2013,39(5):148-151.endprint
5 结束语
针对P2P网络存在的搭便车现象,从调整节点信誉评价方法入手提出以平衡资源的贡献和消费、提高资源利用率为基础的激励和惩罚机制。通过该机制来抑制搭便车行为,体现了公平原则,还提高了资源利用率。对于新节点参与交易的积极性给予了保护。实验表明,该激励机制保证了平衡节点获得较高的下载成功率,同时也鼓励了贡献节点,惩罚了搭便车行为。
参考文献:
[1]Adar E, Huberman B. Free riding on Gnutella[J]. First Monday, 2000, 5(10): 32-35.
[2]LIU Jian-hui, WANG Jun, JI Chang-peng,et al. Balanced Algorithm to Suppress Free-riding in P2P Network[J]. Computer Science, 2013,40(7):36-38.
[3]YU Yijiao, JIN Hai.A Survey on Overcoming Free Riding in Peer-to-Peer Networks[J].Chinese Journal of Computers,2008(1) : 1-15.
[4]LEI Fang, LIU Huiyuan, WANG Chang, et al. Reputation-based incentive mechanism for enhancing P2P network service stability[J]. Journal of Chongqing University of Posts and Telecommunications( Natural Science Edition), 2013,25(5):675-679.
[5]KUNG H T, WU C H. Differentiated admission for peer-to-peer systems: incentivizing peers to contribute their resources [EB/OL].(2003-12-21)[2005-03-03]. http: //www. sims. berkeley. edu/research/conferences/p2pecon/papers/s5-kung. pd.f.
[6]MA R TB,LEE SCM,LUI JC S,etal.A game theoretic approach to provide incentive and service differentiation in P2P networks[J]. ACM S igmetrics Performance Evaluation Review,2004,32(1):189-198.
[7]LANG K T, VRAGOV R.A pricing mechanism for digital content distribution over peer-to-peer networks[C] //Proc of the 38th Annual Hawaii International Conference on System Sciences. Hawai:i [s. n. ],2005.
[8]HALES D, EDMONDS B. Applying a socially inspired technique(tags) to improve cooperation in P2P networks[J].IEEE Trans on System: System and Humans,2005,35(3): 385-395.
[9]ZHUANG Lei,CHANG Yu-cun, DONG Xi-guang. Incentive mechanism in peer-to-peer file sharing system[J].Application Research ofComputers,2009,26(1):266-268.
[10]ZHANG Yu,SCHAAR Mihaela van der. Designing Incentives for P2P Multimedia Sharing[C]//IEEE Communications Society subject matter experts for publication.Berkeley: ACM Press,2011: 1-6.
[11]WANG Miao, TAO Fei, ZHANG Yu-Jun,et.Accurate and Adaptive Reputation Mechanism for P2P File Sharing Network[J]. Journal of Software,2011,22(10):2346-2357.
[12]LI Li-miao, CHEN Zhi-gang, GUI Jin-song,et. P2P Network Trust Model Based on Priority[J]. Computer Engineering.2013,39(5):148-151.endprint
5 结束语
针对P2P网络存在的搭便车现象,从调整节点信誉评价方法入手提出以平衡资源的贡献和消费、提高资源利用率为基础的激励和惩罚机制。通过该机制来抑制搭便车行为,体现了公平原则,还提高了资源利用率。对于新节点参与交易的积极性给予了保护。实验表明,该激励机制保证了平衡节点获得较高的下载成功率,同时也鼓励了贡献节点,惩罚了搭便车行为。
参考文献:
[1]Adar E, Huberman B. Free riding on Gnutella[J]. First Monday, 2000, 5(10): 32-35.
[2]LIU Jian-hui, WANG Jun, JI Chang-peng,et al. Balanced Algorithm to Suppress Free-riding in P2P Network[J]. Computer Science, 2013,40(7):36-38.
[3]YU Yijiao, JIN Hai.A Survey on Overcoming Free Riding in Peer-to-Peer Networks[J].Chinese Journal of Computers,2008(1) : 1-15.
[4]LEI Fang, LIU Huiyuan, WANG Chang, et al. Reputation-based incentive mechanism for enhancing P2P network service stability[J]. Journal of Chongqing University of Posts and Telecommunications( Natural Science Edition), 2013,25(5):675-679.
[5]KUNG H T, WU C H. Differentiated admission for peer-to-peer systems: incentivizing peers to contribute their resources [EB/OL].(2003-12-21)[2005-03-03]. http: //www. sims. berkeley. edu/research/conferences/p2pecon/papers/s5-kung. pd.f.
[6]MA R TB,LEE SCM,LUI JC S,etal.A game theoretic approach to provide incentive and service differentiation in P2P networks[J]. ACM S igmetrics Performance Evaluation Review,2004,32(1):189-198.
[7]LANG K T, VRAGOV R.A pricing mechanism for digital content distribution over peer-to-peer networks[C] //Proc of the 38th Annual Hawaii International Conference on System Sciences. Hawai:i [s. n. ],2005.
[8]HALES D, EDMONDS B. Applying a socially inspired technique(tags) to improve cooperation in P2P networks[J].IEEE Trans on System: System and Humans,2005,35(3): 385-395.
[9]ZHUANG Lei,CHANG Yu-cun, DONG Xi-guang. Incentive mechanism in peer-to-peer file sharing system[J].Application Research ofComputers,2009,26(1):266-268.
[10]ZHANG Yu,SCHAAR Mihaela van der. Designing Incentives for P2P Multimedia Sharing[C]//IEEE Communications Society subject matter experts for publication.Berkeley: ACM Press,2011: 1-6.
[11]WANG Miao, TAO Fei, ZHANG Yu-Jun,et.Accurate and Adaptive Reputation Mechanism for P2P File Sharing Network[J]. Journal of Software,2011,22(10):2346-2357.
[12]LI Li-miao, CHEN Zhi-gang, GUI Jin-song,et. P2P Network Trust Model Based on Priority[J]. Computer Engineering.2013,39(5):148-151.endprint