WO2021189692A1 - 基于区块链的数据验证方法及装置 - Google Patents

基于区块链的数据验证方法及装置 Download PDF

Info

Publication number
WO2021189692A1
WO2021189692A1 PCT/CN2020/098825 CN2020098825W WO2021189692A1 WO 2021189692 A1 WO2021189692 A1 WO 2021189692A1 CN 2020098825 W CN2020098825 W CN 2020098825W WO 2021189692 A1 WO2021189692 A1 WO 2021189692A1
Authority
WO
WIPO (PCT)
Prior art keywords
zero
encrypted data
knowledge
blockchain
evidence
Prior art date
Application number
PCT/CN2020/098825
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 WO2021189692A1 publication Critical patent/WO2021189692A1/zh

Links

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/602Providing cryptographic facilities or services
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • This application relates to the field of blockchain technology, and in particular to a method and device for data verification based on blockchain.
  • the inventor realized that all data is encrypted and stored. Although encrypted data storage realizes secure data sharing, it will make it difficult to effectively verify the authenticity of the data. For example, using warehouse receipts for financing requires verification of financing. The authenticity of various warehouse receipt related data involved in the process, the existing transaction data, there is a greater risk of man-made fraud, it is difficult to verify the authenticity of the warehouse receipt data.
  • the embodiments of the present application provide a blockchain-based data verification method and device to solve the problem that the authenticity of warehouse receipt data in the prior art is difficult to verify.
  • a blockchain-based data verification method includes:
  • the participant nodes include logistics nodes, warehousing nodes, and producer nodes; perform 3D zero-knowledge proof on the encrypted data based on the zero-knowledge evidence, verify the authenticity of the warehouse receipt information, and obtain a verification result;
  • the results are posted to the blockchain for storage.
  • a blockchain-based data verification device comprising:
  • the first obtaining unit is used to obtain the request issued by the demand-side node on the blockchain, and the request carries encrypted data containing the warehouse receipt information;
  • the second obtaining unit is used to obtain the data related to the warehouse A zero-knowledge proof of a participant node associated with a single piece of information, the participant node including a logistics node, a warehouse node, and a producer node; a verification unit for performing 3D zero-knowledge proof on the encrypted data based on the zero-knowledge proof , Verifying the authenticity of the warehouse receipt information, and obtaining a verification result;
  • a publishing unit configured to publish the verification result to the blockchain for storage.
  • a computer storage medium includes a stored program.
  • the device where the storage medium is located is controlled to execute a blockchain-based A data verification method, wherein the method includes:
  • participant nodes include logistics nodes, warehouse nodes, and producer nodes;
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes all
  • the computer program implements a blockchain-based data verification method, wherein the method includes:
  • participant nodes include logistics nodes, warehouse nodes, and producer nodes;
  • the blockchain technology 3D zero-knowledge technology is used to realize the cross-verification of the warehouse receipt information between different parties in the ciphertext state, and change the self-certification to other certification, effectively verifying the authenticity of the warehouse receipt data.
  • the 3D zero-knowledge technology can implement arbitrary logical operations (addition, subtraction, multiplication, and division) on the encrypted data of multiple ledgers, and the processing capacity is greatly optimized.
  • Fig. 1 is a flowchart of an optional blockchain-based data verification method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of an optional warehouse receipt life cycle provided by an embodiment of the present application.
  • Figure 3 is a functional block diagram of an optional blockchain-based data verification device provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of an optional computer device provided by an embodiment of the present application.
  • blockchain As an integrated application of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other technologies, blockchain is considered to be a subversion of the computing model after mainframes, personal computers, and the Internet.
  • Type innovation has caused a new technological innovation and industrial transformation on a global scale.
  • a blockchain is a chained data structure that combines data blocks in a sequential manner in a chronological order, and is a distributed ledger that cannot be tampered with or forged that is guaranteed by cryptography.
  • blockchain technology uses block-chain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, uses cryptography to ensure the security of data transmission and access, and uses automated script codes.
  • a new distributed infrastructure and computing paradigm composed of smart contracts to program and manipulate data.
  • the terminals can be electronic devices such as notebook computers, tablet computers, desktop computers, and smart phones.
  • FIG. 1 is a flowchart of a method for data verification based on blockchain according to an embodiment of the present application. As shown in FIG. 1, the method includes:
  • Step S01 Obtain a request issued by the demand-side node on the blockchain, the request carrying encrypted data containing warehouse receipt information;
  • Step S02 Obtain zero-knowledge evidence of participant nodes associated with the warehouse receipt information on the blockchain, and the participant nodes include logistics nodes, warehousing nodes, and producer nodes;
  • Step S03 Perform 3D zero-knowledge proof on the encrypted data based on the zero-knowledge proof, verify the authenticity of the warehouse receipt information, and obtain a verification result;
  • Step S04 Publish the verification result to the blockchain for certification.
  • the blockchain technology 3D zero-knowledge technology is used to realize the cross-verification of the warehouse receipt information between different parties in the ciphertext state, and change the self-certification to other certification, effectively verifying the authenticity of the warehouse receipt data.
  • the 3D zero-knowledge technology can implement arbitrary logical operations (addition, subtraction, multiplication, and division) on the encrypted data of multiple ledgers, and the processing capacity is greatly optimized.
  • 3D zero-knowledge proof technology refers to the fact that the prover can believe that a certain assertion is correct without providing any useful information.
  • 3D zero-knowledge proof technology data association can be verified in the ciphertext state to ensure data privacy while realizing data sharing.
  • the 3D zero-knowledge proof technology can realize the logic operation of any relationship across the encrypted data of multiple ledgers to complete the verification in 3ms.
  • the demander is the holder of the warehouse receipt, such as a manufacturer, a logistics company, a trader, a warehousing company, a stocker, and so on.
  • the above-mentioned blockchain-based data verification method is applicable to the collaborative platform in the blockchain.
  • the collaborative platform may be a third party other than the demander and the supplier, for example, it may be a warehouse receipt transaction. Platforms or other intermediaries.
  • the collaborative platform evaluates the authenticity of the request, it uploads it to the blockchain according to the evaluation verification result, so that all participating nodes on the blockchain can learn about the authenticity verification result information of the request, that is, the verification result is broadcast to On the blockchain.
  • the supplier node can check the authenticity of the demand side's warehouse receipt on the blockchain.
  • the method includes:
  • the participant nodes without the key cannot open and know the specific value of the total price of the warehouse receipt or the total number of commodities. Therefore, in this solution, the blockchain technology 3D zero-knowledge technology is used to realize the authenticity verification of the warehouse receipt information among different participants in the ciphertext state, and the self-certification becomes other certification.
  • step S03 3D zero-knowledge proof is performed on the encrypted data based on the zero-knowledge proof to verify the authenticity of the warehouse receipt information and obtain the verification result, including:
  • first encrypted data containing the total number of goods, the first zero-knowledge evidence containing the quantity of goods transported, and the second zero-knowledge evidence containing the quantity of goods stored, where the first zero-knowledge evidence, the second zero-knowledge evidence, and the first encrypted data
  • the encryption algorithm used is the same;
  • the authenticity of the first encrypted data is proved according to the first zero-knowledge evidence or the second zero-knowledge evidence, and a verification result is obtained.
  • a zero-knowledge evidence generator is used to generate the first encrypted data, the first zero-knowledge evidence, and the second zero-knowledge evidence.
  • the second zero-knowledge evidence C c*G+X3*H.
  • A, B, and C are all encrypted data
  • a represents the quantity of goods on the demand side
  • b represents the quantity of goods transported by the logistics party
  • c represents the quantity of goods stored by the warehousing party
  • G is the base point of the encryption curve
  • X1, X2, X3 Is the blind factor
  • H h*G
  • h is the respective private key
  • H and G are points on the encryption curve
  • h is an integer smaller than n (n is the order of point G)
  • h is the private key
  • H Public key. Understandably, each participant generates a public key according to the encryption curve (elliptic curve), and the public key H is publicly stored in the blockchain.
  • the blind factor (X1-X2) is used as the private key of curve S to provide a signature to the blockchain
  • D is the public key of curve S, which is used to verify the signature. If the verification is passed, it means a and b equal.
  • A, B and C are announced on the blockchain in advance and cannot be forged, then D cannot be forged; suppose ab is not 0, then the private key is: [(ab)+(X1-X2)*h]. Because h cannot be known, the private key cannot be known by calculation. Therefore, only when ab is equal to 0, the relevant information can be provided. sign.
  • X1-X2 or X1-X3 as the private key to sign D to obtain the signature code, and store the signature code on the blockchain.
  • the zero-knowledge evidence generator uses an elliptic curve encryption algorithm to encrypt data to obtain encrypted data.
  • the elliptic curve encryption algorithm includes any one of P256 curve, P224 curve, P384 curve and P512 curve.
  • Encrypted data is Perdersen in cryptography Commitment format.
  • step S03 performing a 3D zero-knowledge proof on the encrypted data based on the zero-knowledge proof to verify the authenticity of the warehouse receipt information to obtain a verification result, including:
  • the second encrypted data including the total price of the warehouse receipt, the third zero-knowledge evidence including the unit price of the product, and the second zero-knowledge evidence including the storage quantity of the product, where the second zero-knowledge evidence, the third zero-knowledge evidence, and the second encryption
  • the encryption algorithm used for the data is the same;
  • the authenticity of the second encrypted data is proved according to the third zero-knowledge evidence and the second zero-knowledge evidence, and a verification result is obtained.
  • the second zero-knowledge evidence C c*G+X3*H.
  • I, E, and C are all encrypted data
  • the total price of the warehouse receipt i e (unit price of the commodity) * c (quantity of the commodity);
  • the third zero-knowledge evidence can be that the merchant node enters the unit price of the commodity into the block
  • the zero-knowledge evidence generation algorithm preset on the chain is used to generate it.
  • step S04 after publishing the verification result to the blockchain for storage, the method further includes:
  • target information is generated, where the target information includes demander information and warehouse receipt information;
  • the target information is sent to the supplier node, so that the supplier node generates plan data based on the target information, the supplier node sends the plan data to the demander node, and the demander node Determine the value based on the selected program data.
  • the supplier node when the supplier node receives the target information, it will produce plan data based on the target information.
  • the plan data can include factors such as loan interest, term, and quota.
  • the method further includes:
  • target zero-knowledge evidence to verify whether there are repeated requests on the demand side, including:
  • K21 is the public key and x2 is the private key; when signing by the Borromean Ring Signatures algorithm, assuming that the second supplier signs, it needs to provide (message, K0, k1, K2, K3) signatures to get Sig; proceed When verifying the signature, you need to provide (message, K0, K1, K2, K3, Sig) for signature verification, that is, you need the real signer’s private key when signing, and only the public key of all members is required for signature verification. That's it.
  • FIG. 3 is a schematic diagram of a blockchain-based data verification device according to an embodiment of the present application. As shown in FIG. 3, the device includes a first acquisition unit 10, a second acquisition unit 20, a verification unit 30, and a processing unit 40 .
  • the first obtaining unit 10 is configured to obtain a request issued by the demand-side node on the blockchain, the request carrying encrypted data containing warehouse receipt information;
  • the second obtaining unit 20 is configured to obtain zero-knowledge evidence of participant nodes associated with the warehouse receipt information on the blockchain, and the participant nodes include logistics nodes, warehouse nodes, and producer nodes;
  • the verification unit 30 is configured to perform a 3D zero-knowledge proof on the encrypted data based on the zero-knowledge proof, verify the authenticity of the warehouse receipt information, and obtain a verification result;
  • the processing unit 40 is configured to publish the verification result to the blockchain for storage.
  • blockchain technology 3D zero-knowledge technology is used to realize the cross-verification of warehouse receipt information between different parties in the ciphertext state, and change self-certification to other certification, which improves the credibility of warehouse receipts and reduces There is a risk of fraudulent warehouse receipts.
  • the 3D zero-knowledge technology can implement arbitrary logical operations (addition, subtraction, multiplication, and division) on the encrypted data of multiple ledgers, and the processing capacity is greatly optimized.
  • the demander is the holder of the warehouse receipt, such as a manufacturer, a logistics company, a trader, a warehousing company, a stocker, and so on.
  • the collaborative platform may be a third party other than the demander and the supplier, for example, it may be a warehouse receipt trading platform or other intermediary agencies.
  • the collaborative platform evaluates the authenticity of the request, it uploads it to the blockchain according to the evaluation verification result, so that all participating nodes on the blockchain can learn about the authenticity verification result information of the request, that is, the verification result is broadcast to On the blockchain.
  • the supplier node can check the authenticity of the demand side's warehouse receipt on the blockchain.
  • the device further includes:
  • the first receiving unit is configured to receive the total price of the warehouse receipt and the total number of commodities input by the demand-side node to the preset zero-knowledge evidence generator on the blockchain and process, to obtain the first encrypted data containing the total number of commodities , The second encrypted data containing the total price of the warehouse receipt;
  • the second receiving unit is configured to receive the request issued by the demand-side node, and upload the first encrypted data and the second encrypted data to the blockchain.
  • the participant nodes without the key cannot open and know the specific value of the total price of the warehouse receipt or the total number of commodities. Therefore, in this solution, the blockchain technology 3D zero-knowledge technology is used to realize the authenticity verification of the warehouse receipt information among different participants in the ciphertext state, and the self-certification becomes other certification.
  • the verification unit 30 includes a first acquisition subunit and a first verification subunit.
  • the first acquisition subunit is used to acquire the first encrypted data containing the total number of commodities, the first zero-knowledge evidence containing the quantity of goods transported, and the second zero-knowledge evidence containing the quantity of goods stored, where the first zero-knowledge evidence and the second zero-knowledge evidence
  • the encryption algorithm used by the zero-knowledge proof and the first encrypted data is the same;
  • the first verification subunit is configured to prove the authenticity of the first encrypted data according to the first zero-knowledge evidence or the second zero-knowledge evidence, and obtain a verification result.
  • a zero-knowledge evidence generator is used to generate the first encrypted data, the first zero-knowledge evidence, and the second zero-knowledge evidence.
  • the second zero-knowledge evidence C c*G+X3*H.
  • A, B, and C are all encrypted data
  • a represents the quantity of goods on the demand side
  • b represents the quantity of goods transported by the logistics party
  • c represents the quantity of goods stored by the warehousing party
  • G is the base point of the encryption curve
  • X1, X2, X3 Is the blind factor
  • H h*G
  • h is the respective private key
  • H and G are points on the encryption curve
  • h is an integer smaller than n (n is the order of point G)
  • h is the private key
  • H Public key. Understandably, each participant generates a public key according to the encryption curve (elliptic curve), and the public key H is publicly stored in the blockchain.
  • the blind factor (X1-X2) is used as the private key of curve S to provide a signature to the blockchain
  • D is the public key of curve S, which is used to verify the signature. If the verification is passed, it means a and b equal.
  • A, B and C are announced on the blockchain in advance and cannot be forged, then D cannot be forged; suppose ab is not 0, then the private key is: [(ab)+(X1-X2)*h]. Because h cannot be known, the private key cannot be known by calculation. Therefore, only when ab is equal to 0, the relevant information can be provided. sign.
  • X1-X2 or X1-X3 as the private key to sign D to obtain the signature code, and store the signature code on the blockchain.
  • the zero-knowledge evidence generator uses an elliptic curve encryption algorithm, a public key encryption technology, and the elliptic curve encryption algorithm includes any one of the P256 curve, the P224 curve, the P384 curve, and the P512 curve.
  • Encrypted data is Perdersen in cryptography Commitment format.
  • the verification unit 30 further includes a second acquisition subunit and a second verification subunit.
  • the second acquisition subunit is used to acquire the second encrypted data including the total price of the warehouse receipt, the third zero-knowledge evidence including the unit price of the product, and the second zero-knowledge evidence including the storage quantity of the product, where the second zero-knowledge evidence and the first zero-knowledge evidence
  • the encryption algorithm used by the three zero knowledge evidence and the second encrypted data is the same;
  • the second verification subunit is configured to prove the authenticity of the second encrypted data according to the third zero-knowledge evidence and the second zero-knowledge evidence, and obtain a verification result.
  • the second zero-knowledge evidence C c*G+X3*H.
  • I, E, and C are all encrypted data
  • the total price of the warehouse receipt i e (unit price of the commodity) * c (quantity of the commodity);
  • the third zero-knowledge evidence can be that the merchant node enters the unit price of the commodity into the block
  • the zero-knowledge evidence generation algorithm preset on the chain is used to generate it.
  • the device further includes a generating unit and a first sending unit.
  • a generating unit configured to generate target information in response to the request, where the target information includes demander information and warehouse receipt information;
  • the first sending unit is configured to send the target information to a supplier node, so that the supplier node generates plan data based on the target information, and the supplier node sends the plan data to the demander Node, the demand-side node determines the value based on the selected plan data.
  • the supplier node when the supplier node receives the target information, it will produce plan data based on the target information.
  • the plan data can include factors such as loan interest, term, and quota.
  • the device further includes a third acquiring unit, a fourth acquiring unit, and a second verification unit, a second sending unit, and a third sending unit.
  • the third obtaining unit is configured to receive the value input and processed by the demand-side node to the preset zero-knowledge evidence generator on the blockchain to obtain third encrypted data containing the value;
  • a fourth obtaining unit configured to obtain target zero-knowledge evidence related to the demand-side node, where the target zero-knowledge evidence originates from the supplier;
  • the second verification unit is configured to use the target zero-knowledge evidence to verify whether the demander has repeated requests;
  • the second sending unit is configured to send an approval notice to each of the supplier nodes if there is no repeated request;
  • the third sending unit is configured to send an early warning notification to each of the supplier nodes if there are repeated requests.
  • the specific implementation manner of using the target zero-knowledge evidence to verify whether the demanding party has repeated requests can be, for example, as follows:
  • K21 is the public key and x2 is the private key; when signing by the Borromean Ring Signatures algorithm, assuming that the second supplier signs, it needs to provide (message, K0, k1, K2, K3) signatures to get Sig; proceed When verifying the signature, you need to provide (message, K0, K1, K2, K3, Sig) for signature verification, that is, you need the real signer’s private key when signing, and only the public key of all members is required for signature verification. That's it.
  • the embodiments of the present application provide a computer storage medium.
  • the storage medium may be a non-volatile storage medium or a volatile storage medium; the storage medium includes a stored program, where the storage medium is controlled when the program is running.
  • the device performs the following steps:
  • the device where the storage medium is located is controlled to perform the following steps:
  • the first encrypted data containing the total number of goods, the first zero-knowledge evidence containing the quantity of goods transported, and the second zero-knowledge evidence containing the quantity of goods stored, where the first zero-knowledge evidence, the second zero-knowledge evidence, and the first encrypted data
  • the encryption algorithm used is the same; the authenticity of the first encrypted data is proved according to the first zero-knowledge proof or the second zero-knowledge proof, and the verification result is obtained.
  • the device where the storage medium is located is controlled to perform the following steps:
  • the second encrypted data including the total price of the warehouse receipt, the third zero-knowledge evidence including the unit price of the product, and the second zero-knowledge evidence including the storage quantity of the product, where the second zero-knowledge evidence, the third zero-knowledge evidence, and the second encryption
  • the encryption algorithm used for the data is the same; the authenticity of the second encrypted data is proved according to the third zero-knowledge evidence and the second zero-knowledge evidence, and the verification result is obtained.
  • the device where the storage medium is located is controlled to perform the following steps:
  • the target information is generated, the target information includes the demander information and the warehouse receipt information; the target information is sent to the supplier node so that the supplier node generates plan data based on the target information, and the supplier node sends the plan data to the demander Node, the demand-side node determines the value based on the selected plan data.
  • the device where the storage medium is located is controlled to perform the following steps:
  • Fig. 4 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the computer device 100 of this embodiment includes: a processor 101, a memory 102, and a computer program 103 stored in the memory 102 and running on the processor 101.
  • the processor 101 executes the computer program 103 when the computer program 103 is executed.
  • the data verification method based on blockchain in the example will not be repeated here.
  • the computer program is executed by the processor 101, the function of each model/unit in the blockchain-based data verification device in the embodiment is realized. To avoid repetition, it will not be repeated here.
  • the computer device 100 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device may include, but is not limited to, a processor 101 and a memory 102.
  • FIG. 4 is only an example of the computer device 100 and does not constitute a limitation on the computer device 100. It may include more or less components than those shown in the figure, or a combination of certain components, or different components.
  • computer equipment may also include input and output devices, network access devices, buses, and so on.
  • the so-called processor 101 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 102 may be an internal storage unit of the computer device 100, such as a hard disk or memory of the computer device 100.
  • the memory 102 may also be an external storage device of the computer device 100, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, and a flash memory card (Flash Card) equipped on the computer device 100. Card) and so on.
  • the memory 102 may also include both an internal storage unit of the computer device 100 and an external storage device.
  • the memory 102 is used to store computer programs and other programs and data required by the computer equipment.
  • the memory 102 can also be used to temporarily store data that has been output or will be output.

