中文字幕无码日韩视频无码三区

分布式存儲方法與系統與流程

文檔(dang)序號:11133944閱讀:1019來源(yuan):國知局
分布式存儲方法與系統與制造工藝

本發明涉(she)及(ji)分布式存儲技術領域,特別涉(she)及(ji)一(yi)種無中(zhong)心(xin)的、文件冗余可配置的分布式存儲方法(fa)與系統。



背景技術:

在分(fen)布式存(cun)儲(chu)領域,面向(xiang)(xiang)研發(fa)人員的解決方案有知(zhi)名的Hadoop HDFS,HDFS方案特點(dian)(dian)包(bao)括:節點(dian)(dian)有Master和Slave之(zhi)分(fen),Master存(cun)在單點(dian)(dian)故(gu)障問題,可(ke)以通過部署多Master來避(bi)免,但是(shi)配置(zhi)較(jiao)為復雜;文(wen)件(jian)在本地系(xi)統(tong)(tong)被分(fen)塊,無法在本地系(xi)統(tong)(tong)查看與管理分(fen)布式存(cun)儲(chu)的文(wen)件(jian)目錄;將文(wen)件(jian)加入到分(fen)布式存(cun)儲(chu)需要(yao)復制(zhi)過程,比較(jiao)耗時;文(wen)件(jian)的冗余自動(dong)完(wan)成(cheng),用(yong)(yong)戶(hu)難以定位(wei)文(wen)件(jian)存(cun)儲(chu)在哪(na),無法手動(dong)指定文(wen)件(jian)存(cun)儲(chu)位(wei)置(zhi);適(shi)用(yong)(yong)于局(ju)域網內(nei)一直在線的服務器設備上搭(da)建;面向(xiang)(xiang)研發(fa)人員,非專(zhuan)業人員不(bu)適(shi)用(yong)(yong)。

面(mian)向公眾(zhong)的(de)(de)(de)(de)云存(cun)(cun)(cun)(cun)儲方案,比較(jiao)(jiao)成熟的(de)(de)(de)(de)是各類(lei)網盤,實(shi)現了終(zhong)端與云端的(de)(de)(de)(de)文(wen)件目錄(lu)同(tong)(tong)(tong)步(bu)與文(wen)件內(nei)容(rong)的(de)(de)(de)(de)同(tong)(tong)(tong)步(bu)。這類(lei)解決(jue)方案的(de)(de)(de)(de)特點包括:需要連公網服(fu)務(wu)(wu)(wu)器,數(shu)據存(cun)(cun)(cun)(cun)儲在(zai)服(fu)務(wu)(wu)(wu)提供商的(de)(de)(de)(de)服(fu)務(wu)(wu)(wu)器內(nei),存(cun)(cun)(cun)(cun)在(zai)安全隱(yin)患,用戶(hu)使用有顧慮;服(fu)務(wu)(wu)(wu)端和客戶(hu)端所承(cheng)擔的(de)(de)(de)(de)角(jiao)色(se)完全不(bu)同(tong)(tong)(tong);服(fu)務(wu)(wu)(wu)端和客戶(hu)端之間(jian)的(de)(de)(de)(de)目錄(lu)與內(nei)容(rong)的(de)(de)(de)(de)同(tong)(tong)(tong)步(bu)是一(yi)體的(de)(de)(de)(de);用戶(hu)往(wang)往(wang)有多(duo)個終(zhong)端,不(bu)同(tong)(tong)(tong)終(zhong)端的(de)(de)(de)(de)存(cun)(cun)(cun)(cun)儲空間(jian)與網絡成本存(cun)(cun)(cun)(cun)在(zai)較(jiao)(jiao)大差(cha)異(yi),通過網盤在(zai)終(zhong)端之間(jian)有選擇地共(gong)享與同(tong)(tong)(tong)步(bu)數(shu)據操(cao)作復雜,不(bu)夠智能。

數據(ju)同步最(zui)簡單的(de)方(fang)法就是將最(zui)新(xin)的(de)數據(ju)完整(zheng)的(de)傳輸(shu)一(yi)份,全(quan)量(liang)(liang)同步,這種方(fang)式適合數據(ju)量(liang)(liang)小的(de)情況,當完整(zheng)數據(ju)量(liang)(liang)大(da)而數據(ju)的(de)修改又(you)只涉及小部(bu)分內(nei)容時,增量(liang)(liang)同步,即傳輸(shu)修改部(bu)分數據(ju)是更(geng)優的(de)選擇。

數(shu)(shu)(shu)據增量同步(bu)首先需要(yao)識別(bie)同步(bu)雙(shuang)方(fang)之間的(de)差別(bie),發(fa)明申(shen)請201210179530.8公開了一(yi)種(zhong)將同步(bu)雙(shuang)方(fang)的(de)目(mu)錄樹進行(xing)比(bi)對,得(de)出差別(bie)并(bing)(bing)產(chan)生消除差別(bie)的(de)操(cao)作序列的(de)方(fang)案(an);發(fa)明申(shen)請201410022418.2公開了一(yi)通過種(zhong)向(xiang)服務端提交與下載文件操(cao)作指令進行(xing)數(shu)(shu)(shu)據同步(bu)的(de)方(fang)案(an);發(fa)明申(shen)請201210390811.8公開了一(yi)種(zhong)對存儲數(shu)(shu)(shu)據的(de)變化(hua)事件進行(xing)監控,并(bing)(bing)將變化(hua)事件序列進行(xing)合并(bing)(bing),減少(shao)同步(bu)雙(shuang)方(fang)協議交換次數(shu)(shu)(shu)的(de)同步(bu)的(de)方(fang)案(an)。

發明(ming)申(shen)請201210559321.6公(gong)(gong)開(kai)了(le)一種需要借助中心(xin)服務器(qi)來匯總、分(fen)發數據(ju)的同步方案(an)(an),該申(shen)請還公(gong)(gong)開(kai)了(le)通(tong)過(guo)版(ban)本比較(jiao)確定數據(ju)新舊,通(tong)過(guo)分(fen)片哈希(xi)減少文件傳輸內容大小,通(tong)過(guo)斷點續傳提升傳輸效率的技術(shu)方案(an)(an)。發明(ming)申(shen)請201310050905.5公(gong)(gong)開(kai)了(le)一種可脫離中心(xin)服務器(qi),終(zhong)端之間對等地進(jin)行(xing)數據(ju)同步的技術(shu)方案(an)(an)。



技術實現要素:

鑒于上述(shu)現有技術及存在(zai)的(de)(de)不足,本(ben)發明要解決的(de)(de)技術問題在(zai)于提(ti)供(gong)一種用戶容易構建(jian)的(de)(de),不依賴于中心服務器,適用于通信不穩定的(de)(de)各種設備(bei)之(zhi)間進行數據管理、冗余與自動同步,且用戶能夠查看(kan)和指定文件存儲在(zai)哪(na)些設備(bei)的(de)(de)分布式存儲方法與系統。

為解決上述問題,本(ben)發明提(ti)供(gong)了一種分布(bu)式存儲方法,集群由若干對等節點構成:

集群各節點發現(xian)網(wang)絡中的(de)(de)其它(ta)節點,通過數據同步,每個節點都(dou)維(wei)護一(yi)份(fen)完整的(de)(de)集群節點列(lie)表;

集群(qun)各(ge)節點通過數據同步,每個節點都(dou)維護一份(fen)完整的集群(qun)目錄(lu)數據,提(ti)供(gong)給用戶查看與管(guan)理;

集群(qun)各(ge)節點接(jie)受用(yong)戶將本地的(de)文件(jian)(jian)(夾)掛載到集群(qun)目(mu)錄,集群(qun)目(mu)錄相應的(de)插入目(mu)錄數據,新增的(de)集群(qun)目(mu)錄文件(jian)(jian)(夾)標記與之對應的(de)本地文件(jian)(jian)(夾),所述映(ying)射關(guan)系標記不在節點間同步;

所述集群目錄維護各文件(jian)存儲節(jie)點列(lie)表,以便獲取文件(jian)內容及提(ti)供(gong)列(lie)表信息給(gei)用(yong)戶查看(kan)。

所述集群(qun)節點可運行(xing)于多種電子設備上,包括服務器、PC、智(zhi)(zhi)能(neng)(neng)手(shou)機、平(ping)板電腦、路由器、電視、智(zhi)(zhi)能(neng)(neng)家電等。

可選地,所述集群節點(dian)間(jian)相互發(fa)現(xian)的方法S11可選下列方法步驟之一及組合:

S11a,節點(dian)間通過廣播或多播協議,獲取可連接(jie)的節點(dian)列(lie)表;

S11b,各節(jie)點(dian)(dian)都維護一份集群節(jie)點(dian)(dian)列(lie)表并在節(jie)點(dian)(dian)間同步,用戶(hu)通知節(jie)點(dian)(dian)去連(lian)接(jie)一個(ge)(或(huo)多個(ge))節(jie)點(dian)(dian),成功建(jian)立連(lian)接(jie)的各節(jie)點(dian)(dian)更新(xin)本地集群節(jie)點(dian)(dian)列(lie)表,并同步到所有節(jie)點(dian)(dian);

S11c,各節點(dian)(dian)通(tong)過注冊與查詢中(zhong)間(jian)服務,獲取(qu)節點(dian)(dian)列(lie)表。

可選地,為(wei)了使(shi)得同一(yi)網絡內可建(jian)立(li)(li)多(duo)個分布(bu)式(shi)存(cun)儲集群,互不干擾(rao),節(jie)點(dian)間(jian)建(jian)立(li)(li)連接(jie)時判(pan)斷是否屬(shu)于(yu)同一(yi)集群,屬(shu)于(yu)同一(yi)集群才建(jian)立(li)(li)連接(jie)并協作。所述節(jie)點(dian)所屬(shu)的集群標志由管理員配置。

