TW202038122A - Blockchain-based service processing method and apparatus, and electronic device - Google Patents

Blockchain-based service processing method and apparatus, and electronic device Download PDF

Info

Publication number
TW202038122A
TW202038122A TW108131881A TW108131881A TW202038122A TW 202038122 A TW202038122 A TW 202038122A TW 108131881 A TW108131881 A TW 108131881A TW 108131881 A TW108131881 A TW 108131881A TW 202038122 A TW202038122 A TW 202038122A
Authority
TW
Taiwan
Prior art keywords
data
blockchain
target
target data
business
Prior art date
Application number
TW108131881A
Other languages
Chinese (zh)
Inventor
翁欣雨
蔣海滔
林鋒
張鴻
曾曉東
吳軍
楊磊
王林青
湛宗儒
李富強
Original Assignee
香港商阿里巴巴集團服務有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 香港商阿里巴巴集團服務有限公司 filed Critical 香港商阿里巴巴集團服務有限公司
Publication of TW202038122A publication Critical patent/TW202038122A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Abstract

A blockchain-based service processing method, comprising: receiving a target transaction initiated by a service executor; the target transaction comprising target data; and a data summary of the target data being deposited in a blockchain in advance; in response to the target transaction, calculating a data summary of the target data, and determining whether the calculated data summary of the target data matches the data summary of the target data deposited in the blockchain; and if the calculated data summary of the target data matches the data summary of the target data deposited in the blockchain, calling a service logic declared in a corresponding smart contract, and performing service processing on the target data.

Description

基於區塊鏈的業務處理方法及裝置、電子設備Block chain-based business processing method and device, and electronic equipment

本說明書的一個或多個實施例係有關區塊鏈技術領域,尤其有關一種基於區塊鏈的業務處理方法及裝置、電子設備。One or more embodiments of this specification are related to the field of blockchain technology, in particular to a method and device for business processing based on blockchain, and electronic equipment.

區塊鏈技術,也被稱之為分散式帳本技術,是一種由若干台計算設備共同參與“記帳”,共同維護一份完整的分散式資料庫的新興技術。由於區塊鏈技術具有去中心化、公開透明、每台計算設備可以參與資料庫記錄、並且各計算設備之間可以快速地進行資料同步的特性,使得區塊鏈技術已在眾多的領域中廣泛地進行應用。Blockchain technology, also known as distributed ledger technology, is an emerging technology in which several computing devices participate in "bookkeeping" and jointly maintain a complete distributed database. Because the blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database recording, and the data synchronization between computing devices can be carried out quickly, so that the blockchain technology has been widely used in many fields. To apply.

本說明書提出一種基於區塊鏈的業務處理方法,包括: 接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 可選地,所述智慧型合約中還聲明了針對所述目標資料的合法性驗證邏輯; 所述回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配,包括: 回應於所述目標交易,呼叫所述智慧型合約中聲明的合法性驗證邏輯,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配。 可選地,所述方法還包括: 獲取作為成員節點設備的終端設備在所述區塊鏈發布的所述目標資料的資料摘要,其中,所述終端設備搭載了安全運算環境,所述安全運算環境中儲存了與所述終端設備對應的私鑰;所述資料摘要在所述安全運算環境中基於與所述終端設備對應的私鑰進行了簽章; 基於與所述私鑰對應的公鑰對所述資料摘要的簽章進行驗證; 如果所述簽章驗證通過,將所述目標資料的資料摘要在所述區塊鏈中進行存證。 可選地,所述目標交易還包括所述目標資料的描述資料,所述區塊鏈中還存證了所述目標資料的描述資料; 所述如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理,包括: 如果計算出的所述資料摘要與所述區塊鏈中存證的所述目標資料的資料摘要匹配,進一步確定所述目標交易中的所述目標資料的描述資料,與所述區塊鏈中存證的所述目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 可選地,所述描述資料包括: 所述目標資料的採集時刻、採集地點、以及所述目標資料相關的對象中的一個或者多個的組合。 可選地,所述終端設備包括行車記錄器或者執法記錄器;所述目標資料包括由行車記錄器或者執法記錄器採集到的視頻資料。 可選地,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於所述可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。 可選地,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於所述可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。 本說明書還提出一種基於區塊鏈的業務處理裝置,包括: 接收模組,接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 驗證模組,回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 處理模組,如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 可選地,所述智慧型合約中還聲明了針對所述目標資料的合法性驗證邏輯; 所述驗證模組: 回應於所述目標交易,呼叫所述智慧型合約中聲明的合法性驗證邏輯,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配。 可選地,所述裝置還包括: 存證模組,獲取作為成員節點設備的終端設備在所述區塊鏈發布的所述目標資料的資料摘要,其中,所述終端設備搭載了安全運算環境,所述安全運算環境中儲存了與所述終端設備對應的私鑰;所述資料摘要在所述安全運算環境中基於與所述終端設備對應的私鑰進行了簽章;基於與所述私鑰對應的公鑰對所述資料摘要的簽章進行驗證;如果所述簽章驗證通過,將所述目標資料的資料摘要在所述區塊鏈中進行存證。 可選地,所述目標交易還包括所述目標資料的描述資料;所述區塊鏈中還存證了所述目標資料的描述資料; 所述驗證模組進一步: 如果計算出的所述資料摘要與所述區塊鏈中存證的所述目標資料的資料摘要匹配,進一步確定所述目標交易中的所述目標資料的描述資料,與所述區塊鏈中存證的所述目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 可選地,所述描述資料包括: 所述目標資料的採集時刻、採集地點、以及所述目標資料相關的對象中的一個或者多個的組合。 可選地,所述終端設備包括行車記錄器或者執法記錄器;所述目標資料包括由行車記錄器或者執法記錄器採集到的視頻資料。 可選地,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於所述可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。 可選地,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於所述可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。 本說明書還提出一種電子設備,包括: 處理器; 用於儲存機器可執行指令的記憶體; 其中,透過讀取並執行所述記憶體儲存的與基於區塊鏈的基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,所述處理器被促使:接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 在以上技術方案中,透過對區塊鏈上進行資料存證的流程進行改進,不再需要將目標資料的原始內容在區塊鏈上存證,而是將目標資料的資料摘要在區塊鏈上存證,使得區塊鏈中的節點設備在接收到業務發起方發布的攜帶該目標資料的交易時,透過將該目標資料的資料摘要,與在區塊鏈上存證的該目標資料的資料摘要進行匹配,就可以便捷的對該目標資料進行合法性驗證,並基於合法性驗證結果,來進一步呼叫和執行發布在區塊鏈上的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理;從而,使得業務發起方能夠更加便捷的在區塊鏈上完成一些需要對提交的業務資料進行合法性驗證的線上業務。This manual proposes a blockchain-based business processing method, including: Receiving a target transaction initiated by a business executor, where the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract to perform business on the target data deal with. Optionally, the smart contract also declares the legality verification logic for the target data; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain ,include: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine that the calculated data summary of the target data is consistent with that in the blockchain Whether the document summary of the target document is matched. Optionally, the method further includes: Obtain a data summary of the target data published by the terminal device as a member node device on the blockchain, wherein the terminal device is equipped with a secure computing environment, and the secure computing environment stores the data corresponding to the terminal device The private key; the data summary is signed in the secure computing environment based on the private key corresponding to the terminal device; Verifying the signature of the data digest based on the public key corresponding to the private key; If the signature verification is passed, the data summary of the target data is stored in the blockchain. Optionally, the target transaction further includes description data of the target data, and the description data of the target data is also stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, the business logic declared in the corresponding smart contract is called, and the target data Perform business processing, including: If the calculated data summary matches the data summary of the target data stored in the block chain, it is further determined that the description data of the target data in the target transaction is consistent with that in the block chain. Whether the descriptive data of the deposited target data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. Optionally, the description material includes: One or a combination of one or more of the collection time of the target data, the collection location, and the objects related to the target data. Optionally, the terminal device includes a driving recorder or a law enforcement recorder; the target data includes video data collected by a driving recorder or a law enforcement recorder. Optionally, the business logic stated in the smart contract includes processing logic for data analysis of the video data to complete the determination of liability for a car accident; and processing logic for settlement of a car accident claim based on the result of the determination of the liability for the car accident; Alternatively, the business logic stated in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for determining the responsibility of the car accident; and, the car accident based on the trusted third-party service The result of the liability fixes the user's logic for handling car accident claims. Optionally, the business logic declared in the smart contract includes processing logic for performing data analysis on the video data to complete the violation determination; and processing logic for processing the user in violation based on the result of the violation determination; Or, the business logic declared in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for the violation determination; and, the violation determination based on the trusted third-party service As a result, the processing logic for handling violations of the user. This specification also proposes a business processing device based on blockchain, including: A receiving module for receiving a target transaction initiated by a business executor, wherein the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; The verification module, in response to the target transaction, calculates a data summary of the target data, and determines the calculated data summary of the target data and the data summary of the target data that is certified in the blockchain Whether it matches The processing module, if the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract, and check the Target data for business processing. Optionally, the smart contract also declares the legality verification logic for the target data; The verification module: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine that the calculated data summary of the target data is consistent with that in the blockchain Whether the document summary of the target document is matched. Optionally, the device further includes: The storage certificate module obtains the data summary of the target data published on the blockchain by the terminal device as the member node device, wherein the terminal device is equipped with a secure computing environment, and the secure computing environment stores The private key corresponding to the terminal device; the data summary is signed in the secure computing environment based on the private key corresponding to the terminal device; the data summary is based on the public key corresponding to the private key If the signature verification is passed, the data summary of the target data is stored in the blockchain. Optionally, the target transaction further includes description data of the target data; the description data of the target data is also stored in the blockchain; The verification module further: If the calculated data summary matches the data summary of the target data stored in the block chain, it is further determined that the description data of the target data in the target transaction is consistent with that in the block chain. Whether the descriptive data of the deposited target data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. Optionally, the description material includes: One or a combination of one or more of the collection time of the target data, the collection location, and the objects related to the target data. Optionally, the terminal device includes a driving recorder or a law enforcement recorder; the target data includes video data collected by a driving recorder or a law enforcement recorder. Optionally, the business logic stated in the smart contract includes processing logic for data analysis of the video data to complete the determination of liability for a car accident; and processing logic for settlement of a car accident claim based on the result of the determination of the liability for the car accident; Alternatively, the business logic stated in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for determining the responsibility of the car accident; and, the car accident based on the trusted third-party service The result of the liability fixes the user's logic for handling car accident claims. Optionally, the business logic declared in the smart contract includes processing logic for performing data analysis on the video data to complete the violation determination; and processing logic for processing the user in violation based on the result of the violation determination; Or, the business logic declared in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for the violation determination; and, the violation determination based on the trusted third-party service As a result, the processing logic for handling violations of the user. This specification also proposes an electronic device, including: processor; Memory used to store machine executable instructions; Wherein, by reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based blockchain-based business processing stored in the memory, the processor is prompted to: receive the target initiated by the business executor Transaction, wherein the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract to perform business on the target data deal with. In the above technical solutions, by improving the process of data storage on the blockchain, it is no longer necessary to store the original content of the target data on the blockchain, but to summarize the data of the target data on the blockchain The deposit certificate allows the node device in the blockchain to receive a transaction carrying the target data issued by the business initiator, through the data summary of the target data, and the target data stored on the blockchain. By matching the data summary, the legality of the target data can be easily verified, and based on the result of the legality verification, the business logic declared in the smart contract published on the blockchain can be further called and executed. Perform business processing; thus, the business initiator can more conveniently complete some online businesses on the blockchain that need to verify the legality of the submitted business data.