Landscapes

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

Abstract

本申请实施例提供了基于区块链的数据验证方法及装置,本申请涉及区块链技术领域,方法包括:获取需求方节点在区块链上发布的请求,请求携带包含仓单信息的加密数据;获取区块链上与仓单信息相关联的参与方节点的零知识证据,参与方节点包括物流节点、仓储节点、生成商节点;基于零知识证据对加密数据进行3D零知识证明,验证仓单信息的真实性,得到验证结果;将验证结果发布至区块链进行存证。本申请实施例提供的技术方案能够解决现有技术中仓单数据的真实性难以验证的问题。

Description

基于区块链的数据验证方法及装置
本申请要求于2020年03月24日提交中国专利局、申请号为202010216924.0,发明名称为“基于区块链的数据验证方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,尤其涉及基于区块链的数据验证方法及装置。
背景技术
在区块链中,发明人意识到所有的数据都是加密存储,虽然数据加密存储实现了安全的数据共享,但是会导致难以有效验证数据的真实性,例如利用仓单进行融资,需要验证融资过程中涉及的多种仓单相关数据的真实性,现有的交易数据,存在较大的人为造假风险,难以验证仓单数据的真实性。
技术问题
有鉴于此,本申请实施例提供了基于区块链的数据验证方法及装置,用以解决现有技术中仓单数据的真实性难以验证的问题。
技术解决方案
为了实现上述目的,根据本申请的一个方面,提供了一种基于区块链的数据验证方法,所述方法包括:
获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;将所述验证结果发布至所述区块链进行存证。
为了实现上述目的,根据本申请的一个方面,提供了一种基于区块链的数据验证装置,所述装置包括:
第一获取单元,用于获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;第二获取单元,用于获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;验证单元,用于基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;发布单元,用于将所述验证结果发布至所述区块链进行存证。
为了实现上述目的,根据本申请的一个方面,提供了一种计算机存储介质,所述存储介质包括存储的程序,在所述程序运行时控制所述存储介质所在设备执行一种基于区块链的数据验证方法,其中所述方法包括:
获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
将所述验证结果发布至所述区块链进行存证。
为了实现上述目的,根据本申请的一个方面,提供了一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现一种基于区块链的数据验证方法,其中所述方法包括:
获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
将所述验证结果发布至所述区块链进行存证。
有益效果
在本方案中,利用区块链技术3D零知识技术,实现仓单信息在不同参与方间,在密文状态下的交叉验证,变自证为他证,有效验证仓单数据的真实性,提升仓单的可信度,降低仓单人为造假风险。其中3D零知识技术可以实现多个账本的加密数据进行任意关系的逻辑运算(加、减、乘、除),处理能力大大优化。
附图说明
图1是本申请实施例提供的一种可选的基于区块链的数据验证方法的流程图;
图2是本申请实施例提供的一种可选的仓单生命周期示意图;
图3是本申请实施例提供的一种可选的基于区块链的数据验证装置的功能框图;
图4是本申请实施例提供的一种可选的计算机设备的示意图。
本发明的最佳实施方式
为了便于理解,首先介绍一下区块链,区块链作为分布式数据存储、点对点传输、共识机制、加密算法等技术的集成应用,被认为是继大型机、个人电脑、互联网之后计算模式的颠覆式创新,在全球范围引起一场新的技术革新和产业变革。狭义来讲,区块链是一种按照时间顺序将数据区块以顺序相连的方式组合成的一种链式数据结构,并以密码学方式保证的不可篡改和不可伪造的分布式账本。广义来讲,区块链技术是利用块链式数据结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用密码学的方式保证数据传输和访问的安全、利用自动化脚本代码组成的智能合约来编程和操作数据的一种全新的分布式基础架构与计算范式。
区块链中有多个终端,多个终端均可以将加密数据上传至区块链中,以供区块链中的其他终端共享加密数据。区块链中的其他终端可以从区块链上获取加密数据以实现对加密数据的访问,终端可以是笔记本电脑、平板电脑、台式电脑、智能手机等电子设备。
本申请实施例提供一种基于区块链的数据验证方法,图1是根据本申请实施例的一种基于区块链的数据验证方法的流程图,如图1所示,该方法包括:
步骤S01,获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
步骤S02,获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
步骤S03,基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
步骤S04,将所述验证结果发布至所述区块链进行存证。
在本方案中,利用区块链技术3D零知识技术,实现仓单信息在不同参与方间,在密文状态下的交叉验证,变自证为他证,有效验证仓单数据的真实性,提升仓单的可信度,降低仓单人为造假风险。其中3D零知识技术可以实现多个账本的加密数据进行任意关系的逻辑运算(加、减、乘、除),处理能力大大优化。
其中,3D零知识证明技术是指证明者能够在不向眼睁睁提供任何有用的信息的情况下,是验证者相信某个论断是正确的。应用3D零知识证明技术,可以在密文状态下实现数据的关联关系验证,以保证数据隐私的同时实现数据共享。3D零知识证明技术可以实现跨多个账本的加密数据进行任意关系的逻辑运算3ms即可完成验证。
以仓单融资为例,如图2所示,存货人、仓储企业、贸易商、注册平台、生产厂商、物流公司、融资机构等参与方,各参与方拥有自己的区块链节点。不同参与方通过节点记录信息,使电子仓单从生产、物流、仓储、注册生成、交易、融资、注销等全生命周期上链,全流程可追溯。并可通过区块链浏览器查看实时交易信息。
需求方为仓单持有人,例如可以是生产商、物流公司、贸易商、仓储企业、存货商等等。
在一种实施方式中,上述基于区块链的数据验证方法适用于区块链中的协同平台,具体地,协同平台可以是除需求方、供应方以外的第三方,例如可以是仓单交易平台或其他中介机构。
当协同平台对请求进行真实性评估后,根据评估验证结果上传到区块链,使得区块链上的参与方节点均可以了解到关于这个请求的真实性验证结果信息,即验证结果被广播到区块链上。例如供应方节点就能在区块链是上查看需求方的仓单的真实性。
在步骤S01之前,方法包括:
接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的仓单总价、商品总数,得到包含商品总数的第一加密数据、包含仓单总价的第二加密数据;
接收所述需求方节点发布的请求,并将所述第一加密数据及第二加密数据上传至所述区块链。
可以理解地,需求方节点将仓单总价、商品总数分别进行加密处理后,没有密钥的参与方节点不能打开知道仓单总价或商品总数的具体数值。因此,本方案中,利用区块链技术3D零知识技术,实现仓单信息在不同参与方间,以密文状态下进行真实性验证,变自证为他证。
具体地,步骤S03,基于零知识证据对加密数据进行3D零知识证明,验证仓单信息的真实性,得到验证结果,包括:
获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,第一零知识证据、第二零知识证据及第一加密数据所使用的加密算法相同;
根据所述第一零知识证据或所述第二零知识证据证明所述第一加密数据的真实性,得到验证结果。
可以理解地,用包含商品运输数量的第一零知识证据或包含商品存储数量的第二零知识证据来证明第一加密数据的真实性,需求方的商品数量=物流方的商品运输数量=仓储方的商品存储数量,如果数量一致,则仓单信息中的商品总数真实有效。
具体地,利用零知识证据生成器生成第一加密数据、第一零知识证据及第二零知识证据。
第一加密数据为A=a*G+X1*H,第一零知识证据为B=b*G+X2*H,第二零知识证据C=c*G+X3*H。其中,A、B、C都是加密数据,a表示需求方的商品数量,b表示物流方的商品运输数量,c表示仓储方的商品存储数量,G为加密曲线的基点,X1、X2、X3为盲因子,H=h*G,h为各自的私钥,H和G为加密曲线上的点,h为小于n(n是点G的阶)的整数,h为私有密钥,H为公开密钥。可以理解地,各个参与方根据加密曲线(椭圆曲线)生成公钥,公钥H公开存储在区块链中。
由于H=h*G满足离散对数难题的性质,给定H和G,求h就相对困难,仅能通过暴力破解。而该h点(私钥)是不公开的,即所有的业务参与方都不能得知各自的私钥h是多少。同时,我们有一条以H点为基点的椭圆曲线S。
进一步地,计算D=A-B=(a-b)*G+(X1-X2)*H,或计算D=A-C=(a-c)*G+(X1-X3)*H。示例性地,以盲因子(X1-X2)为曲线S的私钥,对区块链提供签名,而D即是曲线S的公钥,用于验签,验签通过,则说明a和b相等。因为,D=A-B=(X1-X2)*H=(X1-X2)*h*G,由于A、B及C提前公布在区块链上而无法伪造,则D无法伪造;假设a-b不为0,则私钥为:[(a-b)+(X1-X2)*h],因为h不能知晓,所以该私钥无法通过计算得知,所以,只有a-b等于0的情况下,才可以提供相关签名。
进一步地,以X1-X2或X1-X3为私钥,对D进行签名,得到签名码,并将签名码存储至区块链上,区块链上的验证工作:D=A-B,message=hash(string(A)-string(B)),用D作为公钥对message进行验签,如果验签通过,则说明A和B相等,同样地,也可以验证A和C相等。若公钥(D)对哈希值验签通过,第一加密数据中的商品数量与第一零知识证据中的商品运输数量相等,或第一加密数据中的商品数量与第二零知识证据中的商品存储数量相等。若公钥(D)对哈希值验签未通过,A、B、C中的值不一致。
在本实施方式中,零知识证据生成器采用椭圆曲线加密算法对数据进行加密处理,得到加密数据。作为一种公钥加密技术,椭圆曲线加密算法包括P256曲线、P224曲线、P384曲线及P512曲线中的任意一种。加密数据都是密码学中的Perdersen Commitment格式。
可选地,步骤S03,基于零知识证据对加密数据进行3D零知识证明,验证仓单信息的真实性,得到验证结果,包括:
获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,第二零知识证据、第三零知识证据及第二加密数据所使用的加密算法相同;
根据所述第三零知识证据及所述第二零知识证据证明所述第二加密数据的真实性,得到验证结果。
具体地,第二加密数据为I=i*G+X4*H,第三零知识证据为E=e*G+X5*H,第二零知识证据C=c*G+X3*H。
其中,I、E、C都是加密数据,仓单总价i=e(商品单价)*c(商品数量);可以理解地,第三零知识证据可以是贸易商节点将商品单价输入区块链上预设的零知识证据生成算法进行生成。
进一步地,计算第二加密数据减去第三零知识证据乘以第二加密数据,得到差值F=I-E*C。然后对差值F进行验签,如果验签通过,则确定I等于第三零知识证据中的商品单价乘以第二零知识证据中的商品数量。
可选地,在步骤S04,将所述验证结果发布至所述区块链进行存证之后,之后,方法还包括:
响应于所述请求,生成目标信息,所述目标信息包括需求方信息及仓单信息;
将所述目标信息发送至供应方节点,以使所述供应方节点基于所述目标信息生成方案数据,所述供应方节点将所述方案数据发送给所述需求方节点,所述需求方节点基于选中的方案数据确定数值。
可以理解地,当供应方节点收到目标信息后,就会根据目标信息制作方案数据,方案数据可以包括贷款利息、期限、额度等因素。
进一步地,在需求方节点基于选中的方案数据确定数值之后,方法还包括:
接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的数值,得到包含所述数值的第三加密数据;
获取与所述需求方节点相关的目标零知识证据,所述目标零知识证据来源于所述供应方;
利用所述目标零知识证据验证所述需求方是否存在重复请求;
如不存在重复请求,发送审批通知至各个所述供应方节点;
如存在重复请求,发送预警通知至各个所述供应方节点。
其中,利用目标零知识证据验证需求方是否存在重复请求,包括:
1)需求方构建基于椭圆曲线的承诺值:
K=k*G+x*H,其中,x是随机数(本次的盲因子),k=数值;
假设有4个供应方都提供资源,他们有自己的公私钥对为:(k0,K0),(k1,K1),(k2,K2),(k3,K3);其中某个供应方对message的签名,但是又不想暴露自己是这4个供应方中的一个,我们可以采用Borromean Ring Signatures环签名,同时Borromean Ring Signatures算法提供了多个环的情况,将多个环串起来的方法。
2)构建各个供应方的承诺值,即承诺提供的数值。
K20=K2−0H=x2G+413H
K21=K2−67108864H=x2G+413H
K22=K2−134217728H=x2G−413H
K23=K2−201326592H=x2G−2*413H
可以理解地,K21为公钥,x2为私钥;Borromean Ring Signatures算法签名的时候,假设第二个供应方进行签名,需要提供(message,K0,k1,K2,K3)签名,得到Sig;进行验签时,需要提供(message,K0,K1,K2,K3,Sig)验签,即,签名的时候需要真实的签名者的私钥,验签的时候,仅需要提供所有成员这的公钥即可。
3)需求方会根据数值的生成承诺值,即K作为message,K=K0+K1+K2+K3,同样的,对于盲因子,也需要保证:x1+x2+x3=x;
4)从区块链上获取K、K0、K1、K2、K3,Sig进行RangeProof验签,其中,Sig是Borromean Ring Signatures算法计算出来的签名结果;
5)计算K5=K-(K0+K1+K2+K3),并计算公钥;
6)从区块链上获取message,K,所有的公钥,以及签名Sig,利用Borromean Ring Signatures算法即可验签。
可以理解地,通过加密验证,能够有效判断该仓单所需融资的数值是否超过仓单总价值,也能够有效避免重复请求。
图3是根据本申请实施例的一种基于区块链的数据验证装置的示意图,如图3所示,该装置包括第一获取单元10、第二获取单元20、验证单元30及处理单元40。
第一获取单元10,用于获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
第二获取单元20,用于获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
验证单元30,用于基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
处理单元40,用于将所述验证结果发布至所述区块链进行存证。
在本方案中,利用区块链技术3D零知识技术,实现仓单信息在不同参与方间,在密文状态下的交叉验证,变自证为他证,提升仓单的可信度,降低仓单人为造假风险。其中3D零知识技术可以实现多个账本的加密数据进行任意关系的逻辑运算(加、减、乘、除),处理能力大大优化。
需求方为仓单持有人,例如可以是生产商、物流公司、贸易商、仓储企业、存货商等等。
具体地,协同平台可以是除需求方、供应方以外的第三方,例如可以是仓单交易平台或其他中介机构。
当协同平台对请求进行真实性评估后,根据评估验证结果上传到区块链,使得区块链上的参与方节点均可以了解到关于这个请求的真实性验证结果信息,即验证结果被广播到区块链上。例如供应方节点就能在区块链是上查看需求方的仓单的真实性。
可选地,装置还包括:
第一接收单元,用于接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的仓单总价、商品总数,得到包含商品总数的第一加密数据、包含仓单总价的第二加密数据;
第二接收单元,用于接收所述需求方节点发布的请求,并将所述第一加密数据及第二加密数据上传至所述区块链。
可以理解地,需求方节点将仓单总价、商品总数分别进行加密处理后,没有密钥的参与方节点不能打开知道仓单总价或商品总数的具体数值。因此,本方案中,利用区块链技术3D零知识技术,实现仓单信息在不同参与方间,以密文状态下进行真实性验证,变自证为他证。
具体地,验证单元30包括第一获取子单元、第一验证子单元。
第一获取子单元,用于获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,第一零知识证据、第二零知识证据及第一加密数据所使用的加密算法相同;
第一验证子单元,用于根据所述第一零知识证据或所述第二零知识证据证明所述第一加密数据的真实性,得到验证结果。
可以理解地,用包含商品运输数量的第一零知识证据或包含商品存储数量的第二零知识证据来证明第一加密数据的真实性,需求方的商品数量=物流方的商品运输数量=仓储方的商品存储数量,如果数量一致,则仓单信息中的商品总数真实有效。
具体地,利用零知识证据生成器生成第一加密数据、第一零知识证据及第二零知识证据。
第一加密数据为A=a*G+X1*H,第一零知识证据为B=b*G+X2*H,第二零知识证据C=c*G+X3*H。其中,A、B、C都是加密数据,a表示需求方的商品数量,b表示物流方的商品运输数量,c表示仓储方的商品存储数量,G为加密曲线的基点,X1、X2、X3为盲因子,H=h*G,h为各自的私钥,H和G为加密曲线上的点,h为小于n(n是点G的阶)的整数,h为私有密钥,H为公开密钥。可以理解地,各个参与方根据加密曲线(椭圆曲线)生成公钥,公钥H公开存储在区块链中。
由于H=h*G满足离散对数难题的性质,给定H和G,求h就相对困难,仅能通过暴力破解。而该h点(私钥)是不公开的,即所有的业务参与方都不能得知各自的私钥h是多少。同时,我们有一条以H点为基点的椭圆曲线S。
进一步地,计算D=A-B=(a-b)*G+(X1-X2)*H,或计算D=A-C=(a-c)*G+(X1-X3)*H。示例性地,以盲因子(X1-X2)为曲线S的私钥,对区块链提供签名,而D即是曲线S的公钥,用于验签,验签通过,则说明a和b相等。因为,D=A-B=(X1-X2)*H=(X1-X2)*h*G,由于A、B及C提前公布在区块链上而无法伪造,则D无法伪造;假设a-b不为0,则私钥为:[(a-b)+(X1-X2)*h],因为h不能知晓,所以该私钥无法通过计算得知,所以,只有a-b等于0的情况下,才可以提供相关签名。
进一步地,以X1-X2或X1-X3为私钥,对D进行签名,得到签名码,并将签名码存储至区块链上,区块链上的验证工作:D=A-B,message=hash(string(A)-string(B)),用D作为公钥对message进行验签,如果验签通过,则说明A和B相等,同样地,也可以验证A和C相等。若公钥(D)对哈希值验签通过,第一加密数据中的商品数量与第一零知识证据中的商品运输数量相等,或第一加密数据中的商品数量与第二零知识证据中的商品存储数量相等。若公钥(D)对哈希值验签未通过,A、B、C中的值不一致。
在本实施方式中,零知识证据生成器采用椭圆曲线加密算法,一种公钥加密技术,椭圆曲线加密算法包括P256曲线、P224曲线、P384曲线及P512曲线中的任意一种。加密数据都是密码学中的Perdersen Commitment格式。
可选地,验证单元30还包括第二获取子单元及第二验证子单元。
第二获取子单元,用于获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,第二零知识证据、第三零知识证据及第二加密数据所使用的加密算法相同;
第二验证子单元,用于根据所述第三零知识证据及所述第二零知识证据证明所述第二加密数据的真实性,得到验证结果。
具体地,第二加密数据为I=i*G+X4*H,第三零知识证据为E=e*G+X5*H,第二零知识证据C=c*G+X3*H。
其中,I、E、C都是加密数据,仓单总价i=e(商品单价)*c(商品数量);可以理解地,第三零知识证据可以是贸易商节点将商品单价输入区块链上预设的零知识证据生成算法进行生成。
进一步地,计算第二加密数据减去第三零知识证据乘以第二加密数据,得到差值F=I-E*C。然后对差值F进行验签,如果验签通过,则确定I等于第三零知识证据中的商品单价乘以第二零知识证据中的商品数量。
可选地,装置还包括生成单元、第一发送单元。
生成单元,用于响应于所述请求,生成目标信息,所述目标信息包括需求方信息及仓单信息;
第一发送单元,用于将所述目标信息发送至供应方节点,以使所述供应方节点基于所述目标信息生成方案数据,所述供应方节点将所述方案数据发送给所述需求方节点,所述需求方节点基于选中的方案数据确定数值。
可以理解地,当供应方节点收到目标信息后,就会根据目标信息制作方案数据,方案数据可以包括贷款利息、期限、额度等因素。
进一步地,装置还包括第三获取单元、第四获取单元及第二验证单元、第二发送单元及第三发送单元。
第三获取单元,用于接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的数值,得到包含所述数值的第三加密数据;
第四获取单元,用于获取与所述需求方节点相关的目标零知识证据,所述目标零知识证据来源于所述供应方;
第二验证单元,用于利用所述目标零知识证据验证所述需求方是否存在重复请求;
第二发送单元,用于如不存在重复请求,发送审批通知至各个所述供应方节点;
第三发送单元,用于如存在重复请求,发送预警通知至各个所述供应方节点。
具体地,利用目标零知识证据验证需求方是否存在重复请求的具体实现方式例如可以是:
1)需求方构建基于椭圆曲线的承诺值:
K=k*G+x*H,其中,x是随机数(本次的盲因子),k=数值;
假设有4个供应方都提供资源,他们有自己的公私钥对为:(k0,K0),(k1,K1),(k2,K2),(k3,K3);其中某个供应方对message的签名,但是又不想暴露自己是这4个供应方中的一个,我们可以采用Borromean Ring Signatures环签名,同时Borromean Ring Signatures算法提供了多个环的情况,将多个环串起来的方法。
2)构建各个供应方的承诺值,即承诺提供的数值。
K20=K2−0H=x2G+413H
K21=K2−67108864H=x2G+413H
K22=K2−134217728H=x2G−413H
K23=K2−201326592H=x2G−2*413H
可以理解地,K21为公钥,x2为私钥;Borromean Ring Signatures算法签名的时候,假设第二个供应方进行签名,需要提供(message,K0,k1,K2,K3)签名,得到Sig;进行验签时,需要提供(message,K0,K1,K2,K3,Sig)验签,即,签名的时候需要真实的签名者的私钥,验签的时候,仅需要提供所有成员这的公钥即可。
3)需求方会根据数值的生成承诺值,即K作为message,K=K0+K1+K2+K3,同样的,对于盲因子,也需要保证:x1+x2+x3=x;
4)从区块链上获取K、K0、K1、K2、K3,Sig进行RangeProof验签,其中,Sig是Borromean Ring Signatures算法计算出来的签名结果;
5)计算K5=K-(K0+K1+K2+K3),并计算公钥;
6)从区块链上获取message,K,所有的公钥,以及签名Sig,利用Borromean Ring Signatures算法即可验签。
可以理解地,通过加密验证,能够有效判断该仓单的融资额度是否超过仓单总价值,也能够有效避免重复请求。
本申请实施例提供了一种计算机存储介质,所述存储介质可以是非易失性存储介质,也可以是易失性存储介质;存储介质包括存储的程序,其中,在程序运行时控制存储介质所在设备执行以下步骤:
获取需求方节点在区块链上发布的请求,请求携带包含仓单信息的加密数据;获取区块链上与仓单信息相关联的参与方节点的零知识证据,参与方节点包括物流节点、仓储节点、生成商节点;基于零知识证据对加密数据进行3D零知识证明,验证仓单信息的真实性,得到验证结果;将验证结果发布至区块链进行存证。
可选地,在程序运行时控制存储介质所在设备执行以下步骤:
获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,第一零知识证据、第二零知识证据及第一加密数据所使用的加密算法相同;根据第一零知识证据或第二零知识证据证明第一加密数据的真实性,得到验证结果。
可选地,在程序运行时控制存储介质所在设备执行以下步骤:
获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,第二零知识证据、第三零知识证据及第二加密数据所使用的加密算法相同;根据第三零知识证据及第二零知识证据证明第二加密数据的真实性,得到验证结果。
可选地,在程序运行时控制存储介质所在设备执行以下步骤:
响应于请求,生成目标信息,目标信息包括需求方信息及仓单信息;将目标信息发送至供应方节点,以使供应方节点基于目标信息生成方案数据,供应方节点将方案数据发送给需求方节点,需求方节点基于选中的方案数据确定数值。
可选地,在程序运行时控制存储介质所在设备执行以下步骤:
接收需求方节点输入至区块链上预设的零知识证据生成器并进行处理的数值,得到包含数值的第三加密数据;获取与需求方节点相关的目标零知识证据,目标零知识证据来源于供应方;利用目标零知识证据验证需求方是否存在重复请求;如不存在重复请求,发送审批通知至各个供应方节点;如存在重复请求,发送预警通知至各个供应方节点。
图4是本申请实施例提供的一种计算机设备的示意图。如图4所示,该实施例的计算机设备100包括:处理器101、存储器102以及存储在存储器102中并可在处理器101上运行的计算机程序103,处理器101执行计算机程序103时实现实施例中的基于区块链的数据验证方法,为避免重复,此处不一一赘述。或者,该计算机程序被处理器101执行时实现实施例中基于区块链的数据验证装置中各模型/单元的功能,为避免重复,此处不一一赘述。
计算机设备100可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。计算机设备可包括,但不仅限于,处理器101、存储器102。本领域技术人员可以理解,图4仅仅是计算机设备100的示例,并不构成对计算机设备100的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如计算机设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器101可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
存储器102可以是计算机设备100的内部存储单元,例如计算机设备100的硬盘或内存。存储器102也可以是计算机设备100的外部存储设备,例如计算机设备100上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,存储器102还可以既包括计算机设备100的内部存储单元也包括外部存储设备。存储器102用于存储计算机程序以及计算机设备所需的其他程序和数据。存储器102还可以用于暂时地存储已经输出或者将要输出的数据。

