• 沒有找到結果。

6. 預先戳記法成本改善機制

6.3 分類法壓縮

6.3.2 布隆過慮器壓縮

第三種方式是使用布隆過濾器(Bloom filter)[5][6],布隆過濾器主要透過 k 個雜湊函 數,將一筆資料映射到一個具有 m 位元的陣列(Bit array)中的 k 個欄位,並可在其中放 入 n 個元素,新加入的元素會將其對應到的欄位設為 1。在搜尋時,只要有一個欄位對 應到的數值為 0,即表示該筆資料並不存在於戳記欄位中。

由上節中,我們得知將 IP 經雜湊函數壓縮後為 32bits,假設我們建立一個長度為 10,000bits 的布隆過濾器,壓縮後所需的欄位大小為 m/4Bytes,則壓縮後 512 個戳記所 需的空間為 2.5Kbits,壓縮率為 6.55 倍,有著較雜湊法更佳的壓縮能力,並且布隆過濾 在插入及查詢資料的時間複雜度皆為常數 O(k),能更方便的進行查詢和過濾。布隆過 濾器由於是透過雜湊函數映射到位元陣列中,因此在戳記的內容中,並不包含原始的 IP 資訊,有著比雜湊法更高的保密性,缺點是程式較為複雜,且隨著存入的元素增加,誤 算率(False positive)也會隨之增加。誤算率 p 可由[5]文中得知為

1 /

/

/ ln 2

1 0.6185

2

m n

  m n

  ≈

 

因此我們可以藉由上述的算式,計算出在 m=5,000bits 以及 n=512 個 IP 位址的情況下,

使用 10 個雜湊函數可以得到最小的誤算率 p=0.008192,而提升 IP 位址至 1024 個節點 情況下,將 m 提升到 10,000bits,誤算率則約為 0.0091669,可以發現隨著加入布隆過 濾器中的元素越多,相應的誤算率的情況也會快速上升。若想要降低誤算率,則可以增 加布隆過濾器的位元陣列長度,但同時也會降低壓縮比。以預先戳記法在 BA 模型中的 平均戳記數量為例,約可將原本 9355Bytes 的戳記原始資料,以 625Bytes 的布隆位元陣 列所取代,並可達到約 15 倍左右的壓縮率。

6.4 戳記 戳記總量控制 戳記 戳記 總量控制 總量控制 總量控制

雖然壓縮法可以改善部分的戳記大小問題,但最根本的問題在於預先戳記法中夾帶 了大量的戳記,且這此戳記隨著封包經過的節點數,會慢慢地累積並增加。因此,我們 透過戳記總量控制的方式,將已經過多次傳輸而失去作用的戳記,從封包中刪減掉,並 留下最近加入的固定數量的戳記,用以優化戳記記錄的情況,透過實驗了解離當前節點 越遠的節點資訊,影響力較鄰近的節點小,進而得知留下較新的戳記對於節點是否廣播 有著較大的影響,需記錄的戳記數量,則因網路的不同而有所差異。

在 1024 個節點的二維網狀模型中,我們利用收到的平均戳記數量,並以 10 個戳記 為間距逐量減少,由圖 6-5 中可以發現,在二維網狀模型中,記錄 10 個戳記與記錄 100 個戳記獲得的效果是一樣的,因此我們進一步的降低記錄的戳記數量,實驗記錄 10 個 至 1 個戳記造成的效果。由圖 6-5 可得知在記錄的戳記數量為 6 個的情況下,即可達到 與記錄全部戳記有著差不多的效果,最多僅需記錄到 8 個戳記,即為二層左右的鄰居資 訊即可,最多可節省 96%的戳記總量。在二維網狀模型中,訊息的傳遞會在一、二層內 即收到訊息,因此需記錄的戳記數量也僅需約二層即可以達到效果。

圖 6-7 為在 512 個節點中的小世界網路中,戳記總量控制的結果。我們以在二維網

Number of Messages

Number of Stamps

Flooding Basic Advanced Hybrid Pre

Number of Messages

Number of Stamps

Flooding Basic Advanced Hybrid Pre