由於在區塊鏈儲存的資料具有不可篡改的特性,因此將資料儲存在區塊鏈上來做資料存證,是業界目前的主流趨勢。 然而,在實際應用中,對於一些流資料;比如,執法記錄器或者行車記錄器採集到的視頻流、音訊流等資料;由於其自身所需佔用的儲存空間較大,則通常無法直接儲存到區塊鏈上進行存證。 但在一些場景下,區塊鏈的營運方基於實際的業務需求,可能需要依託於在區塊鏈上存證的諸如視頻流等業務資料,來部署一些需要對提交的業務資料進行合法性驗證的線上業務。 比如,依託於區塊鏈中存證的由行車記錄器採集到的視頻流,來部署基於區塊鏈中存證的視頻流進行車禍理賠等線上業務。 由於缺乏資料認證手段,這類流資料作為業務資料的合法性,通常會存在廣泛質疑。因此,如何更加便捷地驗證這些在區塊鏈上存證的流資料作為業務資料的合法性,並基於這些流資料在區塊鏈上完成相關的業務實現,是業界亟待解決的技術問題。 基於此,本說明書旨在提出一種使得業務執行方可以更加便捷地在區塊鏈上完成一些,需要對提交的業務資料進行合法性驗證的線上業務的技術方案。 在實現時,一方面,區塊鏈的營運方可以透過在區塊鏈上發布智慧型合約,並在智慧型合約中聲明相關的業務邏輯的方式,在區塊鏈上部署需要對提交的業務資料進行合法性驗證的線上業務。 另一方面,對於採集到的作為業務資料的目標資料,可以不再將該目標資料的原始內容在區塊鏈上存證,而是將該目標資料的資料摘要在區塊鏈上進行存證。 而對於業務執行方而言,可以建構攜帶上述目標資料的目標交易,在區塊鏈中進行發布,來呼叫發布在區塊鏈上的智慧型合約,來完成相關的業務實現。 當區塊鏈中的成員節點設備,在接收到業務執行方發起的目標交易時,可以對該目標交易進行回應,計算該目標資料的資料摘要,並確定該計算出的該目標資料的資料摘要,與區塊鏈中存證的該目標資料的資料摘要是否匹配; 如果計算出的該目標資料的資料摘要,與區塊鏈中存證的該目標資料的資料摘要匹配,此時針對該目標資料的合法性驗證通過,該成員節點設備可以進一步呼叫部署在區塊鏈中的智慧型合約,執行該智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。 在以上技術方案中,透過對區塊鏈上進行資料存證的流程進行改進,不再需要將目標資料的原始內容在區塊鏈上存證,而是將目標資料的資料摘要在區塊鏈上存證,使得區塊鏈中的節點設備在接收到業務發起方發布的攜帶該目標資料的交易時,透過將該目標資料的資料摘要,與在區塊鏈上存證的該目標資料的資料摘要進行匹配,就可以便捷地對該目標資料進行合法性驗證,並基於合法性驗證結果,來進一步呼叫和執行發布在區塊鏈上的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理;從而,使得業務發起方能夠更加便捷地在區塊鏈上完成一些需要對提交的業務資料進行合法性驗證的線上業務。 下面透過具體實施例並結合具體的應用場景對本說明書進行描述。 請參考圖1,圖1是本說明書一實施例提供的一種基於區塊鏈的業務處理方法,係應用於區塊鏈中的節點設備,執行以下步驟: 步驟102,接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 步驟104,回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 步驟106,如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 在本說明書所描述的區塊鏈,具體可以包括私有鏈、共有鏈以及聯盟鏈等,在本說明書中不進行特別限定。 例如,在一個場景中,上述區塊鏈具體可以是由第三方支付平臺的伺服器、境內銀行伺服器、境外銀行伺服器、以及若干用戶節點設備作為成員設備組成的一個聯盟鏈。該聯盟鏈的營運方可以依託於該聯盟鏈,來線上部署諸如基於聯盟鏈的跨境轉帳、資產轉移等線上業務。 上述目標資料,包括由終端設備採集到的,需要在區塊鏈的分散式資料庫中完成資料存證的任意類型的資料,其中,將資料在區塊鏈上進行存證,是指將資料作為證據在區塊鏈中進行持久化儲存。 而上述終端設備,可以包括能夠作為節點設備加入區塊鏈,並將採集到的資料在區塊鏈上進行存證的任意形式的終端設備; 例如,在實際應用中,上述終端設備具體可以包括執法記錄器或者行車記錄器等。上述目標資料具體可以是執法記錄器或者行車記錄器等終端設備採集到的視頻資料、音訊資料、圖像資料等流資料。執法記錄器或者行車記錄器可以作為節點設備加入區塊鏈,將採集到的諸如視頻資料、音訊資料、圖像資料等流資料,在區塊鏈上進行存證。 1)業務資料的上鏈存證 在本說明書中,可以為終端設備搭建安全運算環境,並利用搭建的安全運算環境,來儲存和維護用於對終端設備需要在區塊鏈上存證的資料進行簽章的私鑰。 其中,在終端設備的硬體環境中搭建安全運算環境的具體方式,在本說明書中不進行特別限定。 在實際應用中,可以透過在終端設備的硬體環境中引入新的硬體來搭建安全運算環境,也可以對終端設備的硬體環境中已有的硬體的軟體環境進行改造來搭建安全運算環境; 例如,在一種實施方式中,可以採用基於SE(Secure Element,安全元件)的解決方案,為終端設備搭建安全運算環境。在這種解決方案下,可以在終端設備的硬體環境中引入SE硬體,利用SE硬體來儲存和維護終端設備的私鑰,並面向終端設備提供安全運算環境。 在示出的另一種實施方式中,也可以採用基於TEE(Trusted Execution Environment,可信執行環境)的解決方案,為終端設備搭建安全運算環境。在這種解決方案下,可以對終端設備的硬體環境中已有的硬體(比如,主晶片)的軟體環境進行改造,在該軟體環境中來搭建可信執行環境,利用該可信執行環境來儲存和維護終端設備的私鑰,並面向終端設備提供安全運算環境。 在示出的第三種實施方式,也可以採用基於SE+TEE的解決方案,為終端設備搭建安全運算環境。在這種解決方案下,可以利用SE硬體來儲存和維護終端設備的私鑰,利用TEE來面向終端設備提供安全運算環境。 或者,在實際應用中,也可以不對終端設備的硬體環境進行改造,透過為終端設備外接一個可插拔設備來為該終端設備搭建安全運算環境; 例如,可以預先在可插拔設備上搭建安全運算環境,在該安全運算環境中儲存與可插拔設備對應的私鑰,並透過將可插拔設備與終端設備進行對接的方式,將在可插拔設備上搭建完成的安全運算環境,提供給終端設備。 在本說明書中,上述終端設備可以作為節點設備加入到區塊鏈(也稱之為設備上鏈),並將與該終端設備對應的私鑰,在為該終端設備搭建的安全運算環境中進行儲存和維護。 其中,與終端設備對應的私鑰,具體可以是由終端設備持有的私鑰,也可以是終端設備的使用用戶所持有的私鑰。 亦即,本說明書中描述的“與終端設備對應的私鑰”,具體可以是終端設備的設備生產商在設備生產階段,為該終端設備產生的,並由終端設備持有的私鑰;也可以是由終端設備在用戶使用該終端設備時,由終端設備自主的為該用戶產生的,並由該用戶個人持有的私鑰。 在示出的一種實施方式中,終端設備持有的私鑰以及公鑰,可以由設備生產商在設備生產階段為終端設備產生,並由設備生產商預先將該私鑰寫入該終端設備的安全運算環境中進行儲存和維護。 在這種情況下,終端設備持有的私鑰以及公鑰,則與終端設備的使用用戶的身份並不關聯。對於該終端設備的不同的使用用戶而言,可以共用由設備生產商預設寫入該終端設備的安全運算環境中的同一個私鑰。 在示出的一種實施方式中,終端設備持有的私鑰以及公鑰,也可以由終端設備自主的為該終端設備的使用用戶產生,並由終端設備自主的將該私鑰寫入該終端設備的安全運算環境。 在這種情況下,終端設備自主的產生的私鑰以及公鑰,可以與終端設備的使用用戶的身份相關聯,終端設備可以基於不同的使用用戶的身份資訊,為不同的使用用戶分別產生一對私鑰和公鑰,並將產生的私鑰與各使用用戶的身份資訊分別進行綁定,然後將綁定關係在安全運算環境中進行儲存和維護。 例如,在實現時,終端設備的生產商可以預先將密鑰產生演算法寫入該終端設備的安全運算環境。當終端設備的使用用戶在使用終端設備時,終端設備可以提示使用用戶輸入身份資訊進行身份認證; 其中,使用用戶輸入的身份資訊的資料類型,以及終端設備所採用的身份認證方式,在本說明書中均不進行特別的限定;例如,可以採用諸如輸入密碼或者口令的傳統認證方式,也可以採用諸如基於指紋或者人臉等生理特徵的認證方式。 當終端設備獲取到使用用戶輸入的身份資訊後,可以確定安全運算環境中是否儲存了與該身份資訊綁定的私鑰;如果安全運算環境中並未儲存與該身份資訊綁定的私鑰,表明該使用用戶為首次使用該終端設備的新用戶,此時終端設備可以基於獲取到的該身份資訊對該使用用戶進行身份認證;如果針對該使用用戶身份認證通過,則終端設備可以在上述安全運算環境中呼叫上述密鑰產生演算法產生一對私鑰以及公鑰,並將產生的私鑰與該使用用戶的身份資訊進行綁定,然後將綁定關係在上述安全運算環境中進行儲存和維護。 在本說明書中,用戶可以使用終端設備進行資料獲取,並透過終端設備將採集到的資料在區塊鏈上進行存證。 其中,在本說明書中,終端設備僅需要將採集到的資料在本地儲存,並將採集到的資料的資料摘要在區塊鏈上進行存證即可,不再需要將採集到的資料的原始內容在區塊鏈上進行存證。 在本說明書中,終端設備在需要將採集到的目標資料在區塊鏈上進行存證時,首先可以計算該目標資料的資料摘要;比如,該資料摘要具體可以是基於特定的雜湊演算法計算該目標資料的hash值;然後,終端設備可以在安全運算環境中,基於安全運算環境中儲存的私鑰,對該資料摘要進行簽章處理。 在示出的一種實施方式中,如果終端設備的安全運算環境中儲存和維護的私鑰,為設備生產商在設備生產階段為終端設備產生的,由終端設備持有的私鑰;在這種情況下,可以引入對終端設備的使用用戶的身份認證機制,提示使用用戶輸入身份資訊進行身份認證;當終端設備獲取到使用用戶輸入的身份資訊後,可以基於獲取到的身份資訊對該使用用戶進行身份認證;如果針對該使用用戶的身份認證通過,終端設備可以在安全運算環境中,基於該安全運算環境中儲存和維護的由該終端設備持有的私鑰,對該資料摘要進行簽章處理。 在示出的一種實施方式中,如果終端設備的安全運算環境中儲存和維護的私鑰,終端設備自主的為使用用戶產生的,由使用用戶持有的私鑰;此時,安全運算環境中預先儲存和維護了使用用戶的身份資訊與私鑰的綁定關係。 在這種情況下,當終端設備獲取到該使用用戶輸入的身份資訊後,可以查詢安全運算環境中維護的綁定關係,確定安全運算環境中是否儲存了與該身份資訊綁定的私鑰;如果安全運算環境中儲存了該身份資訊綁定的私鑰,終端設備可以在安全運算環境中,基於查詢到的該私鑰,對該資料摘要進行簽章處理。 當然,如果安全運算環境中並未儲存與該身份資訊綁定的私鑰,表明該使用用戶為首次使用該終端設備的新用戶,此時終端設備可以基於獲取到的該身份資訊對該使用用戶進行身份認證,並在身份認證透過後,呼叫安全運算環境中儲存的密鑰產生演算法,為該使用用戶產生私鑰和公鑰,並使用產生的私鑰,對該資料摘要進行簽章處理;以及,將產生的私鑰與該使用用戶的身份資訊進行綁定,然後將綁定關係在安全運算環境中進行儲存和維護。 在本說明書中,當終端設備在安全運算環境中,基於安全運算環境中儲存的私鑰,對採集到的目標資料的資料摘要進行簽章處理完成之後,可以將簽章後的資料摘要,在區塊鏈中進行發布; 例如,可以基於簽章後的資料摘要建構一筆區塊鏈交易(Transaction),將該交易向其它各節點設備進行廣播擴散。 區塊鏈中的節點設備在接收到該簽章後的資料摘要後,可以獲取與安全運算環境中儲存的私鑰對應的公鑰,然後基於獲取到的公鑰對該資料摘要的簽章進行驗證;如果該資料摘要的簽章驗證通過,該節點設備可以在區塊鏈中發起對該資料摘要的共識處理,並在該資料摘要共識處理通過後,將該資料摘要打包進區塊在區塊鏈中進行儲存,以完成針對該資料摘要的資料存證。 其中,需要說明的是,本說明書中所描述的區塊鏈所採用的共識機制,在本說明書中不進行特別限定,在實際應用中,區塊鏈的營運方可以基於實際的需求來靈活地選擇。 在示出的另一種實施方式中,終端設備在將採集到的目標資料時,在區塊鏈上進行存證時,還可以將該目標資料的描述資料與該目標資料的資料摘要,一併在區塊鏈上進行存證。 例如,終端設備可以將該資料摘要和該目標資料的描述資訊進行整體簽章,並基於簽章後的資料摘要和上述目標資料的描述資料建構一筆區塊鏈交易,將該交易向其它各節點設備進行廣播擴散。或者,在另一種情況下,終端設備也可以僅針對上述資料摘要進行簽章,並基於上述目標資料的描述資料,和簽章後的資料摘要來建構一筆區塊鏈交易,將該交易向其它各節點設備進行廣播擴散。 其中,上述目標資料的描述資訊所包含的具體內容,在本說明書中不進行特別限定,在實際應用中,可以涵蓋與上述目標資料相關的任意內容; 在示出的一種實施方式中,由於資料的採集時刻、採集地點和資料相關的對象,通常為資料作為證據文件的極其重要的屬性;因此,在本說明書中,上述目標資料的描述資訊,具體可以包括上述目標資料的採集時刻、採集地點、以及上述目標資料相關的對象中的一個或者多個的組合。 其中,在示出的一種實施方式中,目標資料的採集時刻,具體可以是終端設備在採集到目標資料時,與時間認證中心進行互動,從時間認證中心獲取到的經過認證的權威時刻(時間戳記)。目標資料的採集地點,可以是終端設備採集到目標資料時,即時呼叫終端設備搭載的定位模組(比如,GPS模組)獲取到的精確採集地點。而與上述目標資料相關的對象,可以是終端設備在採集到目標資料後,由該終端設備的合法用戶手動輸入的相關對象。 例如,以執法記錄器採集到的與車禍事件的取證視頻資料為例,該視頻資料的描述資訊,具體可以包括採集到該視頻資料的時刻從時間認證中心獲取到的經過認證的權威時刻、採集到該視頻資料的時刻執法記錄器即時呼叫定位模組獲取到的精確採集地點、以及由執法者輸入的與該視頻資料相關的車輛資訊、駕駛者資訊等。 2)線上業務的部署 區塊鏈的營運方可以透過在區塊鏈上發布智慧型合約,並在智慧型合約中聲明相關的業務邏輯的方式,在區塊鏈上部署需要對提交的業務資料進行合法性驗證的線上業務。 其中,區塊鏈的營運方,在聯盟鏈上部署線上業務時,可以預先定義一種用於觸發業務實現的業務事件,作為智慧型合約的執行條件,並基於定義的該業務事件,來開發相應的智慧型合約,在智慧型合約中聲明在滿足上述執行條件時,需要觸發執行的業務邏輯相關的程式碼(比如,一些程式方法或者函數等)。 其中,營運方定義的業務事件的具體類型,以及與上述業務事件對應的業務邏輯,通常均取決於營運方實際的業務需求,在本說明書中不進行特別限定。 例如,在一種實現方式中,區塊鏈的營運方在區塊鏈上部署的線上業務,具體可以是依託於區塊鏈中存證的由行車記錄器採集到的視頻流,進行車禍理賠的線上業務。 在這種業務場景下,上述業務事件具體可以是用戶透過交易提交給智慧型合約的作為業務資料的視頻資料通過合法性驗證的事件;而上述業務邏輯,具體可以包括針對視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯。 又如,在另一種實現方式中,區塊鏈的營運方在區塊鏈上部署的線上業務,具體業務可以是依託於區塊鏈中存證的由執法記錄器採集到的視頻流,進行違規處理的線上業務。 在這種業務場景下,上述業務事件仍然可以是用戶透過交易提交給智慧型合約的作為業務資料的視頻資料通過合法性驗證的事件;而上述業務邏輯,則具體可以包括針對視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯。 其中,需要說明的是,上述業務邏輯中的一些較為複雜的處理邏輯,在實際應用中,也可以不在智慧型合約中進行聲明,而是作為第三的可信服務,部署在鏈下的一些第三方的可信服務設備(比如,伺服器),由上述第三方的可信服務設備來觸發執行。 在這種情況下,智慧型合約中可以聲明針對上述第三方的可信服務的呼叫邏輯,智慧型合約透過執行該呼叫邏輯,來呼叫第三方的可信服務,然後基於第三方的可信服務返回的呼叫結果,來繼續執行智慧型合約中聲明的業務邏輯,完成相關的業務實現。 例如,在以上示出的兩種業務場景中所描述的,針對視頻資料進行資料分析完成車禍定責的處理邏輯,以及,針對視頻資料進行資料分析完成違規判定的呼叫邏輯,均可以作為第三方的可信服務,部署在第三方的可信服務設備上。而在上述智慧型合約中,可以僅聲明呼叫上述可信的第三方的可信服務的呼叫邏輯即可;比如,智慧型合約中可以以執行碼的形式,聲明上述第三方的可信服務的呼叫介面以及相關的呼叫參數等資訊。 在本說明書中,對於開發完成的智慧型合約,營運方可以透過區塊鏈中的任一節點設備,將該智慧型合約發布至區塊鏈,在區塊鏈中發起針對該智慧型合約的共識處理;當智慧型合約在區塊鏈中完成共識之後,可以收錄至該區塊鏈的分散式資料庫(即分散式帳本)。後續,用戶可以透過存取任一節點設備的客戶端,向區塊鏈中收錄的該智慧型合約提交交易,來發起對該智慧型合約的合約呼叫,觸發在區塊鏈上執行該智慧型合約聲明的業務邏輯。 其中,需要說明的是,在區塊鏈中對發布至區塊鏈的智慧型合約進行共識處理時,所採用的共識演算法,以及具體的共識過程,在本說明書中不再進行詳述,本領域技術人員在將本說明書記載的技術方案付諸實現時,可以參考相關技術中的記載。 3)線上業務的觸發執行 在本說明書中,對於業務執行方而言,在需要基於上述終端設備採集到的目標資料,在區塊鏈上觸發完成相關的業務實現時,可以透過建構攜帶上述目標資料的目標交易,在區塊鏈中進行發布,來呼叫已經在區塊鏈上部署的智慧型合約,完成相關的業務實現。 例如,在實現時,在建構完成的該交易中可以攜帶上述智慧型合約的呼叫地址,進而可以基於該呼叫地址,將該交易作為上述智慧型合約的輸入(input)提交至上述智慧型合約,發起對上述智慧型合約的呼叫,來觸發智慧型合約執行聲明的業務邏輯相關的程式碼。 其中,需要說明的是,業務執行方在建構攜帶上述目標資料的目標交易時,具體可以由用戶透過客戶端手動創建,也可以由區塊鏈中的節點設備,基於用戶觸發的指令來自動創建; 例如,以上終端設備為行車記錄器為例,行車記錄器可以作為節點設備加入區塊鏈;在一種情況下,用戶可以透過客戶端來手動創建建構攜帶上述目標資料的目標交易,然後將創建的目標交易提交給行車記錄器,由行車記錄器將該目標交易在區塊鏈中進行發布,來呼叫在區塊鏈上部署的智慧型合約。而在另一種情況下,在車輛中可以搭載語音互動硬體,業務執行方可以透過向車輛發起語音指令,來觸發車輛上搭載的行車記錄器,來自動創建攜帶上述目標資料的目標交易,然後由行車記錄器將該目標交易在區塊鏈中進行發布,來呼叫在區塊鏈上部署的智慧型合約。比如,以上述智慧型合約為基於區塊鏈上存證的由執法記錄器採集到的視頻資料,對用戶進行車禍理賠的智慧型合約為例,上述語音指令具體可以是一條“發起車禍理賠合約”的語音指令。 在本說明書中,當區塊鏈中的節點設備收到業務執行方發布的目標交易後,首先可以在區塊鏈中發起針對該目標交易的共識處理; 其中,在區塊鏈中對發布至區塊鏈的交易進行共識處理時,所採用的共識演算法,以及具體的共識過程,在本說明書中不再進行詳述,本領域技術人員在將本說明書記載的技術方案付諸實現時,可以參考相關技術中的記載。 當該目標交易共識通過後,該節點設備可以回應該目標交易,獲取該目標交易中攜帶的目標資料,並計算該目標資料的資料摘要,將該目標資料的資料摘要與已經在區塊鏈上存證的該目標資料的資料摘要進行匹配,來完成針對該目標資料的合法性驗證; 如果該目標資料的資料摘要,與已經在區塊鏈上存證的該目標資料的資料摘要不匹配,此時該目標資料合法性驗證失敗,該節點設備可以直接向業務執行方返回智慧型合約呼叫失敗的提示資訊; 如果該目標資料的資料摘要,與已經在區塊鏈上存證的該目標資料的資料摘要匹配,此時該目標資料通過合法性驗證,此時該節點設備可以進一步呼叫部署在區塊鏈中的智慧型合約,執行該智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。 其中,需要說明的是,以上描述的針對上述目標資料的合法性驗證過程,除了可以由區塊鏈中的節點設備來完成以外,在實際應用中,也可以上述智慧型合約來完成。 在這種情況下,區塊鏈的營運方在開發上述智慧型合約時,除了需要在上述智慧型合約中聲明用於進行業務處理的業務邏輯,還可以在上述智慧型合約中聲明用於對上述目標資料進行合法性驗證的合法性驗證邏輯。 當上述目標交易共識通過後,節點設備可以回應該目標交易,呼叫上述智慧型合約,執行該智慧型合約中聲明的合法性驗證邏輯,計算該目標資料的資料摘要,將該目標資料的資料摘要與已經在區塊鏈上存證的該目標資料的資料摘要進行匹配; 如果該目標資料的資料摘要,與已經在區塊鏈上存證的該目標資料的資料摘要匹配時,此時可以進一步執行該智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。 在示出的一種實施方式中,在實際如果上述目標資料的描述資訊,也與上述目標資料的資料摘要一起在區塊鏈中進行了存證,在對上述目標資料進行合法性驗證時,除了需要確認計算出的該目標資料的資料摘要,與在區塊鏈上存證的該目標資料的資料摘要是否匹配以外,還可以進一步確認確定上述目標交易中的所述目標資料的描述資料,與已經在區塊鏈中存證的該目標資料的描述資料是否匹配;如果該目標資料的描述資料,與已經在區塊鏈上存證的該目標資料的描述資料也匹配,再執行該智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。 以下將結合具體的業務場景,對以上描述的技術方案進行詳細描述。 1)業務場景一 在一種業務場景下,上述終端設備具體可以是行車記錄器;上述目標資料可以是行車記錄器採集到的視頻資料,行車記錄器作為區塊鏈上的節點設備,可以將採集到的視頻資料的資料摘要在區塊鏈上進行存證;而上述線上業務,具體可以是依託於區塊鏈中存證的由行車記錄器採集到的視頻資料,進行車禍理賠的線上業務。 在這種場景下,區塊鏈的營運方在區塊鏈中部署的智慧型合約中聲明的業務邏輯,具體可以包括針對行車記錄器採集到的視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯; 或者,在將上述車禍定責的處理邏輯,作為第三方的可信服務部署在第三方的可信服務設備上時,區塊鏈的營運方在區塊鏈中部署的智慧型合約中聲明的業務邏輯,具體可以包括呼叫上述可信的第三方服務,針對上述視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於上述可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。 假設作為業務執行方的用戶,駕車遭遇了車禍事件,需要進行線上理賠,則可以透過客戶端獲取行車記錄器在車輛遭遇車禍的時刻前後一段時間內採集到的視頻資料,並基於獲取到的視頻資料來建構一筆目標交易,發送給行車記錄器,由行車記錄器在區塊鏈中進行發布。 區塊鏈中的節點設備在接收到該目標交易時,可以計算該視頻資料的資料摘要,並將計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要進行匹配; 如果計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要匹配,可以進一步呼叫上述智慧型合約,執行上述智慧型合約中聲明的針對視頻資料進行資料分析完成車禍定責的處理邏輯,針對該視頻資料進行資料分析完成車禍定責,當得到車禍定責結果後,可以進一步呼叫上述智慧型合約中聲明的基於車禍定責結果對用戶進行車禍理賠的處理邏輯,完成針對該用戶(用戶的身份資訊可以攜帶在上述目標交易中)的快速車禍理賠。 或者,如果計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要匹配,可以進一步呼叫上述智慧型合約,執行上述智慧型合約中聲明的呼叫可信的第三方服務的呼叫邏輯,呼叫可信的第三方服務針對該視頻資料進行資料分析完成車禍定責,並在可信的第三方服務得到車禍定責結果後,可以進一步呼叫上述智慧型合約中聲明的基於車禍定責結果對用戶進行車禍理賠的處理邏輯,完成針對該用戶的快速車禍理賠。 透過這種方式,使得用戶在遭遇車禍時,可以透過呼叫部署在區塊鏈上的智慧型合約,自主且快捷的完成車禍理賠。 2)業務場景二 在另一種業務場景下,上述終端設備具體可以是執法記錄器;上述目標資料可以是執法記錄器採集到的視頻資料,執法記錄器作為區塊鏈上的節點設備,可以將採集到的視頻資料的資料摘要在區塊鏈上進行存證;而上述線上業務,具體可以是依託於區塊鏈中存證的由執法記錄器採集到的視頻資料,進行違規處理的線上業務。 在這種場景下,區塊鏈的營運方在區塊鏈中部署的智慧型合約中聲明的業務邏輯,具體可以包括針對執法記錄器採集到的視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯; 或者,在將上述違規判定的處理邏輯,作為第三方的可信服務部署在第三方的可信服務設備上時,區塊鏈的營運方在區塊鏈中部署的智慧型合約中聲明的業務邏輯,具體可以包括呼叫上述可信的第三方服務,針對上述視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於上述可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。 假設作為業務執行方的執法者,需要對攜帶的執法記錄器記錄的一起車輛違規事件,進行線上違規處理,則可以透過客戶端獲取執法記錄器記錄到的車輛違規事件的發生時刻前後一段時間內的視頻資料,並基於獲取到的視頻資料來建構一筆目標交易,發送給執法記錄器,由執法記錄器在區塊鏈中進行發布。 區塊鏈中的節點設備在接收到該目標交易時,可以計算該視頻資料的資料摘要,並將計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要進行匹配; 如果計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要匹配,可以進一步呼叫上述智慧型合約,執行上述智慧型合約中聲明的針對視頻資料進行資料分析完成違規判定的處理邏輯,針對該視頻資料進行資料分析完成違規判定,當得到違規判定結果後,可以進一步呼叫上述智慧型合約中聲明的基於違規判定結果對用戶進行車禍理賠的處理邏輯,完成針對相關駕駛者(駕駛者的身份資訊可以攜帶在上述目標交易中)的快速違規處理。 或者,如果計算出的資料摘要與區塊鏈中存證的該視頻資料的資料摘要匹配,可以進一步呼叫上述智慧型合約,執行上述智慧型合約中聲明的呼叫可信的第三方服務的呼叫邏輯,呼叫可信的第三方服務針對該視頻資料進行資料分析完成違規判定,並在可信的第三方服務得到違規判定結果後,可以進一步呼叫上述智慧型合約中聲明的基於違規判定結果對用戶進行違規處理的處理邏輯,完成針對該相關駕駛者的快速違規處理。 透過這種方式,使得執法者攜帶的執法記錄器記錄到了相關的車輛違規事件時,可以透過呼叫部署在區塊鏈上的智慧型合約,自主且快捷的完成相關車輛的違規處理。 在以上技術方案中,透過對區塊鏈上進行資料存證的流程進行改進,不再需要將目標資料的原始內容在區塊鏈上存證,而是將目標資料的資料摘要在區塊鏈上存證,使得區塊鏈中的節點設備在接收到業務發起方發布的攜帶該目標資料的交易時,透過將該目標資料的資料摘要,與在區塊鏈上存證的該目標資料的資料摘要進行匹配,就可以便捷的對該目標資料進行合法性驗證,並基於合法性驗證結果,來進一步呼叫和執行發布在區塊鏈上的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理;從而,使得業務發起方能夠更加便捷的在區塊鏈上完成一些需要對提交的業務資料進行合法性驗證的線上業務。 與上述方法實施例相對應,本說明書還提供了一種基於區塊鏈的業務處理裝置的實施例。本說明書的基於區塊鏈的業務處理裝置的實施例可以應用在電子設備上。裝置實施例可以透過軟體來實現,也可以透過硬體或者軟硬體結合的方式來實現。以軟體實現為例,作為一個邏輯意義上的裝置,是透過其所在電子設備的處理器將非易失性記憶體中對應的電腦程式指令讀取到內部記憶體中運行形成的。從硬體層面而言,如圖2所示,為本說明書的基於區塊鏈的業務處理裝置所在電子設備的一種硬體結構圖,除了圖2所示的處理器、內部記憶體、網路介面、以及非易失性記憶體之外,實施例中裝置所在的電子設備通常根據該電子設備的實際功能,還可以包括其他硬體,對此不再贅述。 圖3是本說明書一示例性實施例示出的一種基於區塊鏈的業務處理裝置的方塊圖。 請參考圖3,所述基於區塊鏈的業務處理裝置30可以應用在前述圖2所示的電子設備中,包括有:接收模組301、驗證模組302和處理模組303。 接收模組301,接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 驗證模組302,回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 處理模組303,如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 在本說明書中,所述智慧型合約中還聲明了針對所述目標資料的合法性驗證邏輯; 所述驗證模組302: 回應於所述目標交易,呼叫所述智慧型合約中聲明的合法性驗證邏輯,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配。 在本說明書中,所述裝置30還包括: 存證模組304(圖3中未示出),獲取作為成員節點設備的終端設備在所述區塊鏈發布的所述目標資料的資料摘要,其中,所述終端設備搭載了安全運算環境,所述安全運算環境中儲存了與所述終端設備對應的私鑰;所述資料摘要在所述安全運算環境中基於與所述終端設備對應的私鑰進行了簽章;基於與所述私鑰對應的公鑰對所述資料摘要的簽章進行驗證;如果所述簽章驗證通過,將所述目標資料的資料摘要在所述區塊鏈中進行存證。 在本說明書中,所述目標交易還包括所述目標資料的描述資料;所述區塊鏈中還存證了所述目標資料的描述資料; 所述驗證模組302進一步: 如果計算出的所述資料摘要與所述區塊鏈中存證的所述目標資料的資料摘要匹配,進一步確定所述目標交易中的所述目標資料的描述資料,與所述區塊鏈中存證的所述目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 在本說明書中,所述描述資料包括: 所述目標資料的採集時刻、採集地點、以及所述目標資料相關的對象中的一個或者多個的組合。 在本說明書中,所述終端設備包括行車記錄器或者執法記錄器;所述目標資料包括由行車記錄器或者執法記錄器採集到的視頻資料。 在本說明書中,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於所述可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。 在本說明書中,所述智慧型合約中聲明的業務邏輯包括針對所述視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯; 或者,所述智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對所述視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於所述可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。 上述裝置中各個模組的功能和作用的實現過程具體詳見上述方法中對應步驟的實現過程,在此不再贅述。 對於裝置實施例而言,由於其基本對應於方法實施例,所以相關之處參見方法實施例的部分說明即可。以上所描述的裝置實施例僅僅是示意性的,其中所述作為分離部件說明的模組可以是或者也可以不是物理上分開的,作為模組顯示的部件可以是或者也可以不是物理模組,即可以位於一個地方,或者也可以分布到多個網路模組上。可以根據實際的需要選擇其中的部分或者全部模組來實現本說明書方案的目的。本領域普通技術人員在不付出創造性勞動的情況下,即可以理解並實施。 上述實施例闡明的系統、裝置、模組或模組,具體可以由電腦晶片或實體實現,或者由具有某種功能的產品來實現。一種典型的實現設備為電腦,電腦的具體形式可以是個人電腦、膝上型電腦、蜂巢式電話、相機電話、智慧型電話、個人數位助理、媒體播放機、導航設備、電子郵件收發設備、遊戲控制台、平板電腦、可穿戴設備或者這些設備中的任意幾種設備的組合。 與上述方法實施例相對應,本說明書還提供了一種電子設備的實施例。該電子設備包括:處理器以及用於儲存機器可執行指令的記憶體,其中,處理器和記憶體通常透過內部匯流排而相互連接。在其他可能的實現方式中,所述設備還可能包括外部介面,以能夠與其他設備或者部件進行通訊。 在本實施例中,透過讀取並執行所述記憶體儲存的與基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,所述處理器被促使: 接收業務執行方發起的目標交易,其中,所述目標交易包括目標資料,所述目標資料的資料摘要預先在所述區塊鏈中進行了存證; 回應於所述目標交易,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配; 如果計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 在本實施例中,所述智慧型合約中還聲明了針對所述目標資料的合法性驗證邏輯; 透過讀取並執行所述記憶體儲存的與基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,所述處理器被促使: 回應於所述目標交易,呼叫所述智慧型合約中聲明的合法性驗證邏輯,計算所述目標資料的資料摘要,並確定計算出的所述目標資料的資料摘要,與所述區塊鏈中存證的所述目標資料的資料摘要是否匹配。 在本實施例中,透過讀取並執行所述記憶體儲存的與基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,所述處理器被促使: 獲取作為成員節點設備的終端設備在所述區塊鏈發布的所述目標資料的資料摘要,其中,所述終端設備搭載了安全運算環境,所述安全運算環境中儲存了與所述終端設備對應的私鑰,所述資料摘要在所述安全運算環境中基於與所述終端設備對應的私鑰進行了簽章; 基於與所述私鑰對應的公鑰對所述資料摘要的簽章進行驗證; 如果所述簽章驗證通過,將所述目標資料的資料摘要在所述區塊鏈中進行存證。 在本實施例中,所述目標交易還包括所述目標資料的描述資料;所述區塊鏈中還存證了所述目標資料的描述資料; 透過讀取並執行所述記憶體儲存的與基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,所述處理器被促使: 如果計算出的所述資料摘要與所述區塊鏈中存證的所述目標資料的資料摘要匹配,進一步確定所述目標交易中的所述目標資料的描述資料,與所述區塊鏈中存證的所述目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對所述目標資料進行業務處理。 本領域技術人員在考慮說明書及實踐這裡揭示的發明後,將容易想到本說明書的其它實施方案。本說明書旨在涵蓋本說明書的任何變型、用途或者適應性變化,這些變型、用途或者適應性變化遵循本說明書的一般性原理並包括本說明書未揭示的本技術領域中的公知常識或慣用技術手段。說明書和實施例僅被視為示例性的,本說明書的真正範圍和精神由下面的申請專利範圍來指出。 應當理解的是,本說明書並不局限於上面已經描述並在圖式中示出的精確結構,並且可以在不脫離其範圍進行各種修改和改變。本說明書的範圍僅由所附的申請專利範圍來限制。 以上所述僅為本說明書的較佳實施例而已,並不用來限制本說明書,凡在本說明書的精神和原則之內,所做的任何修改、等同替換、改進等,均應包含在本說明書保護的範圍之內。Because the data stored on the blockchain has the characteristics of non-tampering, it is the current mainstream trend in the industry to store the data on the blockchain for data storage. However, in practical applications, for some streaming data, such as video streams, audio streams and other data collected by law enforcement recorders or driving recorders; due to their own large storage space, they usually cannot be stored directly Deposit certificates on the blockchain. However, in some scenarios, based on actual business needs, the operator of the blockchain may need to rely on the business data such as video streams stored on the blockchain to deploy some business data that needs to be submitted for legality verification Online business. For example, relying on the video stream collected by the driving recorder stored in the blockchain to deploy online services such as car accident claims based on the video stream stored in the blockchain. Due to the lack of data authentication methods, the legality of such streaming data as business data is usually widely questioned. Therefore, how to more conveniently verify the legitimacy of these stream data stored on the blockchain as business data and complete the relevant business implementation on the blockchain based on these stream data is a technical problem that the industry needs to solve urgently. Based on this, this manual aims to propose a technical solution for online business that enables business executives to complete some on the blockchain more conveniently and requires legal verification of the submitted business data. In the implementation, on the one hand, the operator of the blockchain can publish the smart contract on the blockchain and declare the relevant business logic in the smart contract to deploy the required business on the blockchain. Online business where data is verified for legality. On the other hand, for the collected target data as business data, the original content of the target data can no longer be certified on the blockchain, but the data summary of the target data can be certified on the blockchain . For the business executor, the target transaction carrying the above target data can be constructed and published in the blockchain to call the smart contract published on the blockchain to complete the related business realization. When the member node device in the blockchain receives the target transaction initiated by the business executor, it can respond to the target transaction, calculate the data summary of the target data, and determine the calculated data summary of the target data , Whether it matches the data summary of the target data stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, and the legality verification of the target data is passed, the member node device can further call deployment in the block The smart contract in the chain executes the business logic declared in the smart contract and performs business processing on the target data. In the above technical solutions, by improving the process of data storage on the blockchain, it is no longer necessary to store the original content of the target data on the blockchain, but to summarize the data of the target data on the blockchain The deposit certificate allows the node device in the blockchain to receive a transaction carrying the target data issued by the business initiator, through the data summary of the target data, and the target data stored on the blockchain. By matching the data summary, the legality of the target data can be easily verified, and based on the result of the legality verification, the business logic declared in the smart contract published on the blockchain can be further called and executed for the target data. Perform business processing; thus, the business initiator can more conveniently complete some online businesses on the blockchain that need to verify the legality of the submitted business data. The following describes this specification through specific embodiments and combined with specific application scenarios. Please refer to Figure 1. Figure 1 is a blockchain-based business processing method provided by an embodiment of this specification, which is applied to a node device in the blockchain, and performs the following steps: Step 102: Receive a target transaction initiated by a business executor, where the target transaction includes target data, and a data summary of the target data is pre-certified in the blockchain; Step 104: In response to the target transaction, calculate a data summary of the target data, and determine whether the calculated data summary of the target data is consistent with the data summary of the target data stored in the blockchain match; Step 106: If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract, and check the target data. Data is processed for business. The blockchain described in this specification can specifically include private chains, shared chains, and alliance chains, etc., which are not particularly limited in this specification. For example, in a scenario, the aforementioned blockchain may specifically be a consortium chain composed of a third-party payment platform server, a domestic bank server, an overseas bank server, and a number of user node devices as member devices. The operator of the alliance chain can rely on the alliance chain to deploy online businesses such as cross-border transfers and asset transfers based on the alliance chain. The above-mentioned target data includes any type of data collected by terminal equipment that needs to be stored in the distributed database of the blockchain. Among them, storing the data on the blockchain means storing the data Persistent storage as evidence in the blockchain. The above-mentioned terminal equipment may include any form of terminal equipment that can join the blockchain as a node device and store the collected data on the blockchain; For example, in practical applications, the aforementioned terminal device may specifically include a law enforcement recorder or a driving recorder. The aforementioned target data may specifically be streaming data such as video data, audio data, image data, etc. collected by terminal devices such as law enforcement recorders or driving recorders. The law enforcement recorder or the driving recorder can be added to the blockchain as a node device, and the collected streaming data, such as video data, audio data, and image data, are stored on the blockchain. 1) On-chain deposit of business data In this manual, you can build a secure computing environment for terminal equipment, and use the built secure computing environment to store and maintain the private key used to sign the data that the terminal equipment needs to be stored on the blockchain. Among them, the specific manner of building a secure computing environment in the hardware environment of the terminal device is not particularly limited in this specification. In practical applications, you can build a secure computing environment by introducing new hardware into the hardware environment of the terminal device, or you can modify the software environment of the existing hardware in the hardware environment of the terminal device to build a secure computing environment. surroundings; For example, in an implementation manner, a solution based on SE (Secure Element) may be adopted to build a secure computing environment for terminal devices. Under this solution, SE hardware can be introduced into the hardware environment of the terminal device, and the SE hardware can be used to store and maintain the private key of the terminal device, and provide a secure computing environment for the terminal device. In another embodiment shown, a solution based on TEE (Trusted Execution Environment, Trusted Execution Environment) can also be used to build a secure computing environment for terminal devices. Under this solution, the software environment of the existing hardware (such as the main chip) in the hardware environment of the terminal device can be modified, and a trusted execution environment can be built in the software environment, and the trusted execution environment can be used The environment is used to store and maintain the private key of the terminal device, and to provide a secure computing environment for the terminal device. In the third embodiment shown, a solution based on SE+TEE can also be used to build a secure computing environment for terminal equipment. Under this solution, SE hardware can be used to store and maintain the private key of the terminal device, and TEE can be used to provide a secure computing environment for the terminal device. Or, in actual applications, it is not necessary to modify the hardware environment of the terminal device, and build a secure computing environment for the terminal device by connecting a pluggable device to the terminal device; For example, a secure computing environment can be built on pluggable devices in advance, and the private keys corresponding to the pluggable devices can be stored in the secure computing environment. The safe computing environment built on the plug-in equipment is provided to the terminal equipment. In this specification, the above-mentioned terminal device can be added to the blockchain as a node device (also called device on-chain), and the private key corresponding to the terminal device is used in the secure computing environment built for the terminal device. Storage and maintenance. The private key corresponding to the terminal device may specifically be a private key held by the terminal device, or may be a private key held by a user of the terminal device. That is, the "private key corresponding to the terminal device" described in this manual may specifically be the private key that the terminal device manufacturer generates for the terminal device during the equipment production stage and is held by the terminal device; also It may be a private key that the terminal device autonomously generates for the user when the user uses the terminal device and is held by the user. In the illustrated embodiment, the private key and public key held by the terminal device can be generated by the device manufacturer for the terminal device during the equipment production stage, and the device manufacturer writes the private key into the terminal device in advance. Store and maintain in a safe computing environment. In this case, the private key and public key held by the terminal device are not associated with the identity of the user who uses the terminal device. For different users of the terminal device, the same private key that is preset by the device manufacturer and written in the secure computing environment of the terminal device can be shared. In the illustrated embodiment, the private key and public key held by the terminal device can also be independently generated by the terminal device for the user of the terminal device, and the terminal device autonomously writes the private key into the terminal The safe computing environment of the equipment. In this case, the private key and public key independently generated by the terminal device can be associated with the identity of the user of the terminal device. The terminal device can generate one for different users based on the identity information of different users. The private key and the public key are respectively bound to the identity information of each user, and then the binding relationship is stored and maintained in a secure computing environment. For example, in implementation, the manufacturer of the terminal device can write the key generation algorithm into the secure computing environment of the terminal device in advance. When the user of the terminal device is using the terminal device, the terminal device can prompt the user to enter identity information for identity authentication; Among them, the type of data using the identity information entered by the user and the identity authentication method adopted by the terminal device are not particularly limited in this manual; for example, traditional authentication methods such as entering a password or password can be used, or can be used Such as authentication methods based on physiological characteristics such as fingerprints or faces. When the terminal device obtains the identity information entered by the user, it can determine whether the private key bound to the identity information is stored in the secure computing environment; if the private key bound to the identity information is not stored in the secure computing environment, Indicates that the user is a new user who uses the terminal device for the first time. At this time, the terminal device can perform identity authentication on the user based on the obtained identity information; if the user identity authentication is passed, the terminal device can be in the above security In the computing environment, the above-mentioned key generation algorithm is called to generate a pair of private key and public key, and the generated private key is bound with the identity information of the user, and then the binding relationship is stored and stored in the above-mentioned secure computing environment. maintain. In this manual, users can use terminal equipment to obtain data, and use the terminal equipment to store the collected data on the blockchain. Among them, in this manual, the terminal device only needs to store the collected data locally, and store the data summary of the collected data on the blockchain, and it is no longer necessary to store the original data of the collected data. The content is stored on the blockchain. In this manual, when the terminal device needs to store the collected target data on the blockchain, it can first calculate the data summary of the target data; for example, the data summary can be calculated based on a specific hash algorithm. The hash value of the target data; then, the terminal device can perform signature processing on the data summary in a secure computing environment based on the private key stored in the secure computing environment. In the illustrated embodiment, if the private key stored and maintained in the secure computing environment of the terminal device is the private key that the device manufacturer generates for the terminal device during the equipment production stage, and is held by the terminal device; in this case In this case, the user’s identity authentication mechanism can be introduced to prompt the user to enter identity information for identity authentication; when the terminal device obtains the identity information entered by the user, it can be based on the obtained identity information. Perform identity authentication; if the user’s identity authentication is passed, the terminal device can sign the data summary in a secure computing environment based on the private key held by the terminal device stored and maintained in the secure computing environment deal with. In the illustrated embodiment, if the private key is stored and maintained in the secure computing environment of the terminal device, the terminal device is autonomously generated by the user and is held by the user; at this time, in the secure computing environment The binding relationship between the user's identity information and the private key is stored and maintained in advance. In this case, when the terminal device obtains the identity information input by the user, it can query the binding relationship maintained in the secure computing environment to determine whether the private key bound to the identity information is stored in the secure computing environment; If the private key bound to the identity information is stored in the secure computing environment, the terminal device can perform signature processing on the data summary based on the queried private key in the secure computing environment. Of course, if the private key bound to the identity information is not stored in the secure computing environment, it indicates that the user is a new user who uses the terminal device for the first time. At this time, the terminal device can use the acquired identity information for the user Perform identity authentication, and after the identity authentication is passed, call the key generation algorithm stored in the secure computing environment, generate private and public keys for the user, and use the generated private key to sign the data summary ; And, bind the generated private key with the user's identity information, and then store and maintain the binding relationship in a secure computing environment. In this manual, when the terminal device is in the secure computing environment, based on the private key stored in the secure computing environment, after the data summary of the collected target data is completed, the signed data summary can be Publish in the blockchain; For example, a blockchain transaction (Transaction) can be constructed based on the signed data summary, and the transaction can be broadcast to other node devices. After receiving the signed data summary, the node device in the blockchain can obtain the public key corresponding to the private key stored in the secure computing environment, and then perform the signature of the data summary based on the obtained public key Verification; if the signature of the data summary is verified, the node device can initiate a consensus processing of the data summary in the blockchain, and after the data summary consensus processing is passed, the data summary is packaged into the block in the area It is stored in the block chain to complete the data deposit for the data summary. Among them, it should be noted that the consensus mechanism used by the blockchain described in this specification is not particularly limited in this specification. In practical applications, the operator of the blockchain can flexibly based on actual needs. select. In another embodiment shown, when the terminal device stores the collected target data on the blockchain, it can also combine the description data of the target data with the data summary of the target data. Deposit certificates on the blockchain. For example, the terminal device can sign the data summary and the description information of the target data as a whole, and construct a blockchain transaction based on the signed data summary and the description data of the target data, and send the transaction to other nodes The equipment carries out broadcast diffusion. Or, in another case, the terminal device can only sign the above data summary, and construct a blockchain transaction based on the description data of the above target data and the signed data summary, and send the transaction to other Each node device performs broadcast diffusion. Among them, the specific content contained in the description information of the above-mentioned target data is not particularly limited in this specification. In practical applications, it can cover any content related to the above-mentioned target data; In the illustrated embodiment, since the collection time, collection location, and data-related objects of the data are usually extremely important attributes of the data as evidence documents; therefore, in this specification, the description information of the above target data is specifically It may include one or a combination of the time of collection of the target data, the location of collection, and the objects related to the target data. Among them, in the illustrated embodiment, the collection time of the target data may specifically be the terminal device interacting with the time authentication center when the target data is collected, and the authenticated authoritative time (time) obtained from the time authentication center stamp). The collection location of the target data may be the precise collection location acquired by the positioning module (for example, GPS module) carried by the terminal device when the terminal device collects the target data. The object related to the aforementioned target data may be a related object manually input by a legal user of the terminal device after the terminal device collects the target data. For example, take the forensic video data of a car accident collected by a law enforcement recorder as an example. The description information of the video data may specifically include the time when the video data was collected. At the time of the video data, the law enforcement recorder immediately calls the precise collection location obtained by the positioning module, and the vehicle information and driver information related to the video data input by the law enforcement officer. 2) Online business deployment The operator of the blockchain can deploy a smart contract on the blockchain and declare the relevant business logic in the smart contract to deploy online on the blockchain that needs to verify the legality of the submitted business data business. Among them, the operator of the blockchain, when deploying online business on the alliance chain, can predefine a business event used to trigger the realization of the business as the execution condition of the smart contract, and develop the corresponding business event based on the defined business event In the smart contract, it is stated in the smart contract that when the above execution conditions are met, the business logic-related code (for example, some program methods or functions, etc.) needs to be triggered to execute. Among them, the specific types of business events defined by the operator and the business logic corresponding to the above-mentioned business events usually depend on the actual business needs of the operator, and are not specifically limited in this specification. For example, in one implementation, the online business deployed by the operator of the blockchain on the blockchain can be specifically based on the video stream collected by the driving recorder stored in the blockchain for car accident claims. Online business. In this business scenario, the above business event may specifically be an event in which the video data as business data submitted by the user to the smart contract through a transaction passes the legality verification; and the above business logic may specifically include the completion of data analysis for the video data The processing logic of car accident liability; and, the processing logic of car accident claim settlement for the user based on the result of the car accident liability. For another example, in another implementation mode, the online business deployed by the operator of the blockchain on the blockchain, the specific business can be based on the video stream collected by the law enforcement recorder stored in the blockchain. Online business handled in violation of regulations. In this business scenario, the above business event can still be an event in which the video data as business data submitted by the user to the smart contract through a transaction passes the legality verification; and the above business logic can specifically include data analysis for the video data Completing the processing logic of the violation determination; and, based on the violation determination result, the processing logic of the user's violation processing. Among them, it needs to be explained that some of the more complex processing logic in the above business logic may not be declared in the smart contract in actual applications, but as a third trusted service deployed in some off-chain The third-party trusted service equipment (for example, server) is triggered by the above-mentioned third-party trusted service equipment. In this case, the smart contract can declare the call logic for the third-party trusted service. The smart contract executes the call logic to call the third-party trusted service, and then based on the third-party trusted service The returned call result will continue to execute the business logic declared in the smart contract and complete the related business implementation. For example, in the two business scenarios shown above, the processing logic for data analysis to complete the determination of car accident responsibility for video data, and the call logic for data analysis to complete violation determination for video data can be used as a third party Trusted services of, deployed on third-party trusted service equipment. In the above-mentioned smart contract, it is sufficient to declare the calling logic of the trusted service of the above-mentioned trusted third party; for example, the smart contract can declare the above-mentioned trusted service of the third party in the form of execution code Information such as call interface and related call parameters. In this manual, for the developed smart contract, the operator can publish the smart contract to the blockchain through any node device in the blockchain, and initiate the smart contract in the blockchain. Consensus processing; after the smart contract completes the consensus in the blockchain, it can be included in the distributed database of the blockchain (ie, distributed ledger). Later, the user can access the client of any node device and submit a transaction to the smart contract included in the blockchain to initiate a contract call to the smart contract and trigger the execution of the smart contract on the blockchain The business logic of the contract statement. Among them, it needs to be explained that the consensus algorithm and the specific consensus process used when the smart contract issued to the blockchain is processed in the blockchain are not detailed in this manual. Those skilled in the art can refer to the descriptions in related technologies when implementing the technical solutions described in this specification. 3) Trigger execution of online business In this manual, for the business executor, when it is necessary to trigger the completion of the relevant business realization on the blockchain based on the target data collected by the above-mentioned terminal equipment, it can construct a target transaction that carries the above-mentioned target data in the district. Release in the block chain to call the smart contract that has been deployed on the block chain to complete the related business realization. For example, in the implementation, the call address of the smart contract can be carried in the completed transaction, and based on the call address, the transaction can be submitted to the smart contract as the input of the smart contract. Initiate a call to the above smart contract to trigger the smart contract to execute the code related to the business logic declared. Among them, it should be noted that when the business executor constructs the target transaction carrying the above target data, it can be created manually by the user through the client, or it can be created automatically by the node device in the blockchain based on the instruction triggered by the user. ; For example, the above terminal device is a driving recorder as an example. The driving recorder can be added to the blockchain as a node device; in one case, the user can manually create and construct a target transaction carrying the above target data through the client, and then create The target transaction is submitted to the driving recorder, and the driving recorder publishes the target transaction on the blockchain to call the smart contract deployed on the blockchain. In another case, the vehicle can be equipped with voice interactive hardware, and the business executive can trigger the driving recorder on the vehicle by initiating a voice command to the vehicle to automatically create the target transaction carrying the above target data, and then The driving recorder publishes the target transaction on the blockchain to call the smart contract deployed on the blockchain. For example, taking the above smart contract as an example of a smart contract based on video data collected by law enforcement recorders stored on the blockchain to make car accident claims for users, the above voice command can specifically be an "initiate a car accident claims contract" "Voice command. In this manual, after the node device in the blockchain receives the target transaction issued by the business executor, it can first initiate a consensus process for the target transaction in the blockchain; Among them, the consensus algorithm and the specific consensus process used when performing consensus processing on transactions published to the blockchain in the blockchain will not be described in detail in this manual. Those skilled in the art will When the technical solution described in the manual is put into practice, you can refer to the description in the related technology. After the target transaction consensus is passed, the node device can respond to the target transaction, obtain the target data carried in the target transaction, and calculate the data summary of the target data, and the data summary of the target data is already on the blockchain Matching the document summary of the documented target data to complete the legality verification of the target data; If the data summary of the target data does not match the data summary of the target data that has been stored on the blockchain, and the legality verification of the target data fails, the node device can directly return the smart contract to the business executive Reminder information of call failure; If the data summary of the target data matches the data summary of the target data that has been certified on the blockchain, the target data passes the legality verification, and the node device can be further deployed in the blockchain at this time The smart contract executes the business logic declared in the smart contract and performs business processing on the target data. Among them, it should be noted that the above-described legality verification process for the above-mentioned target data can be completed by the node device in the blockchain. In practical applications, it can also be completed by the above-mentioned smart contract. In this case, when the operator of the blockchain develops the above smart contract, in addition to the business logic used for business processing, it can also declare in the above smart contract for The legality verification logic of the above-mentioned target data for legality verification. When the consensus of the target transaction is passed, the node device can respond to the target transaction, call the smart contract, execute the legality verification logic declared in the smart contract, calculate the data summary of the target data, and summarize the data of the target data Match with the data summary of the target data that has been certified on the blockchain; If the data summary of the target data matches the data summary of the target data that has been certified on the blockchain, then the business logic declared in the smart contract can be further executed to perform business processing on the target data. In the illustrated embodiment, if the description information of the target data is actually stored in the blockchain together with the data summary of the target data, when the legality of the target data is verified, in addition to It is necessary to confirm whether the calculated data summary of the target data matches the data summary of the target data stored on the blockchain, and the descriptive data of the target data in the above-mentioned target transaction can be further confirmed. Whether the description data of the target data that has been certified in the blockchain matches; if the description data of the target data matches the description data of the target data that has been certified on the blockchain, then execute the smart type The business logic declared in the contract performs business processing on the target data. The technical solutions described above will be described in detail below in conjunction with specific business scenarios. 1) Business scenario one In a business scenario, the above-mentioned terminal device may specifically be a driving recorder; the above-mentioned target data may be video data collected by a driving recorder. As a node device on the blockchain, the driving recorder can be The data summary is recorded on the blockchain; and the above-mentioned online business can specifically be an online business that relies on the video data collected by the driving recorder that is stored on the blockchain to conduct car accident claims. In this scenario, the business logic declared by the operator of the blockchain in the smart contract deployed in the blockchain can specifically include the processing logic for data analysis of the video data collected by the driving recorder to complete the responsibility for the car accident ; And, based on the result of the determination of the liability for the car accident, the processing logic for the user to settle the car accident claims; Or, when the processing logic for determining responsibility for car accidents is deployed as a third-party trusted service on a third-party trusted service device, the operator of the blockchain declares in the smart contract deployed in the blockchain The business logic can specifically include calling the above-mentioned trusted third-party service, and analyzing the above-mentioned video data to complete the call logic for determining the responsibility for the car accident; and, based on the result of the above-mentioned trusted third-party service for the user's car accident compensation The processing logic. Assuming that the user who is the business executor encounters a car accident while driving and needs to make online claims, the client can obtain the video data collected by the driving recorder at the time of the car accident and based on the obtained video. The data is used to construct a target transaction, send it to the driving recorder, and the driving recorder will publish it in the blockchain. When the node device in the blockchain receives the target transaction, it can calculate the data summary of the video material, and match the calculated data summary with the data summary of the video material stored in the blockchain; If the calculated data summary matches the data summary of the video data stored in the blockchain, you can further call the above-mentioned smart contract to execute the data analysis of the video data stated in the above-mentioned smart contract to complete the processing of car accident liability Logic, perform data analysis on the video data to complete the determination of the responsibility for the car accident. When the result of the determination of the car accident is obtained, it can further call the processing logic of the user to settle the car accident based on the result of the car accident stated in the smart contract, and complete the processing logic for the user (User's identity information can be carried in the above-mentioned target transaction) fast car accident claims. Or, if the calculated data summary matches the data summary of the video data stored in the blockchain, the above smart contract can be further called to execute the call logic for calling trusted third-party services declared in the above smart contract , Call a credible third-party service to analyze the video data to complete the car accident determination, and after the trusted third-party service obtains the car accident determination result, you can further call the above-mentioned smart contract based on the car accident determination result Carry out the processing logic of car accident claims to the user, and complete the fast car accident claims for the user. In this way, when a user encounters a car accident, they can independently and quickly complete car accident claims by calling the smart contract deployed on the blockchain. 2) Business scenario two In another business scenario, the aforementioned terminal device can be a law enforcement recorder; the aforementioned target data can be video data collected by a law enforcement recorder. As a node device on the blockchain, the law enforcement recorder can transfer the collected video data The data summary of is stored on the blockchain; and the above-mentioned online business can be specifically an online business that relies on the video data collected by the law enforcement recorder that is stored on the blockchain to conduct illegal processing. In this scenario, the business logic declared by the operator of the blockchain in the smart contract deployed in the blockchain can specifically include the processing logic for data analysis of the video data collected by the law enforcement recorder to complete the violation determination; And, based on the result of the violation determination, the processing logic for the violation processing of the user; Or, when the processing logic of the above violation determination is deployed as a third-party trusted service on a third-party trusted service device, the business declared in the smart contract deployed by the blockchain operator The logic can specifically include the calling logic for calling the above-mentioned trusted third-party service, and analyzing the above-mentioned video data to complete the violation determination; and, based on the above-mentioned trusted third-party service's violation determination result, the processing logic for processing the user's violation . Assuming that the law enforcement agent as the business executive needs to conduct online violation processing on a vehicle violation recorded by the law enforcement recorder carried, the time of occurrence of the vehicle violation recorded by the law enforcement recorder can be obtained through the client within a period of time before and after Based on the obtained video data, construct a target transaction, send it to the law enforcement recorder, and the law enforcement recorder will publish it on the blockchain. When the node device in the blockchain receives the target transaction, it can calculate the data summary of the video material, and match the calculated data summary with the data summary of the video material stored in the blockchain; If the calculated data summary matches the data summary of the video data stored in the blockchain, you can further call the above smart contract and execute the processing logic for data analysis of the video data declared in the above smart contract to complete the violation determination. , Perform data analysis on the video data to complete the violation determination. When the violation determination result is obtained, you can further call the processing logic of the user's car accident compensation based on the violation determination result declared in the smart contract to complete the relevant driver (driver The identity information can be carried in the above-mentioned target transaction) for fast violation processing. Or, if the calculated data summary matches the data summary of the video data stored in the blockchain, the above smart contract can be further called to execute the call logic for calling trusted third-party services declared in the above smart contract , Call a trusted third-party service to analyze the video data to complete the violation determination, and after the trusted third-party service obtains the violation determination result, you can further call the above-mentioned smart contract to perform the violation determination result on the user based on the violation determination result. The processing logic of violation processing completes the rapid violation processing for the relevant driver. In this way, when the law enforcement recorder carried by law enforcement officers records related vehicle violations, they can autonomously and quickly complete the violation processing of related vehicles by calling the smart contract deployed on the blockchain. In the above technical solutions, by improving the process of data storage on the blockchain, it is no longer necessary to store the original content of the target data on the blockchain, but to summarize the data of the target data on the blockchain The deposit certificate allows the node device in the blockchain to receive a transaction carrying the target data issued by the business initiator, through the data summary of the target data, and the target data stored on the blockchain. By matching the data summary, the legality of the target data can be easily verified, and based on the result of the legality verification, the business logic declared in the smart contract published on the blockchain can be further called and executed. Perform business processing; thus, the business initiator can more conveniently complete some online businesses on the blockchain that need to verify the legality of the submitted business data. Corresponding to the foregoing method embodiment, this specification also provides an embodiment of a blockchain-based business processing device. The embodiments of the blockchain-based business processing device in this specification can be applied to electronic equipment. The device embodiments can be implemented through software, or 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 internal memory through the processor of the electronic device where it is located. From a hardware perspective, as shown in Figure 2, it is a hardware structure diagram of the electronic equipment where the blockchain-based business processing device of this specification is located, except for the processor, internal memory, and network shown in Figure 2. In addition to the interface and the non-volatile memory, the electronic device in which the device is located in the embodiment generally may include other hardware according to the actual function of the electronic device, which will not be repeated here. Fig. 3 is a block diagram of a business processing device based on a blockchain according to an exemplary embodiment of this specification. Please refer to FIG. 3, the blockchain-based service processing device 30 can be applied to the electronic device shown in FIG. 2, and includes: a receiving module 301, a verification module 302 and a processing module 303. The receiving module 301 receives a target transaction initiated by a business executor, where the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; The verification module 302, in response to the target transaction, calculates a data summary of the target data, and determines the calculated data summary of the target data, and the data of the target data that is certified in the blockchain Whether the summary matches; The processing module 303, if the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract, and check Said target data for business processing. In this manual, the smart contract also declares the legality verification logic for the target data; The verification module 302: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine that the calculated data summary of the target data is consistent with that in the blockchain Whether the document summary of the target document is matched. In this specification, the device 30 further includes: The attestation module 304 (not shown in FIG. 3) obtains a data summary of the target data published on the blockchain by a terminal device as a member node device, wherein the terminal device is equipped with a secure computing environment, The private key corresponding to the terminal device is stored in the secure computing environment; the data digest is signed in the secure computing environment based on the private key corresponding to the terminal device; based on the private key The corresponding public key verifies the signature of the data summary; if the signature verification is passed, the data summary of the target data is stored in the blockchain for certification. In this specification, the target transaction also includes the description data of the target data; the description data of the target data is also stored in the blockchain; The verification module 302 further: If the calculated data summary matches the data summary of the target data stored in the block chain, it is further determined that the description data of the target data in the target transaction is consistent with that in the block chain. Whether the descriptive data of the deposited target data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. In this manual, the description materials include: One or a combination of one or more of the collection time of the target data, the collection location, and the objects related to the target data. In this specification, the terminal device includes a driving recorder or a law enforcement recorder; the target data includes video data collected by a driving recorder or a law enforcement recorder. In this specification, the business logic stated in the smart contract includes the processing logic for data analysis of the video data to complete the determination of the responsibility for the car accident; and the processing logic for the user to settle the car accident claims based on the result of the determination of the car accident; Alternatively, the business logic stated in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for determining the responsibility of the car accident; and, the car accident based on the trusted third-party service The result of the liability fixes the user's logic for handling car accident claims. In this specification, the business logic declared in the smart contract includes the processing logic for data analysis to complete the violation determination for the video data; and the processing logic for the user to perform violation processing based on the violation determination result; Or, the business logic declared in the smart contract includes calling a trusted third-party service, and performing data analysis on the video data to complete the call logic for the violation determination; and, the violation determination based on the trusted third-party service As a result, the processing logic for handling violations of the user. For the implementation process of the functions and roles of each module in the above-mentioned device, refer to the implementation process of the corresponding steps in the above-mentioned method for details, which will not be repeated here. For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can refer to the part of the description of the method embodiment. The device embodiments described above are merely illustrative. 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. 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 work. The system, device, module, or module set forth in the above embodiments may be implemented by a computer chip or entity, or implemented by a product with a certain function. A typical implementation device is a computer. The specific form of the computer can be 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 receiving and sending device, and a game. Console, tablet, wearable device, or a combination of any of these devices. Corresponding to the foregoing method embodiment, this specification also provides an embodiment of an electronic device. The electronic device includes a processor and a memory for storing machine-executable instructions, where the processor and the memory are usually connected to each other through an internal bus. In other possible implementation manners, the device may also include an external interface to be able to communicate with other devices or components. In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based business processing stored in the memory, the processor is prompted to: Receiving a target transaction initiated by a business executor, where the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract to perform business on the target data deal with. In this embodiment, the smart contract also declares the legality verification logic for the target data; By reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based business processing stored in the memory, the processor is prompted to: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine that the calculated data summary of the target data is consistent with that in the blockchain Whether the document summary of the target document is matched. In this embodiment, by reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based business processing stored in the memory, the processor is prompted to: Obtain a data summary of the target data published by the terminal device as a member node device on the blockchain, wherein the terminal device is equipped with a secure computing environment, and the secure computing environment stores the data corresponding to the terminal device The private key of the data summary is signed in the secure computing environment based on the private key corresponding to the terminal device; Verifying the signature of the data digest based on the public key corresponding to the private key; If the signature verification is passed, the data summary of the target data is stored in the blockchain. In this embodiment, the target transaction further includes the description data of the target data; the description data of the target data is also stored in the blockchain; By reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based business processing stored in the memory, the processor is prompted to: If the calculated data summary matches the data summary of the target data stored in the block chain, it is further determined that the description data of the target data in the target transaction is consistent with that in the block chain. Whether the descriptive data of the deposited target data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. Those skilled in the art will easily think of other embodiments of this specification after considering the specification and practicing the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptive changes of this specification. These variations, uses, or adaptive changes follow the general principles of this specification and include common knowledge or conventional technical means in the technical field not disclosed in this specification. . The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the specification are pointed out by the following patent application scope. It should be understood that this specification is not limited to the precise structure described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is only limited by the scope of the attached patent application. The above descriptions are only the preferred embodiments of this specification, and are not used to limit this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in this specification. Within the scope of protection.

102:方法步驟 104:方法步驟 106:方法步驟 30:基於區塊鏈的業務處理裝置 301:接收模組 302:驗證模組 303:處理模組102: Method steps 104: Method steps 106: Method steps 30: Blockchain-based business processing device 301: receiving module 302: Verification Module 303: Processing Module

圖1是一示例性實施例提供的一種基於區塊鏈的業務處理方法的流程圖。 圖2是一示例性實施例提供的一種電子設備的結構示意圖。 圖3是一示例性實施例提供的一種基於區塊鏈的業務處理裝置的方塊圖。Fig. 1 is a flowchart of a business processing method based on blockchain provided by an exemplary embodiment. Fig. 2 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Fig. 3 is a block diagram of a block chain-based business processing device provided by an exemplary embodiment.

Claims (17)

一種基於區塊鏈的業務處理方法,該方法包括: 接收業務執行方發起的目標交易,其中,該目標交易包括目標資料,該目標資料的資料摘要預先在該區塊鏈中進行了存證; 回應於該目標交易,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配;以及 如果計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。A business processing method based on blockchain, the method includes: Receive a target transaction initiated by a business executor, where the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; and If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, the business logic declared in the corresponding smart contract is called to perform business processing on the target data. 根據請求項1所述的方法,該智慧型合約中還聲明了針對該目標資料的合法性驗證邏輯; 該回應於該目標交易,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配,包括: 回應於該目標交易,呼叫該智慧型合約中聲明的合法性驗證邏輯,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配。According to the method described in claim 1, the smart contract also declares the legality verification logic for the target data; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, including: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine the calculated data summary of the target data, and the target certified in the blockchain Whether the data summary of the data matches. 根據請求項1所述的方法,該方法還包括:獲取作為成員節點設備的終端設備在該區塊鏈發布的該目標資料的資料摘要,其中,該終端設備搭載了安全運算環境,該安全運算環境中儲存了與該終端設備對應的私鑰,該資料摘要在該安全運算環境中基於與該終端設備對應的私鑰進行了簽章; 基於與該私鑰對應的公鑰對該資料摘要的簽章進行驗證;以及 如果該簽章驗證通過,將該目標資料的資料摘要在該區塊鏈中進行存證。According to the method of claim 1, the method further includes: obtaining a data summary of the target data published on the blockchain by a terminal device as a member node device, wherein the terminal device is equipped with a secure computing environment, and the secure computing The private key corresponding to the terminal device is stored in the environment, and the data summary is signed in the secure computing environment based on the private key corresponding to the terminal device; Verify the signature of the data summary based on the public key corresponding to the private key; and If the signature verification is passed, the data summary of the target data is stored in the blockchain. 根據請求項1所述的方法,該目標交易還包括該目標資料的描述資料,該區塊鏈中還存證了該目標資料的描述資料; 該如果計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理,包括: 如果計算出的該資料摘要與該區塊鏈中存證的該目標資料的資料摘要匹配,進一步確定該目標交易中的該目標資料的描述資料,與該區塊鏈中存證的該目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。According to the method described in claim 1, the target transaction further includes description data of the target data, and the description data of the target data is also stored in the blockchain; If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, the business logic declared in the corresponding smart contract is called to perform business processing on the target data, including : If the calculated data summary matches the data summary of the target data stored in the blockchain, further determine the description data of the target data in the target transaction and the target data stored in the blockchain Whether the description data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. 根據請求項4所述的方法,該描述資料包括: 該目標資料的採集時刻、採集地點、以及該目標資料相關的對象中的一個或者多個的組合。According to the method described in claim 4, the description material includes: One or a combination of the collection time of the target data, the collection location, and the objects related to the target data. 根據請求項1所述的方法,該終端設備包括行車記錄器或者執法記錄器;該目標資料包括由行車記錄器或者執法記錄器採集到的視頻資料。According to the method of claim 1, the terminal device includes a driving recorder or a law enforcement recorder; the target data includes video data collected by a driving recorder or a law enforcement recorder. 根據請求項6所述的方法,該智慧型合約中聲明的業務邏輯包括針對該視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯;或者 該智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對該視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於該可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。According to the method described in claim 6, the business logic stated in the smart contract includes the processing logic for data analysis of the video data to complete the determination of the liability for the car accident; and the processing logic for the user to settle the car accident claims based on the result of the liability for the car accident; or The business logic stated in the smart contract includes calling a trusted third-party service, and analyzing the video data to complete the call logic for determining the responsibility for the car accident; and, based on the result of the trusted third-party service’s car accident determination, the user Carry out the processing logic of car accident claims. 根據請求項6所述的方法,該智慧型合約中聲明的業務邏輯包括針對該視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯;或者 該智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對該視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於該可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。According to the method described in claim 6, the business logic declared in the smart contract includes the processing logic for data analysis of the video data to complete the violation determination; and the processing logic for the user to perform violation processing based on the violation determination result; or The business logic stated in the smart contract includes calling a credible third-party service, data analysis of the video data to complete the call logic for violation determination; and, based on the violation determination result of the trusted third-party service, the user is violated Processing logic of processing. 一種基於區塊鏈的業務處理裝置,該裝置包括: 接收模組,接收業務執行方發起的目標交易,其中,該目標交易包括目標資料,該目標資料的資料摘要預先在該區塊鏈中進行了存證; 驗證模組,回應於該目標交易,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配;以及 處理模組,如果計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。A business processing device based on blockchain, which includes: The receiving module receives the target transaction initiated by the business executor, where the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; The verification module, in response to the target transaction, calculates a data summary of the target data, and determines whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; and The processing module, if the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, call the business logic declared in the corresponding smart contract to perform business on the target data deal with. 根據請求項9所述的方法,該智慧型合約中還聲明了針對該目標資料的合法性驗證邏輯; 該驗證模組: 回應於該目標交易,呼叫該智慧型合約中聲明的合法性驗證邏輯,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配。According to the method described in claim 9, the smart contract also declares the legality verification logic for the target data; The verification module: In response to the target transaction, call the legality verification logic declared in the smart contract, calculate the data summary of the target data, and determine the calculated data summary of the target data, and the target certified in the blockchain Whether the data summary of the data matches. 根據請求項9所述的裝置,該裝置還包括: 存證模組,獲取作為成員節點設備的終端設備在該區塊鏈發布的該目標資料的資料摘要,其中,該終端設備搭載了安全運算環境,該安全運算環境中儲存了與該終端設備對應的私鑰;該資料摘要在該安全運算環境中基於與該終端設備對應的私鑰進行了簽章;基於與該私鑰對應的公鑰對該資料摘要的簽章進行驗證;如果該簽章驗證通過,將該目標資料的資料摘要在該區塊鏈中進行存證。The device according to claim 9, the device further comprising: The storage certificate module obtains the data summary of the target data published on the blockchain by the terminal device as the member node device, wherein the terminal device is equipped with a secure computing environment, and the secure computing environment stores the corresponding terminal device The private key of the data summary; the data summary is signed in the secure computing environment based on the private key corresponding to the terminal device; the signature of the data summary is verified based on the public key corresponding to the private key; if the signature is After the verification is passed, the data summary of the target data is stored in the blockchain. 根據請求項9所述的裝置,該目標交易還包括該目標資料的描述資料,該區塊鏈中還存證了該目標資料的描述資料; 該驗證模組進一步: 如果計算出的該資料摘要與該區塊鏈中存證的該目標資料的資料摘要匹配,進一步確定該目標交易中的該目標資料的描述資料,與該區塊鏈中存證的該目標資料的描述資料是否匹配;如果是,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。According to the device described in claim 9, the target transaction further includes description data of the target data, and the description data of the target data is also stored in the blockchain; The verification module further: If the calculated data summary matches the data summary of the target data stored in the blockchain, further determine the description data of the target data in the target transaction and the target data stored in the blockchain Whether the description data matches; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data. 根據請求項12所述的裝置,該描述資料包括: 該目標資料的採集時刻、採集地點、以及該目標資料相關的對象中的一個或者多個的組合。According to the device according to claim 12, the description material includes: One or a combination of the collection time of the target data, the collection location, and the objects related to the target data. 根據請求項9所述的裝置,該終端設備包括行車記錄器或者執法記錄器;該目標資料包括由行車記錄器或者執法記錄器採集到的視頻資料。According to the device of claim 9, the terminal equipment includes a driving recorder or a law enforcement recorder; the target data includes video data collected by the driving recorder or a law enforcement recorder. 根據請求項14所述的裝置,該智慧型合約中聲明的業務邏輯包括針對該視頻資料進行資料分析完成車禍定責的處理邏輯;以及,基於車禍定責結果對用戶進行車禍理賠的處理邏輯;或者 該智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對該視頻資料進行資料分析完成車禍定責的呼叫邏輯;以及,基於該可信的第三方服務的車禍定責結果對用戶進行車禍理賠的處理邏輯。According to the device described in claim 14, the business logic stated in the smart contract includes the processing logic for data analysis of the video data to complete the determination of the responsibility for the car accident; and the processing logic for the user to settle the car accident claim based on the result of the determination of the car accident; or The business logic stated in the smart contract includes calling a trusted third-party service, and analyzing the video data to complete the call logic for determining the responsibility for the car accident; and, based on the result of the trusted third-party service’s car accident determination, the user Carry out the processing logic of car accident claims. 根據請求項14所述的裝置,該智慧型合約中聲明的業務邏輯包括針對該視頻資料進行資料分析完成違規判定的處理邏輯;以及,基於違規判定結果對用戶進行違規處理的處理邏輯;或者 該智慧型合約中聲明的業務邏輯包括呼叫可信的第三方服務,針對該視頻資料進行資料分析完成違規判定的呼叫邏輯;以及,基於該可信的第三方服務的違規判定結果對用戶進行違規處理的處理邏輯。According to the device of claim 14, the business logic declared in the smart contract includes processing logic for data analysis to complete the violation determination of the video data; and processing logic for processing the user in violation based on the result of the violation determination; or The business logic stated in the smart contract includes calling a credible third-party service, data analysis of the video data to complete the call logic for violation determination; and, based on the violation determination result of the trusted third-party service, the user is violated Processing logic of processing. 一種電子設備,包括: 處理器;以及 用於儲存機器可執行指令的記憶體; 其中,透過讀取並執行該記憶體儲存的與基於區塊鏈的基於區塊鏈的業務處理的控制邏輯對應的機器可執行指令,該處理器被促使:接收業務執行方發起的目標交易,其中,該目標交易包括目標資料,該目標資料的資料摘要預先在該區塊鏈中進行了存證; 回應於該目標交易,計算該目標資料的資料摘要,並確定計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要是否匹配;以及 如果計算出的該目標資料的資料摘要,與該區塊鏈中存證的該目標資料的資料摘要匹配,呼叫對應的智慧型合約中聲明的業務邏輯,對該目標資料進行業務處理。An electronic device including: Processor; and Memory used to store machine executable instructions; Among them, by reading and executing the machine executable instructions corresponding to the control logic of the blockchain-based blockchain-based business processing stored in the memory, the processor is prompted to receive the target transaction initiated by the business executor, Among them, the target transaction includes target data, and the data summary of the target data is pre-certified in the blockchain; In response to the target transaction, calculate the data summary of the target data, and determine whether the calculated data summary of the target data matches the data summary of the target data stored in the blockchain; and If the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, the business logic declared in the corresponding smart contract is called to perform business processing on the target data.
TW108131881A 2018-11-28 2019-09-04 Blockchain-based service processing method and apparatus, and electronic device TW202038122A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811435804.9A CN110046522A (en) 2018-11-28 2018-11-28 Method for processing business and device, electronic equipment based on block chain
CN201811435804.9 2018-11-28

Publications (1)

Publication Number Publication Date
TW202038122A true TW202038122A (en) 2020-10-16

Family

ID=67273265

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108131881A TW202038122A (en) 2018-11-28 2019-09-04 Blockchain-based service processing method and apparatus, and electronic device

Country Status (3)

Country Link
CN (1) CN110046522A (en)
TW (1) TW202038122A (en)
WO (1) WO2020108130A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046522A (en) * 2018-11-28 2019-07-23 阿里巴巴集团控股有限公司 Method for processing business and device, electronic equipment based on block chain
CN110597837B (en) * 2019-09-19 2024-05-03 腾讯科技(深圳)有限公司 Service data processing method, device, storage medium and computer equipment
CN110780945B (en) * 2019-10-24 2023-09-08 杭州趣链科技有限公司 Cross-chain bridging method, device and storage medium for pluggable heterogeneous blockchain
CN112714157B (en) * 2020-12-18 2022-11-11 成都质数斯达克科技有限公司 Asset contract issuing method and device, electronic equipment and readable storage medium

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025559B (en) * 2017-01-26 2020-09-18 创新先进技术有限公司 Service processing method and device
CN107248074A (en) * 2017-03-29 2017-10-13 阿里巴巴集团控股有限公司 A kind of method for processing business and equipment based on block chain
CN107169125B (en) * 2017-05-31 2020-12-18 北京小米移动软件有限公司 Multimedia resource delivery statistical data acquisition method and device
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution
CN107292621B (en) * 2017-06-22 2020-10-27 丁江 Method and node for determining authority and storing certificate of mass data
CN107688927A (en) * 2017-09-19 2018-02-13 中国银行股份有限公司 A kind of method and system for calling the intelligent contract on block chain
CN107911373B (en) * 2017-11-24 2019-09-06 中钞信用卡产业发展有限公司杭州区块链技术研究院 A kind of block chain right management method and system
CN111861433B (en) * 2018-03-30 2024-04-02 创新先进技术有限公司 Business execution method and device based on block chain and electronic equipment
CN108717431A (en) * 2018-05-11 2018-10-30 中国科学院软件研究所 A kind of electronic evidence based on block chain deposits card, verification method and system
CN108632381B (en) * 2018-05-14 2020-09-29 浪潮集团有限公司 Block chain-based environment supervision method and system
CN108898390B (en) * 2018-06-27 2021-01-12 创新先进技术有限公司 Intelligent contract calling method and device based on block chain and electronic equipment
CN110046522A (en) * 2018-11-28 2019-07-23 阿里巴巴集团控股有限公司 Method for processing business and device, electronic equipment based on block chain

Also Published As

Publication number Publication date
CN110046522A (en) 2019-07-23
WO2020108130A1 (en) 2020-06-04

Similar Documents

Publication Publication Date Title
TWI701573B (en) Data storage method and device based on blockchain, and electronic equipment
TWI694709B (en) Blockchain-based electronic signature method and device, and electronic equipment
CN108898389B (en) Content verification method and device based on block chain and electronic equipment
TWI741314B (en) Block chain-based data storage method and device, and electronic equipment
TW202018571A (en) Data storage method and device based on block chain and electronic equipment
TWI737944B (en) Block chain-based transaction execution method and device, and electronic equipment
CN108712257B (en) Cross-block-chain authentication method and device and electronic equipment
TWI759563B (en) Asset management method and device, electronic equipment
TWI736809B (en) Asset management method and device, electronic equipment
TWI721552B (en) Block chain-based data storage method and device, and electronic equipment
TW202038122A (en) Blockchain-based service processing method and apparatus, and electronic device
TW201935384A (en) Asset management method and device, and electronic equipment
TW201935383A (en) Asset management method and apparatus, and electronic device
TW202024944A (en) Data sharing method, apparatus, and system, and electronic device
TW201935375A (en) Asset management method and apparatus, and electronic device
CN109003185B (en) Intelligent contract establishing method and device, computing equipment and storage medium
TWI623904B (en) Confirmation system based on blockchain smart contract and method thereof
CN115552441A (en) Low trust privilege access management
WO2022206433A1 (en) Method and apparatus for pre-executing chaincode in fabric blockchain
CN110009348B (en) Block chain proxy signature method and system and electronic equipment
CN115879938A (en) Transaction suspension method, device and equipment based on block chain
WO2023069505A1 (en) Non-transferable token
CN115131030A (en) Copyright transaction method and device based on block chain