Claims (20)

  1. 一种基于区块链的数据验证方法,其中,所述方法包括:
    获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
    获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
    基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
    将所述验证结果发布至所述区块链进行存证。
  2. 根据权利要求1所述的方法,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,所述第一零知识证据、所述第二零知识证据及所述第一加密数据所使用的加密算法相同;
    根据所述第一零知识证据或所述第二零知识证据证明所述第一加密数据的真实性,得到验证结果。
  3. 根据权利要求1所述的方法,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,所述第二零知识证据、所述第三零知识证据及所述第二加密数据所使用的加密算法相同;
    根据所述第三零知识证据及所述第二零知识证据证明所述第二加密数据的真实性,得到验证结果。
  4. 根据权利要求2或3所述的方法,其中,在所述获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据之前,所述方法包括:
    接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的仓单总价、商品总数,得到包含商品总数的第一加密数据、包含仓单总价的第二加密数据;
    接收所述需求方节点发布的请求,并将所述第一加密数据及第二加密数据上传至所述区块链。
  5. 根据权利要求1所述的方法,其中,在所述将所述验证结果发布至所述区块链进行存证之后,所述方法还包括:
    响应于所述请求,生成目标信息,所述目标信息包括需求方信息及仓单信息;
    将所述目标信息发送至供应方节点,以使所述供应方节点基于所述目标信息生成方案数据,所述供应方节点将所述方案数据发送给所述需求方节点,所述需求方节点基于选中的方案数据确定数值。
  6. 根据权利要求5所述的方法,其中,在所述需求方节点基于选中的方案数据确定数值之后,所述方法还包括:
    接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的数值,得到包含所述数值的第三加密数据;
    获取与所述需求方节点相关的目标零知识证据,所述目标零知识证据来源于所述供应方;
    利用所述目标零知识证据验证所述需求方是否存在重复请求;
    如不存在重复请求,发送审批通知至各个所述供应方节点;
    如存在重复请求,发送预警通知至各个所述供应方节点。
  7. 根据权利要求1所述的方法,其中,所述零知识证据生成器采用椭圆曲线加密算法对数据进行加密处理,得到加密数据。
  8. 一种基于区块链的数据验证装置,其中,所述装置包括:
    第一获取单元,用于获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
    第二获取单元,用于获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
    验证单元,用于基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
    发布单元,用于将所述验证结果发布至所述区块链进行存证。
  9. 一种计算机存储介质,其中,所述存储介质包括存储的程序,在所述程序运行时控制所述存储介质所在设备执行一种基于区块链的数据验证方法,其中所述方法包括:
    获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
    获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
    基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
    将所述验证结果发布至所述区块链进行存证。
  10. 根据权利要求9所述的计算机存储介质,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,所述第一零知识证据、所述第二零知识证据及所述第一加密数据所使用的加密算法相同;
    根据所述第一零知识证据或所述第二零知识证据证明所述第一加密数据的真实性,得到验证结果。
  11. 根据权利要求9所述的计算机存储介质,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,所述第二零知识证据、所述第三零知识证据及所述第二加密数据所使用的加密算法相同;
    根据所述第三零知识证据及所述第二零知识证据证明所述第二加密数据的真实性,得到验证结果。
  12. 根据权利要求10或11所述的计算机存储介质,其中,在所述获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据之前,所述方法包括:
    接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的仓单总价、商品总数,得到包含商品总数的第一加密数据、包含仓单总价的第二加密数据;
    接收所述需求方节点发布的请求,并将所述第一加密数据及第二加密数据上传至所述区块链。
  13. 根据权利要求9所述的计算机存储介质,其中,在所述将所述验证结果发布至所述区块链进行存证之后,所述方法还包括:
    响应于所述请求,生成目标信息,所述目标信息包括需求方信息及仓单信息;
    将所述目标信息发送至供应方节点,以使所述供应方节点基于所述目标信息生成方案数据,所述供应方节点将所述方案数据发送给所述需求方节点,所述需求方节点基于选中的方案数据确定数值。
  14. 根据权利要求13所述的计算机存储介质,其中,在所述需求方节点基于选中的方案数据确定数值之后,所述方法还包括:
    接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的数值,得到包含所述数值的第三加密数据;
    获取与所述需求方节点相关的目标零知识证据,所述目标零知识证据来源于所述供应方;
    利用所述目标零知识证据验证所述需求方是否存在重复请求;
    如不存在重复请求,发送审批通知至各个所述供应方节点;
    如存在重复请求,发送预警通知至各个所述供应方节点。
  15. 根据权利要求9所述的计算机存储介质,其中,所述零知识证据生成器采用椭圆曲线加密算法对数据进行加密处理,得到加密数据。
  16. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现一种基于区块链的数据验证方法:
    获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据;
    获取所述区块链上与所述仓单信息相关联的参与方节点的零知识证据,所述参与方节点包括物流节点、仓储节点、生成商节点;
    基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果;
    将所述验证结果发布至所述区块链进行存证。
  17. 根据权利要求16所述的计算机设备,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含商品总数的第一加密数据、包含商品运输数量的第一零知识证据及包含商品存储数量的第二零知识证据,其中,所述第一零知识证据、所述第二零知识证据及所述第一加密数据所使用的加密算法相同;
    根据所述第一零知识证据或所述第二零知识证据证明所述第一加密数据的真实性,得到验证结果。
  18. 根据权利要求16所述的计算机设备,其中,所述基于所述零知识证据对所述加密数据进行3D零知识证明,验证所述仓单信息的真实性,得到验证结果,包括:
    获取包含仓单总价的第二加密数据、包含商品单价的第三零知识证据及包含商品存储数量的第二零知识证据,其中,所述第二零知识证据、所述第三零知识证据及所述第二加密数据所使用的加密算法相同;
    根据所述第三零知识证据及所述第二零知识证据证明所述第二加密数据的真实性,得到验证结果。
  19. 根据权利要求17或18所述的计算机设备,其中,在所述获取需求方节点在区块链上发布的请求,所述请求携带包含仓单信息的加密数据之前,所述方法包括:
    接收所述需求方节点输入至所述区块链上预设的零知识证据生成器并进行处理的仓单总价、商品总数,得到包含商品总数的第一加密数据、包含仓单总价的第二加密数据;
    接收所述需求方节点发布的请求,并将所述第一加密数据及第二加密数据上传至所述区块链。
  20. 根据权利要求16所述的计算机设备,其中,在所述将所述验证结果发布至所述区块链进行存证之后,所述方法还包括:
    响应于所述请求,生成目标信息,所述目标信息包括需求方信息及仓单信息;
    将所述目标信息发送至供应方节点,以使所述供应方节点基于所述目标信息生成方案数据,所述供应方节点将所述方案数据发送给所述需求方节点,所述需求方节点基于选中的方案数据确定数值。