圖圖

圖 6-6 二維網狀模型戳記總量控制於十以下比較圖二維網狀模型戳記總量控制於十以下比較圖二維網狀模型戳記總量控制於十以下比較圖二維網狀模型戳記總量控制於十以下比較圖

在 Waxman 模型中,我們以戳記法中記錄的戳記總量的最大值 60 個為依據,以 10

Number of Messages

Number of Stamps

Flooding Basic Advanced Hybrid Pre

Number of Messages

Number of Stamps

Flooding Basic Advanced Hybrid Pre

圖 圖

圖 6-8 Waxman 模型戳記總量控制比較圖模型戳記總量控制比較圖模型戳記總量控制比較圖 模型戳記總量控制比較圖

在 BA 模型中,預先戳記法收到了最多達 687 個的戳記數量,因此戳記的總量控制

Ratio of Messages

Number of Stamps

BF SP SBA Basic

Advanced Hybrid Pre

Number of Messages

Number of Stamps

Flooding Basic Advanced Hybrid Pre

節省的幅度約為 35%。

圖 6-10 為無線網路中,戳記總量控制的比較圖。經由實驗發現,在無線網路中,

512 個節點的條件下,網路的稠密度較高,每個節點的鄰居數量也較多,造成網狀連接 的情況也較為頻繁,因此需記錄的戳記數量更多,避免訊息藉由網狀連接回傳的情況。

但由於無線網路在戳記的部分,會於 Random Delay Time 時進行蒐集與更新,因此無線 網路中的戳記數量會較多,且需要較多的戳記來記錄在發送前蒐集到的新資訊。在無線

Number of Messages

Hops

Flooding Basic Advanced Hybrid Pre

圖 圖圖

圖 6-11 二維網路層數控制比較圖二維網路層數控制比較圖二維網路層數控制比較圖 二維網路層數控制比較圖

此記錄一層的戳記即可。

Number of Messages

Hops

Flooding Basic Advanced Hybrid Pre

圖圖圖

Number of Messages

Hops

Flooding Basic Advanced Hybrid Pre

預先戳記欄位在傳遞時,更新至戳記欄位的動作,進而補充 3hops 以內的鄰居資訊,因

Number of Messages

Hops

Flooding Basic Advanced Hybrid Pre

Number of Forwarding Nodes

Hops

Flooding SP SBA Basic

Advanced Hybrid Pre

環境中,由於節點在傳遞訊息時,並沒有在網路底層即將重複的訊息過濾,因此會在發 送訊息前不斷累積戳記的訊息,較不受到戳記層數控制的影響。在無線網路的環境下,

記錄的戳記層數與廣播的節點之間影響不大,因此僅需記錄 1 至 2 層即可達到效果。

6.6 小結 小結 小結 小結

在本章中,我們透過將預先戳記法實作於 IPv6 的環境中,探討預先戳記法可能造 成的空間成本問題,並利用三種不同的壓縮法、戳記總量的控制與層數控制,企圖降低 預先戳記法中龐大的戳記所佔用的空間成本浪費。

在壓縮的部分,分類壓縮法於 IPv6 環境中,改善效果較低,主要因為 IPv6 中,用 於區隔網段的長度僅佔其總長度的 25%,且隨著全世界網段的劃分,Groups 的數量亦 會增加,使得分類的壓縮能力降低,但分類壓縮仍且有使查詢的時間降低至 O(√n)的 優點。而雜湊法壓縮雖然可以得到較佳的壓縮率,但隨著壓縮率的增加,發生碰撞的機 率也會提升,造成覆蓋率降低的情況,因此在使用雜法壓縮時,需考慮可以容許何種程 度的碰撞機率下,依舊可以使網路的廣播情況維持在要求的門檻之上。布隆過濾器在三 種壓縮法中,有著最佳的壓縮率,但與之伴隨的是誤算率的提升,因此在使用上,與雜 湊法一樣需注意壓縮率與覆蓋率之間的取捨。戳記總量的控制, 則有效地降低預先戳 記法大量的戳記問題。隨著傳遞的節點越遠,先前蒐集的節點鄰居資訊的影響力與作用 力也會遞減,透過戳記的總量控制,可將需記錄的戳記數量減少 35%~80%的戳記數量。,

