在一些場景下,產品的生產機構在對產品進行防偽時,通常會基於第三方的權威機構(比如防偽機構)為產品產生的防偽識別資訊(比如防偽識別碼),來為產品構建防偽標籤,並將防偽標籤附著於產品的外表面。
當產品流轉到消費者手中後,消費者可以透過終端設備對附著於產品外表面的防偽標籤進行掃描識別,來獲取防偽識別資訊,然後發起對獲取到的防偽識別資訊進行合法性驗證,來確認所持有的產品是否為假冒偽劣的產品。
在這種場景下,一旦第三方的權威機構用於產生防偽識別資訊的相關資料發生洩露,則產品的造假者就可能利用發生洩露的資料,為假冒偽劣產品產生合法的防偽標籤,而將一些假冒偽劣產品作為真品銷售給消費者,對消費者造成損失。
基於此,在本說明書中,提出一種基於多個防偽參與方在區塊鏈上儲存的多種防偽識別資訊來構造與目標產品相關的防偽資訊,並通過在針對該目標產品的防偽校驗中,引入針對上述防偽資訊的完整性校驗,來提升產品防偽的安全等級的技術方案。
在實現時,上述目標產品的防偽參與方,可以不再僅涵蓋單一的權威機構,而是由多個防偽參與方組成。該多個防偽參與方可以將各自為上述目標產品產生的防偽識別資訊,以交易的形式在區塊鏈中進行儲存。而應用客戶端可以利用多個防偽參與方在區塊鏈上儲存的,與目標產品對應的多種防偽識別資訊,來構成與目標產品對應的防偽資訊;
例如,上述多個防偽參與方具體可以包括防偽機構、以及至少一種其它防偽參與方;在這種場景下,上述防偽資訊則具體可以包括由上述防偽機構為該目標產品產生的防偽識別碼、以及與該防偽識別碼關聯儲存的至少一種由其它防偽參與方產生的防偽識別資訊;
其中,上述其它防偽參與方,具體可以是上述目標產品的產品生命週期中的各個環節對應的關鍵參與方;比如,上述關鍵參與方具體可以是上述目標產品的生產機構、檢驗機構等等。在這種場景下,上述防偽資訊具體可以包括,上述目標產品的防偽識別碼、上述目標產品的生產資訊的資料摘要、上述目標產品的檢驗報告的資料摘要。
當上述目標產品流轉到消費者手中後,消費者可以透過持有的終端設備來獲取上述多種防偽識別資訊中的至少一種防偽識別資訊,然後基於獲取到的防偽識別資訊,來構建針對該目標產品的防偽校驗請求;
例如,在實際應用中,上述目標產品的生產機構,可以基於上述防偽機構為該目標產品產生的防偽識別碼,為該目標產品構建防偽標籤(比如,該防偽標籤具體可以是RFID電子標籤、二維碼標籤等),並在該目標產品出廠時,將該防偽標籤附著在該目標產品外表面。
當該目標產品流轉到消費者手中後,消費者可以透過持有的終端設備對該防偽標籤進行掃描識別,來獲取上述防偽識別碼,並基於獲取到的防偽識別碼來構建針對上述目標產品的防偽驗證請求,然後將該防偽驗證請求提交給應用客戶端。
應用客戶端在收到針對上述目標產品的防偽驗證請求之後,可以基於該防偽驗證請求中攜帶的防偽識別資訊,發起針對上述目標產品的防偽校驗;其中,針對上述目標產品的防偽校驗至少需要包括針對已經在區塊鏈上儲存的與上述目標產品對應的防偽資訊的完整性校驗。當完成針對上述目標產品的防偽校驗之後,應用客戶端可以向用戶回傳防偽校驗結果。
在以上技術方案中,由於在區塊鏈中儲存的與目標產品相關的防偽資訊,是基於多個防偽參與方在區塊鏈上儲存的與所述目標產品對應的多種防偽識別資訊構成;並且,在針對該目標產品的防偽校驗中,引入了針對區塊鏈上儲存的上述防偽資訊的完整性校驗;因此,即便上述多種防偽識別資訊中的部分真實的防偽識別資訊發生洩露,基於這部分洩露的防偽識別資訊為假冒偽劣產品所產生的防偽資訊,也仍然無法透過針對該產品的防偽資訊的完整性校驗,從而可以顯著的提升產品防偽的安全等級。
下面透過具體實施例並結合具體的應用場景對本說明書進行描述。
請參考圖1,圖1是本說明書一實施例提供的一種基於區塊鏈的防偽方法,應用于應用客戶端;其中,所述區塊鏈中儲存了與目標產品對應的防偽資訊;所述防偽資訊由多個防偽參與方在區塊鏈上儲存的與所述目標產品對應的多種防偽識別資訊構成;上述方法執行以下步驟:
步驟102,獲取用戶提交的針對所述目標產品的防偽驗證請求;
步驟104,反應於所述防偽校驗請求,發起針對所述目標產品的防偽校驗;其中,所述防偽校驗至少包括針對所述防偽資訊的完整性校驗;
步驟106,向所述用戶回傳針對所述目標產品的防偽校驗結果。
在本說明書所描述的區塊鏈,具體可以包括私有鏈、共有鏈以及聯盟鏈等,在本說明書中不進行特別限定。
例如,在一個場景中,上述區塊鏈具體可以是由目標產品的防偽機構、生產機構、檢驗機構(或者管理機構)作為聯盟成員組成的一個聯盟鏈;該聯盟鏈的運營方可以依託於該聯盟鏈,來部署針對上述目標產品的防偽校驗事務;而以上所描述的作為聯盟成員的防偽機構、生產機構、檢驗機構都可以作為上述防偽校驗事務的一個事務節點。各個事務節點可以將自身所產生的與上述目標產品相關的防偽識別資訊以交易的形式在聯盟鏈中進行發佈,並在該交易經過聯盟鏈中的共識節點的共識處理之後,在聯盟鏈中的分布式資料庫進行儲存,完成上述防偽識別資訊的“上鏈”存證。
其中,需要說明的是,在本說明書中所描述的交易(Transaction),是指用戶透過區塊鏈的客戶端創建,並需要最終發佈至區塊鏈的分布式資料庫中的一筆資料。
區塊鏈中的交易,通常存在狹義的交易以及廣義的交易之分。狹義的交易是指用戶向區塊鏈發佈的一筆價值轉移;例如,在傳統的比特幣區塊鏈網路中,交易可以是用戶在區塊鏈中發起的一筆轉帳。而廣義的交易是指用戶向區塊鏈發佈的一筆具有事務意圖的事務資料;例如,運營方可以基於實際的事務需求搭建一個聯盟鏈,依託於聯盟鏈部署一些與價值轉移無關的其它類型的在線事務(比如,防偽校驗事務、租房事務、車輛調度事務、保險理賠事務、信用服務、醫療服務等),而在這類聯盟鏈中,交易可以是用戶在聯盟鏈中發佈的一筆具有事務意圖的事務消息或者事務請求。
上述應用客戶端,可以包括任意類型的以區塊鏈中儲存的底層事務資料作為資料支撐,來實現特定的事務功能的上層應用;
例如,以在區塊鏈中部署防偽校驗事務為例,上述應用客戶端具體可以是,以區塊鏈中儲存的與上述目標產品對應的防偽資料作為資料支撐,來實現對該目標產品的防偽驗證的APP客戶端。
上述防偽資訊,具體可以包括用於對目標產品進行防偽校驗的任意形式的資料;在傳統的防偽校驗場景中,上述防偽資訊通常可以是由與產品的生產機構具有合作關係的防偽機構,產生的具有唯一性的防偽識別碼;而在本說明書中,上述防偽資訊,則可以是由多個防偽參與方在區塊鏈上儲存的,與上述目標產品對應的多種防偽識別資訊構成。
其中,上述多個防偽參與方的具體類型,在本說明書中都不進行具體的限定,與上述目標產品相關的任意機構,都可以加入到上述多個防偽參與方;
例如,在示出的一種實施方式中,上述多個防偽參與方,具體可以包括上述防偽機構,以及至少一種與上述防偽機構共同參與針對上述目標產品的防偽校驗的其它防偽參與方。
在這種場景下,上述防偽資訊則具體可以包括由上述防偽機構為該目標產品產生的防偽識別碼、以及與該防偽識別碼關聯儲存的至少一種由其它防偽參與方產生的防偽識別資訊;
其中,在示出的一種實施方式中,上述其它防偽參與方,具體可以包括上述目標產品的產品生命週期中的各個環節對應的關鍵參與方;相應的,上述至少一種由其它防偽參與方產生的防偽識別資訊,則可以包括與上述目標產品的產品生命週期中的各個環節相關的產品描述資訊。
其中,上述產品生命週期,具體可以涵蓋產品從生產到投入市場,以及從投入市場到更新換代和退出市場,所經歷的所有環節;
例如,在示出的一種實現方式中,上述目標產品的產品生命週期通常可以包括產品的生產、檢驗等環節等;在這種情況下,上述關鍵參與方,具體可以包括上述目標產品的生產機構、檢驗機構等等;相應的,上述至少一種由其它防偽參與方產生的防偽識別資訊,則可以包括上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要等等。
透過這種方式,由於單一防偽參與方不能篡改區塊鏈上的儲存的資料,也不能由單一防偽參與方基於自身產生的單一一種防偽識別資訊,為上述目標產品構造成完整的防偽資訊;因此,可以保證上述防偽資訊的唯一性、可信性;而且,還可以將上述目標產品的防偽識別碼,與該目標產品的產品生命週期中的諸如生產、檢驗等各個關鍵環節相關聯,從而基於上述目標產品的防偽識別碼,就可以在區塊鏈中查詢到各個關鍵環節的產品描述資訊。
其中,需要說明的是,上述多個防偽參與方的具體數量,在本說明書中不進行特別限定;在實際應用中,上述多個防偽參與方的數量越多,最終基於上述多個防偽參與方在區塊鏈中儲存的多種防偽識別資訊構成的防偽資訊的防偽能力,也會進一步得到提升。
例如,在示出的一種實施方式中,上述多個防偽參與方的具體數量,可以是動態變化的;也即,上述目標產品的產品生命週期中的任意一個環節對應的運營方,都可以作為防偽參與方,動態加入或者退出上述多個防偽參與方。
以下以上述區塊鏈為聯盟鏈,上述多個防偽參與方包括防偽機構、生產機構以及檢驗機構為例,對本說明書的技術方案進行詳細說明;
其中,需要強調的是,以上述多個防偽參與方包括上述目標產品的防偽機構、生產機構以及檢驗機構為例僅為示例性說明;
顯然,在本說明書中,上述多個防偽參與方也可以包括防偽機構、生產機構以及檢驗機構以外的能夠參與上述目標產品的防偽校驗的其它類型的運營機構;比如,上述目標產品的銷售機構、代理機構、管理機構等等,在本說明書中不再進行一一列舉。
請參見圖2,圖2為本說明書示出的一種聯盟鏈的架構圖。
如圖2所示,上述目標產品的防偽機構、生產機構以及檢驗機構,均可以作為聯盟成員加入到聯盟鏈,並將各自產生的與上述目標產品相關的產品資料作為防偽識別資訊,以交易的形式發佈至聯盟鏈,並在該交易經過聯盟鏈中的共識節點的共識處理之後,在聯盟鏈中的分布式資料庫進行儲存,完成上述防偽識別資訊的“上鏈”存證。
上述防偽機構,可以獨立開發和設計具有唯一性的防偽驗證碼,並將開發和設計的防偽驗證碼,以交易的形式發佈至聯盟鏈,在上述聯盟鏈的分布式資料庫中進行“上鏈”存證;同時,上述防偽機構,還可以基於開發和設計的防偽驗證碼,來為上述生產機構所生產的產品構建防偽標籤;其中,上述防偽標籤的具體類型在本說明書不進行特別限定;比如,可以是基於上述防偽驗證碼產生的RFID標籤、或者二維碼標籤,等等。
上述生產機構,在完成產品的製造生產後,可以在出庫的產品的外表面上,附著由上述防偽機構產生的防偽標籤;同時,可以將該產品的諸如產品名稱,生產日期,出庫日期,批次,包裝批號等產品的生產資訊,保存在與上述聯盟鏈對應的第三方儲存系統,並基於持有的私鑰對該產品的生產資訊的資料摘要(比如hash值)進行簽名後,以交易的形式發佈至聯盟鏈,在上述聯盟鏈的分布式資料庫中進行“上鏈”存證;
上述檢驗機構,可以對上述生產機構上市的各個批次的產品進行檢驗,並將檢驗報告的詳細內容保存至與上述聯盟鏈對應的第三方儲存系統,同時還可以基於持有的私鑰對該產品的生產資訊的資料摘要進行簽名後,以交易的形式發佈至聯盟鏈,在上述聯盟鏈的分布式資料庫中進行“上鏈”存證。
其中,在示出的一種實施方式中,上述第三方儲存系統,具體可以是CAS(content-addressable-storage,內容可尋址儲存)系統。
所謂內容可尋址儲存系統,是指基於所儲存的資料的內容(比如基於資料的內容產生的資料摘要)來唯一標識資料,而不再採用基於所儲存的資料的保存位置來標識資料的儲存系統;例如,在實際應用中,上述第三方儲存系統具體可以是IPFS等CAS系統;
透過這種方式,用戶後續在需要查看產品的生產資訊以及校驗報告時,可以透過應用客戶端,基於該產品的防偽資訊中的資料摘要,向上述CAS系統發起查詢,來獲得產品的生產資訊以及檢驗報告的原始內容。
請繼續參見圖2,在本說明書中,在上述聯盟鏈上存證的與需要進行防偽驗證的目標產品相關的防偽資料,具體可以由上述目標產品的防偽驗證碼、上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要等三部分組成。
而上述防偽機構、生產機構以及檢驗機構,在將各自產生的與上述目標產品相關的防偽識別資訊,在聯盟鏈中進行“上鏈”存證之後,上述應用客戶端可以獲取已經在聯盟鏈上存證的與上述目標產品對應的防偽識別碼、上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要,並將在聯盟鏈上存證的上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要,與在聯盟鏈上存證的上述目標產品的防偽識別碼進行關聯儲存,以將以上三方在聯盟鏈上存證的防偽識別資訊,組織成為該目標產品的防偽資訊。
例如,在實現時,上述防偽機構、生產機構以及檢驗機構在聯盟鏈上存證各自為目標產品產生的防偽識別資訊時,可以將該目標產品的產品標識與對應的防偽識別資訊一起在聯盟鏈中進行存證,從而應用客戶端可以在聯盟鏈中查詢對應相同的產品標識的防偽識別碼、生產資訊的資料摘要、以及檢驗報告的資料摘要,來為該目標產品產生防偽資訊。
在本說明書中,上述聯盟鏈的運營方,在聯盟鏈上部署上述防偽校驗事務時,具體可以透過向聯盟鏈發佈與防偽校驗事務相關的智慧合約來實現。
在這種情況下,上述運營方可以預先開發與防偽校驗事務相關的智慧合約,並在智慧合約中聲明需要觸發執行的防偽校驗事務邏輯。
而對於開發完成的智慧合約,運營方可以透過聯盟鏈中的任一節點設備將該智慧合約發佈至聯盟鏈,並在該智慧合約由該聯盟鏈中的共識節點完成共識後,收錄至該聯盟鏈的分布式資料庫。
後續,普通的消費者可以透過應用客戶端接入任一節點設備,發起對該智慧合約的合約調用,在聯盟鏈上觸發執行相關的防偽校驗事務邏輯,完整針對上述目標產品的防偽校驗。
其中,需要說明的是,聯盟鏈中的成員節點設備在對發佈至區塊鏈的智慧合約進行共識處理時,所採用的共識算法,以及具體的共識過程,在本說明書中不再進行詳述,本領域技術人員在將本說明書記載的技術方案付諸實現時,可以參考相關技術中的記載。例如,對於聯盟鏈而言,可以採用諸如PBFT算法,或者其它類似的共識算法。
在本說明書中,當上述目標產品流轉到消費者手中後,消費者可以透過終端設備對附著於產品外表面的防偽標籤進行掃描識別,來獲取該防偽標籤中攜帶的防偽識別碼,然後基於獲取到的防偽識別碼來構建針對上述目標產品的防偽校驗請求。
其中,需要說明的是,在實際應用中,防偽機構在構建針對上述目標產品的防偽校驗請求時,所使用的防偽識別資訊,除了可以包括透過掃描識別上述防偽標籤獲取到的防偽識別碼以外,還可以包括上述多種防偽識別資訊中除了上述防偽識別碼以外的任意一種或者幾種,在本說明書中不進行特別限定。
也即,在上述防偽校驗請求中,除了可以包括從上述防偽標籤中掃描識別出的防偽識別碼以外,還可以包含上述多種防偽識別資訊中除了上述防偽識別碼以外的其它種類的防偽識別資訊。
而上述應用客戶端在收到上述防偽驗證請求後,可以反應該防偽驗證請求,發起針對上述智慧合約的合約調用,以完成針對上述目標產品的防偽校驗。
其中,需要說明的是,在本說明書中,針對上述目標產品的防偽校驗,至少需要包括針對已經在聯盟鏈上存證的上述目標產品的防偽資訊的完整性校驗。所述完整性校驗,是指校驗已經在聯盟鏈上存證的,構成上述目標產品的防偽資訊的多種防偽識別資訊中,是否存在缺失。
在示出的一種實施方式中,針對上述目標產品的防偽校驗,具體可以包括針對上述目標產品的防偽資訊的完整性校驗和合法性校驗兩部分。
在實現時,上述應用客戶端在收到上述防偽驗證請求後,可以讀取該防偽驗證請求中攜帶的防偽識別碼,並將該防偽驗證碼提交至上述智慧合約的公共合約地址,來發起針對上述智慧合約的合約調用,以觸發執行上述智慧合約中聲明的防偽校驗事務邏輯,完成上述目標產品的防偽校驗。
而上述智慧合約在收到上述應用客戶端提交的防偽識別碼後,首先可以針對讀取到的防偽識別碼進行合法性驗證;其中,針對該防偽識別碼的合法性驗證,通常可以包括針對該防偽識別碼的唯一性驗證;
例如,在實際應用中,可以計算讀取到的防偽識別碼的hash值,基於該hash值在聯盟鏈中發起查詢,以確定聯盟鏈中是否存證了與該hash值對應的唯一的防偽識別碼;如果是,可以認為該防偽識別碼通過了合法性驗證。
當該防偽驗證請求中攜帶的防偽識別碼通過了合法性驗證之後,上述智慧合約可以進一步針對上述目標產品的防偽資訊進行完整性校驗,基於該防偽驗證請求中的防偽識別碼在聯盟鏈中發起查詢,以確定是否查詢到與該防偽識別碼關聯儲存的上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要;
如果查詢到了與該防偽識別碼關聯儲存的上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要,表明已經在聯盟鏈上存證的,構成上述目標產品的防偽資訊的多種防偽識別資訊完整,並不存在缺失,此時上述目標產品的防偽資訊通過完整性驗證;
如果未查詢到了與該防偽識別碼關聯儲存的上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要,此時上述目標產品的防偽資訊未通過完整性驗證,可以透過上述應用客戶端向用戶回傳上述防偽產品為假冒偽劣產品的防偽校驗結果;比如,該防偽校驗結果具體可以是一條 “該產品為假冒產品”的文本提示。
進一步的,如果上述目標產品的防偽資訊通過完整性驗證之後,上述智慧合約可以進一步針對查詢到的,與上述防偽識別碼關聯儲存的上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要進行合法性驗證;
其中,針對上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要的合法性驗證,通常可以包括針對上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要所攜帶的簽名進行驗證;
例如,上述智慧合約可以基於與上述生產機構和上述檢驗機構持有的私鑰對應的公鑰,針對上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要所攜帶的簽名分別進行驗證;如果驗證通過,表明上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要通過合法性驗證。
如果上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要通過了合法性驗證,此時針對該目標產品的防偽校驗完成,該目標產品通過了防偽校驗。在這種情況下,可以透過上述應用客戶端向用戶回傳上述防偽產品為真品的防偽校驗結果;比如,該防偽校驗結果具體可以是一條 “該產品為真品”的文本提示;
相應的,如果上述目標產品的生產資訊的資料摘要,以及上述目標產品的檢驗報告的資料摘要未通過合法性驗證(比如簽名不正確),此時該目標產品未通過防偽校驗。在這種情況下,可以透過上述應用客戶端向用戶回傳上述防偽產品為假冒偽劣產品的防偽校驗結果。
其中,需要補充說明的是,當有新的機構作為上述防偽參與方,加入至上述多個防偽參與方,此時上述應用客戶端可以按照以上描述的方式,將在聯盟鏈上存證的多種防偽識別資訊,重新組織成為該目標產品的防偽資訊,對原有的防偽資訊進行更新;
例如,假設上述目標產品的銷售機構也將作為防偽參與方加入至上述多個防偽參與方,此時該目標產品的銷售機構所產生的銷售資訊,也將作為構成上述防偽資訊的防偽識別資訊加入至上述防偽資訊。
相應的,如果防偽參與方的數量發生變化,構成上述防偽資訊的防偽識別資訊中加入了新的防偽識別資訊,此時針對上述防偽資訊的防偽校驗邏輯,也會同步的發生變化;在這種情況下,上述聯盟鏈的運營方,可以重新在聯盟鏈中部署新的智慧合約,來對上述目標產品的防偽資訊進行防偽校驗。
在示出的另一種實施方式中,用戶在透過終端設備針對上述防偽標籤進行識別掃描時,上述應用客戶端還可以對用戶針對上述防偽標籤的掃描操作進行反應,產生用戶針對上述防偽標籤的掃描記錄,然後將產生的掃描記錄以交易的形式,在聯盟鏈中進行儲存。
透過這種方式,可以將用戶針對上述防偽標籤的掃描記錄,在聯盟鏈中進行存證,以便能夠在目標商品在流轉的過程中,對該目標商品的防偽標籤的掃描記錄進行追溯查詢。
透過以上實施例可見,由於在本說明書中,在區塊鏈中儲存的與目標產品相關的防偽資訊,是基於多個防偽參與方在區塊鏈上儲存的與所述目標產品對應的多種防偽識別資訊構成,不再採用單一的防偽識別碼作為防偽資訊;
並且,在針對該目標產品的防偽校驗中,引入了針對區塊鏈上儲存的上述防偽資訊的完整性校驗;
因此,即便上述多種防偽識別資訊中的部分真實的防偽識別資訊發生洩露,基於這部分洩露的防偽識別資訊為假冒偽劣產品所產生的防偽資訊,也仍然無法通過針對該產品的防偽資訊的完整性校驗,從而可以顯著的提升產品防偽的安全等級。
例如,以上述防偽資訊具體由,上述目標產品的防偽識別碼、上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要等三部分組成為例,即便上述目標產品的防偽識別碼洩露,產品的造假者基於發生洩露的防偽識別碼構建出了合法的防偽標籤;但在基於從該目標產品上的防偽標籤中掃描識別出的防偽識別碼,對該目標產品進行防偽校驗的階段,此時由於聯盟鏈上可能並不沒有存證與該防偽識別碼關聯儲存的上述目標產品的生產資訊的資料摘要、以及上述目標產品的檢驗報告的資料摘要,因此無法通過針對上述防偽資訊的完整性校驗,從而在防偽校驗階段,仍然能夠將這類包含合法的防偽標籤的假冒偽劣產品識別為假冒偽劣產品。
與上述方法實施例相對應,本說明書還提供了一種基於區塊鏈的防偽裝置的實施例。本說明書的基於區塊鏈的防偽裝置的實施例可以應用在電子設備上。裝置實施例可以透過軟體實現,也可以透過硬體或者軟硬體結合的方式實現。以軟體實現為例,作為一個邏輯意義上的裝置,是透過其所在電子設備的處理器將非揮發性記憶體中對應的計算機程式指令讀取到內存記憶體中運行形成的。從硬體層面而言,如圖3所示,為本說明書的基於區塊鏈的防偽裝置所在電子設備的一種硬體結構圖,除了圖3所示的處理器、內存記憶體、網路介面、以及非揮發性記憶體之外,實施例中裝置所在的電子設備通常根據該電子設備的實際功能,還可以包括其他硬體,對此不再贅述。
圖4是本說明書一示例性實施例示出的一種基於區塊鏈的防偽裝置的框圖。
請參考圖4,所述基於區塊鏈的防偽裝置40可以應用在前述圖3所示的電子設備中;所述區塊鏈中儲存了與目標產品對應的防偽資訊;其中,所述防偽資訊由多個防偽參與方在區塊鏈上儲存的與所述目標產品對應的多種防偽識別資訊構成;所述裝置40包括有:獲取模組401、校驗模組402和回傳模組403。
獲取模組401,獲取用戶提交的針對所述目標產品的防偽驗證請求;
校驗模組402,反應於所述防偽校驗請求,發起針對所述目標產品的防偽校驗;其中,所述防偽校驗至少包括針對所述防偽資訊的完整性校驗;
回傳模組403,向所述用戶回傳針對所述目標產品的防偽校驗結果。
在本實施例中,所述防偽資訊包括由防偽機構為所述目標產品產生的防偽識別碼、以及與所述防偽識別碼關聯儲存的至少一種由其它防偽參與方產生的防偽識別資訊。
在本實施例中,所述目標產品附著了基於所述防偽識別碼產生的防偽標籤;所述防偽驗證請求包括用戶透過掃描識別所述防偽標籤獲取到的所述防偽識別碼;
所述校驗模組402:
反應於所述防偽校驗請求,基於所述防偽驗證請求中的防偽識別碼在所述區塊鏈中發起查詢,以確定是否查詢到與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊;
如果查詢到與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊,確定所述目標產品通過防偽校驗。
在本實施例中,所述校驗模組402進一步:
在基於所述防偽驗證請求中的防偽識別碼在所述區塊鏈中發起查詢之前,針對所述防偽驗證請求中的防偽識別碼進行合法性驗證;如果所述防偽識別碼通過合法性驗證,進一步基於所述防偽識別碼在所述區塊鏈中發起查詢。
在本實施例中,所述校驗模組402進一步:
如果所述區塊鏈中儲存了與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊,進一步針對所述至少一種由其它防偽參與方產生的防偽識別資訊進行合法性驗證;如果所述至少一種由其它防偽參與方產生的防偽識別資訊通過合法性驗證,確定所述目標產品通過防偽校驗。
在本實施例中,所述裝置40還包括:
產生模組404(圖4中未示出),反應於用戶針對所述防偽標籤的掃描操作,產生用戶針對所述防偽標籤的掃描記錄;將產生的掃描記錄發佈至所述區塊鏈進行儲存。
在本實施例中,所述其它防偽參與方,包括所述目標產品的產品生命週期中的各個環節對應的關鍵參與方;所述至少一種由其它防偽參與方產生的防偽識別資訊,包括與所述目標產品的產品生命週期中的各個環節相關的產品描述資訊。
在本實施例中,所述關鍵參與方,包括所述目標產品的生產機構、以及檢驗機構;所述至少一種由其它防偽參與方產生的防偽識別資訊包括,所述目標產品的生產資訊的資料摘要、所述目標產品的檢驗報告的資料摘要。
在本實施例中,所述目標產品的生產資訊以及所述目標產品的檢驗報告,儲存在與所述區塊鏈對接的第三方儲存系統;其中,所述第三方儲存系統為內容可尋址儲存系統。
在本實施例中,所述區塊鏈為聯盟鏈。
對於裝置實施例而言,由於其基本對應於方法實施例,所以相關之處參見方法實施例的部分說明即可。以上所描述的裝置實施例僅僅是示意性的,其中所述作為分離部件說明的模組可以是或者也可以不是實體上分開的,作為模組顯示的部件可以是或者也可以不是實體模組,即可以位於一個地方,或者也可以分佈到多個網路模組上。可以根據實際的需要選擇其中的部分或者全部模組來實現本說明書方案的目的。本領域普通技術人員在不付出創造性勞動的情況下,即可以理解並實施。
上述實施例闡明的系統、裝置、模組或模組,具體可以由計算機晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為計算機,計算機的具體形式可以是個人計算機、膝上型計算機、蜂巢式電話、相機電話、智慧電話、個人數位助理、媒體播放器、導航設備、電子郵件收發設備、遊戲控制台、平板計算機、可穿戴設備或者這些設備中的任意幾種設備的組合。
與上述方法實施例相對應,本說明書還提供了一種電子設備的實施例。該電子設備包括:處理器以及用於儲存機器可執行指令的儲存器;其中,處理器和儲存器通常透過內部匯流排相互連接。在其他可能的實現方式中,所述設備還可能包括外部介面,以能夠與其他設備或者部件進行通信。
在本實施例中,透過讀取並執行所述儲存器儲存的與基於區塊鏈的防偽的控制邏輯對應的機器可執行指令,所述處理器被促使:
獲取用戶提交的針對所述目標產品的防偽驗證請求;所述區塊鏈中儲存了與目標產品對應的防偽資訊;其中,所述防偽資訊由多個防偽參與方在區塊鏈上儲存的與所述目標產品對應的多種防偽識別資訊構成;
反應於所述防偽校驗請求,發起針對所述目標產品的防偽校驗;其中,所述防偽校驗至少包括針對所述防偽資訊的完整性校驗;
向所述用戶回傳針對所述目標產品的防偽校驗結果。
在本實施例中,所述防偽資訊包括由防偽機構為所述目標產品產生的防偽識別碼、以及與所述防偽識別碼關聯儲存的至少一種由其它防偽參與方產生的防偽識別資訊;所述目標產品附著了基於所述防偽識別碼產生的防偽標籤;所述防偽驗證請求包括用戶透過掃描識別所述防偽標籤獲取到的所述防偽識別碼;
透過讀取並執行所述儲存器儲存的與基於區塊鏈的防偽的控制邏輯對應的機器可執行指令,所述處理器被促使:
反應於所述防偽校驗請求,基於所述防偽驗證請求中的防偽識別碼在所述區塊鏈中發起查詢,以確定是否查詢到與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊;
如果查詢到與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊,確定所述目標產品通過防偽校驗。
在本實施例中,透過讀取並執行所述儲存器儲存的與基於區塊鏈的防偽的控制邏輯對應的機器可執行指令,所述處理器被促使:
基於所述防偽驗證請求中的防偽識別碼在所述區塊鏈中發起查詢之前,針對所述防偽驗證請求中的防偽識別碼進行合法性驗證;如果所述防偽識別碼通過合法性驗證,進一步基於所述防偽識別碼在所述區塊鏈中發起查詢。
在本實施例中,透過讀取並執行所述儲存器儲存的與基於區塊鏈的防偽的控制邏輯對應的機器可執行指令,所述處理器被促使:
如果所述區塊鏈中儲存了與所述防偽識別碼關聯儲存的所述至少一種由其它防偽參與方產生的防偽識別資訊,進一步針對所述至少一種由其它防偽參與方產生的防偽識別資訊進行合法性驗證;
如果所述至少一種由其它防偽參與方產生的防偽識別資訊通過合法性驗證,確定所述目標產品通過防偽校驗。
在本實施例中,透過讀取並執行所述儲存器儲存的與基於區塊鏈的防偽的控制邏輯對應的機器可執行指令,所述處理器被促使:
反應於用戶針對所述防偽標籤的掃描操作,產生用戶針對所述防偽標籤的掃描記錄;
將產生的掃描記錄發佈至所述區塊鏈進行儲存。
本領域技術人員在考慮說明書及實踐這裡公開的發明後,將容易想到本說明書的其它實施方案。本說明書旨在涵蓋本說明書的任何變型、用途或者適應性變化,這些變型、用途或者適應性變化遵循本說明書的一般性原理並包括本說明書未公開的本技術領域中的公知常識或慣用技術手段。說明書和實施例僅被視為示例性的,本說明書的真正範圍和精神由下面的申請專利範圍指出。
應當理解的是,本說明書並不局限於上面已經描述並在附圖中示出的精確結構,並且可以在不脫離其範圍進行各種修改和改變。本說明書的範圍僅由所附的申請專利範圍來限制。
以上所述僅為本說明書的較佳實施例而已,並不用以限制本說明書,凡在本說明書的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本說明書保護的範圍之內。 In some scenarios, when the production organization of the product is anti-counterfeiting, it usually builds an anti-counterfeiting label for the product based on the anti-counterfeiting identification information (such as the anti-counterfeiting identification code) generated for the product by a third-party authoritative organization (such as an anti-counterfeiting agency). And attach the anti-counterfeiting label to the outer surface of the product. When the product is transferred to the consumer, the consumer can scan and identify the anti-counterfeiting label attached to the outer surface of the product through the terminal device to obtain the anti-counterfeiting identification information, and then initiate the legality verification of the obtained anti-counterfeiting identification information to confirm Whether the products held are counterfeit and shoddy products. In this scenario, once the relevant data used by a third-party authority to generate anti-counterfeiting identification information is leaked, product counterfeiters may use the leaked data to generate legal anti-counterfeiting labels for counterfeit and shoddy products. Fake and shoddy products are sold to consumers as genuine products, causing losses to consumers. Based on this, in this specification, it is proposed to construct anti-counterfeiting information related to a target product based on a variety of anti-counterfeiting identification information stored on the blockchain by multiple anti-counterfeiting participants, and through the anti-counterfeiting verification for the target product, Introduce a technical solution to improve the security level of product anti-counterfeiting by introducing the integrity check for the above-mentioned anti-counterfeiting information. When implemented, the anti-counterfeiting participants of the above target products can no longer only cover a single authority, but consist of multiple anti-counterfeiting participants. The multiple anti-counterfeiting participants can store the anti-counterfeiting identification information generated for the above target products in the blockchain in the form of transactions. The application client can use various anti-counterfeiting identification information corresponding to the target product stored on the blockchain by multiple anti-counterfeiting participants to form anti-counterfeiting information corresponding to the target product; for example, the above-mentioned multiple anti-counterfeiting participants may specifically include: An anti-counterfeiting agency, and at least one other anti-counterfeiting participant; in this scenario, the above-mentioned anti-counterfeiting information may specifically include an anti-counterfeiting identification code generated by the above-mentioned anti-counterfeiting agency for the target product, and at least one kind of anti-counterfeiting identification code stored in association with the anti-counterfeiting identification code. Anti-counterfeiting identification information generated by other anti-counterfeiting participants; wherein, the above-mentioned other anti-counterfeiting participants may specifically be the key participants corresponding to each link in the product life cycle of the above-mentioned target product; for example, the above-mentioned key participants may specifically be the above-mentioned target product production institutions, inspection institutions, etc. In this scenario, the anti-counterfeiting information may specifically include the anti-counterfeiting identification code of the target product, a data abstract of the production information of the target product, and a data abstract of the inspection report of the target product. After the above-mentioned target products are transferred to consumers, consumers can obtain at least one kind of anti-counterfeiting identification information among the above-mentioned various kinds of anti-counterfeiting identification information through the terminal equipment they hold, and then construct a target product based on the obtained anti-counterfeiting identification information. For example, in practical applications, the production organization of the above-mentioned target product can construct an anti-counterfeiting label for the target product based on the anti-counterfeiting identification code generated by the above-mentioned anti-counterfeiting organization for the target product (for example, the anti-counterfeiting label can specifically be RFID electronic label, two-dimensional code label, etc.), and when the target product leaves the factory, the anti-counterfeiting label is attached to the outer surface of the target product. When the target product is transferred to the consumer, the consumer can scan and identify the anti-counterfeiting label through the terminal device they hold to obtain the above-mentioned anti-counterfeiting identification code, and based on the obtained anti-counterfeiting identification code, construct an anti-counterfeiting identification code for the above-mentioned target product. The anti-forgery verification request is then submitted to the application client. After receiving the anti-counterfeiting verification request for the above-mentioned target product, the application client can initiate anti-counterfeiting verification for the above-mentioned target product based on the anti-counterfeiting identification information carried in the anti-counterfeiting verification request; wherein, the anti-counterfeiting verification for the above-mentioned target product is at least It is necessary to include an integrity check on the anti-counterfeiting information corresponding to the above-mentioned target product that has been stored on the blockchain. After completing the anti-counterfeiting verification for the above target product, the application client can return the anti-counterfeiting verification result to the user. In the above technical solution, since the anti-counterfeiting information related to the target product stored in the blockchain is composed of various anti-counterfeiting identification information corresponding to the target product stored on the blockchain by multiple anti-counterfeiting participants; and , in the anti-counterfeiting verification for the target product, the integrity verification for the above-mentioned anti-counterfeiting information stored on the blockchain is introduced; therefore, even if some of the above-mentioned anti-counterfeiting identification information is leaked This part of the leaked anti-counterfeiting identification information is the anti-counterfeiting information generated by counterfeit and shoddy products, and it still cannot pass the integrity check of the anti-counterfeiting information for the product, so that the security level of product anti-counterfeiting can be significantly improved. The present specification will be described below through specific embodiments and in conjunction with specific application scenarios. Please refer to FIG. 1. FIG. 1 is a blockchain-based anti-counterfeiting method provided by an embodiment of this specification, applied to an application client; wherein, the blockchain stores anti-counterfeiting information corresponding to the target product; the The anti-counterfeiting information is composed of various anti-counterfeiting identification information corresponding to the target product stored on the blockchain by multiple anti-counterfeiting participants; the above method executes the following steps: Step 102: Obtain the anti-counterfeiting verification request for the target product submitted by the user ; Step 104, in response to the anti-counterfeiting verification request, initiate anti-counterfeiting verification for the target product; wherein, the anti-counterfeiting verification at least includes integrity verification for the anti-counterfeiting information; Step 106, report to the The user returns the anti-counterfeiting verification result for the target product. The blockchain described in this specification may specifically include a private chain, a public chain, and a consortium chain, etc., which are not particularly limited in this specification. For example, in one scenario, the above-mentioned blockchain may be a consortium chain composed of anti-counterfeiting agencies, production agencies, inspection agencies (or management agencies) of the target product as members of the consortium; the operator of the consortium chain can rely on the The alliance chain is used to deploy anti-counterfeiting verification transactions for the above target products; and the anti-counterfeiting institutions, production institutions, and inspection institutions that are members of the alliance described above can be used as transaction nodes for the above-mentioned anti-counterfeiting verification transactions. Each transaction node can publish the anti-counterfeiting identification information related to the above target product generated by itself in the alliance chain in the form of a transaction, and after the transaction is processed by consensus of the consensus nodes in the alliance chain, in the alliance chain. The distributed database is stored to complete the "on-chain" storage of the above-mentioned anti-counterfeiting identification information. Among them, it should be noted that the transaction (Transaction) described in this specification refers to a piece of data created by the user through the client side of the blockchain and which needs to be finally released to the distributed database of the blockchain. Transactions in the blockchain are usually divided into narrow transactions and broad transactions. A transaction in a narrow sense refers to a transfer of value issued by a user to the blockchain; for example, in the traditional Bitcoin blockchain network, a transaction can be a transfer initiated by a user in the blockchain. In a broad sense, a transaction refers to a transaction data with transaction intent released by a user to the blockchain; for example, an operator can build a consortium chain based on actual transaction requirements, and rely on the consortium chain to deploy some other types of transactions that are not related to value transfer. Online transactions (for example, anti-counterfeiting verification affairs, rental affairs, vehicle scheduling, insurance claims, credit services, medical services, etc.), and in this type of alliance chain, the transaction can be a transaction published by the user in the alliance chain. Intent transaction message or transaction request. The above application client can include any type of upper-layer application that uses the underlying transaction data stored in the blockchain as data support to implement specific transaction functions; for example, taking the deployment of anti-counterfeiting verification transactions in the blockchain as an example, The above-mentioned application client may specifically be an APP client that realizes the anti-counterfeiting verification of the target product by using the anti-counterfeiting data corresponding to the above-mentioned target product stored in the blockchain as a data support. The above-mentioned anti-counterfeiting information may specifically include any form of data used to perform anti-counterfeiting verification on the target product; in a traditional anti-counterfeiting verification scenario, the above-mentioned anti-counterfeiting information can usually be provided by an anti-counterfeiting institution that has a cooperative relationship with the production institution of the product. The unique anti-counterfeiting identification code generated; and in this manual, the above-mentioned anti-counterfeiting information can be composed of various anti-counterfeiting identification information corresponding to the above-mentioned target products stored on the blockchain by multiple anti-counterfeiting participants. The specific types of the above-mentioned multiple anti-counterfeiting participants are not specifically limited in this specification, and any organization related to the above-mentioned target product can be added to the above-mentioned multiple anti-counterfeiting participants; for example, the one shown in the In an embodiment, the above-mentioned multiple anti-counterfeiting participants may specifically include the above-mentioned anti-counterfeiting mechanism, and at least one other anti-counterfeiting participant that participates in the anti-counterfeiting verification of the above-mentioned target product together with the above-mentioned anti-counterfeiting mechanism. In this scenario, the anti-counterfeiting information may specifically include an anti-counterfeiting identification code generated by the anti-counterfeiting agency for the target product, and at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code; wherein , in the illustrated embodiment, the above-mentioned other anti-counterfeiting participants may specifically include key participants corresponding to each link in the product life cycle of the above-mentioned target product; The identification information may include product description information related to each link in the product life cycle of the above target product. The above-mentioned product life cycle can specifically cover all the links experienced by the product from production to market launch, as well as from market launch to replacement and exit from the market; The life cycle can usually include the production, inspection and other links of the product; in this case, the above-mentioned key participants may specifically include the production organization, inspection organization, etc. of the above-mentioned target product; correspondingly, at least one of the above-mentioned anti-counterfeiting participation The anti-counterfeiting identification information generated by the manufacturer may include a data summary of the production information of the target product, a data summary of the inspection report of the target product, and so on. In this way, since a single anti-counterfeiting participant cannot tamper with the data stored on the blockchain, nor can a single anti-counterfeiting participant construct complete anti-counterfeiting information for the above target product based on a single anti-counterfeiting identification information generated by itself; therefore , which can ensure the uniqueness and credibility of the above-mentioned anti-counterfeiting information; moreover, the anti-counterfeiting identification code of the above-mentioned target product can also be associated with various key links such as production and inspection in the product life cycle of the target product, so as to be based on With the anti-counterfeiting identification code of the above target product, the product description information of each key link can be queried in the blockchain. Among them, it should be noted that the specific number of the above-mentioned multiple anti-counterfeiting participants is not particularly limited in this specification; in practical applications, the more the above-mentioned multiple anti-counterfeiting participants are, the more The anti-counterfeiting ability of anti-counterfeiting information composed of various anti-counterfeiting identification information stored in the blockchain will also be further improved. For example, in the illustrated embodiment, the specific number of the above-mentioned multiple anti-counterfeiting participants can be dynamically changed; that is, the operator corresponding to any link in the product life cycle of the above-mentioned target product can be used as the Anti-counterfeiting participants, dynamically join or withdraw from the above multiple anti-counterfeiting participants. The following takes the above-mentioned blockchain as the alliance chain, and the above-mentioned multiple anti-counterfeiting participants include anti-counterfeiting institutions, production institutions and inspection institutions as examples to describe the technical solutions of this specification in detail; The example of the parties including the anti-counterfeiting institutions, production institutions and inspection institutions of the target product mentioned above is only an exemplary illustration; obviously, in this specification, the above-mentioned multiple anti-counterfeiting participants may also include anti-counterfeiting institutions, production institutions and inspection institutions. Other types of operating organizations for the anti-counterfeiting verification of the above target product; for example, the sales organization, agency, management organization, etc. of the above target product, will not be listed one by one in this specification. Please refer to FIG. 2, which is an architecture diagram of a consortium chain shown in this specification. As shown in Figure 2, the anti-counterfeiting institutions, production institutions and inspection institutions of the above-mentioned target products can join the alliance chain as alliance members, and use the product information related to the above-mentioned target products generated by them as anti-counterfeiting identification information. The form is published to the alliance chain, and after the transaction is processed by consensus of the consensus nodes in the alliance chain, it is stored in the distributed database in the alliance chain to complete the "on-chain" storage of the above-mentioned anti-counterfeiting identification information. The above-mentioned anti-counterfeiting institutions can independently develop and design unique anti-counterfeiting verification codes, and publish the developed and designed anti-counterfeiting verification codes to the alliance chain in the form of transactions, and perform "on-chain" in the distributed database of the above-mentioned alliance chain. At the same time, the above-mentioned anti-counterfeiting mechanism can also construct anti-counterfeiting labels for the products produced by the above-mentioned production institutions based on the developed and designed anti-counterfeiting verification codes; wherein, the specific types of the above-mentioned anti-counterfeiting labels are not particularly limited in this manual; For example, it may be an RFID tag generated based on the above-mentioned anti-counterfeiting verification code, or a two-dimensional code tag, and so on. The above-mentioned production mechanism, after completing the manufacture and production of the product, can attach the anti-counterfeiting label generated by the above-mentioned anti-counterfeiting mechanism on the outer surface of the product out of the warehouse; Second, the production information of the product such as the packaging batch number is stored in the third-party storage system corresponding to the above-mentioned alliance chain, and the data summary (such as the hash value) of the production information of the product is signed based on the private key held. The above-mentioned inspection agency can inspect each batch of products listed by the above-mentioned production organization, and report the details of the inspection report. The content is saved to the third-party storage system corresponding to the above-mentioned consortium chain. At the same time, the data summary of the production information of the product can be signed based on the private key held, and then released to the consortium chain in the form of transactions. The "on-chain" deposit is carried out in the distributed database. Wherein, in the illustrated embodiment, the above-mentioned third-party storage system may specifically be a CAS (content-addressable-storage, content-addressable-storage) system. The so-called content-addressable storage system refers to the unique identification of data based on the content of the stored data (such as a data digest generated based on the content of the data), instead of using the storage location of the stored data to identify the storage of the data. For example, in practical applications, the above-mentioned third-party storage system may be a CAS system such as IPFS; in this way, when users need to view the production information and verification reports of the product, they can use the application client, based on the For the data summary in the anti-counterfeiting information of the product, initiate a query to the above-mentioned CAS system to obtain the production information of the product and the original content of the inspection report. Please continue to refer to Figure 2. In this specification, the anti-counterfeiting information related to the target product that needs anti-counterfeiting verification stored on the above-mentioned alliance chain can be specifically the anti-counterfeiting verification code of the above-mentioned target product, and the production information of the above-mentioned target product. It consists of three parts: the data abstract and the data abstract of the inspection report of the target product mentioned above. The above-mentioned anti-counterfeiting institutions, production institutions and inspection institutions, after "uplinking" the anti-counterfeiting identification information related to the above-mentioned target products generated by themselves in the alliance chain, the above-mentioned application clients can obtain the information that has been registered on the alliance chain. The anti-counterfeiting identification code corresponding to the above-mentioned target product, the data summary of the production information of the above-mentioned target product, and the data summary of the inspection report of the above-mentioned target product, and the production information of the above-mentioned target product will be certified on the alliance chain. The data abstract and the data abstract of the inspection report of the above-mentioned target product are stored in association with the anti-counterfeiting identification code of the above-mentioned target product on the alliance chain, so as to organize the anti-counterfeiting identification information of the above three parties on the alliance chain into a Anti-counterfeiting information of the target product. For example, at the time of implementation, when the above-mentioned anti-counterfeiting agencies, production agencies and inspection agencies store the anti-counterfeiting identification information generated for the target product on the alliance chain, the product identification of the target product and the corresponding anti-counterfeiting identification information can be stored in the alliance chain together with the anti-counterfeiting identification information. The application client can query the anti-counterfeiting identification code corresponding to the same product identification, the data summary of the production information, and the data summary of the inspection report in the alliance chain to generate anti-counterfeiting information for the target product. In this specification, when the operator of the above-mentioned consortium chain deploys the above-mentioned anti-counterfeiting verification transaction on the alliance chain, it can be implemented by publishing a smart contract related to the anti-counterfeiting verification transaction to the alliance chain. In this case, the above-mentioned operators can develop smart contracts related to anti-counterfeiting verification transactions in advance, and declare in the smart contract the anti-counterfeiting verification transaction logic that needs to be triggered and executed. For the developed smart contract, the operator can publish the smart contract to the consortium chain through any node device in the consortium chain, and after the smart contract is reached by the consensus nodes in the consortium chain, it will be included in the consortium. Chain's distributed repository. Subsequently, ordinary consumers can access any node device through the application client, initiate a contract call to the smart contract, trigger and execute the relevant anti-counterfeiting verification transaction logic on the alliance chain, and complete the anti-counterfeiting verification for the above target products. . Among them, it should be noted that the consensus algorithm and the specific consensus process used by the member node devices in the alliance chain to perform consensus processing on the smart contracts published to the blockchain will not be described in detail in this specification. , those skilled in the art may refer to the descriptions in the related art when implementing the technical solutions described in this specification. For example, for the consortium chain, such as PBFT algorithm, or other similar consensus algorithms can be used. In this specification, after the above-mentioned target product is transferred to the consumer, the consumer can scan and identify the anti-counterfeiting label attached to the outer surface of the product through the terminal device to obtain the anti-counterfeiting identification code carried in the anti-counterfeiting label, and then obtain the anti-counterfeiting identification code based on the obtained The obtained anti-counterfeiting identification code is used to construct the anti-counterfeiting verification request for the above target product. Among them, it should be noted that, in practical applications, the anti-counterfeiting identification information used by the anti-counterfeiting agency when constructing the anti-counterfeiting verification request for the above-mentioned target product may include the anti-counterfeiting identification code obtained by scanning and recognizing the above-mentioned anti-counterfeiting label. , may also include any one or several of the above-mentioned various anti-counterfeiting identification information except the above-mentioned anti-counterfeiting identification code, which is not particularly limited in this specification. That is, in the above-mentioned anti-counterfeiting verification request, in addition to the anti-counterfeiting identification code scanned and identified from the above-mentioned anti-counterfeiting label, it may also include other types of anti-counterfeiting identification information other than the above-mentioned anti-counterfeiting identification information in the above-mentioned various anti-counterfeiting identification information. . After receiving the above-mentioned anti-counterfeiting verification request, the above-mentioned application client can respond to the above-mentioned anti-counterfeiting verification request and initiate a contract call for the above-mentioned smart contract, so as to complete the anti-counterfeiting verification for the above-mentioned target product. Among them, it should be noted that, in this specification, the anti-counterfeiting verification for the above-mentioned target product needs to include at least the integrity verification of the anti-counterfeiting information of the above-mentioned target product that has been certified on the alliance chain. The integrity verification refers to verifying whether there are any deficiencies in the various anti-counterfeiting identification information constituting the anti-counterfeiting information of the above-mentioned target product that has been stored on the alliance chain. In the illustrated embodiment, the anti-counterfeiting verification for the above-mentioned target product may specifically include two parts: integrity verification and legality verification of the anti-counterfeiting information for the above-mentioned target product. During implementation, after receiving the above-mentioned anti-counterfeiting verification request, the above-mentioned application client can read the anti-counterfeiting identification code carried in the anti-counterfeiting verification request, and submit the anti-counterfeiting verification code to the public contract address of the above-mentioned smart contract to initiate targeting The contract invocation of the above smart contract triggers the execution of the anti-counterfeiting verification transaction logic declared in the above-mentioned smart contract, and completes the anti-counterfeiting verification of the above-mentioned target product. After receiving the anti-counterfeiting identification code submitted by the application client, the above smart contract can firstly verify the validity of the read anti-counterfeiting identification code; wherein, the legality verification of the anti-counterfeiting identification code can usually include The uniqueness verification of the anti-counterfeiting identification code; for example, in practical applications, the hash value of the read anti-counterfeiting identification code can be calculated, and a query is initiated in the alliance chain based on the hash value to determine whether there is a certificate in the alliance chain related to the The unique anti-counterfeiting identification code corresponding to the hash value; if it is, it can be considered that the anti-counterfeiting identification code has passed the validity verification. After the anti-counterfeiting identification code carried in the anti-counterfeiting verification request has passed the legality verification, the above smart contract can further perform integrity verification on the anti-counterfeiting information of the above-mentioned target product, based on the anti-counterfeiting identification code in the anti-counterfeiting verification request in the alliance chain Initiate a query to determine whether the data summary of the production information of the above-mentioned target product stored in association with the anti-counterfeiting identification code and the data summary of the inspection report of the above-mentioned target product are queried; if the above-mentioned target stored in association with the anti-counterfeiting identification code is queried The data summary of the production information of the product and the data summary of the inspection report of the above-mentioned target product indicate that the various anti-counterfeiting identification information constituting the anti-counterfeiting information of the above-mentioned target product, which have been certified on the alliance chain, are complete and not missing. The anti-counterfeiting information of the above-mentioned target product has passed the integrity verification; if the data summary of the production information of the above-mentioned target product stored in association with the anti-counterfeiting identification code and the data summary of the inspection report of the above-mentioned target product are not found, then the If the anti-counterfeiting information has not passed the integrity verification, the anti-counterfeiting verification result of the above-mentioned anti-counterfeiting product can be returned to the user through the above-mentioned application client; Text prompt. Further, if the anti-counterfeiting information of the above-mentioned target product passes the integrity verification, the above-mentioned smart contract can further check the data summary of the production information of the above-mentioned target product stored in association with the above-mentioned anti-counterfeiting identification code, and the inspection of the above-mentioned target product. The legality verification of the data abstract of the report; wherein, the legality verification of the data abstract of the production information of the above-mentioned target product and the data abstract of the inspection report of the above-mentioned target product can usually include the data abstract of the production information of the above-mentioned target product , and the signature carried by the data digest of the inspection report of the target product for verification; for example, the smart contract can be based on the public key corresponding to the private key held by the production organization and the inspection organization. The data abstract of the target product and the signature carried in the data abstract of the inspection report of the target product are verified separately; if the verification is passed, it indicates that the data abstract of the production information of the target product and the data abstract of the inspection report of the target product have passed the legality. verify. If the data abstract of the production information of the target product and the data abstract of the inspection report of the target product have passed the legality verification, the anti-counterfeiting verification of the target product is completed at this time, and the target product has passed the anti-counterfeiting verification. In this case, the anti-counterfeiting verification result that the above-mentioned anti-counterfeiting product is genuine can be returned to the user through the application client; for example, the anti-counterfeiting verification result can be a text prompt that "this product is genuine"; , if the data abstract of the production information of the target product and the data abstract of the inspection report of the target product have not passed the legality verification (for example, the signature is incorrect), then the target product has not passed the anti-counterfeiting verification. In this case, the anti-counterfeiting verification result that the above-mentioned anti-counterfeiting product is a counterfeit and inferior product can be returned to the user through the above-mentioned application client. Among them, it should be added that when a new institution joins the above-mentioned multiple anti-counterfeiting participants as the above-mentioned anti-counterfeiting participants, the above-mentioned application client can store various certificates on the alliance chain in the manner described above. The anti-counterfeiting identification information is reorganized into the anti-counterfeiting information of the target product, and the original anti-counterfeiting information is updated; The sales information generated by the sales organization of the target product will also be added to the above-mentioned anti-counterfeiting information as the anti-counterfeiting identification information that constitutes the above-mentioned anti-counterfeiting information. Correspondingly, if the number of anti-counterfeiting participants changes, and new anti-counterfeiting identification information is added to the anti-counterfeiting identification information that constitutes the above-mentioned anti-counterfeiting information, the anti-counterfeiting verification logic for the above-mentioned anti-counterfeiting information will also change synchronously; In this case, the operator of the above-mentioned alliance chain can re-deploy a new smart contract in the alliance chain to perform anti-counterfeiting verification on the anti-counterfeiting information of the above-mentioned target products. In another embodiment shown, when the user identifies and scans the anti-counterfeiting label through the terminal device, the application client can also respond to the user's scanning operation on the anti-counterfeiting label, and generate the user's scanning operation on the anti-counterfeiting label. Records, and then store the generated scan records in the alliance chain in the form of transactions. In this way, the user's scanning records of the above-mentioned anti-counterfeiting labels can be stored in the alliance chain, so that the scanning records of the anti-counterfeiting labels of the target products can be traced back in the process of circulation of the target products. It can be seen from the above embodiments that in this specification, the anti-counterfeiting information related to the target product stored in the blockchain is based on various anti-counterfeiting information corresponding to the target product stored on the blockchain by multiple anti-counterfeiting participants The identification information is formed, and a single anti-counterfeiting identification code is no longer used as the anti-counterfeiting information; and, in the anti-counterfeiting verification for the target product, the integrity verification for the above-mentioned anti-counterfeiting information stored on the blockchain is introduced; therefore, even if Part of the real anti-counterfeiting identification information in the above-mentioned various anti-counterfeiting identification information is leaked, and the anti-counterfeiting identification information based on this part of the leaked anti-counterfeiting identification information is the anti-counterfeiting information generated by counterfeit and shoddy products, and still cannot pass the integrity check of the anti-counterfeiting information for the product. Thus, the security level of product anti-counterfeiting can be significantly improved. For example, taking the above-mentioned anti-counterfeiting information as an example, it consists of three parts: the anti-counterfeiting identification code of the above-mentioned target product, the data summary of the production information of the above-mentioned target product, and the data summary of the inspection report of the above-mentioned target product. If the identification code is leaked, the counterfeiter of the product constructs a legal anti-counterfeiting label based on the leaked anti-counterfeiting identification code; At this time, since there may not be a data summary of the production information of the above-mentioned target product stored in association with the anti-counterfeiting identification code and a data summary of the above-mentioned target product inspection report on the alliance chain, it is impossible to pass the above-mentioned data summary. Integrity verification of anti-counterfeiting information, so that such counterfeit and shoddy products containing legal anti-counterfeiting labels can still be identified as fake and shoddy products during the anti-counterfeiting verification stage. Corresponding to the above method embodiments, the present specification also provides an embodiment of a blockchain-based anti-counterfeiting device. The embodiments of the blockchain-based anti-counterfeiting device of this specification can be applied to electronic devices. The apparatus embodiment may be implemented through software, or may be implemented through hardware or a combination of software and hardware. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory memory through the processor of the electronic device where it is located. From the perspective of hardware, as shown in Figure 3, it is a hardware structure diagram of the electronic equipment where the blockchain-based anti-counterfeiting device of this specification is located, except for the processor, memory, and network interface shown in Figure 3 , and the non-volatile memory, the electronic device in which the device in the embodiment is located usually may also include other hardware according to the actual function of the electronic device, which will not be repeated here. FIG. 4 is a block diagram of a blockchain-based anti-counterfeiting device according to an exemplary embodiment of the present specification. Please refer to FIG. 4 , the blockchain-based anti-counterfeiting device 40 can be applied to the electronic equipment shown in FIG. 3 ; the blockchain stores anti-counterfeiting information corresponding to the target product; wherein, the anti-counterfeiting information It is composed of a plurality of anti-counterfeiting identification information corresponding to the target product stored on the blockchain by a plurality of anti-counterfeiting participants; the device 40 includes an acquisition module 401 , a verification module 402 and a return module 403 . The obtaining module 401 obtains the anti-counterfeiting verification request for the target product submitted by the user; the verification module 402, in response to the anti-counterfeiting verification request, initiates the anti-counterfeiting verification for the target product; wherein, the anti-counterfeiting verification The verification at least includes the integrity verification of the anti-counterfeiting information; the return module 403 returns the anti-counterfeit verification result of the target product to the user. In this embodiment, the anti-counterfeiting information includes an anti-counterfeiting identification code generated by an anti-counterfeiting agency for the target product, and at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code. In this embodiment, an anti-counterfeiting label generated based on the anti-counterfeiting identification code is attached to the target product; the anti-counterfeiting verification request includes the anti-counterfeiting identification code obtained by the user by scanning and recognizing the anti-counterfeiting label; the verification Module 402: In response to the anti-counterfeiting verification request, initiate a query in the blockchain based on the anti-counterfeiting identification code in the anti-counterfeiting verification request to determine whether the query stored in association with the anti-counterfeiting identification code is found. at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants; if the at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code is queried, it is determined that the target product has passed the anti-counterfeiting verification. In this embodiment, the verification module 402 further: before initiating a query in the blockchain based on the anti-counterfeiting identification code in the anti-counterfeiting verification request, perform a query on the anti-counterfeiting identification code in the anti-counterfeiting verification request Legality verification; if the anti-counterfeiting identification code passes the legality verification, a query is further initiated in the blockchain based on the anti-counterfeiting identification code. In this embodiment, the verification module 402 further: if the at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code is stored in the blockchain, further The at least one type of anti-counterfeiting identification information generated by other anti-counterfeiting participants is subject to legality verification; if the at least one type of anti-counterfeiting identification information generated by other anti-counterfeiting participants passes the legality verification, it is determined that the target product has passed the anti-counterfeiting verification. In this embodiment, the device 40 further includes: a generating module 404 (not shown in FIG. 4 ), which generates a scanning record of the anti-counterfeiting label by the user in response to the user's scanning operation on the anti-counterfeiting label; The resulting scan records are posted to the blockchain for storage. In this embodiment, the other anti-counterfeiting participants include key participants corresponding to each link in the product life cycle of the target product; the at least one anti-counterfeiting identification information generated by the other anti-counterfeiting participants includes Product description information related to each link in the product life cycle of the target product. In this embodiment, the key participants include a production institution and an inspection institution of the target product; the at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants includes data of production information of the target product Abstract, data summary of the inspection report of the target product. In this embodiment, the production information of the target product and the inspection report of the target product are stored in a third-party storage system connected to the blockchain; wherein, the third-party storage system is content addressable storage system. In this embodiment, the blockchain is a consortium chain. For the apparatus embodiments, since they basically correspond to the method embodiments, reference may be made to the partial descriptions of the method embodiments for related parts. The device embodiments described above are only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, That is, it can be located in one place, or it can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this specification. Those of ordinary skill in the art can understand and implement it without creative effort. The systems, devices, modules or modules described in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, a game control desktop, tablet, wearable device, or a combination of any of these devices. Corresponding to the foregoing method embodiments, the present specification further provides an embodiment of an electronic device. The electronic device includes: a processor and a memory for storing machine-executable instructions; wherein the processor and the memory are typically interconnected by internal busbars. In other possible implementations, the device may also include an external interface to enable communication with other devices or components. In this embodiment, by reading and executing the machine-executable instructions stored in the storage and corresponding to the blockchain-based anti-counterfeiting control logic, the processor is caused to: obtain the target product submitted by the user for the target product anti-counterfeiting verification request; anti-counterfeiting information corresponding to the target product is stored in the blockchain; wherein, the anti-counterfeiting information is stored on the blockchain by multiple anti-counterfeiting participants corresponding to the target product. Information composition; Initiating anti-counterfeiting verification for the target product in response to the anti-counterfeiting verification request; wherein, the anti-counterfeiting verification at least includes integrity verification for the anti-counterfeiting information; The anti-counterfeiting verification result of the target product. In this embodiment, the anti-counterfeiting information includes an anti-counterfeiting identification code generated by an anti-counterfeiting agency for the target product, and at least one anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code; the The target product is attached with an anti-counterfeiting label generated based on the anti-counterfeiting identification code; the anti-counterfeiting verification request includes the anti-counterfeiting identification code obtained by the user by scanning and recognizing the anti-counterfeiting label; The machine-executable instructions corresponding to the blockchain-based anti-counterfeiting control logic, the processor is prompted to: In response to the anti-counterfeiting verification request, the anti-counterfeiting identification code in the anti-counterfeiting verification request is stored in the blockchain Initiate a query to determine whether the at least one anti-counterfeiting identification information stored in association with the anti-counterfeiting identification code and generated by other anti-counterfeiting participants is found; if the at least one anti-counterfeiting identification information stored in association with the anti-counterfeiting identification code is found by The anti-counterfeiting identification information generated by the anti-counterfeiting party determines that the target product has passed the anti-counterfeiting verification. In this embodiment, by reading and executing machine-executable instructions stored in the memory corresponding to the control logic of blockchain-based anti-counterfeiting, the processor is caused to: based on the anti-counterfeiting verification request in the anti-counterfeiting request Before the identification code initiates a query in the blockchain, the validity of the anti-counterfeiting identification code in the anti-counterfeiting verification request is verified; if the anti-counterfeiting identification code passes the legality verification, further based on the anti-counterfeiting identification code in the Initiate a query in the blockchain. In this embodiment, by reading and executing machine-executable instructions stored in the storage corresponding to the blockchain-based anti-counterfeiting control logic, the processor is caused to: if stored in the blockchain The at least one kind of anti-counterfeiting identification information generated by other anti-counterfeiting participants stored in association with the anti-counterfeiting identification code, and further verify the validity of the at least one kind of anti-counterfeiting identification information generated by other anti-counterfeiting participants; The anti-counterfeiting identification information generated by other anti-counterfeiting participants passes the legality verification, and it is determined that the target product passes the anti-counterfeiting verification. In this embodiment, by reading and executing machine-executable instructions stored in the memory corresponding to the control logic of blockchain-based anti-counterfeiting, the processor is caused to: respond to a user's response to the anti-counterfeiting label The scanning operation generates a scanning record of the anti-counterfeiting label by the user; and the generated scanning record is published to the blockchain for storage. Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses or adaptations of this specification that follow the general principles of this specification and include common knowledge or conventional techniques in the art not disclosed in this specification . The specification and examples are to be regarded as exemplary only, the true scope and spirit of the specification being indicated by the following claims. It should be understood that this specification is not limited to the precise structures described above and illustrated in the accompanying drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of this specification is limited only by the scope of the appended claims. The above descriptions are only preferred embodiments of this specification, and are not intended to limit this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this specification shall be included in this specification. within the scope of protection.