可(ke)選地,節點(dian)間建立連接時(shi)對(dui)聲明屬于同一(yi)集群的其(qi)它(ta)節點(dian)進行安(an)全(quan)(quan)校(xiao)(xiao)驗(yan),所述用于安(an)全(quan)(quan)校(xiao)(xiao)驗(yan)的秘鑰由管(guan)理員配置(zhi)。

節點(dian)列表需要(yao)包(bao)含(han)節點(dian)唯(wei)一標識和節點(dian)地(di)(di)(di)址信息(xi)。可選地(di)(di)(di),在跨局域網的情況下(xia),節點(dian)地(di)(di)(di)址信息(xi)可有(you)多個(ge)地(di)(di)(di)址,每個(ge)地(di)(di)(di)址包(bao)含(han)網域標識和域內地(di)(di)(di)址。

可選(xuan)地,各節(jie)(jie)點(dian)(dian)維(wei)護的集群(qun)節(jie)(jie)點(dian)(dian)列(lie)表(biao)信息還包括:該(gai)節(jie)(jie)點(dian)(dian)是否在線(xian),若所有在線(xian)節(jie)(jie)點(dian)(dian)都連(lian)接不(bu)上該(gai)節(jie)(jie)點(dian)(dian),該(gai)節(jie)(jie)點(dian)(dian)離(li)線(xian);該(gai)節(jie)(jie)點(dian)(dian)最后在線(xian)時間;若離(li)線(xian)持續很久,可以將該(gai)節(jie)(jie)點(dian)(dian)狀態(tai)設成失效、甚至(zhi)從節(jie)(jie)點(dian)(dian)列(lie)表(biao)移除。

所述節點列表的同步,可選用(yong)背(bei)景技(ji)術中的全量同步或增(zeng)量同步方(fang)案。

所述(shu)節(jie)(jie)(jie)點(dian)(dian)間(jian)的通(tong)(tong)信(xin)是(shi)松(song)散的,一個節(jie)(jie)(jie)點(dian)(dian)在(zai)某些時間(jian)段只能和部分節(jie)(jie)(jie)點(dian)(dian)保持(chi)通(tong)(tong)信(xin),甚至不能和其它(ta)任何節(jie)(jie)(jie)點(dian)(dian)保持(chi)通(tong)(tong)信(xin)。優(you)選地,各(ge)節(jie)(jie)(jie)點(dian)(dian)還維(wei)護本(ben)節(jie)(jie)(jie)點(dian)(dian)能否與(yu)節(jie)(jie)(jie)點(dian)(dian)列表的其它(ta)節(jie)(jie)(jie)點(dian)(dian)直接通(tong)(tong)信(xin)的信(xin)息,本(ben)信(xin)息可(ke)不在(zai)節(jie)(jie)(jie)點(dian)(dian)間(jian)同(tong)步。

當節(jie)(jie)(jie)點(dian)與(yu)目(mu)標(biao)(biao)節(jie)(jie)(jie)點(dian)不能直連時(shi),節(jie)(jie)(jie)點(dian)向(xiang)目(mu)標(biao)(biao)節(jie)(jie)(jie)點(dian)發送數(shu)據(ju)及(ji)節(jie)(jie)(jie)點(dian)從目(mu)標(biao)(biao)節(jie)(jie)(jie)點(dian)獲取數(shu)據(ju)需(xu)要通(tong)過中(zhong)間節(jie)(jie)(jie)點(dian)中(zhong)轉(zhuan),需(xu)要集群有(you)發現中(zhong)轉(zhuan)節(jie)(jie)(jie)點(dian)及(ji)選擇(ze)較優(you)中(zhong)轉(zhuan)節(jie)(jie)(jie)點(dian)的能力。可選地,各節(jie)(jie)(jie)點(dian)維護的集群節(jie)(jie)(jie)點(dian)列(lie)表信(xin)息中(zhong),若(ruo)(ruo)該(gai)(gai)節(jie)(jie)(jie)點(dian)不可直接通(tong)信(xin)則維護一組(zu)到達(da)該(gai)(gai)節(jie)(jie)(jie)點(dian)的中(zhong)轉(zhuan)節(jie)(jie)(jie)點(dian)列(lie)表,若(ruo)(ruo)該(gai)(gai)中(zhong)轉(zhuan)節(jie)(jie)(jie)點(dian)列(lie)表有(you)N個節(jie)(jie)(jie)點(dian),與(yu)目(mu)標(biao)(biao)節(jie)(jie)(jie)點(dian)的通(tong)信(xin)需(xu)要中(zhong)轉(zhuan)N次。

可選地,所述計算(suan)發起節點(dian)到目標節點(dian)的中轉節點(dian)列表方法S12具(ju)體(ti)步驟為:

S120,發起節(jie)點(dian)向(xiang)所有能夠直連(lian)的(de)中間節(jie)點(dian)發起查(cha)詢目(mu)標節(jie)點(dian)路由的(de)請(qing)求(qiu),請(qing)求(qiu)附(fu)帶一(yi)請(qing)求(qiu)編號;

S121,中(zhong)(zhong)間(jian)節(jie)點收到(dao)請(qing)(qing)求(qiu)后,判(pan)斷是否(fou)收到(dao)過發(fa)起節(jie)點的該編號(hao)的查詢(xun)請(qing)(qing)求(qiu),若(ruo)收到(dao)過則忽略不返回,若(ruo)沒收到(dao)過,則判(pan)斷目標節(jie)點是否(fou)可以直連,若(ruo)是則返回與目標節(jie)點通信的平均響(xiang)應時間(jian),否(fou)則中(zhong)(zhong)間(jian)節(jie)點向收到(dao)的查詢(xun)請(qing)(qing)求(qiu)來源節(jie)點之(zhi)外的,能夠直連的其它中(zhong)(zhong)間(jian)節(jie)點轉發(fa)查詢(xun)請(qing)(qing)求(qiu);

S122,中間節(jie)點和發(fa)起節(jie)點,若(ruo)收到返(fan)(fan)回(hui)(hui)則(ze)在收到的(de)每(mei)條(tiao)返(fan)(fan)回(hui)(hui)內容加(jia)上(shang)(shang)與返(fan)(fan)回(hui)(hui)來源節(jie)點通信平均響應時間和該返(fan)(fan)回(hui)(hui)節(jie)點標(biao)識,中間節(jie)點將所有返(fan)(fan)回(hui)(hui)結果以列表形式返(fan)(fan)回(hui)(hui)給上(shang)(shang)一級請(qing)求(qiu)來源節(jie)點;

S123,發起節(jie)點(dian)匯總(zong)所有返(fan)回后,對每條返(fan)回都累計內容中(zhong)的(de)各項通信平(ping)均(jun)響應時間(jian),選(xuan)擇總(zong)響應時間(jian)最短的(de)返(fan)回結果經過的(de)中(zhong)間(jian)節(jie)點(dian)作(zuo)為優(you)選(xuan)的(de)中(zhong)轉(zhuan)節(jie)點(dian)列表。

可(ke)(ke)選地,若(ruo)步(bu)驟(zou)S123中(zhong)(zhong)(zhong)發(fa)起(qi)節點(dian)未收到任(ren)何(he)返(fan)回(hui),則目(mu)標節點(dian)暫時(shi)不可(ke)(ke)連接,可(ke)(ke)以擇機重(zhong)試若(ruo)干次中(zhong)(zhong)(zhong)轉節點(dian)計算步(bu)驟(zou)S12。可(ke)(ke)選地,若(ruo)發(fa)起(qi)節點(dian)與目(mu)標節點(dian)間的通信失敗或中(zhong)(zhong)(zhong)斷(duan),可(ke)(ke)重(zhong)新(xin)(xin)發(fa)起(qi)中(zhong)(zhong)(zhong)轉節點(dian)計算步(bu)驟(zou)S12,并按新(xin)(xin)的中(zhong)(zhong)(zhong)轉方(fang)案(an)進行數據傳輸(shu)。可(ke)(ke)選地,一次計算的結果(guo)受當(dang)前(qian)網絡狀況影(ying)響,可(ke)(ke)重(zhong)試若(ruo)干次S12,綜合多(duo)次結果(guo)來調整中(zhong)(zhong)(zhong)轉列表。

可選地(di),發(fa)起節(jie)點將同一(yi)(yi)數據(ju)發(fa)送(song)給多個目(mu)標(biao)(biao)節(jie)點都通過同一(yi)(yi)中間(jian)(jian)節(jie)點中轉(zhuan)時,只發(fa)送(song)一(yi)(yi)份(fen)數據(ju)給中間(jian)(jian)節(jie)點,中間(jian)(jian)節(jie)點再將數據(ju)分別發(fa)送(song)給多個目(mu)標(biao)(biao)節(jie)點,節(jie)省網絡流量(liang)。

可選地,多個目(mu)(mu)標節(jie)點(dian)向同一(yi)(yi)(yi)源節(jie)點(dian)請求同一(yi)(yi)(yi)數(shu)據且通過同一(yi)(yi)(yi)中(zhong)間節(jie)點(dian)中(zhong)轉時,中(zhong)間節(jie)點(dian)只向源節(jie)點(dian)請求一(yi)(yi)(yi)份數(shu)據,再(zai)將(jiang)數(shu)據分別返回(hui)給多個目(mu)(mu)標節(jie)點(dian),節(jie)省網絡流(liu)量。