戳記層數控制的部分,考慮到不同環境中使用戳記法或預先戳記法的情況,約略可將戳 記層數控制設定為 3 層以下,且使用層數控制的記憶戳記數量,可改善約 3~7 倍。

戳記總量控制、層數限制與壓縮在使用上並不衝突,因此可以交互使用,大量的改 善預先戳記法中,大量戳記造成的空間成本。

7. 結論 結論 結論 結論

本文主要透過以空間換取效率的方式,透過預先戳記演算法,改善戳記法在非結構 化網以及無線隨意網路中廣播訊息量的問題,並比其他演算法有著大幅度的廣播訊息減 少能力。透過預先戳記演算法,可以改善在點對點檔案傳輸的查詢封包,或是無線網路 中的尋徑封包的廣播效能,減少廣播封包佔用的網路資源,以提升網路封包傳輸的效率,

改善網路延遲的狀況;也可應用在廣播訊息與語音系統中,利用預先戳記法的冗餘訊息 過濾能力,降低廣播訊息與語音系統中的重複封包,減少大量封包使得網路阻塞,造成 重要訊息無法傳遞出去的情況。

透過實驗模擬証實,預先戳記法與泛流式演算法、SBA 演算及戳記演算法,有著 更佳的過濾冗餘訊息傳遞的能力,在類似 Gnutella 網路的小世界網路中,預先戳記法比 起泛流式廣播,降低了 75%~87%左右的冗餘訊息,而比起戳記法中效果最佳的混合式 戳記法,降低了 5%~25%左右的冗餘訊息。在 Waxman 網路中,與泛流式廣播法相較之 前,降低了 76%~80%左右的冗餘訊息量,且比混合式戳記法降低 50%~55%左右的訊息 量,而在 BA 網路中,效果略差於在 Waxman 網路模型中的效果,與泛流式廣播相比降 低了 80%~84%的冗餘訊息量,相較於混合式戳記法則降低了 45%的訊息量。在無線網 路中,預先戳記法比泛流式演算法降低了 55%~80 左右的訊息總量,但因在延遲發送的 時間中有著戳記更新的機制,因此與混合戳記法的相較之下,僅改善了 4%~11%的冗餘 訊息量。透過一系列的實驗,可以發現預先戳記法能有效地降低網路中的訊息總量,進 而改善網路的承載負擔,並提升網路的使用率與效能,減輕網路壅塞的情況,而覆蓋率 與傳輸時間也可維持在與其他演算法相近的效能。而伴隨著網路擴張而增加的戳記儲存 問題,亦可透過戳記壓縮的方式來改善其空間成本與搜尋的時間。未來將可把預先戳記 法應用在廣播訊息以外的應用,如即時通訊系統的群播,或是衛星網路的訊息封包應用 等研究。

參考文獻 參考文獻 參考文獻 參考文獻

[1] E. Adar and B. Huberman, “Free riding on Gnutella,” First Monday, Vol.

5-10, 2000.

[2] Khaled M. Alzoubi, Peng-Jun Wan and Ophir Frieder, “Distributed Construction of Connected Dominating Set in Wireless Ad Hoc Networks,”

Proceedings of the International Conference on Computer Communications, vol. 3, pp. 1597-1604, 2002.

[3] Yang B and Garica Molina H, “Improving Search in Peer-to-Peerd Networks,” Phys. Proceeding of the 22nd IEEE International Conference on Distributed Computing, 2002.

[4] A.L. Bar´abasi and R. Albert, “Emergence of Scaling in Random Networks,”

Proceeding of Science, pp 509–512, 1999.

[5] B. Bloom, “Space/time Tradeoffs in Hash Coding with Allowable Errors,”

Proceeding of ACM, pp.422–426, 1970.

[6] Bloom filer implement, http://www.partow.net/programming/hashfunctions/

[7] Boost, http://www.boost.org/

