本說明書實施例提供一種資料的處理方法、裝置及設備。
為了使本技術領域的人員更好地理解本說明書中的技術方案,下面將結合本說明書實施例中的附圖,對本說明書實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本說明書一部分實施例,而不是全部的實施例。基於本說明書中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都應當屬於本說明書保護的範圍。
實施例一
如圖1所示,本說明書實施例提供一種資料的處理方法,該方法的執行主體可以為終端設備或伺服器,其中的終端設備可以是如手機、平板電腦等移動終端設備,還可以是如個人電腦等終端設備,伺服器可以是獨立的一個伺服器,也可以是由多個伺服器組成的伺服器集群。本說明書實施例中為了提高資料的處理效率,該方法的執行主體以伺服器為例進行詳細說明,對於終端設備的情況,可以參照下述伺服器的具體處理執行,在此不再贅述。該方法具體可以包括以下步驟:
在步驟S102中,接收待儲存資料塊,獲取待儲存資料塊的第一校驗值。
其中,待儲存資料塊可以是任意資料塊,其中的待儲存資料塊可以是由一條或多條資料組成,例如用於註冊某網站的一條資料的資料塊,該資料塊中可以包括用戶註冊的用戶名、密碼和電子郵箱地址等。第一校驗值可以是透過校驗值演算法對待儲存資料塊中的資料進行計算得到的校驗值,校驗值演算法可以包括多種,例如奇偶演算法、BCC(Block Check Character,塊校驗碼)異或校驗法、縱向冗餘校驗演算法、迴圈冗餘校驗演算法和資料摘要演算法(或Hash演算法)等。
在實施中,伺服器可以接收其它設備(如用戶的終端設備或商戶的伺服器等)發送的待儲存資料塊,具體可以包括多種方式,例如,用戶在網站上進行註冊時,用戶可以透過該網站的首頁中查找到註冊選項,查找到後,可以點擊該註冊選項,此時,用戶的終端設備可以獲取註冊頁面,用戶可以在該註冊頁面中輸入用戶名、密碼等資訊。輸入完成後,可以點擊註冊頁面中的確定按鍵,終端設備可以獲取用戶在註冊頁面中輸入的資訊,可以將獲取的資訊作為待儲存資料塊,並將該待儲存資料塊發送給伺服器。
再例如,如圖2所示,用戶在購物完成後,到收銀台結帳,並且用戶使用支付卡(如銀行卡或購物卡等)進行支付,商家可以向其收銀設備中輸入用戶的支付卡的卡號等資訊,該收銀設備可以儲存輸入的上述資訊,並可以將該支付卡的卡號作為待儲存資料塊,將該待儲存資料塊發送給支付卡中心的伺服器,伺服器可以接收該待儲存資料塊。
伺服器中可以設置有校驗值演算法,當伺服器接收到終端設備發送的待儲存資料塊時,可以透過預先設置的校驗值演算法計算待儲存資料塊的校驗值(即第一校驗值)。
需要說明的是,伺服器接收其它設備發送的待儲存資料塊的處理方式除了可以包括上述兩種方式外,在實際應用中還可以包括多種可實現方式,本說明書實施例對此不做限定。
在步驟S104中,如果儲存的資料塊中存在校驗值與上述第一校驗值相匹配的目標資料塊,且上述待儲存資料塊與該目標資料塊不同,則儲存待儲存資料塊,並為待儲存資料塊分配與該目標資料塊不同的輔助查詢標識。
其中,輔助查詢標識可以是用戶確定待儲存資料塊是否是已儲存的資料塊時所依據的輔助標識,輔助查詢標識可以包括多種表現形式,輔助查詢標識的具體形式可以根據實際情況設定,具體如由一個或多個數字構成的數字字串,如2或15等,或者,還可以是由一個或多個字母構成的字串,如rl或rk等,再或者,還可以是數字與字母的組合形成的字串,如x1或y2等。本說明書實施例中以輔助查詢標識來說明的校驗值外的輔助標識,在實際應用中,輔助查詢標識還可以存在其它不同的表示形式,例如版本號等。
在實施中,校驗值是用於檢測兩個或多個資料之間是否相同的主要手段之一,通常,如果兩個資料或資料塊的校驗值相同,則表示這兩個資料或資料塊為相同的資料或資料塊,但是,校驗值在一定的範圍內會產生相同數值的情況,即兩個不同的資料塊產生了相同的校驗值。當伺服器接收到待儲存資料塊後,可以計算該待儲存資料塊的第一校驗值,此時,可以獲取預先儲存的各個資料塊的校驗值,可以將第一校驗值分別與儲存的資料塊的校驗值進行對比,如果第一校驗值與儲存的某一個資料塊或多個資料塊(即目標資料塊)的校驗值相同,則基於上述內容可知,可以認為待儲存資料塊應該與目標資料塊相同,此時,即使待儲存資料塊與目標資料塊不同,而僅是兩者的校驗值相同,則伺服器也將無法儲存該待儲存資料塊,從而造成資料或資料塊的漏儲存,而即使透過某些方法將該待儲存資料儲存到伺服器中,最終,由於伺服器中存在同一校驗值的多個不同的資料塊,則伺服器在讀取該第一校驗值的資料塊時,可能不同時刻讀取的資料塊是不同,例如,伺服器第一次讀取的第一校驗值對應的資料塊為上述待儲存資料塊,伺服器第二次再讀取的第一校驗值對應的資料塊為目標資料塊等。為此,本說明書實施例提供一種可選的處理方式,具體可以參見下述相關內容:
伺服器接獲取到待儲存資料的第一校驗值後,可以將預先儲存的每個資料塊的校驗值分別與第一校驗值進行對比,如果儲存的資料塊中包括校驗值與第一校驗值相匹配(如相同),如果儲存的資料塊中包括校驗值與第一校驗值相同的目標資料,則可以分別提取待儲存資料塊和目標資料塊的資料內容,可以將提取的待儲存資料塊的資料內容與目標資料塊的資料內容進行比對,如果待儲存資料塊與目標資料塊的資料內容不同,則可以確定待儲存資料塊與目標資料塊之間具有相同的校驗值,但是資料內容並不相同,則伺服器可以將待儲存資料塊儲存到伺服器中,並且為待儲存資料塊重新分配一個輔助查詢標識。其中,為了將具有相同校驗值的不同資料塊進行區分,可以為具有相同校驗值的不同資料塊分別設置不同的輔助查詢標識,這樣,當伺服器再次接收到新的待儲存資料塊時,可以分別透過校驗值與輔助查詢標識,確定新的待儲存資料塊是否在伺服器中已經儲存,即先透過校驗值進行查詢,如果確定新的待儲存資料塊的校驗值與已儲存資料塊的校驗值相同,則可以對資料內容進行比對,如果新的待儲存資料塊與其中的某一個資料塊相同,則可以確定新的待儲存資料塊與該資料塊為同一個資料塊,否則為不同的資料塊,此時可以再為新的待儲存資料塊分配輔助查詢標識。
例如,待儲存資料塊為“CD”,第一校驗值為“Xfdsafdsfdlasf”,目標資料塊為“AB”,如果伺服器中儲存的目標資料塊“AB”的校驗值為“Xfdsafdsfdlasf”,待儲存資料塊為“CD”,透過上述校驗值演算法計算待儲存資料塊“CD”的第一校驗值為“Xfdsafdsfdlasf”,則待儲存資料塊與目標資料塊的校驗值相同,但是,待儲存資料塊與目標資料塊的資料內容並不相同,此時可以儲存待儲存資料塊“CD”,然後,可以分別為待儲存資料塊與目標資料塊分配不同的輔助查詢標識,例如待儲存資料塊的輔助查詢標識(或版本號等)為1,目標資料塊的輔助查詢標識(或版本號等)為2等。
如圖3所示,本說明書實施例提供一種資料的處理方法,該方法的執行主體可以為電子設備,該電子設備可以是用於向伺服器請求儲存某資料塊的設備,具體如收銀台的電子設備等,其中的電子設備可以是如手機、平板電腦等移動終端設備,還可以是如個人電腦等終端設備。該方法具體可以包括以下步驟:
在步驟S302中,向伺服器發送待儲存資料塊。
在步驟S304中,接收伺服器發送的待儲存資料塊的儲存結果,儲存結果是伺服器在儲存的資料塊中存在校驗值與待儲存資料塊的第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同的情況下生成。
上述步驟S302和步驟S304的具體處理過程可以參見上述步驟S102和步驟S104中的相關內容,在此不再贅述。
本說明書實施例提供一種資料的處理方法,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
實施例二
如圖4所示,本說明書實施例提供了一種資料的處理方法,該方法的執行主體可以為電子設備和伺服器,該電子設備可以是用於向伺服器請求儲存某資料塊的設備,具體如收銀台的電子設備等,其中的電子設備可以是如手機、平板電腦等移動終端設備,還可以是如個人電腦等終端設備,伺服器可以是獨立的一個伺服器,也可以是由多個伺服器組成的伺服器集群。該方法具體可以包括以下步驟:
在步驟S402中,伺服器接收待儲存資料塊,獲取待儲存資料塊的第一校驗值。
其中,第一校驗值可以為雜湊值,本說明書實施例中以校驗值為雜湊值為例進行說明。
上述步驟S402的具體處理過程可以參見上述是實施例一中步驟S102的相關內容,在此不再贅述。
在步驟S404中,如果儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,則伺服器判斷待儲存資料塊與目標資料塊中的每個子資料塊是否相同。
在實施中,雜湊值可以是用於檢測資料之間是否相同的主要手段之一,通常,如果兩個資料或資料塊的雜湊值相同,則表示這兩個資料或資料塊為相同的資料或資料塊,但是,雜湊值在一定的範圍內會產生碰撞,即兩個不同的資料塊具有相同的雜湊值。本說明書實施例中,可以設置一個處理資料衝突的裝置,該裝置可以用於解決由於雜湊值碰撞帶來的業務問題,該裝置可以分為兩個主要部分,分別為裝置前置和裝置處理,該裝置前置中預先設置有一個資料儲存模型,該資料儲存模型中,可以包括字串(即待儲存資料塊)、雜湊值和衝突版本(即輔助查詢標識)等三個專案。
當伺服器接收到待儲存資料塊後,該裝置前置可以計算該待儲存資料塊的雜湊值(即第一校驗值),此時,可以獲取預先儲存的各個資料塊的雜湊值,可以將第一校驗值分別與儲存的資料塊的雜湊值進行比對,如果第一校驗值與儲存的目標資料塊的雜湊值相同,則判斷待儲存資料塊與目標資料塊中的每個子資料塊是否相同。
在步驟S406中,如果儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同,則伺服器儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識。
其中,輔助查詢標識可以為字元或字串,其中的字元可以是數字、字母、符號或文字等,字串可以是由多個字元構成,例如R12或5等。
在實施中,如圖2所示,當伺服器接收到待儲存資料塊後,該裝置前置可以計算該待儲存資料塊的雜湊值(即第一校驗值),此時,可以獲取預先儲存的各個資料塊的雜湊值,可以將第一校驗值分別與儲存的資料塊的雜湊值進行比對,如果第一校驗值與儲存的目標資料塊的雜湊值相同,則可以分別提取待儲存資料塊和目標資料塊的資料內容,可以將提取的待儲存資料塊的資料內容與目標資料塊的資料內容進行比對,如果待儲存資料塊與目標資料塊的資料內容不同,則可以確定待儲存資料塊與目標資料塊之間具有相同的雜湊值,但是資料內容不相同,則該裝置前置可以將待儲存資料塊儲存到伺服器中,並且為待儲存資料塊重新分配一個輔助查詢標識。則基於上述實施例一中步驟S104的示例,該裝置前置中的如表1所示。
表1
上述處理過程主要是裝置前置部分需要執行的處理,在實際應用中,裝置處理部分可以對任意查詢雜湊值的操作進行處理,具體地,當重新傳入待儲存資料塊時,該裝置處理部分可以檢測上述資料儲存模型中是否儲存有衝突資料,如果沒有,則執行上述處理過程,如果有,則需要提取出所有的雜湊值相同的資料塊,該裝置處理部分會做一一的判斷,判斷其中的字串的值與重新傳入待儲存資料塊是否相同。
上述儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識的處理,在實際應用中可以包括多種處理方式,除了上述相關內容提供的實現方式外,還可以包括多種可實現方式,具體可以如下:將待儲存資料塊和待儲存資料塊的輔助查詢標識,以及目標資料塊和目標資料塊的輔助查詢標識儲存於同一資料塊集合中。
其中的同一資料塊集合可以如表1所示,這樣,對於上述兩個資料塊的查詢,可以分別透過校驗值和輔助查詢標識綜合確定。
在步驟S408中,如果待儲存資料塊與目標資料塊中的第一子資料塊相同,則伺服器輸出第一子資料塊的輔助查詢標識和第一校驗值。
在實施中,如圖2所示,如果透過對比確定待儲存資料塊與目標資料塊中的第一子資料塊相同,則可以確定待儲存資料塊與第一子資料塊相同,此時,可以將第一子資料塊的校驗值和輔助查詢標識作為待儲存資料塊的校驗值和輔助查詢標識(衝突版本),並可以輸出第一子資料塊的輔助查詢標識和第一校驗值。
在步驟S410中,電子設備接收伺服器發送的待儲存資料塊的儲存結果,該儲存結果是伺服器在儲存的資料塊中存在校驗值與待儲存資料塊的第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同的情況下生成。
在實施中,如圖2所示,伺服器儲存完成待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識後,可以向電子設備發送待儲存資料塊的儲存結果,以提示電子設備,其發送的待儲存資料塊已完成儲存。
為了及時對伺服器中可能存在的資料風險進行控制,可以設置風險控制伺服器,電子設備可以將伺服器每次處理完成的待儲存資料塊的校驗值和輔助查詢標識發送給風險控制伺服器,以便相應的管理人員管理和控制資料儲存可能存在的風險。具體可以參見下述步驟S412和步驟S414的相關內容。
在步驟S412中,電子設備接收伺服器發送的第一校驗值和目標輔助查詢標識,該目標輔助查詢標識為校驗值與第一校驗值相匹配的目標資料塊中,與待儲存資料塊相同的第一子資料塊的輔助查詢標識。
在步驟S414中,電子設備將第一校驗值和目標輔助查詢標識發送給風險控制伺服器。
在實施中,如圖2所示,電子設備可以接收伺服器發送的第一校驗值和目標輔助查詢標識,並可以透過第一校驗值和目標輔助查詢標識生成風控資訊,可以將生成的風控資訊發送給風險控制伺服器。管理人員可以透過風控資訊即時瞭解伺服器中的資料儲存情況。
本說明書實施例提供一種資料的處理方法,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
實施例三
以上為本說明書實施例提供的資料的處理方法,基於同樣的思路,本說明書實施例還提供一種資料的處理裝置,如圖5所示。
所述資料的處理裝置包括:獲取模組501和資料處理模組502,其中:
獲取模組501,用於接收待儲存資料塊,獲取所述待儲存資料塊的第一校驗值;
資料處理模組502,用於如果儲存的資料塊中存在校驗值與所述第一校驗值相匹配的目標資料塊,且所述待儲存資料塊與所述目標資料塊不同,則儲存所述待儲存資料塊,並為所述待儲存資料塊分配與所述目標資料塊不同的輔助查詢標識。
可選地,本說明書實施例中,所述目標資料塊中包括多個不同的子資料塊,每個子資料塊設置有相應的輔助查詢標識,所述裝置還包括:
判斷模組,用於如果儲存的資料塊中存在校驗值與所述第一校驗值相匹配的目標資料塊,則判斷所述待儲存資料塊與所述目標資料塊中的每個子資料塊是否相同;
輸出模組,用於如果所述待儲存資料塊與所述目標資料塊中的第一子資料塊相同,則輸出所述第一子資料塊的輔助查詢標識和所述第一校驗值。
可選地,本說明書實施例中,所述資料處理模組502,用於將所述待儲存資料塊和所述待儲存資料塊的輔助查詢標識,以及所述目標資料塊和所述目標資料塊的輔助查詢標識儲存於同一資料塊集合中。
可選地,本說明書實施例中,所述輔助查詢標識為字元或字串。
可選地,本說明書實施例中,所述第一校驗值為雜湊值。
本說明書實施例提供一種資料的處理裝置,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
實施例四
以上為本說明書實施例提供的資料的處理方法,基於同樣的思路,本說明書實施例還提供一種資料的處理裝置,如圖6所示。
所述資料的處理裝置包括:資料發送模組601和結果接收模組602,其中:
資料發送模組601,用於向伺服器發送待儲存資料塊;
結果接收模組602,用於接收所述伺服器發送的所述待儲存資料塊的儲存結果,所述儲存結果是所述伺服器在儲存的資料塊中存在校驗值與所述待儲存資料塊的第一校驗值相匹配的目標資料塊,且所述待儲存資料塊與所述目標資料塊不同的情況下生成。
可選地,本說明書實施例中,所述裝置還包括:
資訊接收模組,用於接收所述伺服器發送的所述第一校驗值和目標輔助查詢標識,所述目標輔助查詢標識為校驗值與所述第一校驗值相匹配的目標資料塊中,與所述待儲存資料塊相同的第一子資料塊的輔助查詢標識;
資訊發送模組,用於將所述第一校驗值和目標輔助查詢標識發送給風險控制伺服器。
本說明書實施例提供一種資料的處理裝置,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
實施例五
基於同樣的思路,本說明書實施例還提供一種資料的處理設備,如圖7所示。
該資料的處理設備可以為上述實施例提供的伺服器等。
資料的處理設備可因配置或性能不同而產生比較大的差異,可以包括一個或一個以上的處理器701和記憶體702,記憶體702中可以儲存有一個或一個以上儲存應用程式或資料。其中,記憶體702可以是短暫儲存或持久儲存。儲存在記憶體702的應用程式可以包括一個或一個以上模組(圖示未示出),每個模組可以包括對資料的處理設備中的一系列電腦可執行指令。更進一步地,處理器701可以設置為與記憶體702通信,在資料的處理設備上執行記憶體702中的一系列電腦可執行指令。資料的處理設備還可以包括一個或一個以上電源703,一個或一個以上有線或無線網路介面704,一個或一個以上輸入輸出介面705,一個或一個以上鍵盤706。
具體在本實施例中,資料的處理設備包括有記憶體,以及一個或一個以上的程式,其中一個或者一個以上程式儲存於記憶體中,且一個或者一個以上程式可以包括一個或一個以上模組,且每個模組可以包括對資料的處理設備中的一系列電腦可執行指令,且經配置以由一個或者一個以上處理器執行該一個或者一個以上套裝程式含用於進行以下電腦可執行指令:
接收待儲存資料塊,獲取所述待儲存資料塊的第一校驗值;
如果儲存的資料塊中存在校驗值與所述第一校驗值相匹配的目標資料塊,且所述待儲存資料塊與所述目標資料塊不同,則儲存所述待儲存資料塊,並為所述待儲存資料塊分配與所述目標資料塊不同的輔助查詢標識。
可選地,所述目標資料塊中包括多個不同的子資料塊,每個子資料塊設置有相應的輔助查詢標識;
所述接收待儲存資料塊,獲取所述待儲存資料塊的第一校驗值之後,還包括:
如果儲存的資料塊中存在校驗值與所述第一校驗值相匹配的目標資料塊,則判斷所述待儲存資料塊與所述目標資料塊中的每個子資料塊是否相同;
如果所述待儲存資料塊與所述目標資料塊中的第一子資料塊相同,則輸出所述第一子資料塊的輔助查詢標識和所述第一校驗值。
可選地,所述儲存所述待儲存資料塊,並為所述待儲存資料塊分配與所述目標資料塊不同的輔助查詢標識,包括:
將所述待儲存資料塊和所述待儲存資料塊的輔助查詢標識,以及所述目標資料塊和所述目標資料塊的輔助查詢標識儲存於同一資料塊集合中。
可選地,所述輔助查詢標識為字元或字串。
可選地,所述第一校驗值為雜湊值。
本說明書實施例提供一種資料的處理設備,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
實施例六
基於同樣的思路,本說明書實施例還提供一種資料的處理設備,如圖8所示。
該資料的處理設備可以為上述實施例提供的電子設備等。
資料的處理設備可因配置或性能不同而產生比較大的差異,可以包括一個或一個以上的處理器801和記憶體802,記憶體802中可以儲存有一個或一個以上儲存應用程式或資料。其中,記憶體802可以是短暫儲存或持久儲存。儲存在記憶體802的應用程式可以包括一個或一個以上模組(圖示未示出),每個模組可以包括對資料的處理設備中的一系列電腦可執行指令。更進一步地,處理器801可以設置為與記憶體802通信,在資料的處理設備上執行記憶體802中的一系列電腦可執行指令。資料的處理設備還可以包括一個或一個以上電源803,一個或一個以上有線或無線網路介面804,一個或一個以上輸入輸出介面805,一個或一個以上鍵盤806。
具體在本實施例中,資料的處理設備包括有記憶體,以及一個或一個以上的程式,其中一個或者一個以上程式儲存於記憶體中,且一個或者一個以上程式可以包括一個或一個以上模組,且每個模組可以包括對資料的處理設備中的一系列電腦可執行指令,且經配置以由一個或者一個以上處理器執行該一個或者一個以上套裝程式含用於進行以下電腦可執行指令:
向伺服器發送待儲存資料塊;
接收所述伺服器發送的所述待儲存資料塊的儲存結果,所述儲存結果是所述伺服器在儲存的資料塊中存在校驗值與所述待儲存資料塊的第一校驗值相匹配的目標資料塊,且所述待儲存資料塊與所述目標資料塊不同的情況下生成。
可選地,所述向伺服器發送待儲存資料塊之後,還包括:
接收所述伺服器發送的所述第一校驗值和目標輔助查詢標識,所述目標輔助查詢標識為校驗值與所述第一校驗值相匹配的目標資料塊中,與所述待儲存資料塊相同的第一子資料塊的輔助查詢標識;
將所述第一校驗值和目標輔助查詢標識發送給風險控制伺服器。
本說明書實施例提供一種資料的處理設備,透過接收待儲存資料塊,並獲取待儲存資料塊的第一校驗值,在儲存的資料塊中存在校驗值與第一校驗值相匹配的目標資料塊,且待儲存資料塊與目標資料塊不同時,儲存待儲存資料塊,並為待儲存資料塊分配與目標資料塊不同的輔助查詢標識,這樣,對於已儲存的目標資料塊與待儲存資料塊來說,當兩者的校驗值相同,但兩者的資料內容不同時,可以儲存待儲存資料塊,並為待儲存資料塊再重新分配與目標資料塊不同的輔助查詢標識,從而來進一步區分校驗值相同,資料內容不同的兩個資料塊,從而解決了相同校驗值不同資料內容的待儲存資料塊,無法儲存到伺服器中的問題,避免造成業務場景的錯亂。
上述對本說明書特定實施例進行了描述。其它實施例在所附申請專利範圍的範圍內。在一些情況下,在申請專利範圍中記載的動作或步驟可以按照不同於實施例中的順序來執行並且仍然可以實現期望的結果。另外,在附圖中描繪的過程不一定要求示出的特定順序或者連續順序才能實現期望的結果。在某些實施方式中,多工處理和並行處理也是可以的或者可能是有利的。
在20世紀90年代,對於一個技術的改進可以很明顯地區分是硬體上的改進(例如,對二極體、電晶體、開關等電路結構的改進)還是軟體上的改進(對於方法流程的改進)。然而,隨著技術的發展,當今的很多方法流程的改進已經可以視為硬體電路結構的直接改進。設計人員幾乎都透過將改進的方法流程編程到硬體電路中來得到相應的硬體電路結構。因此,不能說一個方法流程的改進就不能用硬體實體模組來實現。例如,可編程邏輯器件(Programmable Logic Device, PLD)(例如現場可編程閘陣列(Field Programmable Gate Array, FPGA))就是這樣一種積體電路,其邏輯功能由用戶對器件編程來確定。由設計人員自行編程來把一個數位系統“集成”在一片PLD上,而不需要請晶片製造廠商來設計和製作專用的積體電路晶片。而且,如今,取代手工地製作積體電路晶片,這種編程也多半改用“邏輯編譯器(logic compiler)”軟體來實現,它與程式開發撰寫時所用的軟體編譯器相類似,而要編譯之前的原始代碼也得用特定的編程語言來撰寫,此稱之為硬體描述語言(Hardware Description Language, HDL),而HDL也並非僅有一種,而是有許多種,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)與Verilog。本領域技術人員也應該清楚,只需要將方法流程用上述幾種硬體描述語言稍作邏輯編程並編程到積體電路中,就可以很容易得到實現該邏輯方法流程的硬體電路。
控制器可以按任何適當的方式實現,例如,控制器可以採取例如微處理器或處理器以及儲存可由該(微)處理器執行的電腦可讀程式碼(例如軟體或韌體)的電腦可讀媒體、邏輯閘、開關、專用積體電路(Application Specific Integrated Circuit, ASIC)、可編程邏輯控制器和嵌入微控制器的形式,控制器的例子包括但不限於以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,記憶體控制器還可以被實現為記憶體的控制邏輯的一部分。本領域技術人員也知道,除了以純電腦可讀程式碼方式實現控制器以外,完全可以透過將方法步驟進行邏輯編程來使得控制器以邏輯閘、開關、專用積體電路、可編程邏輯控制器和嵌入微控制器等的形式來實現相同功能。因此這種控制器可以被認為是一種硬體部件,而對其內包括的用於實現各種功能的裝置也可以視為硬體部件內的結構。或者甚至,可以將用於實現各種功能的裝置視為既可以是實現方法的軟體模組又可以是硬體部件內的結構。
上述實施例闡明的系統、裝置、模組或單元,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦。具體的,電腦例如可以為個人電腦、膝上型電腦、蜂窩電話、相機電話、智慧型電話、個人數位助理、媒體播放機、導航設備、電子郵件設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任何設備的組合。
為了描述的方便,描述以上裝置時以功能分為各種單元分別描述。當然,在實施本申請時可以把各單元的功能在同一個或多個軟體和/或硬體中實現。
本領域內的技術人員應明白,本說明書的實施例可提供為方法、系統、或電腦程式產品。因此,本說明書可採用完全硬體實施例、完全軟體實施例、或結合軟體和硬體方面的實施例的形式。而且,本說明書可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。
本說明書是參照根據本說明書實施例的方法、設備(系統)、和電腦程式產品的流程圖和/或方框圖來描述的。應理解可由電腦程式指令實現流程圖和/或方框圖中的每一流程和/或方框、以及流程圖和/或方框圖中的流程和/或方框的結合。可提供這些電腦程式指令到通用電腦、專用電腦、嵌入式處理機或其他可編程資料處理設備的處理器以產生一個機器,使得透過電腦或其他可編程資料處理設備的處理器執行的指令產生用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的裝置。
這些電腦程式指令也可儲存在能引導電腦或其他可編程資料處理設備以特定方式工作的電腦可讀記憶體中,使得儲存在該電腦可讀記憶體中的指令產生包括指令裝置的製造品,該指令裝置實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能。
這些電腦程式指令也可裝載到電腦或其他可編程資料處理設備上,使得在電腦或其他可編程設備上執行一系列操作步驟以產生電腦實現的處理,從而在電腦或其他可編程設備上執行的指令提供用於實現在流程圖一個流程或多個流程和/或方框圖一個方框或多個方框中指定的功能的步驟。
在一個典型的配置中,計算設備包括一個或多個處理器(CPU)、輸入/輸出介面、網路介面和記憶體。
記憶體可能包括電腦可讀媒體中的非永久性記憶體,隨機存取記憶體(RAM)和/或非易失性記憶體等形式,如唯讀記憶體(ROM)或快閃記憶體(flash RAM)。記憶體是電腦可讀媒體的示例。
電腦可讀媒體包括永久性和非永久性、可移動和非可移動媒體可以由任何方法或技術來實現資訊儲存。資訊可以是電腦可讀指令、資料結構、程式的模組或其他資料。電腦的儲存媒體的例子包括,但不限於相變記憶體(PRAM)、靜態隨機存取記憶體(SRAM)、動態隨機存取記憶體(DRAM)、其他類型的隨機存取記憶體(RAM)、唯讀記憶體(ROM)、電可擦除可編程唯讀記憶體(EEPROM)、快閃記憶體或其他記憶體技術、唯讀光碟唯讀記憶體(CD-ROM)、數位多功能光碟(DVD)或其他光學儲存、磁盒式磁帶,磁帶磁磁片儲存或其他磁性存放裝置或任何其他非傳輸媒體,可用於儲存可以被計算設備訪問的資訊。按照本文中的界定,電腦可讀媒體不包括暫存電腦可讀媒體(transitory media),如調製的資料信號和載波。
還需要說明的是,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、商品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、商品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括一個……”限定的要素,並不排除在包括所述要素的過程、方法、商品或者設備中還存在另外的相同要素。
本領域技術人員應明白,本說明書的實施例可提供為方法、系統或電腦程式產品。因此,本說明書可採用完全硬體實施例、完全軟體實施例或結合軟體和硬體方面的實施例的形式。而且,本說明書可採用在一個或多個其中包含有電腦可用程式碼的電腦可用儲存媒體(包括但不限於磁碟記憶體、CD-ROM、光學記憶體等)上實施的電腦程式產品的形式。
本說明書可以在由電腦執行的電腦可執行指令的一般上下文中描述,例如程式模組。一般地,程式模組包括執行特定任務或實現特定抽象資料類型的常式、程式、物件、元件、資料結構等等。也可以在分散式運算環境中實踐本申請,在這些分散式運算環境中,由透過通信網路而被連接的遠端處理設備來執行任務。在分散式運算環境中,程式模組可以位於包括存放裝置在內的本地和遠端電腦儲存媒體中。
本說明書中的各個實施例均採用遞進的方式描述,各個實施例之間相同相似的部分互相參見即可,每個實施例重點說明的都是與其他實施例的不同之處。尤其,對於系統實施例而言,由於其基本相似於方法實施例,所以描述的比較簡單,相關之處參見方法實施例的部分說明即可。
以上所述僅為本說明書的實施例而已,並不用於限制本說明書。對於本領域技術人員來說,本說明書可以有各種更改和變化。凡在本說明書的精神和原理之內所作的任何修改、等同替換、改進等,均應包含在本說明書的申請專利範圍之內。The embodiments of this specification provide a data processing method, device and equipment. In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described The embodiments are only a part of the embodiments in this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this specification. Embodiment 1 As shown in Figure 1, the embodiment of this specification provides a data processing method. The execution body of the method can be a terminal device or a server. The terminal device can be a mobile terminal device such as a mobile phone or a tablet computer. It can be a terminal device such as a personal computer. The server can be an independent server or a server cluster composed of multiple servers. In order to improve the efficiency of data processing in the embodiments of this specification, the execution body of the method takes a server as an example for detailed description. For the terminal device, refer to the specific processing execution of the server below, which will not be repeated here. The method may specifically include the following steps: In step S102, the data block to be stored is received, and the first check value of the data block to be stored is obtained. Among them, the data block to be stored can be any data block, and the data block to be stored can be composed of one or more pieces of data, for example, a data block used to register a piece of data on a certain website, and the data block can include user-registered data blocks. User name, password, email address, etc. The first check value can be a check value calculated by using a check value algorithm to calculate the data in the data block to be stored. The check value algorithm can include multiple, such as parity algorithm, BCC (Block Check Character, block check Code verification) exclusive OR check method, longitudinal redundancy check algorithm, loop redundancy check algorithm and data digest algorithm (or Hash algorithm), etc. In implementation, the server can receive data blocks to be stored sent by other devices (such as the user’s terminal device or the merchant’s server, etc.), which can specifically include multiple methods. For example, when the user registers on the website, the user can use the The registration option is found on the homepage of the website. After finding it, you can click the registration option. At this time, the user's terminal device can obtain the registration page, and the user can enter the user name, password and other information on the registration page. After the input is completed, you can click the OK button on the registration page, and the terminal device can obtain the information entered by the user on the registration page, use the obtained information as a data block to be stored, and send the data block to be stored to the server. For another example, as shown in Figure 2, after the user finishes shopping, he goes to the cashier to check out, and the user uses a payment card (such as a bank card or shopping card) to pay, the merchant can input the user's payment card into its cash register device The cash register device can store the above-mentioned information entered, and can use the card number of the payment card as the data block to be stored, and send the data block to be stored to the server of the payment card center, and the server can receive the information to be stored. Store the data block. The server can be set with a check value algorithm. When the server receives the data block to be stored from the terminal device, it can calculate the check value of the data block to be stored through the preset check value algorithm (that is, the first Check value). It should be noted that, in addition to the above-mentioned two methods, the processing method for the server to receive the data block to be stored sent by other devices may also include multiple achievable methods in practical applications, which are not limited in the embodiment of this specification. In step S104, if there is a target data block whose check value matches the first check value among the stored data blocks, and the data block to be stored is different from the target data block, the data block to be stored is stored, and Assign an auxiliary query identifier different from the target data block to the data block to be stored. Among them, the auxiliary query identifier may be the auxiliary identifier used by the user to determine whether the data block to be stored is a stored data block. The auxiliary query identifier may include a variety of manifestations. The specific form of the auxiliary query identifier can be set according to actual conditions. A number string composed of one or more numbers, such as 2 or 15, or it can also be a string composed of one or more letters, such as rl or rk, etc., or alternatively, it can be a combination of numbers and letters A string formed by combination, such as x1 or y2. In the embodiments of this specification, the auxiliary query identifier is used to illustrate the auxiliary identifier outside the check value. In practical applications, the auxiliary query identifier may also have other different representation forms, such as a version number. In implementation, the check value is one of the main methods used to detect whether two or more data is the same. Generally, if the check value of two data or data blocks is the same, it means that the two data or data The blocks are the same data or data blocks, but the check value will produce the same value within a certain range, that is, two different data blocks have the same check value. When the server receives the data block to be stored, it can calculate the first check value of the data block to be stored. At this time, the check value of each data block stored in advance can be obtained, and the first check value can be compared with The check value of the stored data block is compared. If the first check value is the same as the check value of a certain data block or multiple data blocks (ie the target data block), then based on the above content, it can be considered as waiting The storage data block should be the same as the target data block. At this time, even if the data block to be stored is different from the target data block, but only the check value of the two is the same, the server will not be able to store the data block to be stored, resulting in The missing storage of data or data blocks, and even if the data to be stored is stored in the server through some method, in the end, because there are multiple different data blocks with the same check value in the server, the server is reading When the data block of the first check value is different, the data block read at different times may be different. For example, the data block corresponding to the first check value read by the server for the first time is the above-mentioned data block to be stored. The data block corresponding to the first check value read for the second time is the target data block and so on. To this end, the embodiment of this specification provides an optional processing method. For details, please refer to the following related content: After receiving the first check value of the data to be stored, the server can check the pre-stored data block. The check value is compared with the first check value. If the stored data block includes the check value that matches the first check value (if the same), if the stored data block includes the check value and the first check value For target data with the same value, the data content of the data block to be stored and the target data block can be extracted separately, and the data content of the extracted data block to be stored can be compared with the data content of the target data block. If the data content of the target data block is different, it can be determined that the data block to be stored and the target data block have the same check value, but the data content is not the same, the server can store the data block to be stored in the server, And reassign an auxiliary query identifier for the data block to be stored. Among them, in order to distinguish different data blocks with the same check value, different auxiliary query flags can be set for different data blocks with the same check value, so that when the server receives a new data block to be stored again , The check value and auxiliary query flag can be used to determine whether the new data block to be stored has been stored in the server, that is, to query through the check value first, if the check value of the new data block to be stored is confirmed If the check value of the stored data block is the same, the data content can be compared. If the new data block to be stored is the same as one of the data blocks, it can be determined that the new data block to be stored is the same as the data block The data block, otherwise it is a different data block, at this time, an auxiliary query identifier can be assigned to the new data block to be stored. For example, if the data block to be stored is "CD", the first check value is "Xfdsafdsfdlasf", and the target data block is "AB", if the check value of the target data block "AB" stored in the server is "Xfdsafdsfdlasf", If the data block to be stored is "CD", the first check value of the data block to be stored "CD" is calculated by the above check value algorithm as "Xfdsafdsfdlasf", then the check value of the data block to be stored and the target data block are the same. However, the data content of the data block to be stored and the target data block are not the same. At this time, the data block to be stored "CD" can be stored, and then different auxiliary query identifiers can be assigned to the data block to be stored and the target data block, for example The auxiliary query identifier (or version number, etc.) of the data block to be stored is 1, and the auxiliary query identifier (or version number, etc.) of the target data block is 2, etc. As shown in Figure 3, the embodiment of this specification provides a data processing method. The execution subject of the method can be an electronic device, which can be a device used to request a server to store a certain data block, such as a cash register Electronic equipment, among which the electronic equipment can be mobile terminal equipment such as mobile phones and tablet computers, or terminal equipment such as personal computers. The method may specifically include the following steps: In step S302, the data block to be stored is sent to the server. In step S304, the storage result of the data block to be stored is received from the server, and the storage result is that the server has a target data block whose check value matches the first check value of the data block to be stored in the stored data block , And generated when the data block to be stored is different from the target data block. For the specific processing procedures of the above step S302 and step S304, please refer to the related content in the above step S102 and step S104, which will not be repeated here. The embodiment of this specification provides a data processing method. By receiving a data block to be stored, and obtaining a first check value of the data block to be stored, there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. Embodiment 2 As shown in Figure 4, the embodiment of this specification provides a data processing method. The execution body of the method can be an electronic device and a server. The electronic device can be used to request the server to store a certain data block. Equipment, such as electronic equipment at the cash register. The electronic equipment can be mobile terminal equipment such as mobile phones and tablet computers, or terminal equipment such as personal computers. The server can be an independent server or A server cluster composed of multiple servers. The method may specifically include the following steps: In step S402, the server receives the data block to be stored, and obtains the first check value of the data block to be stored. The first check value may be a hash value. In the embodiment of this specification, the check value is taken as an example for description. For the specific processing process of the above step S402, please refer to the related content of the step S102 in the first embodiment, which will not be repeated here. In step S404, if there is a target data block whose check value matches the first check value in the stored data block, the server determines whether the data block to be stored is the same as each sub-data block in the target data block. In implementation, the hash value can be one of the main methods used to detect whether the data is the same. Generally, if the hash value of two data or data blocks is the same, it means that the two data or data blocks are the same data or Data blocks, however, the hash value will collide within a certain range, that is, two different data blocks have the same hash value. In the embodiments of this specification, a device for handling data conflicts can be set up, which can be used to solve business problems caused by hash value collisions. The device can be divided into two main parts, namely device pre-processing and device processing. A data storage model is preset in the front of the device, and the data storage model can include three items such as string (ie data block to be stored), hash value and conflict version (ie auxiliary query identification). When the server receives the data block to be stored, the device can calculate the hash value (ie the first check value) of the data block to be stored in advance. At this time, the hash value of each data block stored in advance can be obtained. The first check value is respectively compared with the hash value of the stored data block. If the first check value is the same as the hash value of the stored target data block, it is determined that the data block to be stored and each sub-item in the target data block Whether the data blocks are the same. In step S406, if there is a target data block whose check value matches the first check value among the stored data blocks, and the data block to be stored is different from the target data block, the server stores the data block to be stored, and The data block to be stored is allocated with a different auxiliary query identifier from the target data block. Among them, the auxiliary query identifier can be a character or a character string, and the character can be a number, a letter, a symbol or a text, etc., and the character string can be composed of multiple characters, such as R12 or 5. In the implementation, as shown in Figure 2, when the server receives the data block to be stored, the device can calculate the hash value (ie the first check value) of the data block to be stored in front of the server. For the stored hash value of each data block, the first check value can be compared with the hash value of the stored data block. If the first check value is the same as the hash value of the stored target data block, it can be extracted separately The data content of the data block to be stored and the target data block can be compared with the data content of the extracted data block to be stored and the data content of the target data block. If the data content of the data block to be stored and the target data block are different, you can Make sure that the data block to be stored and the target data block have the same hash value, but the data content is not the same, the device can store the data block to be stored in the server in front of the device, and reallocate an auxiliary for the data block to be stored Query ID. Based on the example of step S104 in the above-mentioned first embodiment, the preamble of the device is as shown in Table 1. Table 1 The above processing process is mainly the processing that needs to be performed by the front part of the device. In practical applications, the device processing part can process any operation of querying hash values. Specifically, when the data block to be stored is re-introduced, the device processing part It can detect whether there are conflicting data stored in the above data storage model. If not, execute the above process. If there is, you need to extract all the data blocks with the same hash value. The processing part of the device will make a judgment one by one. Whether the value of the string is the same as the re-injected data block to be stored. The above processing of storing the data block to be stored and assigning an auxiliary query identifier different from the target data block to the data block to be stored may include multiple processing methods in practical applications. In addition to the implementation methods provided by the above related content, it may also include multiple The implementation method can be specifically as follows: the data block to be stored and the auxiliary query identifier of the data block to be stored, and the target data block and the auxiliary query identifier of the target data block are stored in the same data block set. The same data block set can be as shown in Table 1. In this way, the query of the above two data blocks can be comprehensively determined through the check value and the auxiliary query identifier. In step S408, if the data block to be stored is the same as the first sub-data block in the target data block, the server outputs the auxiliary query identifier and the first check value of the first sub-data block. In implementation, as shown in Figure 2, if it is determined by comparison that the data block to be stored is the same as the first sub-data block in the target data block, it can be determined that the data block to be stored is the same as the first sub-data block. Use the check value and auxiliary query identifier of the first sub-data block as the check value and auxiliary query identifier (conflict version) of the data block to be stored, and can output the auxiliary query identifier and first check value of the first sub-data block . In step S410, the electronic device receives the storage result of the data block to be stored from the server, and the storage result is that the server has a check value in the stored data block that matches the first check value of the data block to be stored The target data block is generated when the data block to be stored is different from the target data block. In implementation, as shown in Figure 2, after the server has completed storing the data block to be stored, and assigns an auxiliary query identifier different from the target data block to the data block to be stored, it can send the storage result of the data block to be stored to the electronic device. To remind the electronic device that the data block sent by it to be stored has been stored. In order to control the possible data risks in the server in time, a risk control server can be set up. The electronic device can send the check value and auxiliary query identifier of the data block to be stored each time the server is processed to the risk control server , So that the corresponding managers can manage and control the possible risks of data storage. For details, please refer to the related content of step S412 and step S414 below. In step S412, the electronic device receives the first check value and the target auxiliary query identifier sent by the server. The target auxiliary query identifier is the target data block whose check value matches the first check value, and the data to be stored The auxiliary query identifier of the first sub-data block with the same block. In step S414, the electronic device sends the first check value and the target auxiliary query identifier to the risk control server. In implementation, as shown in Figure 2, the electronic device can receive the first check value and the target auxiliary query identifier sent by the server, and can generate risk control information through the first check value and the target auxiliary query identifier. The risk control information is sent to the risk control server. Managers can learn about the data storage in the server in real time through risk control information. The embodiment of this specification provides a data processing method. By receiving a data block to be stored, and obtaining a first check value of the data block to be stored, there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. Embodiment 3 The above is the data processing method provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, as shown in FIG. 5. The data processing device includes: an acquisition module 501 and a data processing module 502, wherein: the acquisition module 501 is configured to receive a data block to be stored, and obtain the first check value of the data block to be stored; data processing The module 502 is configured to store the target data block whose check value matches the first check value in the stored data block, and the data block to be stored is different from the target data block The data block to be stored, and an auxiliary query identifier different from the target data block is allocated to the data block to be stored. Optionally, in the embodiment of this specification, the target data block includes a plurality of different sub-data blocks, and each sub-data block is provided with a corresponding auxiliary query identifier, and the device further includes: a judgment module for If there is a target data block whose check value matches the first check value in the stored data block, it is determined whether the data block to be stored is the same as each sub-data block in the target data block; output module , For outputting the auxiliary query identifier of the first sub-data block and the first check value if the data block to be stored is the same as the first sub-data block in the target data block. Optionally, in the embodiment of this specification, the data processing module 502 is configured to identify the data block to be stored and the auxiliary query identification of the data block to be stored, and the target data block and the target data The auxiliary query identifier of the block is stored in the same data block collection. Optionally, in this embodiment of the specification, the auxiliary query identifier is a character or string. Optionally, in this embodiment of the specification, the first check value is a hash value. The embodiment of this specification provides a data processing device, which receives a data block to be stored and obtains a first check value of the data block to be stored, and there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. Embodiment 4 The above is the data processing method provided in the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides a data processing device, as shown in FIG. 6. The data processing device includes: a data sending module 601 and a result receiving module 602, wherein: the data sending module 601 is used to send the data block to be stored to the server; the result receiving module 602 is used to receive the The storage result of the data block to be stored sent by the server, where the storage result is that the server has a target in the stored data block whose check value matches the first check value of the data block to be stored Data block, and generated when the data block to be stored is different from the target data block. Optionally, in this embodiment of the specification, the device further includes: an information receiving module, configured to receive the first check value and a target auxiliary query identifier sent by the server, where the target auxiliary query identifier is In the target data block whose check value matches the first check value, the auxiliary query identifier of the first sub-data block that is the same as the data block to be stored; an information sending module for sending the first The check value and the target auxiliary query identifier are sent to the risk control server. The embodiment of this specification provides a data processing device, which receives a data block to be stored and obtains a first check value of the data block to be stored, and there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. Embodiment 5 Based on the same idea, the embodiment of this specification also provides a data processing device, as shown in FIG. 7. The data processing equipment may be the server provided in the above-mentioned embodiment, etc. The data processing equipment may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and a memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 may be short-term storage or permanent storage. The application program stored in the memory 702 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the data processing device. Furthermore, the processor 701 may be configured to communicate with the memory 702, and execute a series of computer executable instructions in the memory 702 on the data processing device. The data processing equipment may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input and output interfaces 705, and one or more keyboards 706. Specifically in this embodiment, the data processing equipment includes memory and one or more programs, one or more programs are stored in the memory, and one or more programs may include one or more modules , And each module can include a series of computer executable instructions in the data processing equipment, and is configured to be executed by one or more processors to execute the one or more package programs containing the following computer executable instructions : Receiving a data block to be stored, and obtaining a first check value of the data block to be stored; if there is a target data block whose check value matches the first check value in the stored data block, and the waiting If the storage data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. Optionally, the target data block includes a plurality of different sub-data blocks, and each sub-data block is provided with a corresponding auxiliary query identifier; the receiving the data block to be stored obtains the first collation of the data block to be stored After the verification value, it further includes: if there is a target data block whose check value matches the first check value in the stored data block, determining each of the data block to be stored and the target data block Whether the data blocks are the same; if the data block to be stored is the same as the first sub-data block in the target data block, output the auxiliary query identifier of the first sub-data block and the first check value. Optionally, the storing the data block to be stored and assigning an auxiliary query identifier different from the target data block to the data block to be stored includes: combining the data block to be stored and the data to be stored The auxiliary query identifier of the block and the auxiliary query identifier of the target data block and the target data block are stored in the same data block set. Optionally, the auxiliary query identifier is a character or string. Optionally, the first check value is a hash value. The embodiment of this specification provides a data processing device. By receiving a data block to be stored, and obtaining a first check value of the data block to be stored, there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. Embodiment 6 Based on the same idea, an embodiment of this specification also provides a data processing device, as shown in FIG. 8. The data processing equipment may be the electronic equipment provided in the above embodiments. The data processing equipment may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and a memory 802, and the memory 802 may store one or more storage applications or data. Among them, the memory 802 may be short-term storage or permanent storage. The application program stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer-executable instructions in the data processing device. Furthermore, the processor 801 may be configured to communicate with the memory 802, and execute a series of computer executable instructions in the memory 802 on the data processing device. The data processing equipment may also include one or more power sources 803, one or more wired or wireless network interfaces 804, one or more input and output interfaces 805, and one or more keyboards 806. Specifically in this embodiment, the data processing equipment includes memory and one or more programs, one or more programs are stored in the memory, and one or more programs may include one or more modules , And each module can include a series of computer executable instructions in the data processing equipment, and is configured to be executed by one or more processors to execute the one or more package programs containing the following computer executable instructions : Sending the data block to be stored to the server; receiving the storage result of the data block to be stored sent by the server, the storage result being that the server has a check value and the waiting data in the stored data block A target data block that matches the first check value of the storage data block is generated when the data block to be stored is different from the target data block. Optionally, after sending the data block to be stored to the server, the method further includes: receiving the first check value and the target auxiliary query identifier sent by the server, where the target auxiliary query identifier is the check value and Among the target data blocks matching the first check value, the auxiliary query identifier of the first sub-data block that is the same as the data block to be stored; sending the first check value and the target auxiliary query identifier to the risk Control the server. The embodiment of this specification provides a data processing device. By receiving a data block to be stored, and obtaining a first check value of the data block to be stored, there is a check value matching the first check value in the stored data block When the target data block is different from the target data block, the data block to be stored is stored, and an auxiliary query identifier different from the target data block is assigned to the data block to be stored. In this way, the stored target data block is different from the target data block. For storing data blocks, when the check values of the two are the same but the data content of the two are different, the data block to be stored can be stored, and the data block to be stored can be reassigned with a different auxiliary query identifier from the target data block. In this way, the two data blocks with the same check value and different data content are further distinguished, thereby solving the problem that the data blocks to be stored with the same check value and different data content cannot be stored in the server, and avoiding confusion in the business scene. The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the attached patent application. In some cases, the actions or steps described in the scope of the patent application may be performed in a different order from the embodiment and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In some embodiments, multiplexing and parallel processing are also possible or may be advantageous. In the 1990s, the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (for method flow Improve). However, with the development of technology, the improvement of many methods and processes today can be regarded as a direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user's programming of the device. It is programmed by the designer to "integrate" a digital system on a PLD without requiring the chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly realized by using "logic compiler" software, which is similar to the software compiler used in program development and writing, but compiles The original code before has to be written in a specific programming language, which is called the Hardware Description Language (HDL), and there is not only one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., currently the most Commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that only a little logic programming of the method flow in the above hardware description languages and programming into an integrated circuit can easily obtain a hardware circuit that implements the logic method flow. The controller can be implemented in any suitable manner. For example, the controller can be a microprocessor or a processor, and a computer readable program code (such as software or firmware) that can be executed by the (micro) processor. Media, logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic. Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable code, it is completely possible to program the method steps to make the controller use logic gates, switches, dedicated integrated circuits, programmable logic controllers and Embedded in the form of a microcontroller etc. to achieve the same function. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure in a hardware component. The systems, devices, modules or units explained in the above embodiments may be implemented by computer chips or entities, or implemented by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cell phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, and a wearable device. Or any combination of these devices. For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and/or hardware. Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Moreover, this manual can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program codes. . This specification is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, dedicated computers, embedded processors, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product that includes the instruction device, The instruction device realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram. These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to generate computer-implemented processing, which can be executed on the computer or other programmable equipment. Instructions provide steps for implementing functions specified in a flow or multiple flows in the flowchart and/or a block or multiple blocks in the block diagram. In a typical configuration, the computing device includes one or more processors (CPU), input/output interfaces, network interfaces, and memory. Memory may include non-permanent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory ( flash RAM). Memory is an example of computer-readable media. Computer-readable media includes permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), and other types of random access memory (RAM) , Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital multi-function disc (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves. It should also be noted that the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product or equipment including a series of elements not only includes those elements, but also includes Other elements that are not explicitly listed, or include elements inherent to this process, method, commodity, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element. Those skilled in the art should understand that the embodiments of this specification can be provided as methods, systems or computer program products. Therefore, this specification may adopt the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Moreover, this manual can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program codes. . This manual can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be implemented in a distributed computing environment. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices. The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment. The above descriptions are only examples of this specification and are not intended to limit this specification. For those skilled in the art, this specification can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of patent application in this specification.