• 沒有找到結果。

FGK動態壓縮演算法支援分散處理系統實做

N/A
N/A
Protected

Academic year: 2021

Share "FGK動態壓縮演算法支援分散處理系統實做"

Copied!
48
0
0

加載中.... (立即查看全文)

全文

(1)

FGK

FGK dynamic compression algorithm support distributed

processing implementation of the system

(2)

FGK

FGK dynamic compression algorithm support distributed processing implementation of the system

Student

Chung-Cheng Hung

Advisor

Yu-Tai Ching

A Thesis

Submitted to Institute of Biomedical Engineering

College of Computer Science

National Chiao Tung University

in partial Fulfillment of the Requirements

for the Degree of

Master

in

Computer Science

June 2010

(3)

FGK

FGK

FGK

FGK

摘要

摘要

摘要

摘要

我們的研究目的是把一個複雜的運算,把它切割成較小的運算來做處理, 而較小的運算間再各自交給自己的處理器來做處理,如此可以免去單一運算所需 耗費的冗長的時間,而我們則是採取動態壓縮的演算法來面對我們傳輸所遇到的 問題,此種演算法有隨壓隨解的性質,可以先把解壓縮過後的資料來拿先做處理, 可以省去較多時間。 而我們還採取了網路傳輸的一些觀念,模擬多核心的架構,我們運用了 3~5 台的電腦來實做我們的系統架構,來達到我們的實驗需求,已獲得合理且有效的 實驗數據。

(4)

FGK dynamic compression algorithm support distributed

processing implementation of the system

Student Chung-Cheng Hung Advisor Yu-Tai Ching

Institute of Biomedical Engineering

National Chiao Tung University

Abstract

Our aim is to a complex operation, it cut less computation to do processing, and smaller operations in their respective rooms to deal with their own processor to do so without having a single operator can spend the necessary the long time, and we are taking the dynamic compression algorithms to transmit the face of our problems, this algorithm has

properties of solutions with the pressure as can be first to come and collect the data after decompression do first processing, can save more time.

And we have also taken some ideas network transmission, analog multi-core architecture, we use the computer at 3 to 5 we implement our system architecture, to achieve our experimental needs, has been given a reasonable and effective experimental data .

(5)

在兩年多的日子裡,有著同學間彼此的照顧,實驗室間彼此的學習交流與成 長,讓我能在這段期間獲得良好的知識,與在交大這良好的學習環境中成長,感 謝教授的細心指導,批改與督促學生相關論文的完成與進度,感謝實驗室同學間 彼此的互相鼓勵,感謝清大的同學在實驗上給予指導和幫助,感謝台大的學長在 論文上的指點與指教,感謝中央的同學在修課上的幫助,在這些日子裡都有你們 的回憶在我心中,最後感謝家人在精神上與經濟上的支持,讓我能在這段日子中 有強烈的支持,讓我能在良好的學習環境中成長,在這裡感謝在這段期間有給我 溫暖的每一個師長、同學,謝謝你們 !

(6)

目錄

目錄

目錄

目錄

中文摘要 ………ii 英文摘要 ………iii 致謝 ………iv 目錄 ………v 第一章 緒論 ………1 1.1 簡介………1 1.2 論文架構………1 第二章 背景與理論基礎………2 2.1 前言………2 2.2 平行計算………3 2.3 Huffman 演算法介紹………5 2.4 FGK 演算法介紹………6 2.5 Gaussian filter 介紹………13 第 三 章 實 驗 實 作 流 程 … … … 1 4 3.1 實驗簡介………14 3.2 FGK 演算法………14 3.3 程式平行處理部分………20 3.4 檔案一切四和四合一部分………22 3.5 網路傳輸部分………23 3.6 即時動態壓縮影像系統總覽………24

(7)

第四章 實驗結果分析………25 4.1 實驗簡介………25 4.2 實驗環境………25 4.3 實驗結果………26 第五章 結論與未來展望………38 參考文獻 ………39

(8)

圖表目錄

圖表目錄

圖表目錄

圖表目錄

1. .4 2. 4 3.(a)(b)(c) 10

4. symbol Dynamic Huffman tree 11

5.Gaussian filter 13 6. .22 7. .26 8. 27 9. 28 10. 29 11. 30 12. 30 13. 33 14. speedup 34

15. Recv Gaussian Total 36

(9)

1.1

2 4 server client client server

1.2

(10)

2.1

, , processors , FGK Huffman 2-pass knuth FGK FGK FGK process

(11)

2.2

CPU CPU

(12)

1.

CPU

(13)