[8] Benjie Chen, Kyle Jamieson, Hari Balakrishnan and Robert Morris, “Span:

An Energy-Efficient Coordination Algorithm for Topology Maintenance in Ad Hoc Wireless Networks,” Proceedings of International Conference on Mobile Computing and Networking, pp. 85-96, 2001.

[9] Fei Dai and Jie Wu, “An Extended Localized Algorithm for Connected Dominating Set Formation in Ad Hoc Wireless Networks,” Transactions on Parallel and Distributed Systems, vol. 15, no. 10, pp. 908-920, 2004.

[10] David B. Johnson and David A. Maltz, “Dynamic Source Routing in Ad Hoc Wireless Networks,” Proceedings of Mobile Computing, pp. 153-181, 1996.

[11] Young-Bae Ko and Nitin H. Vaidya, “Location-Aided Routing (LAR) in Mobile Ad Hoc Networks,” Proceedings of the International Conference on Mobile Computing and Networking, pp. 66-75, 1998.

[12] Anis Laouiti, Amir Qayyum, and Laurent Viennot, “Multipoint Relaying:

An Efficient Technique for Flooding in Mobile Wireless Networks,”

Proceedings of the International Conference on System Sciences, 2001.

[13] Jinyang Li, Charles Blake, Douglas S. J. De Couto, Hu lmm Lee and Robert Morris, “Capacity of Ad Hoc Wireless Networks,” Proceedings of the 7th ACM International Conference on Mobile Computing and Networking, pp.

61-69, 2001.

[14] Hyojun Lim and Chongwon Kim, “Multicast Tree Construction and Flooding in Wireless Ad Hoc Networks,” Proceedings of the International Workshop on Modeling, Analysis and Simulation of Wireless and Mobile Systems, pp. 61-68, 2000.

[15] Hai Liu, Xiaohua Jia, Peng-Jun Wan, Xinxin Liu and Frances F. Yao, “A Distributed and Efficient Flooding Scheme Using 1-Hop Information in Mobile Ad Hoc Networks,” Transactions on Parallel and Distributed Systems, vol. 18, no. 5, pp. 658-671, 2007

[16] Wei Lou and Jie Wu, “Double-Covered Broadcast (DCB): A Simple Reliable Broadcast Algorithm in MANETs,” Proceedings of the International Conference on Computer Communications, 2004.

[17] L. Lovasz, “On the Ratio of Optimal Integral and Fractional Covers,”

Proceedings of Discrete Mathematics, pp. 383-390, 1975.

[18] Qin LV, Pei Cao, Edith Cohen, Kai Li and Scott Shenker, “Search and Replication in Unstructured Peer-to-Peer Networks,” Proceedings of 16th ACM International Conference on Supercomputing, 2002

[19] A. Medina, A. Lakhina, I. Matta, and J. Byers, “BRITE: Universal Topology Generation from a User’s Perspective,” Technical Report BUCS-TR-2001-003, 2001.

[20] Napster, http://music.napster.com/napsterhomemain.htm

[21] Sze-Yao Ni, Yu-Chee Tseng, Yuh-Shyan Chen and Jang-Ping Sheu, “The Broadcast Storm Problem in a Mobile Ad Hoc Network,” Proceedings of the International Conference on Mobile Computing and Networking, pp.

151-162, 1999.

[22] NS-2 The Network Simulator, http://www.isi.edu/nsnam/ns/

[23] Katia Obraczka, Kumar Viswanath and Gene Tsudik, “Flooding for Reliable Multicast in Multi-Hop Ad Hoc Networks,” Proceedings of the International Workshop on Discrete Algorithms and Methods for Mobile Computing and Communications, pp. 64-71, 1999.

[24] OpenNap, http://opennap.sourceforge.net/

[25] Wei Peng and Xicheng Lu, “AHBP: An Efficient Broadcast Protocol for Mobile Ad Hoc Networks,” Journal of Computer Science and Technology, pp. 507-519, 2002.

[26] Wei Peng and Xicheng Lu, “Efficient Broadcast in Mobile Ad Hoc Networks using Connected Dominating Sets,” Journal of Software, pp.

