WO2020108130A1 - 基于区块链的业务处理方法及装置、电子设备 - Google Patents

基于区块链的业务处理方法及装置、电子设备 Download PDF

Info

Publication number
WO2020108130A1
WO2020108130A1 PCT/CN2019/111027 CN2019111027W WO2020108130A1 WO 2020108130 A1 WO2020108130 A1 WO 2020108130A1 CN 2019111027 W CN2019111027 W CN 2019111027W WO 2020108130 A1 WO2020108130 A1 WO 2020108130A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
blockchain
target data
target
business
Prior art date
Application number
PCT/CN2019/111027
Other languages
English (en)
French (fr)
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 WO2020108130A1 publication Critical patent/WO2020108130A1/zh

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

Definitions

  • One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based business processing method and device, and electronic equipment.
  • Blockchain technology also known as distributed ledger technology, is an emerging technology in which several computing devices jointly participate in "bookkeeping" and jointly maintain a complete distributed database.
  • Blockchain technology has the characteristics of decentralization, openness and transparency, each computing device can participate in database records, and data synchronization can be quickly performed between computing devices. To apply.
  • This specification proposes a business processing method based on blockchain, including:
  • Target transaction initiated by a business executive; wherein the target transaction includes target data; a data summary of the target data is pre-registered in the blockchain;
  • the smart contract also declares the validity verification logic for the target data
  • calculating a data digest of the target data In response to the target transaction, calculating a data digest of the target data, and determining whether the calculated data digest of the target data matches the data digest of the target data registered in the blockchain, including :
  • the legality verification logic declared in the smart contract is invoked, the data summary of the target data is calculated, and the calculated data summary of the target data is determined and stored in the blockchain It is verified whether the data summary of the target data matches.
  • the method further includes:
  • the terminal device is equipped with a secure computing environment, and the secure computing environment stores a correspondence corresponding to the terminal device The private key of the data; the data digest is signed based on the private key corresponding to the terminal device in the secure computing environment;
  • the data digest of the target data is verified in the blockchain.
  • the target transaction also includes description data of the target data; the description data of the target data is also stored in the blockchain;
  • the calculated data digest matches the data digest of the target data registered in the blockchain, it is further determined that the description data of the target data in the target transaction matches the data in the blockchain Whether the description data of the target data stored is matched; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data.
  • the description data includes:
  • the terminal device 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.
  • the business logic declared in the smart contract includes processing logic that performs data analysis on the video data to complete the car accident liability determination; and, based on the result of the car accident liability determination, the processing logic for the user to make a car accident claim;
  • the business logic declared in the smart contract includes calling a trusted third-party service, performing a data analysis on the video data to complete the call logic for car accident responsibility; and, based on the trusted third-party service, car accident decision
  • the result of the responsibility is the processing logic for the user to make a car accident claim.
  • the business logic declared in the smart contract includes processing logic that performs data analysis on the video data to complete the violation judgment; and, processing logic that performs violation processing on the user based on the violation judgment result;
  • the business logic declared in the smart contract includes a call logic that calls a trusted third-party service, performs data analysis on the video data to complete a violation determination; and, based on the violation determination result of the trusted third-party service Processing logic for handling violations to users.
  • This specification also proposes a blockchain-based business processing device, including:
  • the receiving module receives the target transaction initiated by the business executor; wherein, the target transaction includes target data; the data summary of the target data is pre-registered in the blockchain;
  • the verification module in response to the target transaction, calculates the data summary of the target data, and determines whether the calculated data summary of the target data and the data summary of the target data stored in the blockchain are match;
  • the processing module if the calculated data summary of the target data matches the data summary of the target data stored in the blockchain, invokes the business logic declared in the corresponding smart contract to check the target data Conduct business processing.
  • the smart contract also declares the validity verification logic for the target data
  • the verification module :
  • the legality verification logic declared in the smart contract is invoked, the data summary of the target data is calculated, and the calculated data summary of the target data is determined and stored in the blockchain It is verified whether the data summary of the target data matches.
  • the device further includes:
  • the certificate storage module obtains a data summary of the target data issued 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 private key corresponding to the terminal device; the data digest is signed based on the private key corresponding to the terminal device in the secure computing environment; and the data digest is signed based on the public key corresponding to the private key Verification; if the signature verification is passed, the data digest of the target data is stored in the blockchain for verification.
  • the target transaction also includes description data of the target data; the description data of the target data is also stored in the blockchain;
  • the verification module further:
  • the calculated data digest matches the data digest of the target data registered in the blockchain, it is further determined that the description data of the target data in the target transaction matches the data in the blockchain Whether the description data of the target data stored is matched; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data.
  • the description data includes:
  • the terminal device 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.
  • the business logic declared in the smart contract includes processing logic that performs data analysis on the video data to complete the car accident liability determination; and, based on the result of the car accident liability determination, the logic for processing the user's car accident compensation;
  • the business logic declared in the smart contract includes calling a trusted third-party service, performing a data analysis on the video data to complete the call logic for car accident responsibility; and, based on the trusted third-party service, car accident decision
  • the result of the responsibility is the processing logic for the user to make a car accident claim.
  • the business logic declared in the smart contract includes processing logic that performs data analysis on the video data to complete the violation judgment; and, processing logic that performs violation processing on the user based on the violation judgment result;
  • the business logic declared in the smart contract includes a call logic that calls a trusted third-party service, performs data analysis on the video data to complete a violation determination; and, based on the violation determination result of the trusted third-party service Processing logic for handling violations to users.
  • This manual also proposes an electronic device, including:
  • Memory for storing machine executable instructions
  • the processor is prompted to: receive the target transaction initiated by the business executor ; Wherein the target transaction includes target data; a data summary of the target data is pre-registered in the blockchain;
  • FIG. 1 is a flowchart of a blockchain-based business processing method 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 blockchain-based business processing apparatus provided by an exemplary embodiment.
  • the operator of the blockchain may need to rely on business data such as video streams deposited on the blockchain to deploy some legal verification of the submitted business data based on actual business needs. Online business.
  • the video stream based on the blockchain in the certificate is deployed to perform online services such as car accident claims.
  • this specification aims to propose a technical solution that enables business executives to more easily complete some online services on the blockchain and needs to verify the legality of submitted business data.
  • the operator of the blockchain can deploy smart contracts on the blockchain and declare the relevant business logic in the smart contract to deploy the business data on the blockchain. Online business for legality verification.
  • 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 .
  • the member node device in the blockchain 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;
  • the legitimacy verification of the target data is passed at this time, and the member node device can further call and deploy 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.
  • FIG. 1 is a blockchain-based business processing method provided in an embodiment of the present specification. It is applied to node devices in the blockchain, and performs the following steps:
  • Step 102 Receive a target transaction initiated by a business executor; wherein, the target transaction includes target data; a data summary of the target data is pre-registered 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 and the data summary of the target data registered in the blockchain are 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 to check the target data Conduct business processing.
  • the blockchain described in this specification may specifically include private chains, public chains, alliance chains, etc., and is not particularly limited in this specification.
  • the above-mentioned blockchain may specifically be a consortium chain consisting of a server of a third-party payment platform, a domestic bank server, an overseas bank server, and several user node devices as member devices.
  • the operator of the alliance chain can rely on the alliance chain to deploy online services such as cross-border transfer and asset transfer based on the alliance chain online.
  • the above target data includes any type of data collected by the terminal device that needs to be completed in the distributed database of the blockchain.
  • data is stored on the blockchain, it means that the data is used as The evidence is stored persistently in the blockchain.
  • the above terminal device may include any form of terminal device that can join the blockchain as a node device and store the collected data on the blockchain for certification;
  • the terminal device may specifically include a law enforcement recorder or a driving recorder.
  • the above target data may specifically be streaming data such as video data, audio data, and image data collected by terminal devices such as law enforcement recorders or driving recorders.
  • the law enforcement recorder or driving recorder can be added to the blockchain as a node device, and the collected streaming data such as video data, audio data, image data, etc. can be recorded on the blockchain.
  • the specific way to build a secure computing environment in the hardware environment of the terminal device is not particularly limited in this specification.
  • a solution based on SE can be used to build a secure computing environment for terminal devices.
  • 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.
  • a solution based on TEE may also be used to build a secure computing environment for terminal devices.
  • TEE Trusted Execution, Trusted Execution Environment
  • a solution based on SE+TEE can also be used to build a secure computing environment for the terminal device.
  • SE hardware can be used to store and maintain the private key of the terminal device
  • TEE can be used to provide a secure computing environment for the terminal device.
  • the hardware environment of the terminal device may not be modified, and a secure computing environment is built for the terminal device by connecting a pluggable device to the terminal device;
  • the above terminal device can be added as a node device to the blockchain (also known as device on-chain), and the private key corresponding to the terminal device is performed in a 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 a private key held by a user who uses the terminal device.
  • the "private key corresponding to the terminal device" described in this specification may specifically be a private key generated by the terminal device manufacturer for the terminal device in the device production stage and held by the terminal device; also It may be a private key generated by the terminal device for the user when the user uses the terminal device, and held by the user personally.
  • the private key and the public key held by the terminal device can be generated by the device manufacturer for the terminal device during the device production stage, and the private key is written into the terminal device by the device manufacturer in advance Storage and maintenance in a secure computing environment.
  • the private key and public key held by the terminal device are not related to the identity of the user who uses the terminal device. For different users of the terminal device, they can share the same private key written by the device manufacturer in the secure computing environment of the terminal device by default.
  • the private key and the public key held by the terminal device can also be generated by the terminal device for the user of the terminal device, and the terminal device can automatically write the private key to the Safe computing environment for terminal equipment.
  • the private key and the public key generated by the terminal device can be associated with the identity of the user of the terminal device, and the terminal device can generate one for each user based on the identity information of the different user. Bind the private key and the public key, and bind the generated private key with the identity information of each user, and then store and maintain the binding relationship in a secure computing environment.
  • the manufacturer of the terminal device may write the key generation algorithm into the secure computing environment of the terminal device in advance.
  • the terminal device may prompt the user to input identity information for identity authentication;
  • the data type of the identity information input by the user and the identity authentication method adopted by the terminal device are not particularly limited in this specification; for example, a traditional authentication method such as entering a password or a password may also be used. Authentication methods such as fingerprints or human faces.
  • the terminal device After the terminal device obtains the identity information input 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, It indicates that the user is a new user using the terminal device for the first time. At this time, the terminal device can authenticate the user based on the obtained identity information; if the identity authentication for the user is passed, the terminal device can be in the above security Call the above key generation algorithm in the computing environment to generate a pair of private and public keys, and bind the generated private key with the user's identity information, and then store and maintain the binding relationship in the above secure computing environment .
  • users can use terminal devices to collect data, and deposit the collected data on the blockchain through the terminal device.
  • the terminal device only needs to store the collected data locally, and save the data summary of the collected data on the blockchain, and it is no longer necessary to store the original data collected.
  • the content is stored on the blockchain.
  • the terminal device when the terminal device needs to collect 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 sign the data digest based on the private key stored in the secure computing environment in the secure computing environment.
  • the private key stored and maintained in the secure computing environment of the terminal device is generated by the device manufacturer during the device production stage as the terminal device, the private key held by the terminal device;
  • an identity authentication mechanism for the user of the terminal device can be introduced to prompt the user to enter the 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
  • the user is authenticated; if the user's identity authentication is passed, the terminal device can, in a secure computing environment, based on the private key held and maintained by the terminal device in the secure computing environment, summarize the data Perform signature processing.
  • the terminal device autonomously generates the private key generated by the user and held by the user; at this time, the secure computing environment The binding relationship between the user's identity information and the private key is stored and maintained in advance.
  • the terminal device after 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 sign the data summary based on the queried private key in the secure computing environment.
  • the terminal device can identify the user based on the obtained identity information.
  • Perform identity authentication and after the identity authentication is passed, call the key generation algorithm stored in the secure computing environment to generate the private key and public key for the user, and use the generated private key to sign the data digest; 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.
  • the terminal device when the terminal device is in a secure computing environment, based on the private key stored in the secure computing environment, after the signature digest of the collected target data is completed, the signed data digest can be placed in the block Publish in the chain;
  • a blockchain transaction can be constructed based on the signed data digest, and the transaction can be broadcast and diffused to other node devices.
  • the node device in the blockchain can obtain the public key corresponding to the private key stored in the secure computing environment, and then verify the signature of the data digest based on the obtained public key; If the signature verification of the data digest is passed, the node device can initiate consensus processing on the data digest in the blockchain, and after the data digest consensus processing is passed, the data digest is packaged into the block, in the blockchain Storage in order to complete the data certification for the data summary.
  • the consensus mechanism adopted 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.
  • the terminal device when the terminal device collects the target data, when depositing on the blockchain, it can also describe the target data and the data summary of the target data. And deposit certificates on the blockchain.
  • the terminal device can sign the data digest and the description information of the target data as a whole, and construct a blockchain transaction based on the signed data digest and the description data of the target data, and then send the transaction to other node devices Broadcast diffusion.
  • the terminal device may only sign the above data digest, and construct a blockchain transaction based on the description data of the above target data and the signed data digest, and transfer the transaction to other Each node device performs broadcast diffusion.
  • the specific content contained in the description information of the above target data is not particularly limited in this specification, and in practical applications, it can cover any content related to the above target data;
  • the data collection time, collection location, and data-related objects usually have extremely important attributes of the data as an evidence file; therefore, in this specification, the description information of the above target data, Specifically, it may include a collection time, a collection location of the target data, and a combination of one or more of the objects related to the target data.
  • the target data collection time may specifically be the terminal authority interacts with the time authentication center when the target data is collected, and obtains the authoritative authorized time obtained from the time authentication center ( Timestamp).
  • the collection location of the target data may be an accurate collection location obtained by calling the positioning module (such as a GPS module) carried by the terminal device in real time when the terminal device collects the target data.
  • the object related to the above 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.
  • the description information of the video data may specifically include the authoritative authorized time and the collection obtained from the time certification center when the video data is collected.
  • the law enforcement recorder calls the precise collection location obtained by the positioning module in real time, and the vehicle information and driver information related to the video data input by the law enforcement officer.
  • Blockchain operators can deploy smart contracts on the blockchain and declare relevant business logic in the smart contracts to deploy online services on the blockchain that require legal verification of the submitted business data.
  • the operator of the blockchain when deploying online services on the consortium chain, can pre-define a business event that triggers the realization of the business as the execution condition of the smart contract, and develop the corresponding based on the defined business event
  • the smart contract declares in the smart contract that the program code (such as some program methods or functions, etc.) related to the business logic that needs to be triggered when the above execution conditions are met.
  • the specific types of business events defined by the operator and the business logic corresponding to the above business events generally depend on the actual business needs of the operator, and are not particularly limited in this specification.
  • the online business deployed on the blockchain by the operator of the blockchain may specifically rely on the video stream collected by the driving recorder and stored in the blockchain to make a car accident claim Online business.
  • the above-mentioned business event may specifically be an event that the video data as business data submitted by the user to the smart contract through the transaction passes the legality verification; and the above-mentioned business logic may specifically include data analysis for the video data to complete the car accident The processing logic of responsibility; and the processing logic of the user's car accident compensation based on the result of the car accident responsibility.
  • the online business deployed by the blockchain operator on the blockchain may be a video stream collected by the law enforcement recorder that relies on the certification in the blockchain, Conduct online business for violations.
  • the above-mentioned business event can still be an event that the video data as business data submitted by the user to the smart contract through the transaction passes the legality verification; and the above-mentioned business logic can specifically include the completion of data analysis for the video data Processing logic for violation determination; and, processing logic for performing violation processing for the user based on the violation determination result.
  • the more complex processing logic in the above business logic may not be declared in the smart contract in actual application, but as a third trusted service, deployed in some off-chain
  • the third-party trusted service device (such as a server) is triggered by the third-party trusted service device.
  • the smart contract can declare the call logic for the above-mentioned 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 return Call the result to continue to execute the business logic declared in the smart contract and complete the relevant business implementation.
  • the processing logic for video data analysis to complete the car accident condemnation, and the call logic for video data analysis to complete the violation determination can be used as third parties Trusted service, deployed on a third-party trusted service device.
  • Trusted service deployed on a third-party trusted service device.
  • only the calling logic for calling the trusted service of the trusted third party may be declared; for example, in the form of code execution, the smart contract may declare the calling interface of the trusted service of the third party And related call parameters and other information.
  • the operator can publish the smart contract to the blockchain through any node device in the blockchain, and initiate consensus processing for the smart contract in the blockchain; After the smart contract completes the consensus in the blockchain, it can be included in the distributed database (ie distributed ledger) of the blockchain. Subsequently, the user can initiate a contract call to the smart contract by accessing the client of any node device to the smart contract included in the blockchain, triggering the execution of the smart contract statement on the blockchain Business logic.
  • distributed database ie distributed ledger
  • the target transaction carrying the above target data can be constructed in the area Publish in the blockchain to call the smart contract already deployed on the blockchain to complete the relevant business implementation.
  • the completed transaction may carry the call address of the smart contract, and based on the call address, the transaction may be submitted to the smart contract as an input of the smart contract to initiate the above
  • the smart contract is called to trigger the smart contract to execute the program code related to the declared business logic.
  • the user can manually create it through the client, or it can be automatically created by the node device in the blockchain based on the instruction triggered by the user ;
  • the driving recorder can be added to the blockchain as a node device; in one case, the user can manually create a target transaction carrying the above target data through the client, and then The created 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.
  • the vehicle can be equipped with voice interaction hardware, and the business executor can initiate a voice recorder on the vehicle by initiating a voice command to the vehicle to automatically create a 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.
  • the above voice command may specifically be a "launch car accident claim contract" Voice commands.
  • the node device in the blockchain when the node device in the blockchain receives the target transaction issued by the business executor, it can first initiate consensus processing for the target transaction in the blockchain;
  • the node device can respond to the target transaction, obtain the target data carried in the target transaction, calculate the data summary of the target data, and compare the data summary of the target data with the already existing blockchain Match the data summary of the target data with the certificate to complete the legality verification of the target data;
  • the node device can directly return the smart contract call to the business executor Failure information
  • the target data passes the legality verification at this time, and the node device can then be further deployed in the blockchain
  • the smart contract executes the business logic declared in the smart contract and performs business processing on the target data.
  • the legality verification process for the above target data described above can be completed by the node device in the blockchain, and in actual applications, it can also be completed by the above smart contract.
  • the operator of the blockchain needs to declare the business logic for business processing in the above-mentioned smart contract, and can also declare the above-mentioned target data in the above-mentioned smart contract Validity verification logic for validity verification.
  • the node device can respond to the target transaction, call the above smart contract, execute the legality verification logic declared in the smart contract, calculate the data summary of the target data, and compare the data summary of the target data with the Match the data summary of the target data stored on the blockchain;
  • the business logic declared in the smart contract can be further executed to perform business processing on the target data.
  • the description information of the target data when 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 verification is performed on the target data, In addition to confirming whether the calculated data summary of the target data matches the data summary of the target data stored on the blockchain, it can further confirm the description data of the target data in the above target transaction, Whether it matches the description data of the target data that has been registered in the blockchain; if the description data of the target data also matches the description data of the target data that has been registered on the blockchain, then execute the intelligence The business logic declared in the contract performs business processing on the target data.
  • the above terminal device may specifically be a driving recorder;
  • the above target data may be video data collected by the driving recorder, and the driving recorder serves as a node device on the blockchain and can collect the collected video data
  • the summary of the data is stored on the blockchain; and the above-mentioned online business can specifically rely on the video data collected by the driving recorder in the blockchain to carry out the online business of claiming a car accident.
  • 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 of the car accident; And, based on the results of the car accident condemnation, the logic of processing the user's car accident claims;
  • the operator of the blockchain declares the business in the smart contract deployed in the blockchain
  • the logic may specifically include calling the above-mentioned trusted third-party service, performing data analysis on the above-mentioned video data to complete the calling logic of the car accident condemnation; Processing logic.
  • the client can obtain the video data collected by the driving recorder during a period of time before and after the vehicle accident, and based on the obtained video The data is used to construct a target transaction, which is sent to the driving recorder, and the driving recorder is released on the blockchain.
  • the node device in the blockchain can calculate the data summary of the video data, and match the calculated data summary with the data summary of the video data stored in the blockchain;
  • the above smart contract to execute the data analysis for video data in the above smart contract to complete the processing logic of car accident condemnation, Carry out data analysis on the video data to complete the car accident condemnation.
  • the processing logic for car accident claims based on the car accident condemnation result stated in the above smart contract to complete the user (user's The identity information can be carried in the above-mentioned target transaction) for fast car accident claims.
  • the processing logic of car accident claims completes the fast car accident claims for this user.
  • the terminal device may specifically be a law enforcement recorder;
  • the target data may be video data collected by the law enforcement recorder, and the law enforcement recorder serves as a node device on the blockchain, which can collect the collected video
  • the data summary of the data is stored on the blockchain;
  • the above-mentioned online business can specifically be an online business that handles violations by relying on the video data collected by the law enforcement recorder in the blockchain.
  • the business logic declared by the blockchain operator in the smart contract deployed in the blockchain may specifically include processing logic for analyzing the video data collected by the law enforcement recorder to complete the violation determination; and , Based on the violation of the judgment results of the user's violation of the processing logic;
  • the business logic declared by the blockchain operator in the smart contract deployed in the blockchain may include calling logic that calls the above-mentioned trusted third-party service, performs data analysis on the above-mentioned video data to complete the violation judgment; and processing logic that performs violation processing on the user based on the violation judgment result of the above-mentioned trusted third-party service.
  • the client can obtain the vehicle violation incident recorded by the law enforcement recorder within a period of time before and after Based on the acquired video data, construct a target transaction, send it to the law enforcement recorder, and the law enforcement recorder will release it on the blockchain.
  • the node device in the blockchain can calculate the data summary of the video data, and match the calculated data summary with the data summary of the video data stored in the blockchain;
  • the processing logic for claiming the car accident claim based on the violation judgment result stated in the above smart contract can be further called to complete the identification information for the relevant driver It can be carried in the above-mentioned target transaction) for quick violation handling.
  • the calculated data digest matches the data digest of the video data documented in the blockchain
  • you can further call the above smart contract execute the call logic of the trusted smart third-party service declared in the above smart contract, call The credible third-party service performs data analysis on the video data to complete the violation judgment, and after the credible third-party service obtains the violation judgment result, it can further call the violation processing of the user based on the violation judgment result stated in the above smart contract Processing logic to complete quick violation handling for the relevant driver.
  • the law enforcement recorder carried by the law enforcement personnel can call the smart contract deployed on the blockchain to complete the violations of relevant vehicles autonomously and quickly.
  • this specification also provides an embodiment of a blockchain-based business processing device.
  • the embodiment of the blockchain-based business processing apparatus of this specification can be applied to electronic devices.
  • the device embodiments may be implemented by software, or by hardware or a combination of hardware and software. Taking software implementation as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory through the processor of the electronic device where it is located.
  • FIG. 2 it is a hardware structure diagram of the electronic equipment where the blockchain-based business processing device is located in this specification, except for the processor, memory, network interface, and non-
  • the electronic device in which the apparatus is located in the embodiment generally may include other hardware according to the actual function of the electronic device, and details are not described here.
  • Fig. 3 is a block diagram of a blockchain-based business processing apparatus shown in an exemplary embodiment of this specification.
  • the blockchain-based business processing device 30 can be applied to the aforementioned electronic device shown in FIG. 2, including: 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; wherein, the target transaction includes target data; a data summary of the target data is pre-registered 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 summary of the target data stored in the blockchain Whether it matches
  • the processing module 303 if the calculated data summary of the target data matches with the data summary of the target data stored in the blockchain, calls the business logic declared in the corresponding smart contract to the target Data is processed for business.
  • the smart contract also declares the validity verification logic for the target data
  • the verification module 302 is the verification module 302:
  • the legality verification logic declared in the smart contract is invoked, the data summary of the target data is calculated, and the calculated data summary of the target data is determined and stored in the blockchain It is verified whether the data summary of the target data matches.
  • the device 30 further includes:
  • the certificate storage module 304 obtains a data summary of the target data issued by the terminal device as a member node device on the blockchain; wherein the terminal device is equipped with a secure computing environment, so The private key corresponding to the terminal device is stored in the secure computing environment; the data digest is signed based on the private key corresponding to the terminal device in the secure computing environment; based on the private key corresponding to the private key The public key verifies the signature of the data digest; if the signature verification is passed, the data digest of the target data is verified in the blockchain.
  • the target transaction also includes description data of the target data; the description data of the target data is also stored in the blockchain;
  • the verification module 302 further:
  • the calculated data digest matches the data digest of the target data registered in the blockchain, it is further determined that the description data of the target data in the target transaction matches the data in the blockchain Whether the description data of the target data stored is matched; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data.
  • the description data includes:
  • the terminal device 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.
  • the business logic declared in the smart contract includes the processing logic for data analysis and completion of the car accident liability determination for the video data; and the processing logic for the user to make a car accident claim based on the car accident liability result;
  • the business logic declared in the smart contract includes calling a trusted third-party service, performing a data analysis on the video data to complete the call logic for car accident responsibility; and, based on the trusted third-party service, car accident decision
  • the result of the responsibility is the processing logic for the user to make a car accident claim.
  • the business logic declared in the smart contract includes processing logic that performs data analysis on the video data to complete the violation judgment; and, processing logic that performs violation processing on the user based on the violation judgment result;
  • the business logic declared in the smart contract includes a call logic that calls a trusted third-party service, performs data analysis on the video data to complete a violation determination; and, based on the violation determination result of the trusted third-party service Processing logic for handling violations to users.
  • the relevant parts can be referred to the description of the method embodiments.
  • the device embodiments described above are only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, may be located in One place, or can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solution in this specification. Those of ordinary skill in the art can understand and implement without paying creative labor.
  • the system, device, module or module explained in the above embodiments may be implemented by a computer chip or entity, or by a product with a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may 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 sending and receiving device, and a game control Desk, tablet computer, wearable device, or any combination of these devices.
  • the electronic device includes: a processor and a memory for storing machine-executable instructions; wherein, the processor and the memory are usually connected to each other through an internal bus.
  • the device may also include an external interface to be able to communicate with other devices or components.
  • Target transaction initiated by a business executive; wherein the target transaction includes target data; a data summary of the target data is pre-registered in the blockchain;
  • the smart contract also declares the validity verification logic for the target data
  • the legality verification logic declared in the smart contract is invoked, the data summary of the target data is calculated, and the calculated data summary of the target data is determined and stored in the blockchain It is verified whether the data summary of the target data matches.
  • the terminal device is equipped with a secure computing environment, and the secure computing environment stores a correspondence corresponding to the terminal device The private key of the data; the data digest is signed based on the private key corresponding to the terminal device in the secure computing environment;
  • the data digest of the target data is verified in the blockchain.
  • the target transaction also includes description data of the target data; the description data of the target data is also stored in the blockchain;
  • the calculated data digest matches the data digest of the target data registered in the blockchain, it is further determined that the description data of the target data in the target transaction matches the data in the blockchain Whether the description data of the target data stored is matched; if so, call the business logic declared in the corresponding smart contract to perform business processing on the target data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于区块链的业务处理方法,包括:接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证(102);响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配(104);如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。