PCT/CN2020/098825 2020-03-24 2020-06-29 基于区块链的数据验证方法及装置 WO2021189692A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010216924.0 2020-03-24
CN202010216924.0A CN111553792A (zh) 2020-03-24 2020-03-24 基于区块链的数据验证方法及装置

Publications (1)

Publication Number Publication Date
WO2021189692A1 true WO2021189692A1 (zh) 2021-09-30

Family

ID=72007406

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098825 WO2021189692A1 (zh) 2020-03-24 2020-06-29 基于区块链的数据验证方法及装置

Country Status (2)

Country Link
CN (1) CN111553792A (zh)
WO (1) WO2021189692A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338665A (zh) * 2021-12-01 2022-04-12 浪潮软件股份有限公司 基于区块链的申报材料防篡改系统
CN115801285A (zh) * 2022-12-02 2023-03-14 北京国脉互联信息科技有限公司 基于零知识证明的政策申请方法、系统及计算机存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231769A (zh) * 2020-10-29 2021-01-15 深圳壹账通智能科技有限公司 基于区块链的数值验证方法、装置、计算机设备和介质
CN112737923B (zh) * 2020-12-22 2022-12-06 网易(杭州)网络有限公司 电子邮件的处理方法、电子邮件的处理系统
CN112508722B (zh) * 2021-01-29 2021-05-25 支付宝(杭州)信息技术有限公司 一种基于零知识证明的保单信息验证方法和装置
CN113051597B (zh) * 2021-04-21 2023-04-11 深圳壹账通智能科技有限公司 联运提单生成方法、装置、电子设备及存储介质
CN113159682B (zh) * 2021-04-22 2023-05-05 上海卓钢链科技有限公司 一种电子仓单信息联盟链系统
CN113239374B (zh) * 2021-05-11 2024-02-02 中国联合网络通信集团有限公司 资源兑换方法和节点服务器
CN113779147B (zh) * 2021-08-30 2023-11-07 武汉天喻信息产业股份有限公司 一种数据上链与利用方法、装置、设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109035029A (zh) * 2018-07-27 2018-12-18 阿里巴巴集团控股有限公司 基于区块链的资产转移方法及装置、电子设备
CN109242675A (zh) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 基于区块链的资产发布方法及装置、电子设备
CN109413102A (zh) * 2018-12-10 2019-03-01 北京八分量信息科技有限公司 基于零知识证明的注册系统、方法及区块链存证系统
CN109858852A (zh) * 2018-12-26 2019-06-07 上海源庐加佳信息科技有限公司 一种基于区块链与零知识证明的仓单验证方法
KR102000244B1 (ko) * 2019-04-02 2019-07-16 주식회사 한국정보보호경영연구소 형태보존 암호화가 적용된 영지식증명 기반의 블록체인 시스템 및 그의 제어 방법

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301521A (zh) * 2017-06-26 2017-10-27 深圳前海华深安信物联技术有限公司 一种基于区块链的仓单系统中加强仓单交易安全性的方法
CN108418689B (zh) * 2017-11-30 2020-07-10 矩阵元技术(深圳)有限公司 一种适合区块链隐私保护的零知识证明方法和介质
CN109493042A (zh) * 2018-10-24 2019-03-19 南京邮电大学 一种拥有访问控制功能的智能合约可信存证方法和系统
CN109559224B (zh) * 2018-10-26 2020-05-05 阿里巴巴集团控股有限公司 征信评估方法及装置、电子设备
CN110223063B (zh) * 2019-05-07 2023-06-20 平安科技(深圳)有限公司 基于零知识证明的供应链数据管理方法及装置
CN110232575A (zh) * 2019-05-13 2019-09-13 平安科技(深圳)有限公司 一种基于区块链技术的商品溯源方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109035029A (zh) * 2018-07-27 2018-12-18 阿里巴巴集团控股有限公司 基于区块链的资产转移方法及装置、电子设备
CN109242675A (zh) * 2018-07-27 2019-01-18 阿里巴巴集团控股有限公司 基于区块链的资产发布方法及装置、电子设备
CN109413102A (zh) * 2018-12-10 2019-03-01 北京八分量信息科技有限公司 基于零知识证明的注册系统、方法及区块链存证系统
CN109858852A (zh) * 2018-12-26 2019-06-07 上海源庐加佳信息科技有限公司 一种基于区块链与零知识证明的仓单验证方法
KR102000244B1 (ko) * 2019-04-02 2019-07-16 주식회사 한국정보보호경영연구소 형태보존 암호화가 적용된 영지식증명 기반의 블록체인 시스템 및 그의 제어 방법

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114338665A (zh) * 2021-12-01 2022-04-12 浪潮软件股份有限公司 基于区块链的申报材料防篡改系统
CN115801285A (zh) * 2022-12-02 2023-03-14 北京国脉互联信息科技有限公司 基于零知识证明的政策申请方法、系统及计算机存储介质
CN115801285B (zh) * 2022-12-02 2023-07-21 北京国脉互联信息科技有限公司 基于零知识证明的政策申请方法、系统及计算机存储介质