現(xian)有個(ge)人云存儲客戶(hu)端(duan)(duan)安裝后需要指定一(yi)個(ge)本(ben)地(di)同步(bu)文(wen)件(jian)夾,若后續(xu)希望將其它(ta)現(xian)有本(ben)地(di)文(wen)件(jian)夾也設(she)置成與(yu)云端(duan)(duan)同步(bu)則(ze)需要將該文(wen)件(jian)夾移動到安裝時指定的那個(ge)文(wen)件(jian)夾,使(shi)用不方(fang)便。

本(ben)發明技術方案中,集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)各(ge)節(jie)(jie)(jie)點通過數據同(tong)步(bu),每個節(jie)(jie)(jie)點都維護一(yi)(yi)份(fen)完整的(de)(de)(de)(de)(de)集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)數據,提供給用(yong)戶(hu)查看與管理。集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)數據包(bao)含集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)的(de)(de)(de)(de)(de)文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)、文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)(jia)信息(xi)(xi),文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)信息(xi)(xi)包(bao)括(kuo)名(ming)稱、類(lei)型(xing)、大小、創建(jian)時(shi)(shi)間(jian)、修改時(shi)(shi)間(jian),文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)(jia)信息(xi)(xi)包(bao)括(kuo)名(ming)稱、創建(jian)時(shi)(shi)間(jian)、文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)(jia)下(xia)子文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)(jia)和文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)列表。初(chu)始狀態(tai)下(xia),集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)只有一(yi)(yi)個根(gen)目(mu)(mu)錄(lu)(lu)(lu)(lu),集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)各(ge)節(jie)(jie)(jie)點接受(shou)用(yong)戶(hu)將(jiang)本(ben)地的(de)(de)(de)(de)(de)文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia)(jia))掛載(zai)到集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu),集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)相應的(de)(de)(de)(de)(de)插入目(mu)(mu)錄(lu)(lu)(lu)(lu)數據,新增的(de)(de)(de)(de)(de)集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia)(jia))標(biao)記與之對應的(de)(de)(de)(de)(de)本(ben)地文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia)(jia)),所述映射關系標(biao)記不在(zai)節(jie)(jie)(jie)點間(jian)同(tong)步(bu),只保存在(zai)本(ben)地。文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia)(jia))的(de)(de)(de)(de)(de)掛載(zai)操作并(bing)不復(fu)制或移動文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)內容(rong),某(mou)一(yi)(yi)節(jie)(jie)(jie)點上集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)加(jia)(jia)入的(de)(de)(de)(de)(de)新數據,會同(tong)步(bu)到其它(ta)節(jie)(jie)(jie)點,用(yong)戶(hu)在(zai)其它(ta)節(jie)(jie)(jie)點查看集(ji)(ji)(ji)群(qun)(qun)(qun)(qun)(qun)目(mu)(mu)錄(lu)(lu)(lu)(lu)時(shi)(shi)也(ye)能(neng)瀏覽到新加(jia)(jia)入的(de)(de)(de)(de)(de)那部分文(wen)(wen)件(jian)(jian)(jian)(jian)(jian)目(mu)(mu)錄(lu)(lu)(lu)(lu),目(mu)(mu)錄(lu)(lu)(lu)(lu)刪除、修改操作也(ye)同(tong)理。

優(you)選地,所述集(ji)(ji)群目錄(lu)數據的同(tong)步(bu),當節點(dian)新加入集(ji)(ji)群時或節點(dian)長時間(jian)離線后(hou)回(hui)歸(gui)集(ji)(ji)群時選用背景(jing)技術中(zhong)的全量同(tong)步(bu)方(fang)案,近期在線情(qing)況下選用背景(jing)技術中(zhong)的增量同(tong)步(bu)方(fang)案。

優選(xuan)地(di)(di),大(da)多數情況(kuang)下,本(ben)(ben)地(di)(di)文(wen)件(jian)(jian)夾(jia)(jia)內部的(de)(de)(de)(de)目(mu)(mu)錄結構(gou)與集(ji)群(qun)目(mu)(mu)錄中對(dui)(dui)應的(de)(de)(de)(de)文(wen)件(jian)(jian)夾(jia)(jia)內的(de)(de)(de)(de)目(mu)(mu)錄結構(gou)通常是一(yi)致的(de)(de)(de)(de),因此當集(ji)群(qun)目(mu)(mu)錄文(wen)件(jian)(jian)(夾(jia)(jia))的(de)(de)(de)(de)對(dui)(dui)應的(de)(de)(de)(de)本(ben)(ben)地(di)(di)文(wen)件(jian)(jian)(夾(jia)(jia))可(ke)以(yi)從(cong)(cong)上(shang)一(yi)層文(wen)件(jian)(jian)夾(jia)(jia)的(de)(de)(de)(de)對(dui)(dui)應關(guan)系推導(dao)得出的(de)(de)(de)(de)情況(kuang)下,只標記該文(wen)件(jian)(jian)(夾(jia)(jia))有對(dui)(dui)應的(de)(de)(de)(de)本(ben)(ben)地(di)(di)文(wen)件(jian)(jian)(夾(jia)(jia)),不標記具(ju)體的(de)(de)(de)(de)路徑,從(cong)(cong)而節(jie)省集(ji)群(qun)目(mu)(mu)錄所需要的(de)(de)(de)(de)存儲空間(jian),減少對(dui)(dui)應關(guan)系變需要更(geng)新的(de)(de)(de)(de)數據量。如集(ji)群(qun)目(mu)(mu)錄/dir1、/dir1/dir2、/dir1/dir2/dir3分別(bie)對(dui)(dui)應本(ben)(ben)地(di)(di)的(de)(de)(de)(de)/mnt/dir1、/mnt/dir1/dir2、/mnt/dir1/dir2/dir3則(ze)可(ke)以(yi)把(ba)對(dui)(dui)應的(de)(de)(de)(de)本(ben)(ben)地(di)(di)目(mu)(mu)錄改成/mnt/dir1、-、-,-代表(biao)存在對(dui)(dui)應的(de)(de)(de)(de)本(ben)(ben)地(di)(di)文(wen)件(jian)(jian)(夾(jia)(jia)),具(ju)體路徑可(ke)以(yi)從(cong)(cong)上(shang)級目(mu)(mu)錄的(de)(de)(de)(de)對(dui)(dui)應的(de)(de)(de)(de)本(ben)(ben)地(di)(di)目(mu)(mu)錄拼接得出。

優選地(di)(di),集(ji)(ji)群(qun)目錄(lu)中(zhong)(zhong)映(ying)射關(guan)系(xi)與(yu)上(shang)一級(ji)目錄(lu)不對(dui)應的(de)文(wen)(wen)件(夾(jia))在(zai)本(ben)(ben)地(di)(di)上(shang)一級(ji)目錄(lu)中(zhong)(zhong)表現為(wei)指向(xiang)對(dui)應本(ben)(ben)地(di)(di)文(wen)(wen)件(夾(jia))的(de)快捷(jie)方式,也稱鏈(lian)接。如集(ji)(ji)群(qun)目錄(lu)/dir1下包含子目錄(lu)/dir1/dir2,dir1對(dui)應本(ben)(ben)地(di)(di)的(de)/mnt/dir1,dir2對(dui)應本(ben)(ben)地(di)(di)的(de)/mnt/dir2,在(zai)本(ben)(ben)地(di)(di)它們不是子文(wen)(wen)件夾(jia)關(guan)系(xi)而是并列(lie)關(guan)系(xi),則節點(dian)在(zai)/mnt/dir1下創(chuang)建(jian)名為(wei)dir2的(de)文(wen)(wen)件夾(jia)快捷(jie)方式,該快捷(jie)方式指向(xiang)/mnt/dir2。

所述集(ji)群目(mu)錄(lu)(lu)維護各文(wen)件(jian)存儲節(jie)(jie)點(dian)(dian)列表,以便獲取文(wen)件(jian)內容及提(ti)供列表信息給用戶(hu)查看。在(zai)節(jie)(jie)點(dian)(dian)上(shang)將本(ben)地目(mu)錄(lu)(lu)掛(gua)載(zai)到集(ji)群目(mu)錄(lu)(lu)之后,新加(jia)入集(ji)群目(mu)錄(lu)(lu)的文(wen)件(jian)存儲節(jie)(jie)點(dian)(dian)列表都(dou)只有該(gai)節(jie)(jie)點(dian)(dian)一項。

優(you)選地,存儲節(jie)點列表項包(bao)含(han)節(jie)點標識之外,還(huan)包(bao)括當前(qian)存儲在該節(jie)點的版本(ben)、文(wen)件大小、最(zui)(zui)后(hou)更新(xin)時間信息。集群目(mu)錄中文(wen)件的信息在多個存儲節(jie)點不(bu)統一時,取(qu)最(zui)(zui)新(xin)版本(ben)文(wen)件的信息。

具體地(di),建立(li)本地(di)目錄與分(fen)布式存儲集群目錄的(de)映射關系的(de)情況包括:

S21,節點(dian)安裝完成后,用戶指定一本地(di)目(mu)錄(lu)(lu)(lu)作(zuo)為(wei)默(mo)認目(mu)錄(lu)(lu)(lu)與(yu)集(ji)群(qun)根目(mu)錄(lu)(lu)(lu)對(dui)應,或節點(dian)創建(jian)一默(mo)認目(mu)錄(lu)(lu)(lu)與(yu)集(ji)群(qun)根目(mu)錄(lu)(lu)(lu)對(dui)應,若本地(di)目(mu)錄(lu)(lu)(lu)包(bao)含(han)數據(ju),則集(ji)群(qun)目(mu)錄(lu)(lu)(lu)相(xiang)應地(di)加(jia)入該本地(di)文件夾(jia)的目(mu)錄(lu)(lu)(lu)信息;