Description

基于区块链的业务处理方法及装置、电子设备 技术领域
本说明书一个或多个实施例涉及区块链技术领域,尤其涉及一种基于区块链的业务处理方法及装置、电子设备。
背景技术
区块链技术,也被称之为分布式账本技术,是一种由若干台计算设备共同参与“记账”,共同维护一份完整的分布式数据库的新兴技术。由于区块链技术具有去中心化、公开透明、每台计算设备可以参与数据库记录、并且各计算设备之间可以快速的进行数据同步的特性,使得区块链技术已在众多的领域中广泛的进行应用。
发明内容
本说明书提出一种基于区块链的业务处理方法,包括:
接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
可选的,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配,包括:
响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
可选的,所述方法还包括:
获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要; 其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;
基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;
如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
可选的,所述目标交易还包括所述目标数据的描述数据;所述区块链中还存证了所述目标数据的描述数据;
所述如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理,包括:
如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
可选的,所述描述数据包括:
所述目标数据的采集时刻、采集地点、以及所述目标数据相关的对象中的一个或者多个的组合。
可选的,所述终端设备包括行车记录仪或者执法记录仪;所述目标数据包括由行车记录仪或者执法记录仪采集到的视频数据。
可选的,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于所述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
可选的,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于所述可信的第三方服务的违 章判定结果对用户进行违章处理的处理逻辑。
本说明书还提出一种基于区块链的业务处理装置,包括:
接收模块,接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
验证模块,响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
处理模块,如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
可选的,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
所述验证模块:
响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
可选的,所述装置还包括:
存证模块,获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要;其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
可选的,所述目标交易还包括所述目标数据的描述数据;所述区块链中还存证了所述目标数据的描述数据;
所述验证模块进一步:
如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
可选的,所述描述数据包括:
所述目标数据的采集时刻、采集地点、以及所述目标数据相关的对象中的一个或者多个的组合。
可选的,所述终端设备包括行车记录仪或者执法记录仪;所述目标数据包括由行车记录仪或者执法记录仪采集到的视频数据。
可选的,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于所述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
可选的,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于所述可信的第三方服务的违章判定结果对用户进行违章处理的处理逻辑。
本说明书还提出一种电子设备,包括:
处理器;
用于存储机器可执行指令的存储器;
其中,通过读取并执行所述存储器存储的与基于区块链的基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
在以上技术方案中,通过对区块链上进行数据存证的流程进行改进,不再需要将目标数据的原始内容在区块链上存证,而是将目标数据的数据摘要在区块链上存证,使得区块链中的节点设备在接收到业务发起方发布的携带该目标数据的交易时,通过将该 目标数据的数据摘要,与在区块链上存证的该目标数据的数据摘要进行匹配,就可以便捷的对该目标数据进行合法性验证,并基于合法性验证结果,来进一步调用和执行发布在区块链上的智能合约中声明的业务逻辑,对该目标数据进行业务处理;从而,使得业务发起方能够更加便捷的在区块链上完成一些需要对提交的业务数据进行合法性验证的在线业务。
附图说明
图1是一示例性实施例提供的一种基于区块链的业务处理方法的流程图。
图2是一示例性实施例提供的一种电子设备的结构示意图。
图3是一示例性实施例提供的一种基于区块链的业务处理装置的框图。
具体实施方式
由于在区块链存储的数据具有不可篡改的特性,因此将数据存储在区块链上来做数据存证,是业界目前的主流趋势。
然而,在实际应用中,对于一些流数据;比如,执法记录仪或者行车记录仪采集到的视频流、音频流等数据;由于其自身所需占用的存储空间较大,则通常无法直接存储到区块链上进行存证。
但在一些场景下,区块链的运营方基于实际的业务需求,可能需要依托于在区块链上存证的诸如视频流等业务数据,来部署一些需要对提交的业务数据进行合法性验证的在线业务。
比如,依托于区块链中存证的由行车记录仪采集到的视频流,来部署基于区块链中存证的视频流进行车祸理赔等在线业务。
由于缺乏数据认证手段,这类流数据作为业务数据的合法性,通常会存在广泛质疑。因此,如何更加便捷的验证这些在区块链上存证的流数据作为业务数据的合法性,并基于这些流数据在区块链上完成相关的业务实现,是业界亟待解决的技术问题。
基于此,本说明书旨在提出一种使得业务执行方可以更加便捷的在区块链上完成一些,需要对提交的业务数据进行合法性验证的在线业务的技术方案。
在实现时,一方面,区块链的运营方可以通过在区块链上发布智能合约,并在智 能合约中声明相关的业务逻辑的方式,在区块链上部署需要对提交的业务数据进行合法性验证的在线业务。
另一方面,对于采集到的作为业务数据的目标数据,可以不再将该目标数据的原始内容在区块链上存证,而是将该目标数据的数据摘要在区块链上进行存证。
而对于业务执行方而言,可以构建携带上述目标数据的目标交易,在区块链中进行发布,来调用发布在区块链上的智能合约,来完成相关的业务实现。
当区块链中的成员节点设备,在收到业务执行方发起的目标交易时,可以对该目标交易进行响应,计算该目标数据的数据摘要,并确定该计算出的该目标数据的数据摘要,与区块链中存证的该目标数据的数据摘要是否匹配;
如果计算出的该目标数据的数据摘要,与区块链中存证的该目标数据的数据摘要匹配,此时针对该目标数据的合法性验证通过,该成员节点设备可以进一步调用部署在区块链中的智能合约,执行该智能合约中声明的业务逻辑,对该目标数据进行业务处理。
在以上技术方案中,通过对区块链上进行数据存证的流程进行改进,不再需要将目标数据的原始内容在区块链上存证,而是将目标数据的数据摘要在区块链上存证,使得区块链中的节点设备在接收到业务发起方发布的携带该目标数据的交易时,通过将该目标数据的数据摘要,与在区块链上存证的该目标数据的数据摘要进行匹配,就可以便捷的对该目标数据进行合法性验证,并基于合法性验证结果,来进一步调用和执行发布在区块链上的智能合约中声明的业务逻辑,对该目标数据进行业务处理;从而,使得业务发起方能够更加便捷的在区块链上完成一些需要对提交的业务数据进行合法性验证的在线业务。
下面通过具体实施例并结合具体的应用场景对本说明书进行描述。
请参考图1,图1是本说明书一实施例提供的一种基于区块链的业务处理方法,应用于区块链中的节点设备,执行以下步骤:
步骤102,接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
步骤104,响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
步骤106,如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目 标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
在本说明书所描述的区块链,具体可以包括私有链、公有链以及联盟链等,在本说明书中不进行特别限定。
例如,在一个场景中,上述区块链具体可以是由第三方支付平台的服务器、境内银行服务器、境外银行服务器、以及若干用户节点设备作为成员设备组成的一个联盟链。该联盟链的运营方可以依托于该联盟链,来在线部署诸如基于联盟链的跨境转账、资产转移等在线业务。
上述目标数据,包括由终端设备采集到的,需要在区块链的分布式数据库中完成数据存证的任意类型的数据;其中,将数据在区块链上进行存证,是指将数据作为证据在区块链中进行持久化存储。
而上述终端设备,可以包括能够作为节点设备加入区块链,并将采集到的数据在区块链上进行存证的任意形式的终端设备;
例如,在实际应用中,上述终端设备具体可以包括执法记录仪或者行车记录仪等。上述目标数据具体可以是执法记录仪或者行车记录仪等终端设备采集到的视频数据、音频数据、图像数据等流数据。执法记录仪或者行车记录仪可以作为节点设备加入区块链,将采集到的诸如视频数据、音频数据、图像数据等流数据,在区块链上进行存证。
1)业务数据的上链存证
在本说明书中,可以为终端设备搭建安全运算环境,并利用搭建的安全运算环境,来存储和维护用于对终端设备需要在区块链上存证的数据进行签名的私钥。
其中,在终端设备的硬件环境中搭建安全运算环境的具体方式,在本说明书中不进行特别限定。
在实际应用中,可以通过在终端设备的硬件环境中引入新的硬件来搭建安全运算环境,也可以对终端设备的硬件环境中已有的硬件的软件环境进行改造来搭建安全运算环境;
例如,在一种实施方式中,可以采用基于SE(Secure Element,安全元件)的解决方案,为终端设备搭建安全运算环境。在这种解决方案下,可以在终端设备的硬件环境中引入SE硬件,利用SE硬件来存储和维护终端设备的私钥,并面向终端设备提供安 全运算环境。
在示出的另一种实施方式中,也可以采用基于TEE(Trusted Execution Environment,可信执行环境)的解决方案,为终端设备搭建安全运算环境。在这种解决方案下,可以对终端设备的硬件环境中已有的硬件(比如主芯片)的软件环境进行改造,在该软件环境中来搭建可信执行环境,利用该可信执行环境来存储和维护终端设备的私钥,并面向终端设备提供安全运算环境。
在示出的第三种实施方式,也可以采用基于SE+TEE的解决方案,为终端设备搭建安全运算环境。在这种解决方案下,可以利用SE硬件来存储和维护终端设备的私钥,利用TEE来面向终端设备提供安全运算环境。
或者,在实际应用中,也可以不对终端设备的硬件环境进行改造,通过为终端设备外接一个可插拔设备来为该终端设备搭建安全运算环境;
例如,可以预先在可插拔设备上搭建安全运算环境,在该安全运算环境中存储与可插拔设备对应的私钥,并通过将可插拔设备与终端设备进行对接的方式,将在可插拔设备上搭建完成的安全运算环境,提供给终端设备。
在本说明书中,上述终端设备可以作为节点设备加入到区块链(也称之为设备上链),并将与该终端设备对应的私钥,在为该终端设备搭建的安全运算环境中进行存储和维护。
其中,与终端设备对应的私钥,具体可以是由终端设备持有的私钥,也可以是终端设备的使用用户所持有的私钥。
也即,本说明书中描述的“与终端设备对应的私钥”,具体可以是终端设备的设备生产商在设备生产阶段,为该终端设备生成的,并由终端设备持有的私钥;也可以是由终端设备在用户使用该终端设备时,由终端设备自主的为该用户生成的,并由该用户个人持有的私钥。
在示出的一种实施方式中,终端设备持有的私钥以及公钥,可以由设备生产商在设备生产阶段为终端设备生成,并由设备生产商预先将该私钥写入该终端设备的安全运算环境中进行存储和维护。
在这种情况下,终端设备持有的私钥以及公钥,则与终端设备的使用用户的身份并不关联。对于该终端设备的不同的使用用户而言,可以共用由设备生产商默认写入该终端设备的安全运算环境中的同一个私钥。
在示出的一种实施方式中,终端设备持有的私钥以及公钥,也可以由终端设备自主的为该终端设备的使用用户生成,并由终端设备自主的将该私钥写入该终端设备的安全运算环境。
在这种情况下,终端设备自主的生成的私钥以及公钥,可以与终端设备的使用用户的身份相关联,终端设备可以基于不同的使用用户的身份信息,为不同的使用用户分别生成一对私钥和公钥,并将生成的私钥与各使用用户的身份信息分别进行绑定,然后将绑定关系在安全运算环境中进行存储和维护。
例如,在实现时,终端设备的生产商可以预先将密钥生成算法写入该终端设备的安全运算环境。当终端设备的使用用户在使用终端设备时,终端设备可以提示使用用户输入身份信息进行身份认证;
其中,使用用户输入的身份信息的数据类型,以及终端设备所采用的身份认证方式,在本说明书中均不进行特别的限定;例如,可以采用诸如输入密码或者口令的传统认证方式,也可以采用诸如基于指纹或者人脸等生理特征的认证方式。
当终端设备获取到使用用户输入的身份信息后,可以确定安全运算环境中是否存储了与该身份信息绑定的私钥;如果安全运算环境中并未存储与该身份信息绑定的私钥,表明该使用用户为首次使用该终端设备的新用户,此时终端设备可以基于获取到的该身份信息对该使用用户进行身份认证;如果针对该使用用户身份认证通过,则终端设备可以在上述安全运算环境中调用上述密钥生成算法生成一对私钥以及公钥,并将生成的私钥与该使用用户的身份信息进行绑定,然后将绑定关系在上述安全运算环境中进行存储和维护。
在本说明书中,用户可以使用终端设备进行数据采集,并通过终端设备将采集到的数据在区块链上进行存证。
其中,在本说明书中,终端设备仅需要将采集到的数据在本地存储,并将采集到的数据的数据摘要在区块链上进行存证即可,不再需要将采集到的数据的原始内容在区块链上进行存证。
在本说明书中,终端设备在需要将采集到的目标数据在区块链上进行存证时,首先可以计算该目标数据的数据摘要;比如,该数据摘要具体可以是基于特定的哈希算法计算该目标数据的哈希值(hash value);然后,终端设备可以在安全运算环境中,基于安全运算环境中存储的私钥,对该数据摘要进行签名处理。
在示出的一种实施方式中,如果终端设备的安全运算环境中存储和维护的私钥,为设备生产商在设备生产阶段为终端设备时生成的,则由终端设备持有的私钥;在这种情况下,可以引入对终端设备的使用用户的身份认证机制,提示使用用户输入身份信息进行身份认证;当终端设备获取到使用用户输入的身份信息后,可以基于获取到的身份信息对该使用用户进行身份认证;如果针对该使用用户的身份认证通过,终端设备可以在安全运算环境中,基于该安全运算环境中存储和维护的由该终端设备持有的私钥,对该数据摘要进行签名处理。
在示出的一种实施方式中,如果终端设备的安全运算环境中存储和维护的私钥,终端设备自主的为使用用户生成的,由使用用户持有的私钥;此时,安全运算环境中预先存储和维护了使用用户的身份信息与私钥的绑定关系。
在这种情况下,当终端设备获取到该使用用户输入的身份信息后,可以查询安全运算环境中维护的绑定关系,确定安全运算环境中是否存储了与该身份信息绑定的私钥;如果安全运算环境中存储了该身份信息绑定的私钥,终端设备可以在安全运算环境中,基于查询到的该私钥,对该数据摘要进行签名处理。
当然,如果安全运算环境中并未存储与该身份信息绑定的私钥,表明该使用用户为首次使用该终端设备的新用户,此时终端设备可以基于获取到的该身份信息对该使用用户进行身份认证,并在身份认证通过后,调用安全运算环境中存储的密钥生成算法,为该使用用户生成私钥和公钥,并使用生成的私钥,对该数据摘要进行签名处理;以及,将生成的私钥与该使用用户的身份信息进行绑定,然后将绑定关系在安全运算环境中进行存储和维护。
在本说明书中,当终端设备在安全运算环境中,基于安全运算环境中存储的私钥,对采集到的目标数据的数据摘要进行签名处理完成之后,可以将签名后的数据摘要,在区块链中进行发布;
例如,可以基于签名后的数据摘要构建一笔区块链交易(Transaction),将该交易向其它各节点设备进行广播扩散。
区块链中的节点设备在收到该签名后的数据摘要后,可以获取与安全运算环境中存储的私钥对应的公钥,然后基于获取到的公钥对该数据摘要的签名进行验证;如果该数据摘要的签名验证通过,该节点设备可以在区块链中发起对该数据摘要的共识处理,并在该数据摘要共识处理通过后,将该数据摘要打包进区块,在区块链中进行存储,以 完成针对该数据摘要的数据存证。
其中,需要说明的是,本说明书中所描述的区块链所采用的共识机制,在本说明书中不进行特别限定,在实际应用中,区块链的运营方可以基于实际的需求来灵活的选择。
在示出的另一种实施方式中,终端设备在将采集到的目标数据时,在区块链上进行存证时,还可以将该目标数据的描述数据与该目标数据的数据摘要,一并在区块链上进行存证。
例如,终端设备可以将该数据摘要和该目标数据的描述信息进行整体签名,并基于签名后的数据摘要和上述目标数据的描述数据构建一笔区块链交易,将该交易向其它各节点设备进行广播扩散。或者,在另一种情况下,终端设备也可以仅针对上述数据摘要进行签名,并基于上述目标数据的描述数据,和签名后的数据摘要来构建一笔区块链交易,将该交易向其它各节点设备进行广播扩散。
其中,上述目标数据的描述信息所包含的具体内容,在本说明书中不进行特别限定,在实际应用中,可以涵盖与上述目标数据相关的任意内容;
在示出的一种实施方式中,由于数据的采集时刻、采集地点和数据相关的对象,通常具有数据作为证据文件的极其重要的属性;因此,在本说明书中,上述目标数据的描述信息,具体可以包括上述目标数据的采集时刻、采集地点、以及上述目标数据相关的对象中的一个或者多个的组合。
其中,在示出的一种实施方式中,目标数据的采集时刻,具体可以是终端设备在采集到目标数据时,与时间认证中心进行交互,从时间认证中心获取到的经过认证的权威时刻(时间戳)。目标数据的采集地点,可以是终端设备采集到目标数据时,实时调用终端设备搭载的定位模块(比如GPS模块)获取到的精确采集地点。而与上述目标数据相关的对象,可以是终端设备在采集到目标数据后,由该终端设备的合法使用者手动输入的相关对象。
例如,以执法记录仪采集到的与车祸事件的取证视频数据为例,该视频数据的描述信息,具体可以包括采集到该视频数据的时刻从时间认证中心获取到的经过认证的权威时刻、采集到该视频数据的时刻执法记录仪实时调用定位模块获取到的精确采集地点、以及由执法者输入的与该视频数据相关的车辆信息、驾驶者信息等。
2)在线业务的部署
区块链的运营方可以通过在区块链上发布智能合约,并在智能合约中声明相关的业务逻辑的方式,在区块链上部署需要对提交的业务数据进行合法性验证的在线业务。
其中,区块链的运营方,在联盟链上部署在线业务时,可以预先定义一种用于触发业务实现的业务事件,作为智能合约的执行条件,并基于定义的该业务事件,来开发相应的智能合约,在智能合约中声明在满足上述执行条件时,需要触发执行的业务逻辑相关的程序代码(比如一些程序方法或者函数等)。
其中,运营方定义的业务事件的具体类型,以及与上述业务事件对应的业务逻辑,通常均取决于运营方实际的业务需求,在本说明书中不进行特别限定。
例如,在一种实现方式中,区块链的运营方在区块链上部署的在线业务,具体可以是依托于区块链中存证的由行车记录仪采集到的视频流,进行车祸理赔的在线业务。
在这种业务场景下,上述业务事件具体可以是用户通过交易提交给智能合约的作为业务数据的视频数据通过合法性验证的事件;而上述业务逻辑,具体可以包括针对视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑。
又如,在另一种实现方式中,区块链的运营方在区块链上部署的在线业务,具体业务可以是依托于区块链中存证的由执法记录仪采集到的视频流,进行违章处理的在线业务。
在这种业务场景下,上述业务事件仍然可以是用户通过交易提交给智能合约的作为业务数据的视频数据通过合法性验证的事件;而上述业务逻辑,则具体可以包括针对视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑。
其中,需要说明的是,上述业务逻辑中的一些较为复杂的处理逻辑,在实际应用中,也可以不在智能合约中进行声明,而是作为第三的可信服务,部署在链下的一些第三方的可信服务设备(比如服务器),由上述第三方的可信服务设备来触发执行。
在这种情况下,智能合约中可以声明针对上述第三方的可信服务的调用逻辑,智能合约通过执行该调用逻辑,来调用第三方的可信服务,然后基于第三方的可信服务返回的调用结果,来继续执行智能合约中声明的业务逻辑,完成相关的业务实现。
例如,在以上示出的两种业务场景中所描述的,针对视频数据进行数据分析完成车祸定责的处理逻辑,以及,针对视频数据进行数据分析完成违章判定的调用逻辑,均 可以作为第三方的可信服务,部署在第三方的可信服务设备上。而在上述智能合约中,可以仅声明调用上述可信的第三方的可信服务的调用逻辑即可;比如,智能合约中可以以执行代码的形式,声明上述第三方的可信服务的调用接口以及相关的调用参数等信息。
在本说明书中,对于开发完成的智能合约,运营方可以通过区块链中的任一节点设备,将该智能合约发布至区块链,在区块链中发起针对该智能合约的共识处理;当智能合约在区块链中完成共识之后,可以收录至该区块链的分布式数据库(即分布式账本)。后续,用户可以通过接入任一节点设备的客户端,向区块链中收录的该智能合约提交交易,来发起对该智能合约的合约调用,触发在区块链上执行该智能合约声明的业务逻辑。
其中,需要说明的是,在区块链中对发布至区块链的智能合约进行共识处理时,所采用的共识算法,以及具体的共识过程,在本说明书中不再进行详述,本领域技术人员在将本说明书记载的技术方案付诸实现时,可以参考相关技术中的记载。
3)在线业务的触发执行
在本说明书中,对于业务执行方而言,在需要基于上述终端设备采集到的目标数据,在区块链上触发完成相关的业务实现时,可以通过构建携带上述目标数据的目标交易,在区块链中进行发布,来调用已经在区块链上部署的智能合约,完成相关的业务实现。
例如,在实现时,在构建完成的该交易中可以携带上述智能合约的调用地址,进而可以基于该调用地址,将该交易作为上述智能合约的输入(input)提交至上述智能合约,发起对上述智能合约的调用,来触发智能合约执行声明的业务逻辑相关的程序代码。
其中,需要说明的是,业务执行方在构建携带上述目标数据的目标交易时,具体可以由用户通过客户端手动创建,也可以由区块链中的节点设备,基于用户触发的指令来自动创建;
例如,以上述终端设备为行车记录仪为例,行车记录仪可以作为节点设备加入区块链;在一种情况下,用户可以通过客户端来手动创建构建携带上述目标数据的目标交易,然后将创建的目标交易提交给行车记录仪,由行车记录仪将该目标交易在区块链中进行发布,来调用在区块链上部署的智能合约。而在另一种情况下,在车辆中可以搭载语音交互硬件,业务执行方可以通过向车辆发起语音指令,来触发车辆上搭载的行车记录仪,来自动创建携带上述目标数据的目标交易,然后由行车记录仪将该目标交易在区块链中进行发布,来调用在区块链上部署的智能合约。比如,以上述智能合约为基于区 块链上存证的由执法记录仪采集到的视频数据,对用户进行车祸理赔的智能合约为例,上述语音指令具体可以是一条“发起车祸理赔合约”的语音指令。
在本说明书中,当区块链中的节点设备收到业务执行方发布的目标交易后,首先可以在区块链中发起针对该目标交易的共识处理;
其中,在区块链中对发布至区块链的交易进行共识处理时,所采用的共识算法,以及具体的共识过程,在本说明书中不再进行详述,本领域技术人员在将本说明书记载的技术方案付诸实现时,可以参考相关技术中的记载。
当该目标交易共识通过后,该节点设备可以响应该目标交易,获取该目标交易中携带的目标数据,并计算该目标数据的数据摘要,将该目标数据的数据摘要与已经在区块链上存证的该目标数据的数据摘要进行匹配,来完成针对该目标数据的合法性验证;
如果该目标数据的数据摘要,与已经在区块链上存证的该目标数据的数据摘要不匹配,此时该目标数据合法性验证失败,该节点设备可以直接向业务执行方返回智能合约调用失败的提示信息;
如果该目标数据的数据摘要,与已经在区块链上存证的该目标数据的数据摘要匹配,此时该目标数据通过合法性验证,此时该节点设备可以进一步调用部署在区块链中的智能合约,执行该智能合约中声明的业务逻辑,对该目标数据进行业务处理。
其中,需要说明的是,以上描述的针对上述目标数据的合法性验证过程,除了可以由区块链中的节点设备来完成以外,在实际应用中,也可以上述智能合约来完成。
在这种情况下,区块链的运营方在开发上述智能合约时,除了需要在上述智能合约中声明用于进行业务处理的业务逻辑,还可以在上述智能合约中声明用于对上述目标数据进行合法性验证的合法性验证逻辑。
当上述目标交易共识通过后,节点设备可以响应该目标交易,调用上述智能合约,执行该智能合约中声明的合法性验证逻辑,计算该目标数据的数据摘要,将该目标数据的数据摘要与已经在区块链上存证的该目标数据的数据摘要进行匹配;
如果该目标数据的数据摘要,与已经在区块链上存证的该目标数据的数据摘要匹配时,此时可以进一步执行该智能合约中声明的业务逻辑,对该目标数据进行业务处理。
在示出的一种实施方式中,在实际如果上述目标数据的描述信息,也与上述目标数据的数据摘要一起在区块链中进行了存证,在对上述目标数据进行合法性验证时,除 了需要确认计算出的该目标数据的数据摘要,与在区块链上存证的该目标数据的数据摘要是否匹配以外,还可以进一步确认确定上述目标交易中的所述目标数据的描述数据,与已经在区块链中存证的该目标数据的描述数据是否匹配;如果该目标数据的描述数据,与已经在区块链上存证的该目标数据的描述数据也匹配,再执行该智能合约中声明的业务逻辑,对该目标数据进行业务处理。
以下将结合具体的业务场景,对以上描述的技术方案进行详细描述。
1)业务场景一
在一种业务场景下,上述终端设备具体可以是行车记录仪;上述目标数据可以是行车记录仪采集到的视频数据,行车记录仪作为区块链上的节点设备,可以将采集到的视频数据的数据摘要在区块链上进行存证;而上述在线业务,具体可以是依托于区块链中存证的由行车记录仪采集到的视频数据,进行车祸理赔的在线业务。
在这种场景下,区块链的运营方在区块链中部署的智能合约中声明的业务逻辑,具体可以包括针对行车记录仪采集到的视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
或者,在将上述车祸定责的处理逻辑,作为第三方的可信服务部署在第三方的可信服务设备上时,区块链的运营方在区块链中部署的智能合约中声明的业务逻辑,具体可以包括调用上述可信的第三方服务,针对上述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于上述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
假设作为业务执行方的用户,驾车遭遇了车祸事件,需要进行在线理赔,则可以通过客户端获取行车记录仪在车辆遭遇车祸的时刻前后一段时间内采集到的视频数据,并基于获取到的视频数据来构建一笔目标交易,发送给行车记录仪,由行车记录仪在区块链中进行发布。
区块链中的节点设备在收到该目标交易时,可以计算该视频数据的数据摘要,并将计算出的数据摘要与区块链中存证的该视频数据的数据摘要进行匹配;
如果计算出的数据摘要与区块链中存证的该视频数据的数据摘要匹配,可以进一步调用上述智能合约,执行上述智能合约中声明的针对视频数据进行数据分析完成车祸定责的处理逻辑,针对该视频数据进行数据分析完成车祸定责,当得到车祸定责结果后,可以进一步调用上述智能合约中声明的基于车祸定责结果对用户进行车祸理赔的处理 逻辑,完成针对该用户(用户的身份信息可以携带在上述目标交易中)的快速车祸理赔。
或者,如果计算出的数据摘要与区块链中存证的该视频数据的数据摘要匹配,可以进一步调用上述智能合约,执行上述智能合约中声明的调用可信的第三方服务的调用逻辑,调用可信的第三方服务针对该视频数据进行数据分析完成车祸定责,并在可信的第三方服务得到车祸定责结果后,可以进一步调用上述智能合约中声明的基于车祸定责结果对用户进行车祸理赔的处理逻辑,完成针对该用户的快速车祸理赔。
通过这种方式,使得用户在遭遇车祸时,可以通过调用部署在区块链上的智能合约,自主且快捷的完成车祸理赔。
2)业务场景二
在另一种业务场景下,上述终端设备具体可以是执法记录仪;上述目标数据可以是执法记录仪采集到的视频数据,执法记录仪作为区块链上的节点设备,可以将采集到的视频数据的数据摘要在区块链上进行存证;而上述在线业务,具体可以是依托于区块链中存证的由执法记录仪采集到的视频数据,进行违章处理的在线业务。
在这种场景下,区块链的运营方在区块链中部署的智能合约中声明的业务逻辑,具体可以包括针对执法记录仪采集到的视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
或者,在将上述违章判定的处理逻辑,作为第三方的可信服务部署在第三方的可信服务设备上时,区块链的运营方在区块链中部署的智能合约中声明的业务逻辑,具体可以包括调用上述可信的第三方服务,针对上述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于上述可信的第三方服务的违章判定结果对用户进行违章处理的处理逻辑。
假设作为业务执行方的执法者,需要对携带的执法记录仪记录的一起车辆违章事件,进行在线违章处理,则可以通过客户端获取执法记录仪记录到的车辆违章事件的发生时刻前后一段时间内的视频数据,并基于获取到的视频数据来构建一笔目标交易,发送给执法记录仪,由执法记录仪在区块链中进行发布。
区块链中的节点设备在收到该目标交易时,可以计算该视频数据的数据摘要,并将计算出的数据摘要与区块链中存证的该视频数据的数据摘要进行匹配;
如果计算出的数据摘要与区块链中存证的该视频数据的数据摘要匹配,可以进一步调用上述智能合约,执行上述智能合约中声明的针对视频数据进行数据分析完成违章 判定的处理逻辑,针对该视频数据进行数据分析完成违章判定,当得到违章判定结果后,可以进一步调用上述智能合约中声明的基于违章判定结果对用户进行车祸理赔的处理逻辑,完成针对相关驾驶者(驾驶者的身份信息可以携带在上述目标交易中)的快速违章处理。
或者,如果计算出的数据摘要与区块链中存证的该视频数据的数据摘要匹配,可以进一步调用上述智能合约,执行上述智能合约中声明的调用可信的第三方服务的调用逻辑,调用可信的第三方服务针对该视频数据进行数据分析完成违章判定,并在可信的第三方服务得到违章判定结果后,可以进一步调用上述智能合约中声明的基于违章判定结果对用户进行违章处理的处理逻辑,完成针对该相关驾驶者的快速违章处理。
通过这种方式,使得执法者携带的执法记录仪记录到了相关的车辆违章事件时,可以通过调用部署在区块链上的智能合约,自主且快捷的完成相关车辆的违章处理。
在以上技术方案中,通过对区块链上进行数据存证的流程进行改进,不再需要将目标数据的原始内容在区块链上存证,而是将目标数据的数据摘要在区块链上存证,使得区块链中的节点设备在接收到业务发起方发布的携带该目标数据的交易时,通过将该目标数据的数据摘要,与在区块链上存证的该目标数据的数据摘要进行匹配,就可以便捷的对该目标数据进行合法性验证,并基于合法性验证结果,来进一步调用和执行发布在区块链上的智能合约中声明的业务逻辑,对该目标数据进行业务处理;从而,使得业务发起方能够更加便捷的在区块链上完成一些需要对提交的业务数据进行合法性验证的在线业务。
与上述方法实施例相对应,本说明书还提供了一种基于区块链的业务处理装置的实施例。本说明书的基于区块链的业务处理装置的实施例可以应用在电子设备上。装置实施例可以通过软件实现,也可以通过硬件或者软硬件结合的方式实现。以软件实现为例,作为一个逻辑意义上的装置,是通过其所在电子设备的处理器将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图2所示,为本说明书的基于区块链的业务处理装置所在电子设备的一种硬件结构图,除了图2所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的电子设备通常根据该电子设备的实际功能,还可以包括其他硬件,对此不再赘述。
图3是本说明书一示例性实施例示出的一种基于区块链的业务处理装置的框图。
请参考图3,所述基于区块链的业务处理装置30可以应用在前述图2所示的电子 设备中,包括有:接收模块301、验证模块302和处理模块303。
接收模块301,接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
验证模块302,响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
处理模块303,如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
在本说明书中,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
所述验证模块302:
响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
在本说明书中,所述装置30还包括:
存证模块304(图3中未示出),获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要;其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
在本说明书中,所述目标交易还包括所述目标数据的描述数据;所述区块链中还存证了所述目标数据的描述数据;
所述验证模块302进一步:
如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
在本说明书中,所述描述数据包括:
所述目标数据的采集时刻、采集地点、以及所述目标数据相关的对象中的一个或者多个的组合。
在本说明书中,所述终端设备包括行车记录仪或者执法记录仪;所述目标数据包括由行车记录仪或者执法记录仪采集到的视频数据。
在本说明书中,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于所述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
在本说明书中,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于所述可信的第三方服务的违章判定结果对用户进行违章处理的处理逻辑。
上述装置中各个模块的功能和作用的实现过程具体详见上述方法中对应步骤的实现过程,在此不再赘述。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本说明书方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
上述实施例阐明的系统、装置、模块或模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或 者这些设备中的任意几种设备的组合。
与上述方法实施例相对应,本说明书还提供了一种电子设备的实施例。该电子设备包括:处理器以及用于存储机器可执行指令的存储器;其中,处理器和存储器通常通过内部总线相互连接。在其他可能的实现方式中,所述设备还可能包括外部接口,以能够与其他设备或者部件进行通信。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
在本实施例中,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
通过读取并执行所述存储器存储的与基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
在本实施例中,通过读取并执行所述存储器存储的与基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要;其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;
基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;
如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
在本实施例中,所述目标交易还包括所述目标数据的描述数据;所述区块链中还 存证了所述目标数据的描述数据;
通过读取并执行所述存储器存储的与基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:
如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本说明书的其它实施方案。本说明书旨在涵盖本说明书的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本说明书的一般性原理并包括本说明书未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本说明书的真正范围和精神由下面的权利要求指出。
应当理解的是,本说明书并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本说明书的范围仅由所附的权利要求来限制。
以上所述仅为本说明书的较佳实施例而已,并不用以限制本说明书,凡在本说明书的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本说明书保护的范围之内。