529-536, 1999

[27] Wei Peng and Xi-Cheng Lu, “On the Reduction of Broadcast Redundancy in Mobile Ad Hoc Networks,” Proceedings of The International Symposium of Mobile Ad Hoc Networking and Computing, pp. 129-130, 2000.

[28] Charles E. Perkins, “Ad-Hoc On-Demand Distance Vector (AODV) Routing,” Request for Commends 3561, 2003.

[29] Charles E. Perkins and Pravin Bhagwat, “Highly Dynamic Destination-Sequenced Distance-Vector Routing (DSDV) for Mobile Computers,” Proceedings of the ACM SIGCOMM ’94 Conference on Communications Architectures, Protocols and Applications, pp. 234-244, 1994.

[30] Amir Qayyum, Laurent Viennot and Anis Laouiti, “Multipoint Relaying for Flooding Broadcast Messages in Mobile Wireless Networks,” Proceedings of the International Conference on System Sciences, 2002.

[31] S. Ratnasamy, P. Francis, M. Handley, R. Karp, and S. Shenker, “A scalable content-addressable network,” Proceedings of ACM SIGCOMM, pp.

161-172, 2001.

[32] R. Rivest, “The MD5 Message-Digest Algorithm,” RFC1321, MIT Laboratory for Computer Science and RSA Data Security Inc, 1992

[33] Stefan Saroiu, P. Krishna Gummadi and Steven D. Gribble, “A Measurement Study of Peer-to-Peer File Sharing Systems,” On Multimedia Computing and Networking (MMCN), 2002.

[34] Yoav Sasson, David Cavin and Andre Schiper, “Probabilistic Broadcast for Flooding in Wireless Mobile Ad hoc Networks,” Technical Report IC-2002-54, Swiss Federal Institute of Technology, 2002.

[35] Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, and Hari Balakrishnan, “Chord: A scalable peer-to-peer lookup service for internet applications,” Proceedings of ACM SIGCOMM 2001, 2001.

[36] Ivan Stojmenovic, Mahtab Seddigh, and Jovisa Zunic, “Dominating Sets

and Neighbor Elimination Based Broadcasting Algorithms in Wireless

Networks,” Transactions on Parallel and Distributed Systems, vol. 13, no. 1, pp. 14-25, 2002.

[37] John Sucec and Ivan Marsic, “An Efficient Distributed Network-Wide Broadcast Algorithm for Mobile Ad Hoc Networks,” CAIP Technical Report, Rutgers University, 2000.

[38] Min-Te Sun, Wuchi Feng and Ten-Hwang Lai, “Location Aided Broadcast in Wireless Ad Hoc Networks,” Proceedings of the Global Commnunications Conference, 2001.

[39] Chai K. Toh, “Ad Hoc Mobile Wireless Networks,” Prentice Hall, 2001.

[40] B. Waxman, “Routing of Multipoint Connections,” IEEE J. Select. Areas Commun., 1988.

[41] Brad Williams and Tracy Camp, “Comparison of Broadcasting Techniques for Mobile Ad Hoc Networks,” Proceedings of The International Symposium on Mobile Ad Hoc Networking and Computing, pp. 194-205, 2002.

[42] Jie Wu and Fei Dai, “Broadcasting in Ad Hoc Networks Based on Self-Pruning,” Proceedings of the International Conference on Computer Communications, 2003.

[43] Jie Wu and Hailan Li, “On Calculating Connected Dominating Set for Efficient Routing in Ad Hoc Wireless Networks,” Proceedings of the International Workshop on Discrete Algorithms and Methods for Mobile Computing and Communication, pp. 7-14, 1999.

[44] 李崇右, 溫高宏 and 吳俊興, 戳記式電子郵件轉寄過濾機制, 台灣網

際網路研討會(TANET), 2010

[45] 李崇右 and 吳俊興, 戳記式點對點廣播機制, 第四屆優質家庭生活科

技之關鍵技術研討會, 2010

[46] 謝沛軒 and 吳俊興, 以預先戳記法改善非結構化疊加網路之廣播效能,

全國電信研討會(NST), 2012