S22,用戶可以將(jiang)本地現(xian)有文(wen)件夾(jia)掛載(zai)到(dao)集(ji)群(qun)目錄(lu)中(zhong)現(xian)有的空(kong)文(wen)件夾(jia)或掛載(zai)時(shi)直接在集(ji)群(qun)目錄(lu)中(zhong)新建(jian)文(wen)件夾(jia),建(jian)立映(ying)射后集(ji)群(qun)目錄(lu)相應地加入該本地文(wen)件夾(jia)的目錄(lu)信息(xi);

S23,用(yong)戶可以將(jiang)本地現有(you)文件(jian)(jian)掛載到集群(qun)目(mu)錄中現有(you)的(de)文件(jian)(jian)夾(jia)或(huo)掛載時(shi)直接在集群(qun)目(mu)錄中新建文件(jian)(jian)夾(jia)。

優選地,節(jie)點(dian)上,存在(zai)映射(she)關系的(de)(de)(de)集(ji)(ji)群(qun)目錄(lu)與本(ben)地目錄(lu)進行(xing)同步(bu),同步(bu)的(de)(de)(de)變更(geng)包括文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)基本(ben)信息的(de)(de)(de)更(geng)新、文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)的(de)(de)(de)刪除(chu)、文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)內部結構變化(hua)。所述(shu)變更(geng)無論用戶在(zai)任意節(jie)點(dian)的(de)(de)(de)集(ji)(ji)群(qun)目錄(lu)管(guan)理(li)界(jie)面操作,還(huan)是(shi)在(zai)本(ben)地文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)管(guan)理(li)器界(jie)面操作。文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)內部結構變化(hua)包括:創(chuang)(chuang)建(jian)文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)、創(chuang)(chuang)建(jian)文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)、刪除(chu)文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)夾(jia)(jia)、文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia))移動(dong)到(dao)集(ji)(ji)群(qun)內目錄(lu)、文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia))移動(dong)到(dao)集(ji)(ji)群(qun)外(wai)目錄(lu)。文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)(夾(jia)(jia))移動(dong)到(dao)集(ji)(ji)群(qun)外(wai)只能(neng)在(zai)本(ben)地文(wen)(wen)(wen)(wen)(wen)件(jian)(jian)(jian)(jian)(jian)管(guan)理(li)器操作,需(xu)要在(zai)集(ji)(ji)群(qun)目錄(lu)移除(chu)相應的(de)(de)(de)節(jie)點(dian)。

所述集群目(mu)(mu)(mu)錄(lu)(lu)與(yu)本(ben)地(di)目(mu)(mu)(mu)錄(lu)(lu)同步過程中(zhong)新增的文件(夾),需要建立集群目(mu)(mu)(mu)錄(lu)(lu)與(yu)本(ben)地(di)目(mu)(mu)(mu)錄(lu)(lu)的映射(she)關系。

以(yi)上(shang)所(suo)述技術方案,實現了在(zai)任意(yi)節(jie)點(dian)(dian)查看整個集(ji)群(qun)的目(mu)錄結構,以(yi)及管理集(ji)群(qun)的目(mu)錄結構,所(suo)有的文(wen)件(jian)內容(rong)依然保(bao)留在(zai)原始節(jie)點(dian)(dian)上(shang),還未涉及節(jie)點(dian)(dian)之間傳輸文(wen)件(jian)內容(rong)以(yi)及冗余與同(tong)步文(wen)件(jian)內容(rong)。

可選地(di),所(suo)述節(jie)點集(ji)群目錄管理界面接收用(yong)(yong)(yong)戶(hu)將文(wen)(wen)件分發到目標(biao)節(jie)點的(de)(de)請(qing)求(qiu),等同于將目標(biao)節(jie)點加入(ru)(ru)文(wen)(wen)件存儲節(jie)點列表的(de)(de)請(qing)求(qiu),若本(ben)節(jie)點不是目標(biao)節(jie)點,轉發該(gai)請(qing)求(qiu)到目標(biao)節(jie)點;目標(biao)節(jie)點收到請(qing)求(qiu)后從(cong)源文(wen)(wen)件節(jie)點復制文(wen)(wen)件到本(ben)地(di),完成后將本(ben)節(jie)點加入(ru)(ru)到文(wen)(wen)件的(de)(de)存儲節(jie)點列表。所(suo)述分發的(de)(de)源文(wen)(wen)件默認(ren)為(wei)各節(jie)點中最新(xin)版本(ben)的(de)(de)文(wen)(wen)件,也(ye)可由用(yong)(yong)(yong)戶(hu)指定某(mou)一節(jie)點上的(de)(de)某(mou)一版本(ben)文(wen)(wen)件。若分發的(de)(de)文(wen)(wen)件的(de)(de)上級目錄在節(jie)點上還沒有(you)對應(ying)本(ben)地(di)目錄,需要對應(ying)地(di)創建本(ben)地(di)目錄。文(wen)(wen)件分發到目標(biao)節(jie)點后,用(yong)(yong)(yong)戶(hu)便能夠在該(gai)節(jie)點查看文(wen)(wen)件內容。

支持文(wen)件(jian)(jian)分發后,文(wen)件(jian)(jian)存儲節(jie)(jie)(jie)(jie)點列(lie)表會存在多(duo)個節(jie)(jie)(jie)(jie)點。可選地,當在集群目(mu)錄(lu)管(guan)理界面刪除一(yi)(yi)個存儲于多(duo)個節(jie)(jie)(jie)(jie)點的(de)文(wen)件(jian)(jian)時(shi),系(xi)統詢問用戶是(shi)刪除某一(yi)(yi)節(jie)(jie)(jie)(jie)點上(shang)的(de)文(wen)件(jian)(jian)還是(shi)刪除所有(you)節(jie)(jie)(jie)(jie)點上(shang)的(de)文(wen)件(jian)(jian)。

可(ke)選地,所述節(jie)點(dian)(dian)集(ji)群目錄管理界面(mian)接收用戶將(jiang)文(wen)件從(cong)其某一存(cun)儲(chu)節(jie)點(dian)(dian)刪除的(de)請(qing)求,等同(tong)于將(jiang)目標節(jie)點(dian)(dian)從(cong)文(wen)件存(cun)儲(chu)節(jie)點(dian)(dian)列表移除的(de)請(qing)求,若(ruo)本(ben)節(jie)點(dian)(dian)不(bu)是目標節(jie)點(dian)(dian),轉發該請(qing)求到目標節(jie)點(dian)(dian);目標節(jie)點(dian)(dian)收到請(qing)求后從(cong)本(ben)地刪除文(wen)件,完成后將(jiang)本(ben)節(jie)點(dian)(dian)從(cong)文(wen)件的(de)存(cun)儲(chu)節(jie)點(dian)(dian)列表移除。

可(ke)選地,用戶可(ke)以在集群目錄管(guan)理(li)界面選擇文件夾批量(liang)設置文件夾內文件的存(cun)儲節點列表。

可選地(di),所述節(jie)(jie)(jie)點(dian)集群目錄管理(li)界面(mian)接受用戶設置(zhi)文(wen)(wen)件的同(tong)(tong)(tong)步(bu)節(jie)(jie)(jie)點(dian)列(lie)(lie)表(biao),同(tong)(tong)(tong)步(bu)源文(wen)(wen)件修改(gai)后(hou),所在節(jie)(jie)(jie)點(dian)將文(wen)(wen)件內容或(huo)其修改(gai)同(tong)(tong)(tong)步(bu)到列(lie)(lie)表(biao)中的其它節(jie)(jie)(jie)點(dian),源文(wen)(wen)件默認為(wei)同(tong)(tong)(tong)步(bu)節(jie)(jie)(jie)點(dian)列(lie)(lie)表(biao)各(ge)節(jie)(jie)(jie)點(dian)中最新版本的文(wen)(wen)件,也可由用戶指定某一(yi)節(jie)(jie)(jie)點(dian)上的文(wen)(wen)件。

若加入同步(bu)節點(dian)列表(biao)的同步(bu)節點(dian)原先并不存儲(chu)該文(wen)件,則文(wen)件同步(bu)到本地(di)后,相應(ying)地(di)將節點(dian)加入到文(wen)件的存儲(chu)節點(dian)列表(biao)。

可選(xuan)地,用(yong)戶可以在(zai)集群目(mu)錄(lu)管(guan)理界面(mian)選(xuan)擇文件夾批量設置文件夾內的文件的同步節點(dian)列表。上(shang)述轉發與同步新(xin)增的文件(夾),需要建(jian)立(li)集群目(mu)錄(lu)與本(ben)地目(mu)錄(lu)的映射關(guan)系(xi)。

當其(qi)它節(jie)點(dian)上最新版文件(jian)還未同步(bu)到本(ben)節(jie)點(dian),用(yong)戶又在本(ben)節(jie)點(dian)修改(gai)了文件(jian)時,文件(jian)同步(bu)存在沖(chong)突,節(jie)點(dian)將(jiang)其(qi)中一份文件(jian)進行重(zhong)命名,并告知用(yong)戶存在沖(chong)突,要(yao)求(qiu)用(yong)戶解(jie)決沖(chong)突,并將(jiang)兩(liang)個(ge)文件(jian)合并為一個(ge)文件(jian)。可選(xuan)地,節(jie)點(dian)發現沖(chong)突時嘗試自(zi)動解(jie)決沖(chong)突。