Claims (17)

  1. 一种基于区块链的业务处理方法,包括:
    接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
    响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
    如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
  2. 根据权利要求1所述的方法,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
    所述响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配,包括:
    响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
  3. 根据权利要求1所述的方法,所述方法还包括:获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要;其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;
    基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;
    如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
  4. 根据权利要求1所述的方法,所述目标交易还包括所述目标数据的描述数据;所述区块链中还存证了所述目标数据的描述数据;
    所述如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理,包括:
    如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
  5. 根据权利要求4所述的方法,所述描述数据包括:
    所述目标数据的采集时刻、采集地点、以及所述目标数据相关的对象中的一个或者多个的组合。
  6. 根据权利要求1所述的方法,所述终端设备包括行车记录仪或者执法记录仪;所述目标数据包括由行车记录仪或者执法记录仪采集到的视频数据。
  7. 根据权利要求6所述的方法,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
    或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于所述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
  8. 根据权利要求6所述的方法,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
    或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于所述可信的第三方服务的违章判定结果对用户进行违章处理的处理逻辑。
  9. 一种基于区块链的业务处理装置,包括:
    接收模块,接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
    验证模块,响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
    处理模块,如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
  10. 根据权利要求9所述的装置,所述智能合约中还声明了针对所述目标数据的合法性验证逻辑;
    所述验证模块:
    响应于所述目标交易,调用所述智能合约中声明的合法性验证逻辑,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配。
  11. 根据权利要求9所述的装置,所述装置还包括:
    存证模块,获取作为成员节点设备的终端设备在所述区块链发布的所述目标数据的数据摘要;其中,所述终端设备搭载了安全运算环境,所述安全运算环境中存储了与所述终端设备对应的私钥;所述数据摘要在所述安全运算环境中基于与所述终端设备对应的私钥进行了签名;基于与所述私钥对应的公钥对所述数据摘要的签名进行验证;如果所述签名验证通过,将所述目标数据的数据摘要在所述区块链中进行存证。
  12. 根据权利要求9所述的装置,所述目标交易还包括所述目标数据的描述数据;所述区块链中还存证了所述目标数据的描述数据;
    所述验证模块进一步:
    如果计算出的所述数据摘要与所述区块链中存证的所述目标数据的数据摘要匹配,进一步确定所述目标交易中的所述目标数据的描述数据,与所述区块链中存证的所述目标数据的描述数据是否匹配;如果是,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
  13. 根据权利要求12所述的装置,所述描述数据包括:
    所述目标数据的采集时刻、采集地点、以及所述目标数据相关的对象中的一个或者多个的组合。
  14. 根据权利要求9所述的装置,所述终端设备包括行车记录仪或者执法记录仪;所述目标数据包括由行车记录仪或者执法记录仪采集到的视频数据。
  15. 根据权利要求14所述的装置,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成车祸定责的处理逻辑;以及,基于车祸定责结果对用户进行车祸理赔的处理逻辑;
    或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成车祸定责的调用逻辑;以及,基于所述可信的第三方服务的车祸定责结果对用户进行车祸理赔的处理逻辑。
  16. 根据权利要求14所述的装置,所述智能合约中声明的业务逻辑包括针对所述视频数据进行数据分析完成违章判定的处理逻辑;以及,基于违章判定结果对用户进行违章处理的处理逻辑;
    或者,所述智能合约中声明的业务逻辑包括调用可信的第三方服务,针对所述视频数据进行数据分析完成违章判定的调用逻辑;以及,基于所述可信的第三方服务的违章判定结果对用户进行违章处理的处理逻辑。
  17. 一种电子设备,包括:
    处理器;
    用于存储机器可执行指令的存储器;
    其中,通过读取并执行所述存储器存储的与基于区块链的基于区块链的业务处理的控制逻辑对应的机器可执行指令,所述处理器被促使:接收业务执行方发起的目标交易;其中,所述目标交易包括目标数据;所述目标数据的数据摘要预先在所述区块链中进行了存证;
    响应于所述目标交易,计算所述目标数据的数据摘要,并确定计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要是否匹配;
    如果计算出的所述目标数据的数据摘要,与所述区块链中存证的所述目标数据的数据摘要匹配,调用对应的智能合约中声明的业务逻辑,对所述目标数据进行业务处理。