Also Published As

Publication number Publication date
CN111553792A (zh) 2020-08-18

Similar Documents

Publication Publication Date Title
WO2021189692A1 (zh) 基于区块链的数据验证方法及装置
US20220263671A1 (en) Data processing method, apparatus, and device, blockchain system, and computer-readable storage medium
EP3741082B1 (en) Proof chaining and decomposition
EP3602956B1 (en) Cross-asset trading within blockchain networks
US20210126797A1 (en) Blockchain-based consensus process
US11144918B2 (en) Method, apparatus and electronic device for blockchain transactions
CN107274139B (zh) 仓单数据管理方法和计算机可读介质
EP3616356B1 (en) Preventing misrepresentation of input data by participants in a secure multi-party computation
WO2019144612A1 (zh) 基于区块链的零知识多账本兑换转账方法、装置及存储介质
Jiang et al. A privacy-preserving e-commerce system based on the blockchain technology
CN109359974A (zh) 区块链交易方法及装置、电子设备
CN116561789B (zh) 隐私数据的处理方法、装置、电子设备及可读存储介质
US20240211937A1 (en) System and method for securing crypto-asset transactions
CN111815308A (zh) 基于区块链的贸易数据处理方法及其相关设备
WO2020143343A1 (zh) 基于区块链架构的仓单交易协同方法及装置
Kaur et al. Blockchain technology for convergence: an overview, applications, and challenges
US20240169388A1 (en) Generating a Tokenized Reputation Score
US11900337B1 (en) Distributed ledger receipt wallet system and method
CN114629663B (zh) 基于区块链的数字商品交易方法及装置
Shih et al. A secure multi-item e-auction mechanism with bid privacy
US11430061B2 (en) Dynamic multi-party message reporting system
Henry et al. Towards trustworthy and privacy-preserving decentralized auctions
Chenli et al. Fair 2 Trade: Digital Trading Platform Ensuring Exchange and Distribution Fairness
US20230419285A1 (en) NFT Enforcement Control System
Tan et al. A Study on Privacy Protection of Cross-Chain Transactions Based on Improved Notary Mechanisms

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: 20927053

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: 20927053

Country of ref document: EP

Kind code of ref document: A1