2.3 Huffman

Huffman MIT David Huffman

Huffman Huffman 1. 2. 3. 4. 5. 1 0 6. 2 5 15 A 7 B 6 C 6 D 5 E Huffman

(14)

0 100 101 110 111 87bits

2.4 FGK

Faller Gallager Knuth

FGK t+1 (

t )

Knuth :

:

(15)

aj = j ; t = ; ut = ai1 ai2 ait t ; k = ; wj = aj ; lj = aj ; 1<=j k>=n 0<=wj<=t; : : (1) w1,w2 ,...wp (2) 2j-1 2 j ( ) 1 2 3 4 5 6

(16)

( ) 2.2-5 32 ( t=32 t ) 33 b 2 1 4 6 3 5 6 5,5,6 3 5 ( ) 10 ( ) 1.(a) 1.(b) 1 1 1.(b) 1.(c)

(17)

1.(c) 1 2

(18)

3.(a)(b)(c) k<n 0 0 0 2 0

(19)

3

4. symbol Dynamic Huffman tree

3 q

q

1 a b 8 9 4

(20)
(21)

2.5 Gaussian filter

(1)

(1) Gaussian

Gaussian Mask Mask Gaussian filter

Gaussian filter Gaussian

filter :

(22)

3.1

FGK process create

3.2 FGK

FGK Kunth Encode :

(23)

Encode :

1. NYT node

short code NYT (1) leaf root

NYT node (2) short code

(3) update

2. : A

(1)

(24)

3. Update

code

FGK letter

:

Encode :1.Encode=> leaf root

update short code

(25)
(26)

decode

decode :

Decode=> root bit leaf decode

(27)

update decode

(28)

3.3

client port

server port port

5001 5002 5003 5004 server

:

(29)
(30)

3.4

4.10MB 50 pixel 0 : 6. 50pixel 0

(31)

overlapp

3.5

TCP FTP

client

Raw data byte network

server port data

(32)

3.6

:

一張原始的圖形 的檔案(.tif 檔) 把一張原始的檔 案切割成四個圖 檔來傳輸 經由 FGK 演算法 把四張圖先分別 做 Encode 且 client 端開始做 Decode 之後再把四張壓縮過 後的 Raw data 檔案, 傳到收端 client端等四個檔案同 時收齊之後,再接著做 處理 四張圖檔再同時進 行高斯處理的動作 之後四張經過高斯過 後的圖檔,經過 Encode 之後再傳送回來而 server端開始 Decode 等四個收到的檔收齊 Decode回來,把四張圖 overlapp的部分去掉 最後再合成一張經 過高斯過後的圖檔

(33)

4.1

FGK (.tif) (.tif)

4.2

Client : 1. CPU:Pentium 4 cpu 3.20 GHz 2. RAM:2.00 GB

3. OS system:Microsoft Windows XP Professional Release mode 4. . Develoment environment: DevC++

Server :

2~4 server

(34)

4.3

1. : 2349 * 1823 4.10MB 7 (.tif) 7. 3.49MB

FGK byte Raw data

server port port byte raw

(35)

byte Raw data server port

client byte Raw data

overlapp 8

(36)

2349*1823 9

10 :

(37)

10.

2349*1823 11

(38)

11.

(39)

1 2 1 4 : 4MB 49MB 110MB 196MB 306MB (s) 180 808 2113 3670 5793 Computer1 Gaussian(s) 11 42 117 162 254 Computer2 Gaussian(s) 38 123 233 392 609 Computer3 Gaussian(s) 20 103 112 208 317

(40)

Computer4 Gaussian(s) 13 97 167 371 471 Total time (s) 264 773 2650 3670 5793 Gaussian

Gaussian O(nk) K Gaussian kernel

n pixel speedup

operation

( Guassian ) delay delay

Delay 4 speedup 3104*4672 41.5MB 2349*1823 4.1MB 2349*1823 4.1MB 2349*1823 4.1MB

(41)

(s) 5921 1439 1278 1393 1 to 2 (s) 1650 373 352 329 1 to 2 speedup 3.58 3.86 3.63 4.23 1 to 4 (s) 1296 326 242 267 1 to 4 speedup 4.57 4.41 5.28 5.22 13. 0 1000 2000 3000 4000 5000 6000 7000 圖片 1 圖片 2 圖片 3 圖片 4 單一運算 1 to 2 運算 1 to 4 運算 所需花的時間統計 所需花的時間統計 所需花的時間統計 所需花的時間統計(S)

(42)