PCT/CN2019/111027 2018-11-28 2019-10-14 基于区块链的业务处理方法及装置、电子设备 WO2020108130A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811435804.9 2018-11-28
CN201811435804.9A CN110046522A (zh) 2018-11-28 2018-11-28 基于区块链的业务处理方法及装置、电子设备

Publications (1)

Publication Number Publication Date
WO2020108130A1 true WO2020108130A1 (zh) 2020-06-04

Family

ID=67273265

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/111027 WO2020108130A1 (zh) 2018-11-28 2019-10-14 基于区块链的业务处理方法及装置、电子设备

Country Status (3)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046522A (zh) * 2018-11-28 2019-07-23 阿里巴巴集团控股有限公司 基于区块链的业务处理方法及装置、电子设备
CN110597837B (zh) * 2019-09-19 2024-05-03 腾讯科技(深圳)有限公司 业务数据处理方法、装置、存储介质和计算机设备
CN110780945B (zh) * 2019-10-24 2023-09-08 杭州趣链科技有限公司 一种异构区块链可插拔的跨链桥接方法、设备和存储介质
CN112714157B (zh) * 2020-12-18 2022-11-11 成都质数斯达克科技有限公司 资产合约的发布方法、装置、电子设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107292621A (zh) * 2017-06-22 2017-10-24 丁江 海量数据确权存证方法和节点
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution
CN107911373A (zh) * 2017-11-24 2018-04-13 中钞信用卡产业发展有限公司杭州区块链技术研究院 一种区块链权限管理方法及系统
CN108898390A (zh) * 2018-06-27 2018-11-27 阿里巴巴集团控股有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN110046522A (zh) * 2018-11-28 2019-07-23 阿里巴巴集团控股有限公司 基于区块链的业务处理方法及装置、电子设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107025559B (zh) * 2017-01-26 2020-09-18 创新先进技术有限公司 一种业务处理方法及装置
CN107248074A (zh) * 2017-03-29 2017-10-13 阿里巴巴集团控股有限公司 一种基于区块链的业务处理方法及设备
CN107169125B (zh) * 2017-05-31 2020-12-18 北京小米移动软件有限公司 多媒体资源的投放统计数据获取方法及装置
CN107688927A (zh) * 2017-09-19 2018-02-13 中国银行股份有限公司 一种调用区块链上的智能合约的方法及系统
CN108520462B (zh) * 2018-03-30 2020-07-24 阿里巴巴集团控股有限公司 基于区块链的业务执行方法及装置、电子设备
CN108717431A (zh) * 2018-05-11 2018-10-30 中国科学院软件研究所 一种基于区块链的电子证据存证、验证方法及系统
CN108632381B (zh) * 2018-05-14 2020-09-29 浪潮集团有限公司 一种基于区块链的环境监督方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution
CN107292621A (zh) * 2017-06-22 2017-10-24 丁江 海量数据确权存证方法和节点
CN107911373A (zh) * 2017-11-24 2018-04-13 中钞信用卡产业发展有限公司杭州区块链技术研究院 一种区块链权限管理方法及系统
CN108898390A (zh) * 2018-06-27 2018-11-27 阿里巴巴集团控股有限公司 基于区块链的智能合约调用方法及装置、电子设备
CN110046522A (zh) * 2018-11-28 2019-07-23 阿里巴巴集团控股有限公司 基于区块链的业务处理方法及装置、电子设备