可(ke)選地,所述分發、同步文(wen)件內(nei)容時,可(ke)應(ying)用數(shu)據源(yuan)節(jie)點間負(fu)載均(jun)衡(heng)、分段并行傳輸、斷點續(xu)傳、分片哈(ha)希找出未修改內(nei)容等(deng)策略提升(sheng)效率(lv)。

本發(fa)明還(huan)提供了一種分布式存儲系統(tong),由若干對等的節點(dian)組成,節點(dian)包括:

節點列表(biao)單元,用于發(fa)現網絡中(zhong)的其它節點,通過節點間(jian)數據同步(bu),維護一份完整的集群節點列表(biao);

集群目(mu)錄單(dan)元,用于在節(jie)點本(ben)地(di)維護并存(cun)儲一份完整的集群目(mu)錄信息(xi),供用戶查看(kan)與管(guan)理(li);

目錄同步單元,用(yong)于(yu)本節點(dian)與(yu)其它(ta)節點(dian)間集(ji)群目錄數據的同步;

集(ji)(ji)群(qun)(qun)目(mu)(mu)錄(lu)(lu)單元,還用于接受用戶將本(ben)(ben)地的文(wen)(wen)件(夾(jia)(jia))掛(gua)載到集(ji)(ji)群(qun)(qun)目(mu)(mu)錄(lu)(lu),集(ji)(ji)群(qun)(qun)目(mu)(mu)錄(lu)(lu)相應的插入目(mu)(mu)錄(lu)(lu)數據,新(xin)增的集(ji)(ji)群(qun)(qun)目(mu)(mu)錄(lu)(lu)文(wen)(wen)件(夾(jia)(jia))標(biao)記與之對應的本(ben)(ben)地文(wen)(wen)件(夾(jia)(jia)),所(suo)述映射關系(xi)標(biao)記不在節點(dian)間同步;

集群目(mu)錄單元,還(huan)用于為集群目(mu)錄各文(wen)件維護(hu)存(cun)儲節點(dian)列表(biao),以便獲取文(wen)件內容及提供列表(biao)信息(xi)給用戶查(cha)看。

優選(xuan)地,節點(dian)還包括:

本地(di)同(tong)步(bu)(bu)單元,用于同(tong)步(bu)(bu)存在映射關系的集群目(mu)錄與本地(di)目(mu)錄,同(tong)步(bu)(bu)的變更包括(kuo)文(wen)件(jian)基本信息的更新、文(wen)件(jian)的刪除、文(wen)件(jian)夾內部(bu)結構變化。

優選地,節點(dian)還包括:

內容同步(bu)單(dan)元(yuan),用于向其它節點請求文(wen)(wen)件(jian)內容及將本地文(wen)(wen)件(jian)發送到指定節點;

集群目(mu)錄單(dan)元(yuan),還用(yong)于接(jie)收用(yong)戶將某一文件(jian)分(fen)發到目(mu)標(biao)(biao)節(jie)(jie)點(dian)(dian)的請(qing)(qing)求(qiu),等同(tong)于將目(mu)標(biao)(biao)節(jie)(jie)點(dian)(dian)加入文件(jian)存儲節(jie)(jie)點(dian)(dian)列表(biao)的請(qing)(qing)求(qiu),若本節(jie)(jie)點(dian)(dian)不是(shi)目(mu)標(biao)(biao)節(jie)(jie)點(dian)(dian),轉發該請(qing)(qing)求(qiu)到目(mu)標(biao)(biao)節(jie)(jie)點(dian)(dian),節(jie)(jie)點(dian)(dian)收到請(qing)(qing)求(qiu)后觸發內(nei)容同(tong)步單(dan)元(yuan)從源文件(jian)節(jie)(jie)點(dian)(dian)復制文件(jian)到本地(di),完(wan)成后將本節(jie)(jie)點(dian)(dian)加入到文件(jian)的存儲節(jie)(jie)點(dian)(dian)列表(biao)。

優選(xuan)地,所(suo)述集群(qun)目錄單元,還用于(yu)接(jie)收用戶將(jiang)(jiang)文(wen)件(jian)從(cong)(cong)其某一存儲(chu)節點(dian)(dian)(dian)刪除的請求(qiu),等同于(yu)將(jiang)(jiang)目標(biao)節點(dian)(dian)(dian)從(cong)(cong)文(wen)件(jian)存儲(chu)節點(dian)(dian)(dian)列表(biao)移除的請求(qiu),若本(ben)節點(dian)(dian)(dian)不是目標(biao)節點(dian)(dian)(dian),轉發該請求(qiu)到(dao)(dao)目標(biao)節點(dian)(dian)(dian);目標(biao)節點(dian)(dian)(dian)收到(dao)(dao)請求(qiu)后從(cong)(cong)本(ben)地刪除文(wen)件(jian),完成(cheng)后將(jiang)(jiang)本(ben)節點(dian)(dian)(dian)從(cong)(cong)文(wen)件(jian)的存儲(chu)節點(dian)(dian)(dian)列表(biao)移除。

優選(xuan)地(di),節點還包括(kuo):

內容(rong)同步單元,用(yong)于將本地文(wen)件內容(rong)或其(qi)修改發送(song)到指定節(jie)點(dian)、向其(qi)它節(jie)點(dian)請求文(wen)件內容(rong)或其(qi)修改;

集群(qun)目錄單元,還用于接受用戶(hu)設置文(wen)件同步節(jie)點(dian)列表(biao),當同步源(yuan)(yuan)(yuan)文(wen)件有更新時,源(yuan)(yuan)(yuan)節(jie)點(dian)觸(chu)發內容(rong)同步單元將源(yuan)(yuan)(yuan)文(wen)件同步到(dao)列表(biao)中的其它節(jie)點(dian)。

優選地,節(jie)點(dian)還包括:

中轉單元,用(yong)于轉發其它節(jie)點間的數據傳輸;

節點(dian)列表(biao)單元,還用于維護節點(dian)間能否直連的(de)狀態,若不能直連,嘗試為這兩個節點(dian)間的(de)數(shu)據傳輸尋找優選的(de)中轉節點(dian)列表(biao)。

應(ying)用本發(fa)明(ming)技(ji)術(shu)方案(an)的分布(bu)式存儲方法(fa)與系統,優點(dian)包括:

集群節點(dian)之(zhi)間是對等的,結構簡單,無中心,不存在單點(dian)故障(zhang),實施成本低,易(yi)于推廣應(ying)用。

系統用戶友好,部署簡單,將現有(you)文件加(jia)入(ru)集群簡單快(kuai)速,支持多(duo)文件夾(jia)映射到集群,解決現有(you)云同步(bu)添加(jia)本地文件夾(jia)困難,設備之間無(wu)法選擇性同步(bu)的問題。

集(ji)群運(yun)行(xing)可靠,不(bu)(bu)對(dui)文件(jian)進行(xing)轉換(huan),即(ji)使(shi)(shi)集(ji)群停用,用戶(hu)的文件(jian)依然(ran)能夠使(shi)(shi)用本(ben)地(di)文件(jian)系(xi)統訪(fang)問,不(bu)(bu)存在丟(diu)失數據(ju)的風險,即(ji)使(shi)(shi)集(ji)群發生(sheng)紊亂,也(ye)可以拋棄(qi)現有集(ji)群,根(gen)據(ju)各終(zhong)端本(ben)地(di)文件(jian)快速構建一個新的、健康的集(ji)群。

系統用戶透明(ming)度高(gao),能夠知道(dao)每個(ge)文件存儲的(de)位置,在哪幾個(ge)節點上冗余,并且可以根據用戶的(de)意愿進(jin)行配(pei)置。

集群使用(yong)方便,可(ke)使用(yong)本地(di)現有的文(wen)件管理(li)(li)器進行可(ke)視化(hua)圖形操作,集群管理(li)(li)界面也支持可(ke)視化(hua)圖形操作,面向(xiang)廣大(da)公眾,學習成本低。

系統(tong)(tong)用途(tu)較廣,可以作為(wei)(wei)個人眾多設(she)(she)備之(zhi)間數(shu)據管理與同步(bu)工具(ju),可作為(wei)(wei)企業內部共享文件(jian)(jian)系統(tong)(tong),可作為(wei)(wei)遠程查看(kan)企業或(huo)家庭(ting)文件(jian)(jian)的(de)工具(ju),可作為(wei)(wei)遠程備份數(shu)據容災工具(ju),可作為(wei)(wei)軟件(jian)(jian)系統(tong)(tong)的(de)底層存儲,可作為(wei)(wei)程序設(she)(she)計(ji)、工程設(she)(she)計(ji)、藝(yi)術設(she)(she)計(ji)源文件(jian)(jian)版本控制系統(tong)(tong)。

系統(tong)適應性強,可以支持(chi)資(zi)源(yuan)有限的移(yi)動設(she)備(bei)、嵌入式設(she)備(bei),不要求設(she)備(bei)處于同一(yi)網段、不要求設(she)備(bei)一(yi)直(zhi)相互(hu)連接(jie)。

系統(tong)不(bu)依賴于服務(wu)器(qi),可部(bu)署成私(si)有云(yun),數據(ju)完(wan)全在用戶(hu)的掌握范圍內(nei),無需擔心數據(ju)被截(jie)取或利用,安全性高。

系統具有(you)網(wang)絡穿透和智能路由能力(li),網(wang)絡配置(zhi)簡單(dan),設備間(jian)共(gong)享、同步數據方便(bian)。

附圖說明

圖1是本(ben)發明(ming)一實施例的節點(dian)網絡拓撲圖。

圖2是圖1中節(jie)點1維護的節(jie)點列表(biao)內容實施例。

圖3是本發明(ming)一實施例部署(shu)前兩(liang)個(ge)節點設備的本地目(mu)錄結構(gou)。