14. speedup 1 to 2 1 to 4 1 to 2 speedup 3.58 1 to 4 speedup 5.28 : 0 1 2 3 4 5 6 圖片 1 圖片 2 圖片 3 圖片 4 單一運算 1 to 2運算 1 to 4運算

(43)

4MB 49MB 110MB 196MB 306MB Computer1 Gaussian(s) 11 42 93 162 253 Computer2 Gaussian(s) 20 108 230 407 712 Computer3 Gaussian(s) 13 50 113 198 308 Computer4 Gaussian(s) 20 76 169 299 464 Total time (s) 47 180 422 843 1399 (s) 180 808 2113 3670 5793 speedup 3.83 4.49 5.00 4.35 4.14

(44)

15. Recv Gaussian Total

16. speedup 0 200 400 600 800 1000 1200 1400 1600 4MB 49MB 110MB 196MB 306MB G1 G2 G 3 G 4 Total 0 1 2 3 4 5 6 4M 49M 110M 196M 306M

speedup

speedup 所需花的時間統計 所需花的時間統計 所需花的時間統計 所需花的時間統計(S)

(45)

1 to 4 4MB 306MB 3~5 speedup FGK

(46)

FGK process Huffman process FGK process

(47)

[1] R. G. GALLAGER. Variations on a theme by Huffman, IEEE Trans. Inform.

Theory IT-24 (1978). 668-674.

[2] D. E. KNUTH, Solution to problem E2307, Amer. Math. Monthly 79 (1972),

773-774.

[3] KNUTH, D. E. Dynamic Huffman coding. J. Algorithms 6 (1985), 163-180. [4] VIITER, J. S. Dynamic Huffman Coding. ACM Trans. Math. Sojlw. Submitted

1986.

[5] VITTER, J. S. Design and analysis of dynamic Huffman codes. J. ACM 34, 4

(Oct. 1987),825-845.

[6] BENTLEY, J. L., SLEATOR, D. D., TARJAN, R. E., AND WEI, V. K. A locally

adaptive data compression scheme. Commun. ACM 29,4 (Apr. 1986), 320-330.

[7] ELIAS, P. Interval and recency-rank source coding: Two online adaptive

variable-length schemes.IEEE Trans. InJ Theory. To be published.

[8]FALLER, N. An adaptive system for data compression. In Record ofthe 7th

Asilomar Conference on Circuits, Systems, and Computers. 1913, pp. 593-591

[9]VIITER, J. S., AND CHEN, W. C. Design and Analysis of Coalesced Hashing.

Oxford UniversityPress, New York, 1987.

[10]D. E. KNUTH, Solution to problem E2307, Amer. Math. Monthly 79 (1972),

(48)

[11]JEFFREY SCOTT VITTER “ALGORITHM 673 Dynamic Huffman Coding”

ACM Transactions on Mathematical Software, Vol. 15, No. 2, June 1989, Pages

158-167

[12] T.C. Bell J.G. Cleary and I.H. Witten Text Compression NJ: Prentice Hall

1990

[13]Ross N. Williams “Adaptive Data Compression”

[ 14 ] http://en.wikipedia.org/wiki/Speedup

參考文獻

相關文件

選取本地根資料夾Æ右 1Æ開新檔案Æ輸入檔案名稱( index.html),Enter 鍵Æ右 1Æ設成 首頁 Æ重複〝右 1〝 本地根資料夾〞 Æ開新檔案Æ輸入檔案名稱,Enter

一、成績計算:以術科實作及面試之原始分數計算,術科實作成績佔 70%,面試成績佔 30% (術 科實作原始分數*70%+面試原始分數*30%,分數四捨五入至小數點第 2

如圖,將一張長方形紙張,對摺再對摺,然後剪下一長為 3 公分、寬為 2 公分的長方形,則剪 下的部分展開後的圖形為. 形,且其周長為

print –dtiff my_image.tif: 將目前指定的圖形,產生 TIFF 格式的影像檔,並以my_image.tif 的檔名儲存。.

利用 Microsoft Access 資料庫管理軟體,在 PC Windows 作業系 統環境下,將給與的紙本或電子檔(如 excel

• 我們通常用 nD/mD 來表示一個狀態 O(N^n) ,轉移 O(N^m) 的 dp 演算法. • 在做每題

存放檔案的 inode 資訊, inode 一旦滿了也一樣會 無法儲存新檔案, inode 會告知檔案所使用的 data block 位置。. Q :如何知道那些 inode 和

 培養具有檔案學基礎知識與文化知識,掌握現代資訊技術的基 本技能,能在檔案館、國家機關和企事業單位的檔案機構、資