本發明(ming)涉(she)及信息(xi)處理技術領域,尤(you)其涉(she)及一(yi)種跨數據(ju)中(zhong)心的(de)數據(ju)計(ji)算方法及系統。
背景技術:
云存儲系統需要(yao)記錄某個(ge)時(shi)間(jian)(jian)點(dian)上每個(ge)用(yong)(yong)(yong)戶(hu)(hu)的實(shi)際使用(yong)(yong)(yong)容(rong)量(liang)和配額(e)容(rong)量(liang),對用(yong)(yong)(yong)戶(hu)(hu)的存儲空間(jian)(jian)的配額(e)進行檢查,保證使用(yong)(yong)(yong)容(rong)量(liang)達到配額(e)后(hou)不(bu)能繼續占(zhan)用(yong)(yong)(yong)更多存儲空間(jian)(jian)。如當已(yi)使用(yong)(yong)(yong)空間(jian)(jian)超過配額(e)容(rong)量(liang)時(shi),系統應(ying)(ying)該禁止(zhi)用(yong)(yong)(yong)戶(hu)(hu)執行創建(jian)(jian)操作。當用(yong)(yong)(yong)戶(hu)(hu)刪(shan)除部分內(nei)容(rong)后(hou),使用(yong)(yong)(yong)空間(jian)(jian)小(xiao)于配額(e)容(rong)量(liang)時(shi),系統應(ying)(ying)該恢復(fu)用(yong)(yong)(yong)戶(hu)(hu)執行創建(jian)(jian)操作。
而云(yun)(yun)(yun)存儲(chu)(chu)系(xi)統(tong)分布在(zai)多個數據中(zhong)心(xin)中(zhong),同一用(yong)戶的(de)(de)(de)不同請求經過不同的(de)(de)(de)接(jie)入(ru)節(jie)點連(lian)入(ru)云(yun)(yun)(yun)存儲(chu)(chu)系(xi)統(tong)。在(zai)付費的(de)(de)(de)云(yun)(yun)(yun)存儲(chu)(chu)系(xi)統(tong)中(zhong),需(xu)要統(tong)計(ji)每一用(yong)戶的(de)(de)(de)操(cao)作記(ji)(ji)錄,根(gen)據操(cao)作記(ji)(ji)錄進行收費。在(zai)現(xian)有技術中(zhong)在(zai)進行操(cao)作記(ji)(ji)錄的(de)(de)(de)統(tong)計(ji)時,采用(yong)集中(zhong)的(de)(de)(de)單點設(she)備(bei)實時進行統(tong)計(ji),這種方式的(de)(de)(de)問題在(zai)于會因為(wei)單點設(she)備(bei)的(de)(de)(de)設(she)備(bei)能力導(dao)致(zhi)統(tong)計(ji)瓶(ping)頸,造成(cheng)延(yan)時大,若該(gai)單點設(she)備(bei)出現(xian)故障會導(dao)致(zhi)統(tong)計(ji)結(jie)果需(xu)要重新開始(shi)計(ji)算(suan),故統(tong)計(ji)成(cheng)本很(hen)大。
技術實現要素:
有鑒于此,本發(fa)明實施例(li)期望提供一種(zhong)跨數據(ju)中心的數據(ju)計算(suan)方法及系統(tong),至少部分(fen)解(jie)決信息統(tong)計
為達(da)到上述目的(de)(de),本發(fa)明的(de)(de)技術方案(an)是這樣實現的(de)(de):
本發明實(shi)施(shi)例第一方面提供一種(zhong)跨數據(ju)中心的數據(ju)計(ji)算方法(fa),所述方法(fa)包括:
共(gong)享(xiang)集群(qun)接收按照(zhao)預設發(fa)送(song)策略發(fa)送(song)的統(tong)計(ji)信(xin)息(xi)(xi);所述統(tong)計(ji)信(xin)息(xi)(xi)是(shi)基于至 少兩個數據中心(xin)訪(fang)問信(xin)息(xi)(xi)系統(tong)形成的操作記錄形成的;
接收統計服務器(qi)發送的統計請求;
根(gen)據所(suo)(suo)述(shu)統計請求,統計存儲(chu)在所(suo)(suo)述(shu)共享集群內的統計信息(xi),形成統計結(jie)果;
將所(suo)述統(tong)計結果發(fa)送給統(tong)計服務器。
基于上述方案(an),所(suo)述共享(xiang)集群包括區(qu)域(yu)共享(xiang)集群;
所述(shu)統計服務(wu)(wu)器(qi)包括區(qu)域統計服務(wu)(wu)器(qi);
所(suo)述共(gong)享(xiang)集群(qun)接(jie)收按照(zhao)預設發(fa)送(song)(song)策略發(fa)送(song)(song)的統計信(xin)息,包括(kuo):所(suo)述區域共(gong)享(xiang)集群(qun)從(cong)所(suo)述接(jie)入節點接(jie)收操作記錄(lu);
所述接收統計(ji)(ji)服務(wu)器發送(song)的統計(ji)(ji)請求(qiu),包括:接收區(qu)域統計(ji)(ji)發送(song)的區(qu)域統計(ji)(ji)請求(qiu);
所(suo)述(shu)根據(ju)所(suo)述(shu)統(tong)計(ji)請求,統(tong)計(ji)存(cun)儲(chu)在所(suo)述(shu)共享(xiang)集群內(nei)的(de)統(tong)計(ji)信息(xi),形(xing)成(cheng)統(tong)計(ji)結果(guo),包括:根據(ju)所(suo)述(shu)區域(yu)統(tong)計(ji)請求,統(tong)計(ji)存(cun)儲(chu)在所(suo)述(shu)區域(yu)共享(xiang)集群內(nei)的(de)操作記錄(lu),形(xing)成(cheng)區域(yu)統(tong)計(ji)結果(guo);
所(suo)述將所(suo)述統計(ji)結果發送給統計(ji)服(fu)務器(qi),包括:將所(suo)述區域(yu)(yu)統計(ji)結果發送給區域(yu)(yu)統計(ji)服(fu)務器(qi)。
基于上述(shu)(shu)方案,所述(shu)(shu)共(gong)享集群還包(bao)括系(xi)統共(gong)享集群;
所述統(tong)計服(fu)務器(qi)還包括系統(tong)統(tong)計服(fu)務器(qi);
所(suo)述共(gong)享集(ji)群接收按照預設發(fa)送策略發(fa)送的統計信息(xi),還包括:
所述系統共(gong)享(xiang)集群(qun)(qun)接收(shou)所述區域(yu)共(gong)享(xiang)集群(qun)(qun)形成區域(yu)統計結果;
所述接收(shou)統(tong)計服務器發送的統(tong)計請求,包(bao)括:
所(suo)述(shu)系(xi)統共享(xiang)集群接收所(suo)述(shu)系(xi)統統計(ji)服務器發送的(de)系(xi)統統計(ji)請求(qiu);
所(suo)述根據所(suo)述統計(ji)請求,統計(ji)存儲在所(suo)述共享集群內的(de)統計(ji)信(xin)息,形成統計(ji)結果,包括:
所(suo)述(shu)系(xi)統(tong)(tong)(tong)共享集群根據(ju)所(suo)述(shu)系(xi)統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)(ji)請(qing)求,對所(suo)述(shu)區域統(tong)(tong)(tong)計(ji)(ji)結果進行統(tong)(tong)(tong)計(ji)(ji)處理(li)形成系(xi)統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)(ji)結果。
基于上述方案(an),所述方法還包括:
所(suo)述區(qu)域共享集群對所(suo)述操(cao)作記錄進行(xing)匯總,形成(cheng)區(qu)域匯總文件;所(suo)述區(qu)域匯總文件用于區(qu)域級備份;
所述系(xi)統(tong)(tong)(tong)共享(xiang)集(ji)群對所述區域匯(hui)(hui)(hui)總(zong)(zong)(zong)文件進行匯(hui)(hui)(hui)總(zong)(zong)(zong),形(xing)成系(xi)統(tong)(tong)(tong)匯(hui)(hui)(hui)總(zong)(zong)(zong)文件;所述系(xi)統(tong)(tong)(tong)匯(hui)(hui)(hui)總(zong)(zong)(zong)文件用于系(xi)統(tong)(tong)(tong)級備份。
對所(suo)述(shu)統計信(xin)息進(jin)行匯總,形成匯總文件(jian);其中,所(suo)述(shu)匯總文件(jian)能夠用于備份所(suo)述(shu)統計信(xin)息。
基于上述(shu)方(fang)案,所述(shu)方(fang)法還(huan)包括:
在形成(cheng)(cheng)所述區域(yu)統(tong)計結果(guo)時,所述區域(yu)共(gong)享(xiang)集群還生(sheng)成(cheng)(cheng)區域(yu)成(cheng)(cheng)功(gong)統(tong)計記錄(lu)信息(xi);所述區域(yu)成(cheng)(cheng)功(gong)統(tong)計記錄(lu)信息(xi)用于指示(shi)所述區域(yu)共(gong)享(xiang)集群已成(cheng)(cheng)功(gong)統(tong)計的操作記錄(lu);
在形(xing)成(cheng)所(suo)述系(xi)統(tong)統(tong)計(ji)結果(guo)時,所(suo)述系(xi)統(tong)共享集群(qun)還(huan)生成(cheng)系(xi)統(tong)成(cheng)功(gong)統(tong)計(ji)記錄信(xin)息;所(suo)述系(xi)統(tong)級成(cheng)功(gong)統(tong)計(ji)信(xin)息用(yong)于指示(shi)所(suo)述系(xi)統(tong)共享集群(qun)已成(cheng)功(gong)統(tong)計(ji)的區(qu)域級統(tong)計(ji)結果(guo)。
本發明(ming)實施例(li)第二方面提供一種跨數(shu)據(ju)中心的數(shu)據(ju)計算系統(tong),所述系統(tong)包(bao)括:
共享集群,用(yong)于接收按照(zhao)預(yu)設(she)發(fa)送(song)策略(lve)發(fa)送(song)的統計信(xin)息;所述統計信(xin)息是基(ji)于至少兩個數據(ju)中心訪問信(xin)息系統形成的操作記(ji)錄形成的;
統(tong)計(ji)服務器(qi),用于向所述共享(xiang)集群發(fa)送的統(tong)計(ji)請求(qiu);
所述(shu)共(gong)享集群(qun),還用于根據所述(shu)統(tong)(tong)(tong)計(ji)請(qing)求,統(tong)(tong)(tong)計(ji)存儲在所述(shu)共(gong)享集群(qun)內的統(tong)(tong)(tong)計(ji)信(xin)息,形成(cheng)統(tong)(tong)(tong)計(ji)結(jie)果;及將所述(shu)統(tong)(tong)(tong)計(ji)結(jie)果發送給(gei)統(tong)(tong)(tong)計(ji)服務器。
基于上述(shu)(shu)方案,所述(shu)(shu)共享(xiang)集群(qun)包(bao)括區(qu)域共享(xiang)集群(qun);
所述統(tong)計服務(wu)器包括(kuo)區域統(tong)計服務(wu)器;
所(suo)(suo)述(shu)區(qu)(qu)域(yu)共享集群(qun),用于從所(suo)(suo)述(shu)接入節點接收操作記錄;接收區(qu)(qu)域(yu)統計(ji)(ji)(ji)發送的區(qu)(qu)域(yu)統計(ji)(ji)(ji)請求(qiu);根(gen)據(ju)所(suo)(suo)述(shu)區(qu)(qu)域(yu)統計(ji)(ji)(ji)請求(qiu),統計(ji)(ji)(ji)存儲在所(suo)(suo)述(shu)區(qu)(qu)域(yu)共享集群(qun)內的操作記錄,形成區(qu)(qu)域(yu)統計(ji)(ji)(ji)結果;及將所(suo)(suo)述(shu)區(qu)(qu)域(yu)統計(ji)(ji)(ji)結果發送給區(qu)(qu)域(yu)統計(ji)(ji)(ji)服(fu)務器。
基于(yu)上(shang)述(shu)方案(an),所述(shu)共享(xiang)集群還包括系(xi)統共享(xiang)集群;
所(suo)述統(tong)計服務(wu)器(qi)還包(bao)括系統(tong)統(tong)計服務(wu)器(qi);
所(suo)(suo)述(shu)系(xi)(xi)(xi)統共(gong)享集群,用于(yu)接收所(suo)(suo)述(shu)區(qu)域共(gong)享集群形(xing)成區(qu)域統計(ji)(ji)結果;接收所(suo)(suo)述(shu)系(xi)(xi)(xi)統統計(ji)(ji)服(fu)務器(qi)發送的系(xi)(xi)(xi)統統計(ji)(ji)請(qing)求;根據所(suo)(suo)述(shu)系(xi)(xi)(xi)統統計(ji)(ji)請(qing)求,對所(suo)(suo)述(shu)區(qu)域統計(ji)(ji)結果進行統計(ji)(ji)處理(li)形(xing)成系(xi)(xi)(xi)統統計(ji)(ji)結果。
基于(yu)上(shang)述(shu)方(fang)案,所述(shu)區(qu)域共(gong)享集群,還用于(yu)對所述(shu)操作(zuo)記錄進行匯(hui)(hui)總(zong)(zong)(zong),形成區(qu)域匯(hui)(hui)總(zong)(zong)(zong)文件;所述(shu)區(qu)域匯(hui)(hui)總(zong)(zong)(zong)文件用于(yu)區(qu)域級備份(fen);
所述(shu)系統(tong)共享集群(qun),還用(yong)于(yu)對所述(shu)區域匯(hui)(hui)(hui)總(zong)文件進行匯(hui)(hui)(hui)總(zong),形成(cheng)系統(tong)匯(hui)(hui)(hui)總(zong)文件;所述(shu)系統(tong)匯(hui)(hui)(hui)總(zong)文件用(yong)于(yu)系統(tong)級備份。
基于上述(shu)(shu)方案,所述(shu)(shu)區(qu)域共(gong)享集(ji)群,還用于在形成(cheng)所述(shu)(shu)區(qu)域統計結(jie)果時(shi),還生成(cheng)區(qu)域成(cheng)功(gong)統計記錄(lu)(lu)信(xin)息;所述(shu)(shu)區(qu)域成(cheng)功(gong)統計記錄(lu)(lu)信(xin)息用于指示(shi)所述(shu)(shu)區(qu)域共(gong)享集(ji)群已成(cheng)功(gong)統計的操(cao)作記錄(lu)(lu);
所(suo)述(shu)系統(tong)(tong)(tong)共享集群(qun),還用在(zai)形成(cheng)(cheng)所(suo)述(shu)系統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)結果時,還生成(cheng)(cheng)系統(tong)(tong)(tong)成(cheng)(cheng)功統(tong)(tong)(tong)計(ji)記錄信(xin)息(xi);所(suo)述(shu)系統(tong)(tong)(tong)級成(cheng)(cheng)功統(tong)(tong)(tong)計(ji)信(xin)息(xi)用于指示所(suo)述(shu)系統(tong)(tong)(tong)共享集群(qun)已(yi)成(cheng)(cheng)功統(tong)(tong)(tong)
本發明(ming)實施例提供一(yi)種跨數(shu)(shu)據中心的數(shu)(shu)據計(ji)(ji)(ji)算(suan)方法及系統(tong)(tong)(tong),采用(yong)共(gong)享集(ji)群對(dui)的基統(tong)(tong)(tong)計(ji)(ji)(ji)信息(xi)(xi)進行(xing)統(tong)(tong)(tong)計(ji)(ji)(ji),這樣就實現了采用(yong)多(duo)個共(gong)享集(ji)群中的設(she)(she)備(bei)(bei)來進行(xing)信息(xi)(xi)統(tong)(tong)(tong)計(ji)(ji)(ji),避免了單一(yi)設(she)(she)備(bei)(bei)統(tong)(tong)(tong)計(ji)(ji)(ji)的出現的效率低的現象(xiang)。與此同時(shi),采用(yong)共(gong)享集(ji)群來統(tong)(tong)(tong)計(ji)(ji)(ji)數(shu)(shu)據,還能避免單一(yi)設(she)(she)備(bei)(bei)統(tong)(tong)(tong)計(ji)(ji)(ji),設(she)(she)備(bei)(bei)故障導致(zhi)的所(suo)有(you)統(tong)(tong)(tong)計(ji)(ji)(ji)結果(guo)均丟失,需要從頭開始統(tong)(tong)(tong)計(ji)(ji)(ji)的問題,且通(tong)過統(tong)(tong)(tong)計(ji)(ji)(ji)服務器可(ke)簡便的控(kong)制(zhi)共(gong)享集(ji)群的信息(xi)(xi)統(tong)(tong)(tong)計(ji)(ji)(ji)。
附圖說明
圖1為本發明實施例提(ti)供(gong)的第一(yi)種跨數(shu)據(ju)中(zhong)心的數(shu)據(ju)計(ji)算方法的流程示(shi)意圖;
圖2為本發(fa)明實(shi)施例提供(gong)的第二(er)種跨數據中心的數據計算方(fang)法(fa)的流(liu)程示意(yi)圖;
圖(tu)3為本發明實施例提(ti)供的(de)第(di)三種跨(kua)數據中心的(de)數據計(ji)算方法(fa)的(de)流程(cheng)示意圖(tu);
圖4為(wei)本發明實施例提供的(de)第四種跨數據(ju)中(zhong)心的(de)數據(ju)計算(suan)方法的(de)流程示意圖;
圖5為本發明實施例提供(gong)的(de)第一種(zhong)跨數據(ju)(ju)中心的(de)數據(ju)(ju)計算系(xi)統的(de)結(jie)構示意圖;
圖(tu)6為本發明(ming)實施例提供的第二種(zhong)跨數據中(zhong)心(xin)的數據計算(suan)系統的結構示意圖(tu)。
具體實施方式
以下結合(he)說明(ming)書附圖及具(ju)體實施例對本發明(ming)的技術方案做進一步的詳細闡(chan)述。
如圖1所示,本實施(shi)例提供一種跨(kua)數據中心的數據計算方法,所述(shu)方法包括(kuo):
步驟S110:共(gong)享集群接(jie)收按(an)照預(yu)設發送策略發送的統(tong)計信息;所(suo)述統(tong)計信息是(shi)基于至少兩個數據中(zhong)心訪問信息系統(tong)形成的操作記(ji)錄形成的;
步驟(zou)S120:接收統(tong)計服務器(qi)發送的統(tong)計請求;
步驟S130:根據所(suo)述統(tong)(tong)計(ji)請(qing)求(qiu),統(tong)(tong)計(ji)存(cun)儲在所(suo)述共享集(ji)群內(nei)的統(tong)(tong)計(ji)信(xin)息,形成(cheng)統(tong)(tong)計(ji)結果;
步(bu)驟S140:將所述統計結果發送給統計服務(wu)器。
本(ben)實(shi)施例提供(gong)的(de)跨數(shu)據中(zhong)(zhong)心的(de)數(shu)據計算方法(fa)可應用(yong)于共(gong)享集群(qun)(qun)中(zhong)(zhong),例如(ru)用(yong)來對云(yun)存(cun)儲系統(tong)的(de)用(yong)戶操作記錄的(de)統(tong)計。本(ben)實(shi)施例所述的(de)共(gong)享集群(qun)(qun)可包括一(yi)臺(tai)或一(yi)臺(tai)以上的(de)處理(li)設備。
在步驟S110中所(suo)(suo)述共(gong)享(xiang)集群接收按照預(yu)(yu)設發送(song)策(ce)略(lve)發送(song)的統(tong)計(ji)信息(xi)。這里的所(suo)(suo)述統(tong)計(ji)信息(xi)可(ke)為(wei)(wei)操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)。所(suo)(suo)述操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)可(ke)為(wei)(wei)最原始的統(tong)計(ji)信息(xi)。所(suo)(suo)述統(tong)計(ji)信息(xi)還可(ke)包(bao)括前一級共(gong)享(xiang)集群形成的統(tong)計(ji)結果。該操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)可(ke)為(wei)(wei)原始記(ji)(ji)錄(lu)(lu)在云存儲(chu)系統(tong)的接入(ru)設備(bei)中的操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)。這里的預(yu)(yu)設發送(song)策(ce)略(lve)可(ke)包(bao)括按預(yu)(yu)設時間間隔發送(song)的操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu),也可(ke)以按照當所(suo)(suo)述操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)的更新量(liang)達到(dao)預(yu)(yu)設數(shu)據量(liang)時操(cao)作(zuo)(zuo)記(ji)(ji)錄(lu)(lu)。
在步驟S120所述(shu)共享集群將(jiang)會接收統(tong)(tong)計(ji)(ji)(ji)(ji)服務(wu)器發送(song)(song)的統(tong)(tong)計(ji)(ji)(ji)(ji)請求(qiu),在步驟S130中將(jiang)在接收到統(tong)(tong)計(ji)(ji)(ji)(ji)請求(qiu)之后,統(tong)(tong)計(ji)(ji)(ji)(ji)所述(shu)操作記錄(lu),形成統(tong)(tong)計(ji)(ji)(ji)(ji)結(jie)(jie)果(guo);并在步驟S140中將(jiang)統(tong)(tong)計(ji)(ji)(ji)(ji)結(jie)(jie)果(guo)發送(song)(song)給服務(wu)器。在本實(shi)施例中所述(shu)統(tong)(tong)計(ji)(ji)(ji)(ji)結(jie)(jie)果(guo)可包(bao)括用(yong)戶在當前統(tong)(tong)計(ji)(ji)(ji)(ji)時間(jian)(jian)端(duan)內使用(yong)的存(cun)儲空(kong)間(jian)(jian)容量(liang)(liang)、訪(fang)問請求(qiu)數(shu)以及(ji)數(shu)據交(jiao)互流(liu)量(liang)(liang)等數(shu)據。
首(shou)先(xian)在本實施例中,所述(shu)統(tong)(tong)計(ji)(ji)服務器不直接(jie)參數統(tong)(tong)計(ji)(ji),而(er)(er)是由(you)存儲操作(zuo)記(ji)錄的一個(ge)共享(xiang)(xiang)集(ji)群進行統(tong)(tong)計(ji)(ji)。共享(xiang)(xiang)集(ji)群內(nei)包括多個(ge)設(she)備,多個(ge)設(she)備同時(shi)參與統(tong)(tong)計(ji)(ji),可以(yi)減(jian)少延時(shi)。由(you)于(yu)共享(xiang)(xiang)集(ji)群內(nei)多個(ge)設(she)備同時(shi)出(chu)現故障的概(gai)率低,從而(er)(er)相(xiang)對(dui)于(yu)有(you)統(tong)(tong)計(ji)(ji)服務器單獨統(tong)(tong)計(ji)(ji),會因為故障導致的需(xu)要重頭重新統(tong)(tong)計(ji)(ji)的概(gai)率低,從而(er)(er)提高統(tong)(tong)計(ji)(ji)的安(an)全性(xing)。
作(zuo)為本實施例(li)的進一步改進,所述共(gong)享(xiang)集群(qun)包括區(qu)域共(gong)享(xiang)集群(qun);所述統計服務器包括區(qu)域統計服務器;
所(suo)述(shu)步(bu)驟S110可包(bao)括:所(suo)述(shu)區域共享(xiang)集群按(an)照所(suo)述(shu)第一預設時間間隔從所(suo)述(shu)接(jie)入節點接(jie)收操作記(ji)錄;
所(suo)述步驟S120可包括:接收區域統計發送的區域統計請求;
所(suo)(suo)(suo)述(shu)步驟(zou)S130可包括:根據所(suo)(suo)(suo)述(shu)區域統計請求(qiu),統計存(cun)儲(chu)在所(suo)(suo)(suo)述(shu)區域共(gong)享(xiang)集(ji)群內的操作記錄,形成區域統計結(jie)果(guo);
所述步驟(zou)S140可包括:將所述區(qu)域統(tong)(tong)計(ji)結果發送給區(qu)域統(tong)(tong)計(ji)服務器。
在本實施(shi)例中所(suo)(suo)述(shu)(shu)(shu)接入設(she)(she)備會將(jiang)本地數據庫中存儲(chu)所(suo)(suo)述(shu)(shu)(shu)操(cao)作記錄(lu)。按照所(suo)(suo)述(shu)(shu)(shu)第(di)一預(yu)(yu)(yu)設(she)(she)時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)上報所(suo)(suo)述(shu)(shu)(shu)區(qu)域共(gong)享集群。本實施(shi)例所(suo)(suo)述(shu)(shu)(shu)第(di)一時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)可(ke)為預(yu)(yu)(yu)先設(she)(she)置的(de)(de)(de)時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)。任(ren)意(yi)兩(liang)個所(suo)(suo)述(shu)(shu)(shu)第(di)一預(yu)(yu)(yu)設(she)(she)時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)可(ke)都相等,這樣的(de)(de)(de)話,所(suo)(suo)述(shu)(shu)(shu)區(qu)域共(gong)享集群將(jiang)按周期接收所(suo)(suo)述(shu)(shu)(shu)操(cao)作記錄(lu)。但是,兩(liang)個所(suo)(suo)述(shu)(shu)(shu)第(di)一預(yu)(yu)(yu)設(she)(she)時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)也(ye)可(ke)以(yi)不相等。例如,晚(wan)間(jian)(jian)(jian)(jian)(jian)用戶訪問(wen)(wen)云(yun)存儲(chu)系(xi)統(tong)的(de)(de)(de)訪問(wen)(wen)頻(pin)次相對于白天的(de)(de)(de)訪問(wen)(wen)頻(pin)次叫低。為了實現更好的(de)(de)(de)統(tong)計(ji),在晚(wan)間(jian)(jian)(jian)(jian)(jian)的(de)(de)(de)所(suo)(suo)述(shu)(shu)(shu)第(di)一時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)可(ke)以(yi)大于在白天的(de)(de)(de)所(suo)(suo)述(shu)(shu)(shu)第(di)一時間(jian)(jian)(jian)(jian)(jian)間(jian)(jian)(jian)(jian)(jian)隔(ge)。
所述(shu)區域(yu)共(gong)享集群接(jie)收到所述(shu)統計記(ji)錄之后(hou),將(jiang)存儲所述(shu)統計記(ji)錄。這樣的(de)話(hua),即(ji)便區域(yu)共(gong)享集群出(chu)現(xian)故障(zhang),丟失部分數(shu)據,還可以從接(jie)入設備中重新提取,從而保證(zheng)數(shu)據的(de)高(gao)安全性(xing)。
所述區(qu)域共(gong)享(xiang)集(ji)(ji)(ji)群接收(shou)區(qu)域統(tong)(tong)計(ji)(ji)(ji)(ji)服務器發送(song)的(de)(de)統(tong)(tong)計(ji)(ji)(ji)(ji)請求,這(zhe)樣(yang)區(qu)域共(gong)享(xiang)集(ji)(ji)(ji)群就分區(qu)域進(jin)行了統(tong)(tong)計(ji)(ji)(ji)(ji)。顯然一(yi)(yi)個云(yun)存(cun)儲系(xi)統(tong)(tong)中可能(neng)存(cun)在多個云(yun)存(cun)儲區(qu)域;每個云(yun)存(cun)儲區(qu)域都(dou)可對應設置一(yi)(yi)個區(qu)域共(gong)享(xiang)集(ji)(ji)(ji)群,這(zhe)樣(yang)的(de)(de)話,即便一(yi)(yi)個區(qu)域共(gong)享(xiang)集(ji)(ji)(ji)群出現故障,導致該區(qu)域內的(de)(de)統(tong)(tong)計(ji)(ji)(ji)(ji)結果(guo)不(bu)(bu)能(neng)及(ji)時(shi)提(ti)供,也不(bu)(bu)會(hui)干擾到其他(ta)區(qu)域內的(de)(de)統(tong)(tong)計(ji)(ji)(ji)(ji)結果(guo),從而重新統(tong)(tong)計(ji)(ji)(ji)(ji)的(de)(de)數(shu)據量小,對于整個系(xi)統(tong)(tong)內整個統(tong)(tong)計(ji)(ji)(ji)(ji)結果(guo)的(de)(de)處(chu)理而言,依然能(neng)夠減少(shao)延(yan)時(shi),保(bao)證統(tong)(tong)計(ji)(ji)(ji)(ji)結果(guo)的(de)(de)安全(quan)性。
作為本實施例的進(jin)一(yi)步改進(jin),所(suo)(suo)述共(gong)享(xiang)集群還(huan)包括(kuo)(kuo)系(xi)統共(gong)享(xiang)集群;所(suo)(suo)述統計(ji)服(fu)務器(qi)還(huan)包括(kuo)(kuo)系(xi)統統計(ji)服(fu)務器(qi)。
所(suo)(suo)述(shu)步驟S110還包括:所(suo)(suo)述(shu)系統(tong)共(gong)享集(ji)群(qun)接收所(suo)(suo)述(shu)區(qu)(qu)域共(gong)享集(ji)群(qun)形成區(qu)(qu)域統(tong)計結果。這里的區(qu)(qu)域統(tong)計結果即為(wei)前(qian)述(shu)所(suo)(suo)述(shu)的統(tong)計信息。
所(suo)述(shu)(shu)步驟S120還(huan)包(bao)括(kuo):所(suo)述(shu)(shu)系(xi)(xi)統(tong)共享集群接收所(suo)述(shu)(shu)系(xi)(xi)統(tong)統(tong)計(ji)服務器發送的系(xi)(xi)統(tong)統(tong)計(ji)請(qing)求;
所述(shu)(shu)步驟S130可包(bao)括:所述(shu)(shu)系(xi)統(tong)(tong)(tong)共享(xiang)集群根據所述(shu)(shu)系(xi)統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)請求(qiu),統(tong)(tong)(tong)計(ji)存(cun)儲(chu)在(zai)所述(shu)(shu)系(xi)統(tong)(tong)(tong)共享(xiang)集群內的操作記錄,形成系(xi)統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)結果。
在(zai)本實施(shi)例(li)中所(suo)述(shu)(shu)(shu)統計(ji)服務(wu)器(qi)(qi)也(ye)分為(wei)兩(liang)級(ji)(ji),一(yi)(yi)級(ji)(ji)為(wei)區(qu)域統計(ji)服務(wu)器(qi)(qi),另一(yi)(yi)級(ji)(ji)為(wei)系統統計(ji)服務(wu)器(qi)(qi)。所(suo)述(shu)(shu)(shu)共(gong)享集(ji)群(qun)也(ye)分為(wei)兩(liang)級(ji)(ji),一(yi)(yi)級(ji)(ji)為(wei)區(qu)域共(gong)性集(ji)群(qun),另一(yi)(yi)級(ji)(ji)為(wei)系統共(gong)享集(ji)群(qun)。在(zai)本實施(shi)例(li)的框架內,所(suo)述(shu)(shu)(shu)共(gong)享集(ji)群(qun)不局限于兩(liang)級(ji)(ji),還(huan)可以(yi)分為(wei)三級(ji)(ji)、四級(ji)(ji)或(huo)四級(ji)(ji)以(yi)上(shang)的。所(suo)述(shu)(shu)(shu)統計(ji)服務(wu)器(qi)(qi)也(ye)可以(yi)分為(wei)三級(ji)(ji)、四級(ji)(ji)或(huo)四級(ji)(ji)以(yi)上(shang)的統計(ji)服務(wu)器(qi)(qi)。
在本(ben)實(shi)(shi)施(shi)例(li)中所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)第(di)(di)二時(shi)間(jian)(jian)間(jian)(jian)隔(ge)可(ke)以等于所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)第(di)(di)一(yi)時(shi)間(jian)(jian)間(jian)(jian)隔(ge),也(ye)可(ke)以不(bu)(bu)等于所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)第(di)(di)一(yi)時(shi)間(jian)(jian)間(jian)(jian)隔(ge)。當然任意兩(liang)個所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)第(di)(di)一(yi)時(shi)間(jian)(jian)間(jian)(jian)隔(ge)可(ke)以相等,也(ye)可(ke)以不(bu)(bu)相等。在本(ben)實(shi)(shi)施(shi)例(li)中所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)系(xi)統(tong)共(gong)享集(ji)群(qun)將從(cong)統(tong)計(ji)(ji)(ji)服(fu)(fu)務器(qi)接(jie)收(shou)已(yi)成(cheng)功統(tong)計(ji)(ji)(ji)的操作記錄。本(ben)實(shi)(shi)施(shi)例(li)中所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)系(xi)統(tong)共(gong)享集(ji)群(qun)接(jie)收(shou)區(qu)(qu)(qu)域(yu)(yu)(yu)共(gong)享集(ji)群(qun)統(tong)計(ji)(ji)(ji)形(xing)成(cheng)的區(qu)(qu)(qu)域(yu)(yu)(yu)統(tong)計(ji)(ji)(ji)結果,對各(ge)個區(qu)(qu)(qu)域(yu)(yu)(yu)的區(qu)(qu)(qu)域(yu)(yu)(yu)統(tong)計(ji)(ji)(ji)結果進行統(tong)計(ji)(ji)(ji)處理,得到系(xi)統(tong)統(tong)計(ji)(ji)(ji)結果。在本(ben)實(shi)(shi)施(shi)例(li)中所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)系(xi)統(tong)共(gong)享集(ji)群(qun)可(ke)以直接(jie)從(cong)所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)區(qu)(qu)(qu)域(yu)(yu)(yu)共(gong)享集(ji)群(qun)接(jie)收(shou)所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)區(qu)(qu)(qu)域(yu)(yu)(yu)統(tong)計(ji)(ji)(ji)結果,也(ye)可(ke)以通過所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)區(qu)(qu)(qu)域(yu)(yu)(yu)統(tong)計(ji)(ji)(ji)服(fu)(fu)務器(qi)來(lai)接(jie)收(shou)所(suo)(suo)(suo)(suo)述(shu)(shu)(shu)區(qu)(qu)(qu)域(yu)(yu)(yu)統(tong)計(ji)(ji)(ji)結果。
如圖2所示,在(zai)本實施例中所述方(fang)法還包(bao)括:
步(bu)驟S131:所(suo)述(shu)區域(yu)共享集群對所(suo)述(shu)操作記錄進行匯(hui)總,形成區域(yu)匯(hui)總文件(jian);所(suo)述(shu)區域(yu)匯(hui)總文件(jian)用于區域(yu)級備(bei)份;
所述(shu)系統共(gong)享(xiang)集群對所述(shu)區域匯總(zong)(zong)文(wen)件(jian)進行匯總(zong)(zong),形成系統匯總(zong)(zong)文(wen)件(jian);所述(shu)系統匯總(zong)(zong)文(wen)件(jian)用于系統級備份(fen)。
多(duo)個(ge)操作記錄匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件可形成(cheng)區域(yu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)集(ji)。所(suo)述(shu)區域(yu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件還將作為下一(yi)(yi)級(ji)共(gong)享集(ji)群(qun)進(jin)行(xing)(xing)匯(hui)(hui)(hui)總(zong)的統(tong)計(ji)(ji)(ji)信(xin)(xin)息(xi)。所(suo)述(shu)系(xi)統(tong)共(gong)享集(ji)群(qun)在接收(shou)所(suo)述(shu)區域(yu)統(tong)計(ji)(ji)(ji)結(jie)果(guo)的同時,可一(yi)(yi)同從區域(yu)共(gong)享集(ji)群(qun)或區域(yu)統(tong)計(ji)(ji)(ji)服(fu)務器接收(shou)所(suo)述(shu)區域(yu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件,并對所(suo)述(shu)區域(yu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件進(jin)行(xing)(xing)匯(hui)(hui)(hui)總(zong)形成(cheng)系(xi)統(tong)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件。本實施例所(suo)述(shu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件是進(jin)行(xing)(xing)了信(xin)(xin)息(xi)匯(hui)(hui)(hui)總(zong),排除了錯誤(wu)統(tong)計(ji)(ji)(ji)信(xin)(xin)息(xi)和(he)(he)冗余統(tong)計(ji)(ji)(ji)信(xin)(xin)息(xi),進(jin)行(xing)(xing)了壓縮等(deng)處理(li)的可用(yong)于(yu)對統(tong)計(ji)(ji)(ji)信(xin)(xin)息(xi)進(jin)行(xing)(xing)備份的信(xin)(xin)息(xi)。在本實施例中,通過(guo)所(suo)述(shu)匯(hui)(hui)(hui)總(zong)文(wen)(wen)(wen)(wen)件的生成(cheng)和(he)(he)傳(chuan)輸(shu),可以(yi)在共(gong)享集(ji)群(qun)和(he)(he)統(tong)計(ji)(ji)(ji)服(fu)務器內進(jin)行(xing)(xing)統(tong)計(ji)(ji)(ji)信(xin)(xin)息(xi)的備份,這樣即(ji)便共(gong)享集(ji)群(qun)和(he)(he)/或統(tong)計(ji)(ji)(ji)服(fu)務器中的部分設備出現故(gu)障(zhang),也不會導(dao)致所(suo)有(you)數據的丟失,從而(er)增加了數據的安全(quan)性(xing)。
在(zai)具(ju)體的(de)實現(xian)過程中,所述匯總(zong)文件(jian)可(ke)將(jiang)與統計(ji)結(jie)果一通(tong)發送給統計(ji)服(fu)務器。
作為(wei)本實施例的進(jin)一步改進(jin),如(ru)圖3所示,所述方法還包括:
步驟S132:
在形成(cheng)所(suo)(suo)述(shu)區(qu)域(yu)統(tong)計(ji)(ji)(ji)(ji)結果時,所(suo)(suo)述(shu)區(qu)域(yu)共(gong)享集群還生(sheng)成(cheng)區(qu)域(yu)成(cheng)功(gong)統(tong)計(ji)(ji)(ji)(ji)記(ji)錄(lu)(lu)信息(xi);所(suo)(suo)述(shu)區(qu)域(yu)成(cheng)功(gong)統(tong)計(ji)(ji)(ji)(ji)記(ji)錄(lu)(lu)信息(xi)用于指示(shi)所(suo)(suo)述(shu)區(qu)域(yu)共(gong)享集群已成(cheng)功(gong)統(tong)計(ji)(ji)(ji)(ji)的操作記(ji)錄(lu)(lu);
在(zai)形成(cheng)(cheng)所(suo)述(shu)系統(tong)(tong)統(tong)(tong)計結果(guo)時,所(suo)述(shu)系統(tong)(tong)共(gong)享集(ji)(ji)群還(huan)生(sheng)成(cheng)(cheng)系統(tong)(tong)成(cheng)(cheng)功(gong)(gong)統(tong)(tong)計記錄信息;所(suo)述(shu)系統(tong)(tong)級成(cheng)(cheng)功(gong)(gong)統(tong)(tong)計信息用于指示所(suo)述(shu)系統(tong)(tong)共(gong)享集(ji)(ji)群已成(cheng)(cheng)功(gong)(gong)統(tong)(tong)計的區域級統(tong)(tong)計結果(guo)。
在(zai)本實施例還將生成功統(tong)計(ji)(ji)(ji)記(ji)錄(lu)信息,并按區(qu)域和系統(tong)進(jin)(jin)行(xing)生成成功統(tong)計(ji)(ji)(ji)記(ji)錄(lu)信息,哪(na)些(xie)統(tong)計(ji)(ji)(ji)信息還進(jin)(jin)一步待(dai)統(tong)計(ji)(ji)(ji)。若設備出現故障(zhang),在(zai)進(jin)(jin)行(xing)故障(zhang)恢復(fu)時,可以根據所述成功統(tong)計(ji)(ji)(ji)記(ji)錄(lu)信息,可以快速確定從哪(na)開始進(jin)(jin)行(xing)統(tong)計(ji)(ji)(ji)。
例如,所(suo)述區域共享集群和所(suo)述系統(tong)(tong)集群按照周期進行(xing)統(tong)(tong)計(ji),則(ze)所(suo)述成(cheng)功(gong) 統(tong)(tong)計(ji)記(ji)錄信息可記(ji)錄目前(qian)已經(jing)完成(cheng)截止到(dao)哪個(ge)時間周期的成(cheng)功(gong)統(tong)(tong)計(ji)。
在本實施例中(zhong)還(huan)可以將所述成功統(tong)計(ji)記錄信息由(you)共(gong)享集群發送(song)給統(tong)計(ji)服(fu)(fu)務器,方便(bian)統(tong)計(ji)服(fu)(fu)務器備份及后續查詢。
以下結(jie)合人任(ren)意(yi)實施例提供一個具(ju)體示(shi)例:
如圖(tu)4所示(shi),在本示(shi)例中(zhong)(zhong),假設有(you)多(duo)個數(shu)(shu)據中(zhong)(zhong)心(xin)D1,D2…Dm;數(shu)(shu)據中(zhong)(zhong)心(xin)分布(bu)在不(bu)(bu)同的(de)城市或者洲際,數(shu)(shu)據中(zhong)(zhong)心(xin)之(zhi)間(jian)通(tong)過廣域網通(tong)信。數(shu)(shu)據中(zhong)(zhong)心(xin)D1中(zhong)(zhong)有(you)X個接入節點n1,n2,…nx;其中(zhong)(zhong)所述X為不(bu)(bu)小(xiao)于(yu)2的(de)整(zheng)數(shu)(shu);所述x為不(bu)(bu)大于(yu)所述X的(de)正整(zheng)數(shu)(shu)。
同一個(ge)用戶(hu)的(de)不同請(qing)(qing)求(qiu)(qiu)(qiu)可能(neng)發(fa)給不同數(shu)據中(zhong)(zhong)(zhong)心(xin)的(de)不同接入節點(dian)(dian)(dian)進行(xing)處(chu)(chu)理。假設在(zai)2011年(nian)01月12日10點(dian)(dian)(dian)26分(fen)期(qi)間(jian)(jian),接入節點(dian)(dian)(dian)1收到了(le)大量的(de)訪(fang)問(wen)請(qing)(qing)求(qiu)(qiu)(qiu),其(qi)(qi)中(zhong)(zhong)(zhong)包括用戶(hu)u1發(fa)送過來的(de)創建10MB的(de)對(dui)(dui)象(xiang)/b1/o1請(qing)(qing)求(qiu)(qiu)(qiu)(PUT/b1/o1)、以及用戶(hu)u2發(fa)送過來的(de)創建20MB的(de)對(dui)(dui)象(xiang)/b2/o2請(qing)(qing)求(qiu)(qiu)(qiu)(PUT/b2/o2)。在(zai)接入節點(dian)(dian)(dian)1成(cheng)(cheng)(cheng)功(gong)處(chu)(chu)理完這兩個(ge)訪(fang)問(wen)請(qing)(qing)求(qiu)(qiu)(qiu)后,其(qi)(qi)會將(jiang)操作(zuo)(zuo)(zuo)記(ji)錄(lu)寫到本地的(de)操作(zuo)(zuo)(zuo)記(ji)錄(lu)文(wen)件中(zhong)(zhong)(zhong),每個(ge)接入節點(dian)(dian)(dian)上(shang)的(de)操作(zuo)(zuo)(zuo)記(ji)錄(lu)文(wen)件每分(fen)鐘產(chan)(chan)生一個(ge),如上(shang)述兩個(ge)請(qing)(qing)求(qiu)(qiu)(qiu)是(shi)接入節點(dian)(dian)(dian)1在(zai)2011年(nian)01月12日10點(dian)(dian)(dian)26分(fen)期(qi)間(jian)(jian)處(chu)(chu)理完的(de),則產(chan)(chan)生的(de)操作(zuo)(zuo)(zuo)記(ji)錄(lu)文(wen)件名為(wei)n1-20110112-10-26,該(gai)文(wen)件中(zhong)(zhong)(zhong)記(ji)錄(lu)格式為(wei)<操作(zuo)(zuo)(zuo)記(ji)錄(lu)時間(jian)(jian)戳ts,操作(zuo)(zuo)(zuo)類型(xing)type(上(shang)傳1、下(xia)載(zai)2、刪除3等),操作(zuo)(zuo)(zuo)是(shi)否處(chu)(chu)理成(cheng)(cheng)(cheng)功(gong)bool(成(cheng)(cheng)(cheng)功(gong)1、失敗0),所(suo)屬數(shu)據中(zhong)(zhong)(zhong)心(xin)名Dname,用戶(hu)名User,桶(tong)名Bucket,對(dui)(dui)象(xiang)名Obj,大小size>,對(dui)(dui)于上(shang)述兩個(ge)請(qing)(qing)求(qiu)(qiu)(qiu)其(qi)(qi)在(zai)操作(zuo)(zuo)(zuo)記(ji)錄(lu)文(wen)件n1-20110112-10-26中(zhong)(zhong)(zhong)的(de)記(ji)錄(lu)條目為(wei)<20110112-10:26:36;1;1;D1;u1;b1;o1;10><20110112-10:26:46;1;1;D1;u2;b2;o2;20>。
每隔一定時(shi)間周期(qi)(例如,5分鐘(zhong)),會在區(qu)域共享集群中(zhong)創建新目(mu)錄(lu)(lu)(lu),將本數據(ju)中(zhong)心(xin)的接入(ru)節點發(fa)送過來的一批(pi)記錄(lu)(lu)(lu)文(wen)件(jian)遷移到新目(mu)錄(lu)(lu)(lu)下(xia)。如接入(ru)節點1存放在其本地(di)的一批(pi)記錄(lu)(lu)(lu)文(wen)件(jian)n1-20110112-10-25、n1-20110112-10-26、n1-20110112-10-27、n1-20110112-10-28、n1-20110112-10-29會存放在區(qu)域共享集群的輸入(ru)文(wen)件(jian)集合的/R-in/201101121025目(mu)錄(lu)(lu)(lu)下(xia)。
同理接(jie)(jie)入節(jie)點(dian)(dian)x的同批記(ji)錄文件(jian)也會存放在/R-in/201101121025目錄下(xia)。接(jie)(jie) 入節(jie)點(dian)(dian)x的n1-20110112-10-30、n1-20110112-10-31、n1-20110112-10-32、n1-20110112-10-33、n1-20110112-10-34會存放在區域共享集群的輸入文件(jian)集合的/R-in/201101121030目錄下(xia)。當接(jie)(jie)入節(jie)點(dian)(dian)本地(di)的操作記(ji)錄文件(jian)成功遷移(yi)后,接(jie)(jie)入節(jie)點(dian)(dian)即(ji)可刪除對應的本地(di)文件(jian)。
每隔一(yi)定時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)(例如(ru),5分鐘),區域(yu)統(tong)(tong)計(ji)(ji)服(fu)務器會向(xiang)區域(yu)共享(xiang)集群(qun)(qun)自動發起(qi)統(tong)(tong)計(ji)(ji)計(ji)(ji)算請求,然(ran)后區域(yu)共享(xiang)集群(qun)(qun)會啟動計(ji)(ji)算模塊將同(tong)一(yi)時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內(nei)(nei)的(de)(de)(de)該(gai)數(shu)(shu)據(ju)(ju)中心(xin)內(nei)(nei)的(de)(de)(de)所有(you)接入(ru)節點(dian)的(de)(de)(de)一(yi)批操(cao)作記錄文件(jian)進行(xing)計(ji)(ji)算統(tong)(tong)計(ji)(ji)。如(ru)計(ji)(ji)算模塊將本(ben)數(shu)(shu)據(ju)(ju)中心(xin)的(de)(de)(de)輸(shu)入(ru)文件(jian)集合(he)的(de)(de)(de)201101121025目錄下的(de)(de)(de)所有(you)文件(jian)進行(xing)計(ji)(ji)算(如(ru)n1-20110112-10-25、n1-20110112-10-26、n1-20110112-10-27、n1-20110112-10-28、n1-20110112-10-29、…、nx-20110112-10-25、…)即可得到本(ben)數(shu)(shu)據(ju)(ju)中心(xin)在2011年01月12日10點(dian)25分至29分這段時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內(nei)(nei)用戶(hu)統(tong)(tong)計(ji)(ji)表數(shu)(shu)據(ju)(ju)T1(如(ru)這段時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內(nei)(nei)用戶(hu)在本(ben)數(shu)(shu)據(ju)(ju)中心(xin)的(de)(de)(de)已使(shi)用空間(jian)UserSpace1、用戶(hu)操(cao)作請求數(shu)(shu)UserReq1、用戶(hu)操(cao)作流量(liang)UserTraffic1)、匯(hui)總輸(shu)出文件(jian)/R-out/201101121025、以(yi)及更新最(zui)近統(tong)(tong)計(ji)(ji)成(cheng)(cheng)(cheng)功(gong)(gong)目錄S1(用以(yi)記錄一(yi)下該(gai)時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內(nei)(nei)數(shu)(shu)據(ju)(ju)已成(cheng)(cheng)(cheng)功(gong)(gong)統(tong)(tong)計(ji)(ji),如(ru)last_succeed_dir1:201101121025)。這里(li)(li)的(de)(de)(de)用戶(hu)統(tong)(tong)計(ji)(ji)表數(shu)(shu)據(ju)(ju)T1即對應于者(zhe)前述(shu)的(de)(de)(de)區域(yu)統(tong)(tong)計(ji)(ji)結果。這里(li)(li)的(de)(de)(de)最(zui)僅統(tong)(tong)計(ji)(ji)成(cheng)(cheng)(cheng)功(gong)(gong)目錄S1即對應著前述(shu)實施例中的(de)(de)(de)所述(shu)成(cheng)(cheng)(cheng)功(gong)(gong)統(tong)(tong)計(ji)(ji)記錄信(xin)息(xi)。這里(li)(li)的(de)(de)(de)匯(hui)總輸(shu)出文件(jian)即為前述(shu)實施例中所述(shu)的(de)(de)(de)匯(hui)總文件(jian)。
區(qu)域統(tong)(tong)計(ji)服務器將該數據(ju)中心內(nei)已成(cheng)功統(tong)(tong)計(ji)的匯總輸出文件(jian)/R-out/201101121025遷移到系(xi)統(tong)(tong)共享集群(qun)的輸入文件(jian)集合(he)中(如數據(ju)中心1的區(qu)域統(tong)(tong)計(ji)服務器1將該數據(ju)中心D1內(nei)已成(cheng)功統(tong)(tong)計(ji)的匯總輸出文件(jian)/R-out/201101121025遷移到系(xi)統(tong)(tong)共享集群(qun)的輸入文件(jian)集合(he)形成(cheng)文件(jian)/R-in/201101121025/D1,數據(ju)中心m形成(cheng)文件(jian)/R-in/201101121025/Dm)。
每(mei)隔一定時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)(如(ru)5分(fen)鐘(zhong)),系(xi)統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)(ji)(ji)(ji)服務器(qi)會向系(xi)統(tong)(tong)(tong)共(gong)享集(ji)群(qun)自動發起(qi)統(tong)(tong)(tong)計(ji)(ji)(ji)(ji)計(ji)(ji)(ji)(ji)算請求,然(ran)后系(xi)統(tong)(tong)(tong)共(gong)享集(ji)群(qun)會啟動計(ji)(ji)(ji)(ji)算模塊將(jiang)同(tong)一時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內的(de)(de)所(suo)有數(shu)(shu)據(ju)中心(xin)的(de)(de)輸(shu)(shu)入文件(jian)(jian)(jian)集(ji)合進(jin)行計(ji)(ji)(ji)(ji)算統(tong)(tong)(tong)計(ji)(ji)(ji)(ji)。如(ru)計(ji)(ji)(ji)(ji)算模塊將(jiang)輸(shu)(shu)入文件(jian)(jian)(jian)集(ji)合的(de)(de)201101121025目錄下的(de)(de)所(suo)有文件(jian)(jian)(jian)進(jin)行計(ji)(ji)(ji)(ji)算(如(ru)文件(jian)(jian)(jian)/R-in/201101121025/D1、…、/R-in/201101121025/Dm)即可得(de)到云存(cun)儲(chu)系(xi)統(tong)(tong)(tong)在2011年01月12日10點(dian)25分(fen) 至29分(fen)這(zhe)段(duan)時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內用戶統(tong)(tong)(tong)計(ji)(ji)(ji)(ji)表數(shu)(shu)據(ju)T(如(ru)這(zhe)段(duan)時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內用戶在整個云存(cun)儲(chu)系(xi)統(tong)(tong)(tong)的(de)(de)已(yi)使用空間(jian)UserSpace、用戶操作(zuo)(zuo)請求數(shu)(shu)UserReq、用戶操作(zuo)(zuo)流(liu)量UserTraffic)、匯總(zong)輸(shu)(shu)出文件(jian)(jian)(jian)/R-out/201101121025、以及更(geng)新最近統(tong)(tong)(tong)計(ji)(ji)(ji)(ji)成(cheng)功目錄S(用以記錄一下該時(shi)(shi)間(jian)周(zhou)(zhou)期(qi)內數(shu)(shu)據(ju)已(yi)成(cheng)功統(tong)(tong)(tong)計(ji)(ji)(ji)(ji),如(ru)last_succeed_dir:201101121025)。
通(tong)過上述方(fang)法即可計算出用戶(hu)在(zai)整(zheng)個云(yun)存儲系統中的(de)使用量,對其進行收費。
以下提(ti)供(gong)一(yi)個基于上(shang)述實施例中(zhong)所述的跨(kua)數(shu)據(ju)中(zhong)心(xin)的數(shu)據(ju)計算方(fang)法,提(ti)供(gong)一(yi)種跨(kua)數(shu)據(ju)中(zhong)心(xin)的數(shu)據(ju)計算系(xi)統。
如圖5所示(shi),在本實施例中所述跨數(shu)據(ju)中心的(de)數(shu)據(ju)計算系統包括:
共享集群(qun)110,用于接收(shou)按(an)照預設(she)發送(song)策略(lve)發送(song)的統計(ji)信(xin)息;所(suo)述統計(ji)信(xin)息是基于至少兩個(ge)數據中心訪(fang)問信(xin)息系統形成(cheng)的操作記錄形成(cheng)的;
統(tong)計(ji)服務器120,用于向所述(shu)共享(xiang)集群發(fa)送的統(tong)計(ji)請(qing)求(qiu);
所(suo)述(shu)(shu)(shu)(shu)共(gong)享集(ji)群110,還用于根據所(suo)述(shu)(shu)(shu)(shu)統(tong)計請求(qiu),統(tong)計存儲在所(suo)述(shu)(shu)(shu)(shu)共(gong)享集(ji)群內的統(tong)計信息,形成統(tong)計結果;及將(jiang)所(suo)述(shu)(shu)(shu)(shu)統(tong)計結果發(fa)送給(gei)統(tong)計服(fu)務器。
在(zai)本(ben)實施(shi)例中(zhong)在(zai)進行(xing)所(suo)述跨數(shu)據中(zhong)心的(de)(de)數(shu)據計(ji)(ji)算系(xi)統(tong)(tong),可以用(yong)(yong)于(yu)云存儲系(xi)統(tong)(tong)中(zhong)對用(yong)(yong)戶訪(fang)問的(de)(de)操作記(ji)錄(lu)的(de)(de)統(tong)(tong)計(ji)(ji)。在(zai)本(ben)實施(shi)例中(zhong)采(cai)用(yong)(yong)共享集(ji)群來進行(xing)信(xin)息統(tong)(tong)計(ji)(ji),而共享集(ji)群通常至少由兩(liang)臺(tai)以上的(de)(de)設備構成,這(zhe)種采(cai)用(yong)(yong)分布式的(de)(de)集(ji)群設備的(de)(de)來進行(xing)統(tong)(tong)計(ji)(ji),可以提高(gao)統(tong)(tong)計(ji)(ji)效(xiao)率,避免集(ji)中(zhong)統(tong)(tong)計(ji)(ji)設備故障導(dao)致(zhi)的(de)(de)統(tong)(tong)計(ji)(ji)結果全(quan)部(bu)丟失,同時還提供(gong)了統(tong)(tong)計(ji)(ji)結果形成的(de)(de)安全(quan)性(xing)和穩定(ding)性(xing)。
如圖6所(suo)示,所(suo)述共(gong)享集(ji)群110包括區域共(gong)享集(ji)群111;所(suo)述統計(ji)服務器120包括區域統計(ji)服務器121;
所(suo)述區(qu)(qu)域(yu)(yu)共(gong)享集群111,用于從所(suo)述接入節點接收(shou)操(cao)作記錄(lu);接收(shou)區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)發(fa)送的區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)請(qing)(qing)求;根(gen)據(ju)所(suo)述區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)請(qing)(qing)求,統(tong)(tong)計(ji)存儲在所(suo)述區(qu)(qu)域(yu)(yu)共(gong)享集群內的操(cao)作記錄(lu),形成(cheng)區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)結(jie)(jie)果;及將所(suo)述區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)結(jie)(jie)果發(fa)送給區(qu)(qu)域(yu)(yu)統(tong)(tong)計(ji)服務器。
在具體的應用(yong)過程中,可以將數(shu)據系統(tong)(tong)劃分為多(duo)個區(qu)域(yu)(yu),多(duo)個區(qu)域(yu)(yu)構成了(le) 所述(shu)數(shu)據系統(tong)(tong)。在本(ben)實施(shi)例中可以對應每一(yi)個所述(shu)區(qu)域(yu)(yu),設置一(yi)個區(qu)域(yu)(yu)共享(xiang)集(ji)(ji)群和一(yi)個區(qu)域(yu)(yu)統(tong)(tong)計服務(wu)(wu)器(qi)。該(gai)區(qu)域(yu)(yu)共享(xiang)集(ji)(ji)群和區(qu)域(yu)(yu)統(tong)(tong)計服務(wu)(wu)器(qi),用(yong)于負責該(gai)區(qu)域(yu)(yu)內統(tong)(tong)計信息的統(tong)(tong)計處(chu)理。
在本實施例中所(suo)述(shu)(shu)共(gong)享(xiang)(xiang)(xiang)集(ji)群包(bao)括區(qu)域(yu)(yu)共(gong)享(xiang)(xiang)(xiang)集(ji)群111,將(jiang)接(jie)收(shou)接(jie)入設備發(fa)送(song)的(de)操作(zuo)記錄(lu),對操作(zuo)記錄(lu)進(jin)行統(tong)(tong)(tong)(tong)計(ji),形成區(qu)域(yu)(yu)統(tong)(tong)(tong)(tong)計(ji)結果(guo)。所(suo)述(shu)(shu)統(tong)(tong)(tong)(tong)計(ji)服務(wu)器121將(jiang)根據(ju)需(xu)求,向(xiang)區(qu)域(yu)(yu)共(gong)享(xiang)(xiang)(xiang)集(ji)群111發(fa)送(song)統(tong)(tong)(tong)(tong)計(ji)請求,并(bing)接(jie)收(shou)區(qu)域(yu)(yu)共(gong)享(xiang)(xiang)(xiang)集(ji)群發(fa)送(song)的(de)區(qu)域(yu)(yu)統(tong)(tong)(tong)(tong)計(ji)結果(guo)。這(zhe)樣的(de)話,在本實施例中在進(jin)行信息統(tong)(tong)(tong)(tong)計(ji)時,將(jiang)會分(fen)區(qu)域(yu)(yu)進(jin)行統(tong)(tong)(tong)(tong)計(ji),顯(xian)然有多個(ge)區(qu)域(yu)(yu)集(ji)群同時進(jin)行信息統(tong)(tong)(tong)(tong)計(ji),大大的(de)提升了統(tong)(tong)(tong)(tong)計(ji)效(xiao)率,也不(bu)會因(yin)為一(yi)個(ge)設備的(de)故障(zhang)導(dao)致(zhi)統(tong)(tong)(tong)(tong)計(ji)工作(zuo)的(de)中止及已統(tong)(tong)(tong)(tong)計(ji)結果(guo)的(de)全部丟失,顯(xian)然提升了統(tong)(tong)(tong)(tong)計(ji)的(de)安全性和穩定性。
如圖6所示,所述共享(xiang)集群還(huan)包(bao)括(kuo)(kuo)系統共享(xiang)集群112;所述統計(ji)服(fu)務器120還(huan)包(bao)括(kuo)(kuo)系統統計(ji)服(fu)務器122;
所(suo)(suo)(suo)(suo)述系(xi)(xi)統(tong)(tong)共(gong)享集群(qun)112,用(yong)于接收所(suo)(suo)(suo)(suo)述區(qu)域(yu)共(gong)享集群(qun)形(xing)成區(qu)域(yu)統(tong)(tong)計結(jie)果(guo);接收所(suo)(suo)(suo)(suo)述系(xi)(xi)統(tong)(tong)統(tong)(tong)計服務器(qi)122發送的系(xi)(xi)統(tong)(tong)統(tong)(tong)計請(qing)求(qiu);根(gen)據所(suo)(suo)(suo)(suo)述系(xi)(xi)統(tong)(tong)統(tong)(tong)計請(qing)求(qiu),對所(suo)(suo)(suo)(suo)述區(qu)域(yu)統(tong)(tong)計結(jie)果(guo)進行統(tong)(tong)計處(chu)理形(xing)成系(xi)(xi)統(tong)(tong)統(tong)(tong)計結(jie)果(guo)。
在(zai)(zai)本(ben)實(shi)施例中(zhong)(zhong)所述(shu)(shu)(shu)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)還引入例系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)112,該系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)112為(wei)區域共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)111的(de)(de)上(shang)(shang)一(yi)層共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun),負責對整個數(shu)據系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)進(jin)行統(tong)(tong)(tong)(tong)計(ji)(ji)。在(zai)(zai)本(ben)實(shi)施例中(zhong)(zhong)所述(shu)(shu)(shu)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)與所述(shu)(shu)(shu)區域統(tong)(tong)(tong)(tong)計(ji)(ji)服(fu)務(wu)器121相(xiang)連,還可(ke)以(yi)直接與所述(shu)(shu)(shu)區域共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)111相(xiang)連。所述(shu)(shu)(shu)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)在(zai)(zai)區域共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)111的(de)(de)區域統(tong)(tong)(tong)(tong)計(ji)(ji)結果(guo)之(zhi)上(shang)(shang),進(jin)行基于系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)的(de)(de)統(tong)(tong)(tong)(tong)計(ji)(ji),形(xing)成系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)計(ji)(ji)結果(guo)。在(zai)(zai)本(ben)實(shi)施例中(zhong)(zhong)還引入控制系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)112進(jin)行統(tong)(tong)(tong)(tong)計(ji)(ji)的(de)(de)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)計(ji)(ji)服(fu)務(wu)器122。該系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)計(ji)(ji)服(fu)務(wu)器112可(ke)用于向系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)112發送(song)(song)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)計(ji)(ji)請求,并(bing)接收系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集(ji)(ji)(ji)(ji)群(qun)112發送(song)(song)的(de)(de)系(xi)(xi)(xi)統(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)計(ji)(ji)結果(guo)。
顯然本實施例中所述的跨數(shu)據中心(xin)的數(shu)據計(ji)算(suan)(suan)系(xi)統(tong),至少分為兩級進行統(tong)計(ji),這樣即便有系(xi)統(tong)統(tong)計(ji)結(jie)果(guo)出(chu)現丟失,還可以根據區域統(tong)計(ji)結(jie)果(guo)快速計(ji)算(suan)(suan)出(chu)系(xi)統(tong)統(tong)計(ji)結(jie)果(guo),而(er)不用重頭開始重新統(tong)計(ji)每(mei)一個操(cao)作記錄(lu),顯然提升了故障恢復(fu)能力。
作(zuo)為本(ben)實施例的進(jin)一步改進(jin),所(suo)述(shu)共享集群(qun)(qun)110,所(suo)述(shu)區域(yu)共享集群(qun)(qun),還用(yong)于對(dui)所(suo)述(shu)操作(zuo)記錄進(jin)行匯(hui)(hui)總,形成區域(yu)匯(hui)(hui)總文件(jian);所(suo)述(shu)區域(yu)匯(hui)(hui)總文件(jian)用(yong)于區域(yu)級備份(fen);
所述(shu)系統(tong)(tong)共享集群,還用(yong)于(yu)(yu)對所述(shu)區域匯(hui)總文件(jian)進(jin)行匯(hui)總,形成系統(tong)(tong)匯(hui)總文件(jian);所述(shu)系統(tong)(tong)匯(hui)總文件(jian)用(yong)于(yu)(yu)系統(tong)(tong)級備份。
這(zhe)(zhe)樣(yang)區域匯總(zong)(zong)文件(jian)和系統(tong)(tong)(tong)匯總(zong)(zong)文件(jian)至少形成(cheng)兩級的文件(jian)匯總(zong)(zong),這(zhe)(zhe)樣(yang)就能夠實現(xian)多(duo)級備份,提高數據安(an)全性(xing)。當然所述(shu)區域匯總(zong)(zong)文件(jian)可(ke)存儲(chu)區域統(tong)(tong)(tong)計(ji)服務(wu)器;所述(shu)系統(tong)(tong)(tong)匯總(zong)(zong)文件(jian)可(ke)存儲(chu)與系統(tong)(tong)(tong)統(tong)(tong)(tong)計(ji)服務(wu)器。
此外,所(suo)(suo)述(shu)區(qu)域(yu)共(gong)享集群,還用于(yu)在形(xing)成(cheng)所(suo)(suo)述(shu)區(qu)域(yu)統(tong)計(ji)結果時(shi),還生成(cheng)區(qu)域(yu)成(cheng)功統(tong)計(ji)記錄(lu)信息(xi);所(suo)(suo)述(shu)區(qu)域(yu)成(cheng)功統(tong)計(ji)記錄(lu)信息(xi)用于(yu)指示所(suo)(suo)述(shu)區(qu)域(yu)共(gong)享集群已成(cheng)功統(tong)計(ji)的操(cao)作(zuo)記錄(lu);
所(suo)(suo)述(shu)系(xi)統(tong)(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集群,還(huan)用(yong)在(zai)形(xing)(xing)成(cheng)所(suo)(suo)述(shu)系(xi)統(tong)(tong)(tong)(tong)(tong)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)結果時,還(huan)生成(cheng)系(xi)統(tong)(tong)(tong)(tong)(tong)成(cheng)功(gong)(gong)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)記(ji)錄信(xin)(xin)息;所(suo)(suo)述(shu)系(xi)統(tong)(tong)(tong)(tong)(tong)級成(cheng)功(gong)(gong)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)信(xin)(xin)息用(yong)于指示所(suo)(suo)述(shu)系(xi)統(tong)(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集群已成(cheng)功(gong)(gong)統(tong)(tong)(tong)(tong)(tong)。。當然這里的(de)(de)共(gong)(gong)享(xiang)(xiang)(xiang)集群同樣(yang)(yang)可包括區域共(gong)(gong)享(xiang)(xiang)(xiang)集群和系(xi)統(tong)(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集群;區域共(gong)(gong)享(xiang)(xiang)(xiang)集群和系(xi)統(tong)(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集群分別根據自己(ji)的(de)(de)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)處理(li),形(xing)(xing)成(cheng)所(suo)(suo)述(shu)已成(cheng)功(gong)(gong)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)記(ji)錄信(xin)(xin)息。這樣(yang)(yang),后續如出現設備故障等問題(ti),可以根據區域共(gong)(gong)享(xiang)(xiang)(xiang)集群和系(xi)統(tong)(tong)(tong)(tong)(tong)共(gong)(gong)享(xiang)(xiang)(xiang)集群各自的(de)(de)成(cheng)功(gong)(gong)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)記(ji)錄信(xin)(xin)息,確定需要從哪(na)些數(shu)據開始進行處理(li),盡可能的(de)(de)減少數(shu)據恢(hui)復的(de)(de)統(tong)(tong)(tong)(tong)(tong)計(ji)(ji)量。
作為本實施例的(de)進(jin)(jin)一步改進(jin)(jin),如(ru)圖6所(suo)示,所(suo)述系統還包括:
接(jie)入節點130,用(yong)于在響應完用(yong)戶請求之(zhi)后,根(gen)據響應結(jie)果形(xing)成的操作記(ji)錄;所述操作記(ji)錄為所述統計信息(xi)之(zhi)一。
所(suo)(suo)述接入節點可為各種能(neng)夠(gou)電(dian)子設備(bei),如(ru)云(yun)存儲系統的(de)云(yun)存儲設備(bei),能(neng)夠(gou)用(yong)于(yu)接收(shou)用(yong)戶的(de)訪問(wen)請(qing)求(qiu),響(xiang)應訪問(wen)請(qing)求(qiu),根據響(xiang)應結果(guo)來形成所(suo)(suo)述操作(zuo)記(ji)錄。所(suo)(suo)述操作(zuo)記(ji)錄可包括在一定時間內的(de)訪問(wen)請(qing)求(qiu)數量(liang)、占用(yong)的(de)存儲空間及與用(yong)戶交(jiao)互的(de)數據流(liu)量(liang)等(deng)信息。
接入節(jie)點(dian)在處理完(wan)用(yong)戶(hu)訪問請(qing)求后(hou),會先將操作(zuo)記錄(lu)寫到本地的操作(zuo)記錄(lu)文(wen)件(jian)中;在本地存儲到一(yi)(yi)定數量后(hou)一(yi)(yi)起發送給區域(yu)共(gong)享集群(qun),相比于(yu)每(mei)處理一(yi)(yi) 個請(qing)求即(ji)在區域(yu)共(gong)享集群(qun)中記錄(lu)一(yi)(yi)次,大大提高寫效率、減少(shao)網絡開(kai)銷。
將每個接(jie)入節點的(de)操作(zuo)(zuo)記錄(lu)文件遷(qian)移到在區域(yu)共(gong)享集(ji)(ji)群中(zhong)集(ji)(ji)中(zhong)存(cun)(cun)儲、計(ji)(ji)算、并存(cun)(cun)放(fang)產生(sheng)輸出(chu)統計(ji)(ji)表,便于(yu)使用(yong)區域(yu)共(gong)享集(ji)(ji)群的(de)存(cun)(cun)儲資源的(de)數(shu)(shu)據(ju)(ju)冗(rong)余機制保證數(shu)(shu)據(ju)(ju)的(de)冗(rong)余存(cun)(cun)放(fang)不丟失(shi)(shi)、使用(yong)共(gong)享集(ji)(ji)群的(de)計(ji)(ji)算模(mo)塊(kuai)對整個數(shu)(shu)據(ju)(ju)中(zhong)心進(jin)行(xing)統計(ji)(ji)計(ji)(ji)算;相比存(cun)(cun)儲操作(zuo)(zuo)記錄(lu)文件和(he)輸出(chu)統計(ji)(ji)表在接(jie)入節點或區域(yu)統計(ji)(ji)服務(wu)器上(shang)提高(gao)了(le)計(ji)(ji)費(fei)的(de)正確性,因為接(jie)入節點或區域(yu)統計(ji)(ji)服務(wu)器的(de)單點故障會導致數(shu)(shu)據(ju)(ju)的(de)丟失(shi)(shi)、進(jin)而(er)導致計(ji)(ji)費(fei)的(de)不準確。
區域統(tong)(tong)(tong)計(ji)(ji)服務(wu)(wu)(wu)器每隔(ge)一定(ding)時間周期向(xiang)區域共享(xiang)集(ji)群自動發起統(tong)(tong)(tong)計(ji)(ji)計(ji)(ji)算(suan)請求(qiu)(qiu),由區域共享(xiang)集(ji)群的(de)(de)(de)計(ji)(ji)算(suan)模塊對存(cun)儲在該集(ji)群上的(de)(de)(de)文件進行(xing)統(tong)(tong)(tong)計(ji)(ji)。區域統(tong)(tong)(tong)計(ji)(ji)服務(wu)(wu)(wu)器并不進行(xing)數據的(de)(de)(de)存(cun)儲和(he)計(ji)(ji)算(suan),避免區域統(tong)(tong)(tong)計(ji)(ji)服務(wu)(wu)(wu)器的(de)(de)(de)單點故障會導(dao)致數據的(de)(de)(de)丟失、以及單臺機器計(ji)(ji)算(suan)效率低(di)的(de)(de)(de)問題。采用這種(zhong)結構,即使該區域統(tong)(tong)(tong)計(ji)(ji)服務(wu)(wu)(wu)器發生故障,再加入(ru)新(xin)的(de)(de)(de)區域統(tong)(tong)(tong)計(ji)(ji)服務(wu)(wu)(wu)器對區域共享(xiang)集(ji)群重新(xin)發起統(tong)(tong)(tong)計(ji)(ji)計(ji)(ji)算(suan)請求(qiu)(qiu)即可(ke)。
在(zai)(zai)區域共(gong)享集(ji)群(qun)中形成(cheng)成(cheng)功統(tong)計(ji)(ji)記(ji)錄信(xin)息,便于(yu)在(zai)(zai)區域統(tong)計(ji)(ji)服務器發生故(gu)障過段時間(jian)(jian)重(zhong)啟(qi)后(hou)、或者新(xin)的區域統(tong)計(ji)(ji)服務器加入后(hou),向區域共(gong)享集(ji)群(qun)再次(ci)自動發起統(tong)計(ji)(ji)計(ji)(ji)算請求時,區域共(gong)享集(ji)群(qun)了解到(dao)目(mu)前的統(tong)計(ji)(ji)進展,便于(yu)從最(zui)近(jin)統(tong)計(ji)(ji)成(cheng)周期的下一(yi)個時間(jian)(jian)周期開始進行統(tong)計(ji)(ji)。采用(yong)這種結構避(bi)免數(shu)據的重(zhong)復統(tong)計(ji)(ji),或者中途統(tong)計(ji)(ji)的丟失。
在本申請所提供的(de)幾個實(shi)(shi)(shi)施例(li)中,應該理解到,所揭露的(de)設備(bei)和方法,可以(yi)(yi)通(tong)過其(qi)它的(de)方式(shi)實(shi)(shi)(shi)現(xian)。以(yi)(yi)上所描述(shu)的(de)設備(bei)實(shi)(shi)(shi)施例(li)僅(jin)僅(jin)是示意性(xing)的(de),例(li)如(ru),所述(shu)單(dan)元(yuan)(yuan)的(de)劃分(fen)(fen)(fen),僅(jin)僅(jin)為一(yi)(yi)種邏輯功能劃分(fen)(fen)(fen),實(shi)(shi)(shi)際實(shi)(shi)(shi)現(xian)時可以(yi)(yi)有另(ling)外的(de)劃分(fen)(fen)(fen)方式(shi),如(ru):多個單(dan)元(yuan)(yuan)或(huo)(huo)(huo)(huo)(huo)組(zu)件可以(yi)(yi)結合(he),或(huo)(huo)(huo)(huo)(huo)可以(yi)(yi)集成到另(ling)一(yi)(yi)個系統,或(huo)(huo)(huo)(huo)(huo)一(yi)(yi)些(xie)特征可以(yi)(yi)忽略,或(huo)(huo)(huo)(huo)(huo)不執行。另(ling)外,所顯示或(huo)(huo)(huo)(huo)(huo)討論的(de)各(ge)組(zu)成部分(fen)(fen)(fen)相互之間(jian)的(de)耦合(he)、或(huo)(huo)(huo)(huo)(huo)直接(jie)耦合(he)、或(huo)(huo)(huo)(huo)(huo)通(tong)信(xin)連接(jie)可以(yi)(yi)是通(tong)過一(yi)(yi)些(xie)接(jie)口,設備(bei)或(huo)(huo)(huo)(huo)(huo)單(dan)元(yuan)(yuan)的(de)間(jian)接(jie)耦合(he)或(huo)(huo)(huo)(huo)(huo)通(tong)信(xin)連接(jie),可以(yi)(yi)是電性(xing)的(de)、機(ji)械的(de)或(huo)(huo)(huo)(huo)(huo)其(qi)它形式(shi)的(de)。
上述作為分(fen)離部件說明的(de)單元可(ke)(ke)以(yi)(yi)(yi)是、或也(ye)可(ke)(ke)以(yi)(yi)(yi)不是物理上分(fen)開(kai)的(de),作為單元顯(xian)示的(de)部件可(ke)(ke)以(yi)(yi)(yi)是、或也(ye)可(ke)(ke)以(yi)(yi)(yi)不是物理單元,即可(ke)(ke)以(yi)(yi)(yi)位于(yu)一個地方, 也(ye)可(ke)(ke)以(yi)(yi)(yi)分(fen)布(bu)到多(duo)個網絡單元上;可(ke)(ke)以(yi)(yi)(yi)根據實(shi)(shi)際的(de)需(xu)要選擇其(qi)中的(de)部分(fen)或全部單元來實(shi)(shi)現本實(shi)(shi)施例(li)方案的(de)目的(de)。
另外(wai),在本發(fa)明各(ge)實施例(li)中(zhong)的各(ge)功能單(dan)(dan)元可(ke)(ke)以全(quan)部集成(cheng)在一(yi)個(ge)(ge)處理模塊中(zhong),也(ye)可(ke)(ke)以是各(ge)單(dan)(dan)元分別單(dan)(dan)獨作(zuo)為一(yi)個(ge)(ge)單(dan)(dan)元,也(ye)可(ke)(ke)以兩個(ge)(ge)或兩個(ge)(ge)以上單(dan)(dan)元集成(cheng)在一(yi)個(ge)(ge)單(dan)(dan)元中(zhong);上述集成(cheng)的單(dan)(dan)元既可(ke)(ke)以采用(yong)(yong)硬件(jian)的形式實現,也(ye)可(ke)(ke)以采用(yong)(yong)硬件(jian)加軟件(jian)功能單(dan)(dan)元的形式實現。
本領域(yu)普(pu)通技術人員可以(yi)理解:實現上(shang)述方法實施例的(de)(de)全部或(huo)部分步(bu)驟可以(yi)通過程(cheng)序指令相(xiang)關的(de)(de)硬件來完成,前(qian)述的(de)(de)程(cheng)序可以(yi)存(cun)(cun)儲(chu)(chu)于一計算(suan)機(ji)可讀取存(cun)(cun)儲(chu)(chu)介(jie)(jie)質中,該(gai)程(cheng)序在執(zhi)行(xing)(xing)時,執(zhi)行(xing)(xing)包括(kuo)(kuo)上(shang)述方法實施例的(de)(de)步(bu)驟;而前(qian)述的(de)(de)存(cun)(cun)儲(chu)(chu)介(jie)(jie)質包括(kuo)(kuo):移動存(cun)(cun)儲(chu)(chu)設備、只讀存(cun)(cun)儲(chu)(chu)器(qi)(ROM,Read-Only Memory)、隨機(ji)存(cun)(cun)取存(cun)(cun)儲(chu)(chu)器(qi)(RAM,Random Access Memory)、磁(ci)碟或(huo)者光盤等各種(zhong)可以(yi)存(cun)(cun)儲(chu)(chu)程(cheng)序代(dai)碼的(de)(de)介(jie)(jie)質。
以上所述,僅為(wei)本(ben)發(fa)(fa)明(ming)的(de)(de)具體實施方(fang)式(shi),但本(ben)發(fa)(fa)明(ming)的(de)(de)保護(hu)范(fan)圍(wei)并不(bu)局限于此,任何熟(shu)悉(xi)本(ben)技(ji)術(shu)領域的(de)(de)技(ji)術(shu)人員在本(ben)發(fa)(fa)明(ming)揭(jie)露的(de)(de)技(ji)術(shu)范(fan)圍(wei)內,可(ke)輕易想到變化或替換,都應(ying)涵(han)蓋在本(ben)發(fa)(fa)明(ming)的(de)(de)保護(hu)范(fan)圍(wei)之內。因(yin)此,本(ben)發(fa)(fa)明(ming)的(de)(de)保護(hu)范(fan)圍(wei)應(ying)以所述權(quan)利要求的(de)(de)保護(hu)范(fan)圍(wei)為(wei)準(zhun)。