圖4是本發明一(yi)實施(shi)例安裝(zhuang)后兩個(ge)節點的(de)集(ji)群目錄和本地目錄結構。

圖5是本(ben)發明一實施例掛(gua)載目(mu)(mu)錄(lu)后兩(liang)個節點的集群(qun)目(mu)(mu)錄(lu)和(he)本(ben)地目(mu)(mu)錄(lu)結構。

圖6是本發明一實施例編輯集群目錄(lu)后兩個(ge)節(jie)點的集群目錄(lu)和(he)本地(di)目錄(lu)結構。

圖(tu)7是本發(fa)明一實施例的集群目錄管理界面。

圖8是本發(fa)明(ming)一(yi)實(shi)施(shi)例執行分發(fa)與設置同步后兩個節點的集群(qun)目錄(lu)和本地目錄(lu)結構(gou)。

圖(tu)9是本(ben)發明一(yi)實施例的節點模塊圖(tu)。

圖10示出了本發明一實施例的系統部署圖。

圖(tu)11示出了本發明(ming)一實(shi)施例的系統部署(shu)圖(tu)。

具體實施方式

為了使本發(fa)明(ming)的目的、技術方案及(ji)優點(dian)更加清楚明(ming)白(bai),以下結合(he)附圖及(ji)實施(shi)例,對本發(fa)明(ming)進行進一步詳(xiang)細說(shuo)明(ming)。

如圖1所示,集群cluster有(you)7個(ge)節(jie)點(dian)(dian)(dian)(dian),節(jie)點(dian)(dian)(dian)(dian)1-4屬于(yu)(yu)局域網local1,節(jie)點(dian)(dian)(dian)(dian)5-7屬于(yu)(yu)局域網local2,節(jie)點(dian)(dian)(dian)(dian)3和(he)節(jie)點(dian)(dian)(dian)(dian)6還分配有(you)互聯網ip與端口(kou)(kou),能(neng)夠接收所有(you)節(jie)點(dian)(dian)(dian)(dian)的(de)請求,該外網端口(kou)(kou)通(tong)常是通(tong)過(guo)(guo)網關做端口(kou)(kou)映射實現的(de)。其中節(jie)點(dian)(dian)(dian)(dian)7由于(yu)(yu)某種原因和(he)節(jie)點(dian)(dian)(dian)(dian)5、6都(dou)失去連(lian)接,可能(neng)是因為網線松動或者(zhe)設備關機,從而沒有(you)節(jie)點(dian)(dian)(dian)(dian)能(neng)夠連(lian)接上節(jie)點(dian)(dian)(dian)(dian)7,節(jie)點(dian)(dian)(dian)(dian)7相(xiang)對于(yu)(yu)集群處于(yu)(yu)離(li)線狀態。當節(jie)點(dian)(dian)(dian)(dian)7離(li)線很久,例如超過(guo)(guo)一天(tian),集群可以將(jiang)節(jie)點(dian)(dian)(dian)(dian)7標記為失效(xiao)狀態。

局域網內(nei)節(jie)(jie)點(dian)(dian)(dian)(dian)之(zhi)間發現(xian)可以通過UDP廣播(bo)或多播(bo)實現(xian),而對(dui)于(yu)圖1所示結構(gou)的(de)集(ji)群,需(xu)要管(guan)理(li)員(yuan)作一些配置,告知(zhi)每個節(jie)(jie)點(dian)(dian)(dian)(dian)它可以連(lian)接(jie)的(de)節(jie)(jie)點(dian)(dian)(dian)(dian),當互(hu)(hu)聯的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)之(zhi)間能夠(gou)同步節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)時,管(guan)理(li)員(yuan)的(de)配置工作量會大(da)幅(fu)減少。假(jia)設7各節(jie)(jie)點(dian)(dian)(dian)(dian)一開始都不知(zhi)道對(dui)方的(de)存在,各節(jie)(jie)點(dian)(dian)(dian)(dian)的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)中只有(you)自己,管(guan)理(li)員(yuan)向節(jie)(jie)點(dian)(dian)(dian)(dian)1提供節(jie)(jie)點(dian)(dian)(dian)(dian)2的(de)地址后(hou)(hou),節(jie)(jie)點(dian)(dian)(dian)(dian)1嘗試連(lian)接(jie)節(jie)(jie)點(dian)(dian)(dian)(dian)2,連(lian)接(jie)成(cheng)功,且節(jie)(jie)點(dian)(dian)(dian)(dian)2聲明(ming)自己屬于(yu)集(ji)群cluster,且節(jie)(jie)點(dian)(dian)(dian)(dian)間互(hu)(hu)相(xiang)完成(cheng)秘(mi)(mi)鑰校(xiao)驗,秘(mi)(mi)鑰由(you)管(guan)理(li)員(yuan)事前在節(jie)(jie)點(dian)(dian)(dian)(dian)配置好,此時節(jie)(jie)點(dian)(dian)(dian)(dian)1和2的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)都包(bao)含兩項(xiang)(xiang)。同理(li),管(guan)理(li)員(yuan)向節(jie)(jie)點(dian)(dian)(dian)(dian)2提供節(jie)(jie)點(dian)(dian)(dian)(dian)3的(de)地址,他(ta)們建立(li)連(lian)接(jie)后(hou)(hou),節(jie)(jie)點(dian)(dian)(dian)(dian)2的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)有(you)三(san)項(xiang)(xiang),節(jie)(jie)點(dian)(dian)(dian)(dian)1、3的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)有(you)兩項(xiang)(xiang),三(san)個節(jie)(jie)點(dian)(dian)(dian)(dian)間數據同步之(zhi)后(hou)(hou),節(jie)(jie)點(dian)(dian)(dian)(dian)1、2、3的(de)節(jie)(jie)點(dian)(dian)(dian)(dian)列(lie)(lie)表(biao)都有(you)三(san)項(xiang)(xiang)。

在(zai)跨局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)的(de)部(bu)署模式下(xia),一個節(jie)(jie)點(dian)(dian)(dian)的(de)地(di)址不能僅僅包(bao)含ip地(di)址,因為ip地(di)址可能重復(fu),還(huan)需(xu)要包(bao)含網(wang)(wang)(wang)絡域(yu)(yu)的(de)標識(shi),節(jie)(jie)點(dian)(dian)(dian)只與(yu)本局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)的(de)節(jie)(jie)點(dian)(dian)(dian)、公(gong)網(wang)(wang)(wang)節(jie)(jie)點(dian)(dian)(dian)嘗(chang)試建立連接。跨局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)通(tong)信(xin)可通(tong)過建立公(gong)網(wang)(wang)(wang)鏈路來實(shi)現,如圖1所(suo)示,管理員需(xu)要為節(jie)(jie)點(dian)(dian)(dian)3、6分配公(gong)網(wang)(wang)(wang)IP,若該(gai)IP是網(wang)(wang)(wang)關IP,還(huan)需(xu)要將節(jie)(jie)點(dian)(dian)(dian)分布(bu)式存儲通(tong)信(xin)需(xu)要的(de)端口映射(she)到網(wang)(wang)(wang)關,這樣節(jie)(jie)點(dian)(dian)(dian)3、6便擁有(you)內網(wang)(wang)(wang)、公(gong)網(wang)(wang)(wang)兩個IP,若7個節(jie)(jie)點(dian)(dian)(dian)都(dou)能訪(fang)問外網(wang)(wang)(wang),則(ze)所(suo)有(you)節(jie)(jie)點(dian)(dian)(dian)都(dou)能與(yu)節(jie)(jie)點(dian)(dian)(dian)3、6發起連接。當局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)鏈路能連接時(shi),優選局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)通(tong)信(xin),所(suo)以節(jie)(jie)點(dian)(dian)(dian)1、2、4與(yu)節(jie)(jie)點(dian)(dian)(dian)3的(de)通(tong)信(xin)還(huan)是通(tong)過內網(wang)(wang)(wang)IP在(zai)局(ju)(ju)域(yu)(yu)網(wang)(wang)(wang)完成。圖2表格中節(jie)(jie)點(dian)(dian)(dian)地(di)址列示出了節(jie)(jie)點(dian)(dian)(dian)地(di)址表示的(de)一種實(shi)施(shi)例。

為輔(fu)助通信和跟(gen)蹤集群狀態(tai),節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)列表需(xu)(xu)要(yao)(yao)(yao)維護(hu)(hu)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)是否(fou)(fou)在線(xian)、最后在線(xian)時(shi)間(jian)、是否(fou)(fou)失效(xiao)等信息,圖2示出(chu)了節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)1維護(hu)(hu)的(de)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)列表的(de)實施例。節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)還(huan)需(xu)(xu)要(yao)(yao)(yao)維護(hu)(hu)目前與列表其它(ta)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)能否(fou)(fou)直(zhi)接通信的(de)狀態(tai),這一狀態(tai)用(yong)于(yu)暫停或恢復數據同步,提示用(yong)戶暫時(shi)無法完成某(mou)一操作等。對圖1所示的(de)部(bu)署結構,還(huan)需(xu)(xu)要(yao)(yao)(yao)維護(hu)(hu)不(bu)能直(zhi)連節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)間(jian)的(de)中(zhong)(zhong)(zhong)轉(zhuan)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)列表,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)1向(xiang)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)5發起(qi)(qi)請(qing)求需(xu)(xu)要(yao)(yao)(yao)通過節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)6中(zhong)(zhong)(zhong)轉(zhuan),節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)5向(xiang)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)1發起(qi)(qi)請(qing)求需(xu)(xu)要(yao)(yao)(yao)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)3中(zhong)(zhong)(zhong)轉(zhuan)。若圖1中(zhong)(zhong)(zhong)局(ju)域網(wang)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)無法訪問外網(wang),則節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)1和5之(zhi)間(jian)的(de)通信需(xu)(xu)要(yao)(yao)(yao)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)3、6兩(liang)次中(zhong)(zhong)(zhong)轉(zhuan)。