Also Published As

Publication number Publication date
TW202038122A (zh) 2020-10-16
CN110046522A (zh) 2019-07-23

Similar Documents

Publication Publication Date Title
WO2020088108A1 (zh) 基于区块链的数据存证方法及装置、电子设备
TWI741314B (zh) 基於區塊鏈的資料存證方法及裝置、電子設備
TWI694709B (zh) 基於區塊鏈的電子簽名方法及裝置、電子設備
CN108898389B (zh) 基于区块链的内容验证方法及装置、电子设备
TW202018571A (zh) 基於區塊鏈的資料存證方法及裝置、電子設備
WO2020108130A1 (zh) 基于区块链的业务处理方法及装置、电子设备
US11170092B1 (en) Document authentication certification with blockchain and distributed ledger techniques
WO2020108114A1 (zh) 基于区块链的数据存证方法及装置、电子设备
CN110569658B (zh) 基于区块链网络的用户信息处理方法、装置、电子设备及存储介质
CN110598434B (zh) 基于区块链网络的房屋信息处理方法、装置、电子设备及存储介质
US20230071022A1 (en) Zero-knowledge proof-based certificate service method using blockchain network, certification support server using same, and user terminal using same
WO2020140914A1 (zh) 一种客户端认证方法、装置和计算机可读存储介质
TWI623904B (zh) 基於區塊鏈智能合約的函證系統及其方法
CN115552441A (zh) 低信任特权访问管理
CN114266680A (zh) 基于区块链的电子合同签约方法、装置及系统
US11277270B2 (en) Flexible controls for certificates
WO2010047625A1 (en) Midlet signing and revocation
CN117040930B (zh) 区块链网络的资源处理方法、装置、产品、设备和介质
RU2748964C2 (ru) Способ безопасной передачи запрашиваемых данных и реализующая его система
CN117155553A (zh) 一种存证方法、装置、介质和设备
CN114239056A (zh) 数据访问接口的控制方法、装置、介质及设备
WO2023069505A1 (en) Non-transferable token
CN115049413A (zh) 一种电子合同在线动态交互订立的方法及系统
CN117595996A (zh) 一种电子签名处理方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19889715

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19889715

Country of ref document: EP

Kind code of ref document: A1