本(ben)發(fa)明(ming)方案(an)提(ti)供一種中轉(zhuan)(zhuan)節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)計算(suan)方案(an),以圖1的(de)(de)部署結(jie)(jie)構(gou)為(wei)例,假設(she)內網平(ping)均(jun)(jun)響(xiang)應(ying)時(shi)(shi)(shi)間(jian)10ms,公網平(ping)均(jun)(jun)響(xiang)應(ying)時(shi)(shi)(shi)間(jian)100ms,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)1尋找通往節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)5的(de)(de)中轉(zhuan)(zhuan)列(lie)表的(de)(de)計算(suan)步驟具體為(wei):節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)1發(fa)起(qi)查詢請(qing)(qing)求(qiu),發(fa)給節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)2、3、4、6,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)2收到后判(pan)斷(duan)不能(neng)和(he)5直連,轉(zhuan)(zhuan)發(fa)請(qing)(qing)求(qiu)給節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)3、4、6,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)3、4、6判(pan)斷(duan)收到過該編號的(de)(de)請(qing)(qing)求(qiu),不返(fan)(fan)(fan)回。與節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)2同(tong)理,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)3、4也沒有返(fan)(fan)(fan)回結(jie)(jie)果(guo)。節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)6收到請(qing)(qing)求(qiu)后判(pan)斷(duan)可以和(he)5直連,返(fan)(fan)(fan)回節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)6和(he)5之(zhi)間(jian)通信的(de)(de)平(ping)均(jun)(jun)響(xiang)應(ying)時(shi)(shi)(shi)間(jian),即(ji)返(fan)(fan)(fan)回一條(tiao)10ms給節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)1,節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)一收到返(fan)(fan)(fan)回后加(jia)上返(fan)(fan)(fan)回來源節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)6和(he)與節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)6通信的(de)(de)平(ping)均(jun)(jun)響(xiang)應(ying)時(shi)(shi)(shi)間(jian),此時(shi)(shi)(shi)返(fan)(fan)(fan)回結(jie)(jie)果(guo)變成(cheng)100ms-node6-10ms,由于(yu)請(qing)(qing)求(qiu)是(shi)由節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)1自己(ji)發(fa)起(qi)的(de)(de),返(fan)(fan)(fan)回終(zhong)(zhong)止,最(zui)終(zhong)(zhong)只有一個可選鏈(lian)路,經(jing)過節(jie)(jie)(jie)(jie)(jie)點(dian)(dian)(dian)(dian)(dian)6中轉(zhuan)(zhuan),平(ping)均(jun)(jun)響(xiang)應(ying)總時(shi)(shi)(shi)間(jian)110ms。

圖3示(shi)出了兩(liang)個(ge)設備,臺(tai)式(shi)機D和手(shou)機P,在(zai)部(bu)署本發(fa)明實施例的(de)(de)(de)分布(bu)式(shi)存儲系統之前(qian)的(de)(de)(de)本地目(mu)錄(lu)(lu)結構。在(zai)安裝本發(fa)明實施例的(de)(de)(de)分布(bu)式(shi)存儲系統節點時,臺(tai)式(shi)機在(zai)本地E盤下創建(jian)名為“云存儲”的(de)(de)(de)新(xin)文件夾作為默認目(mu)錄(lu)(lu),即集群(qun)根目(mu)錄(lu)(lu)對應的(de)(de)(de)本地目(mu)錄(lu)(lu)。同理(li)手(shou)機在(zai)SD卡上創建(jian)名為“云存儲”的(de)(de)(de)新(xin)文件夾作為默認目(mu)錄(lu)(lu)。假設集群(qun)只有這兩(liang)個(ge)節點,則現在(zai)集群(qun)目(mu)錄(lu)(lu)只有一個(ge)空的(de)(de)(de)根目(mu)錄(lu)(lu),如(ru)圖4所示(shi)。

用戶在(zai)(zai)臺(tai)式機D將本(ben)地(di)目(mu)(mu)(mu)(mu)錄(lu)“E盤(pan)/文(wen)案”掛載(zai)到集(ji)(ji)群(qun)目(mu)(mu)(mu)(mu)錄(lu)“根目(mu)(mu)(mu)(mu)錄(lu)/工作(zuo)”后,在(zai)(zai)集(ji)(ji)群(qun)目(mu)(mu)(mu)(mu)錄(lu)創(chuang)建(jian)“根目(mu)(mu)(mu)(mu)錄(lu)/工作(zuo)”這一掛載(zai)目(mu)(mu)(mu)(mu)錄(lu)之外,同(tong)時在(zai)(zai)集(ji)(ji)群(qun)目(mu)(mu)(mu)(mu)錄(lu)創(chuang)建(jian)與(yu)“E盤(pan)/文(wen)案”內部(bu)的(de)(de)文(wen)件(jian)與(yu)文(wen)件(jian)夾對應的(de)(de)子目(mu)(mu)(mu)(mu)錄(lu)項(xiang)(xiang),并標(biao)記這些(xie)新插(cha)入(ru)的(de)(de)目(mu)(mu)(mu)(mu)錄(lu)項(xiang)(xiang)對應的(de)(de)本(ben)地(di)文(wen)件(jian)與(yu)文(wen)件(jian)夾、新插(cha)入(ru)的(de)(de)文(wen)件(jian)目(mu)(mu)(mu)(mu)錄(lu)項(xiang)(xiang)的(de)(de)存儲列表設為本(ben)機D。同(tong)理,用戶在(zai)(zai)手機P將“SD卡/娛樂”掛載(zai)到集(ji)(ji)群(qun)目(mu)(mu)(mu)(mu)錄(lu)“根目(mu)(mu)(mu)(mu)錄(lu)/生(sheng)活(huo)”也執(zhi)行(xing)相應的(de)(de)操(cao)作(zuo)。兩個節點的(de)(de)集(ji)(ji)群(qun)目(mu)(mu)(mu)(mu)錄(lu)樹、目(mu)(mu)(mu)(mu)錄(lu)項(xiang)(xiang)存儲列表完成同(tong)步后如圖5表格所示。

優選地,執(zhi)行上述(shu)掛載操作后,在(zai)臺式(shi)機(ji)(ji)D本地默認目(mu)錄(lu)(lu)“E盤/云存儲”下創(chuang)建名(ming)為“工作”、指向“E盤/文(wen)案”的文(wen)件(jian)夾快捷方(fang)式(shi)。在(zai)手機(ji)(ji)P本地默認目(mu)錄(lu)(lu)“SD卡/云存儲”下創(chuang)建名(ming)為“生活(huo)”、指向“SD卡/娛樂”的文(wen)件(jian)夾鏈接。

各節點的集群目(mu)(mu)錄(lu)(lu)(lu)提(ti)供查看與操作(zuo)界面(mian),類(lei)似(si)現有操作(zuo)系統(tong)的文(wen)件管理(li)器(qi)。各節點的本(ben)(ben)地(di)(di)目(mu)(mu)錄(lu)(lu)(lu)已(yi)經由操作(zuo)系統(tong)提(ti)供文(wen)件管理(li)器(qi),供用戶(hu)管理(li)文(wen)件,本(ben)(ben)地(di)(di)目(mu)(mu)錄(lu)(lu)(lu)還接受來自(zi)應(ying)用程序對文(wen)件目(mu)(mu)錄(lu)(lu)(lu)的操作(zuo),當集群目(mu)(mu)錄(lu)(lu)(lu)與本(ben)(ben)地(di)(di)目(mu)(mu)錄(lu)(lu)(lu)建立映射時,本(ben)(ben)地(di)(di)目(mu)(mu)錄(lu)(lu)(lu)和集群目(mu)(mu)錄(lu)(lu)(lu)的操作(zuo)需要進行同(tong)步(bu)。

如圖6所示,在臺式機(ji)(ji)P上(shang),用(yong)(yong)戶使用(yong)(yong)集(ji)(ji)群目(mu)錄(lu)(lu)管理器在集(ji)(ji)群目(mu)錄(lu)(lu)“根(gen)(gen)目(mu)錄(lu)(lu)/工(gong)作/專(zhuan)(zhuan)利(li)”下創建了子目(mu)錄(lu)(lu)“發(fa)明(ming)”,節點(dian)除了將(jiang)該(gai)(gai)改變同步到其它節點(dian)外,因為(wei)“根(gen)(gen)目(mu)錄(lu)(lu)/工(gong)作/專(zhuan)(zhuan)利(li)”存(cun)在對(dui)應(ying)的(de)(de)本地文件夾“E盤(pan)/文案(an)/專(zhuan)(zhuan)利(li)/”,節點(dian)會在“E盤(pan)/文案(an)/專(zhuan)(zhuan)利(li)/”下創建新(xin)文件夾“發(fa)明(ming)”。同理,在手機(ji)(ji)P上(shang),用(yong)(yong)戶將(jiang)“照片(pian).jpg”從不存(cun)在和集(ji)(ji)群目(mu)錄(lu)(lu)對(dui)應(ying)的(de)(de)地方移動到“SD卡(ka)/娛樂”,或者通(tong)過相機(ji)(ji)拍照在“SD卡(ka)/娛樂”下創建了“照片(pian).jpg”,由于該(gai)(gai)文件夾與集(ji)(ji)群目(mu)錄(lu)(lu)“根(gen)(gen)目(mu)錄(lu)(lu)/生(sheng)活(huo)”存(cun)在映射(she)關系,節點(dian)在集(ji)(ji)群的(de)(de)該(gai)(gai)目(mu)錄(lu)(lu)下也創建該(gai)(gai)文件的(de)(de)目(mu)錄(lu)(lu)項(xiang),該(gai)(gai)項(xiang)的(de)(de)存(cun)儲列表為(wei)P,并(bing)將(jiang)集(ji)(ji)群目(mu)錄(lu)(lu)的(de)(de)變更同步到其它節點(dian)。

圖(tu)7示出了(le)一種集群目(mu)錄(lu)管理(li)界面,與常見的(de)(de)操(cao)作系統本(ben)地(di)(di)(di)文件(jian)管理(li)器類(lei)似,包(bao)含(han)地(di)(di)(di)址欄(lan)1,詳細模式表(biao)(biao)頭2,排序按鈕3,目(mu)錄(lu)內容列表(biao)(biao)4,選中(zhong)對象屬性欄(lan)5。屬性欄(lan)包(bao)含(han)文件(jian)大(da)小、更新(xin)時間、文件(jian)類(lei)型等基本(ben)信息(xi)。特(te)別(bie)地(di)(di)(di),本(ben)實施還(huan)在屬性欄(lan)顯示文件(jian)的(de)(de)存儲(chu)節(jie)點列表(biao)(biao)6、文件(jian)的(de)(de)同步(bu)列表(biao)(biao),以(yi)及(ji)編(bian)輯這兩個列表(biao)(biao)的(de)(de)按鈕7。所(suo)述編(bian)輯按鈕也可以(yi)設置在文件(jian)、文件(jian)夾的(de)(de)彈(dan)出菜單中(zhong)。

如圖7所示(shi),用戶在集群目錄管理(li)界(jie)面選中文(wen)(wen)件(jian)(jian)“周計(ji)劃.txt”后,屬性(xing)欄顯示(shi)該(gai)文(wen)(wen)件(jian)(jian)只存(cun)儲(chu)于“臺(tai)式機”,用戶點(dian)(dian)擊存(cun)儲(chu)列(lie)(lie)表(biao)后面的(de)(de)(de)編(bian)輯(ji)按鈕后,彈出(chu)存(cun)儲(chu)列(lie)(lie)表(biao)編(bian)輯(ji)框(kuang)8。編(bian)輯(ji)框(kuang)列(lie)(lie)出(chu)集群現有在線(xian)節點(dian)(dian)列(lie)(lie)表(biao),已經存(cun)儲(chu)該(gai)文(wen)(wen)件(jian)(jian)的(de)(de)(de)節點(dian)(dian)后附(fu)帶“-”號(hao)(hao),不存(cun)儲(chu)該(gai)文(wen)(wen)件(jian)(jian)的(de)(de)(de)節點(dian)(dian)后附(fu)帶“+”號(hao)(hao)。若點(dian)(dian)擊編(bian)輯(ji)框(kuang)“臺(tai)式機”后面的(de)(de)(de)“-”號(hao)(hao),代(dai)表(biao)著將該(gai)文(wen)(wen)件(jian)(jian)從臺(tai)式機節點(dian)(dian)刪除(chu),執(zhi)行后文(wen)(wen)件(jian)(jian)存(cun)儲(chu)列(lie)(lie)表(biao)為空,該(gai)文(wen)(wen)件(jian)(jian)也從集群目錄刪除(chu)。若點(dian)(dian)擊編(bian)輯(ji)框(kuang)“手(shou)機”后面的(de)(de)(de)“+”號(hao)(hao),代(dai)表(biao)將該(gai)文(wen)(wen)件(jian)(jian)從臺(tai)式機節點(dian)(dian)分發(fa)到手(shou)機節點(dian)(dian),分發(fa)完成后,文(wen)(wen)件(jian)(jian)存(cun)儲(chu)列(lie)(lie)表(biao)包含這(zhe)兩個節點(dian)(dian)。

如圖7所示,同(tong)步(bu)列表(biao)(biao)的(de)顯示與編(bian)輯與存儲(chu)列表(biao)(biao)類(lei)似(si),同(tong)步(bu)列表(biao)(biao)至少需要包含兩個(ge)節(jie)(jie)(jie)點(dian)(dian)(dian),且至少有一個(ge)節(jie)(jie)(jie)點(dian)(dian)(dian)上(shang)已經存儲(chu)有該(gai)(gai)文(wen)(wen)件(jian)(jian)。將(jiang)一個(ge)不(bu)存儲(chu)該(gai)(gai)文(wen)(wen)件(jian)(jian)的(de)節(jie)(jie)(jie)點(dian)(dian)(dian)加(jia)入到同(tong)步(bu)列表(biao)(biao),先執(zhi)行將(jiang)該(gai)(gai)文(wen)(wen)件(jian)(jian)分發到該(gai)(gai)節(jie)(jie)(jie)點(dian)(dian)(dian),文(wen)(wen)件(jian)(jian)的(de)存儲(chu)列表(biao)(biao)也會增加(jia)該(gai)(gai)節(jie)(jie)(jie)點(dian)(dian)(dian)。將(jiang)一個(ge)節(jie)(jie)(jie)點(dian)(dian)(dian)移出同(tong)步(bu)列表(biao)(biao),并不(bu)將(jiang)該(gai)(gai)文(wen)(wen)件(jian)(jian)從該(gai)(gai)節(jie)(jie)(jie)點(dian)(dian)(dian)刪(shan)(shan)除。將(jiang)文(wen)(wen)件(jian)(jian)從節(jie)(jie)(jie)點(dian)(dian)(dian)刪(shan)(shan)除同(tong)時也會將(jiang)節(jie)(jie)(jie)點(dian)(dian)(dian)從文(wen)(wen)件(jian)(jian)同(tong)步(bu)節(jie)(jie)(jie)點(dian)(dian)(dian)列表(biao)(biao)刪(shan)(shan)除。

如圖8所示,將“周計劃.txt”從(cong)臺式(shi)(shi)機(ji)(ji)D分發到(dao)手機(ji)(ji)P時(shi),手機(ji)(ji)P節點首先在(zai)本(ben)(ben)地默(mo)認(ren)目錄(lu)“SD卡/云存儲”創建“工作(zuo)”目錄(lu),再(zai)將“周計劃.txt”從(cong)臺式(shi)(shi)機(ji)(ji)復制一份到(dao)本(ben)(ben)地新建的(de)“工作(zuo)”目錄(lu)下。將“照片(pian).jpg”設置成在(zai)兩(liang)個節點間(jian)同(tong)(tong)步(bu)(bu)也(ye)類似(si),同(tong)(tong)步(bu)(bu)在(zai)分發的(de)基礎(chu)上(shang),進一步(bu)(bu)地,在(zai)同(tong)(tong)步(bu)(bu)列表節點上(shang)的(de)文(wen)(wen)件(jian)內容改變時(shi),同(tong)(tong)步(bu)(bu)到(dao)其它節點。默(mo)認(ren)情況下同(tong)(tong)步(bu)(bu)的(de)源文(wen)(wen)件(jian)為最新版(ban)本(ben)(ben)文(wen)(wen)件(jian),即無(wu)論在(zai)臺式(shi)(shi)機(ji)(ji)還是在(zai)手機(ji)(ji)上(shang)修改“照片(pian).jpg”內容,都會同(tong)(tong)步(bu)(bu)到(dao)另一方。

圖(tu)9示出了本發明(ming)實施例的節點模塊圖(tu),集群(qun)各節點包含(han):節點列(lie)表(biao)單(dan)元(yuan)1,集群(qun)目(mu)(mu)錄(lu)單(dan)元(yuan)2,目(mu)(mu)錄(lu)同(tong)步單(dan)元(yuan)3,本地同(tong)步單(dan)元(yuan)4,內容同(tong)步單(dan)元(yuan)5,中轉單(dan)元(yuan)6。

圖10示出了本發明一種實施方式(shi)的系統部署圖,該部署適用于企(qi)業(ye)內部將(jiang)眾多臺式(shi)機(ji)搭建成分布式(shi)存(cun)儲系統,實現大容(rong)量存(cun)儲與數(shu)據共享,還(huan)能將(jiang)企(qi)業(ye)數(shu)據備份到遠程(cheng)服務(wu)器實現云(yun)存(cun)儲與遠程(cheng)容(rong)災,還(huan)能夠支持(chi)員工在(zai)家庭訪問企(qi)業(ye)數(shu)據、通過手機(ji)移動辦公。

圖11示出(chu)了本發(fa)(fa)明一種實(shi)施方式(shi)的系統部署圖,該部署適(shi)用于個人與(yu)家庭用戶在眾(zhong)多個人設(she)(she)備(bei)間(jian)構件分布式(shi)存儲(chu),發(fa)(fa)揮PC容量大、移動設(she)(she)備(bei)便攜等設(she)(she)備(bei)各自(zi)的優勢,將數(shu)據傳輸、備(bei)份、管理變(bian)得簡單,還能在家庭網絡(luo)之外實(shi)現對家庭數(shu)據的訪問。

以(yi)上所述(shu)僅為本發明(ming)的(de)實(shi)施例(li)而已(yi),并(bing)不用以(yi)限制本發明(ming),凡(fan)在本發明(ming)的(de)精神(shen)和原則之內所作的(de)任何修改(gai)、等同替換(huan)和改(gai)進(jin)等,均應包含在本發明(ming)的(de)保護范(fan)圍(wei)之內。

當前第1頁1 2 3 
網友詢(xun)問留言 已有0條留言
  • 還沒有人留言評論。精彩留言會獲得點贊!
1