WO2020134653A1 - 一种电子凭证上传的方法及装置 - Google Patents

一种电子凭证上传的方法及装置 Download PDF

Info

Publication number
WO2020134653A1
WO2020134653A1 PCT/CN2019/117271 CN2019117271W WO2020134653A1 WO 2020134653 A1 WO2020134653 A1 WO 2020134653A1 CN 2019117271 W CN2019117271 W CN 2019117271W WO 2020134653 A1 WO2020134653 A1 WO 2020134653A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
end terminal
hash value
electronic
signature information
Prior art date
Application number
PCT/CN2019/117271
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 WO2020134653A1 publication Critical patent/WO2020134653A1/zh

Links

Images

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • 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

Definitions

  • Embodiments of the present invention relate to the field of blockchain technology, and in particular, to a method and device for uploading electronic credentials.
  • each acquiring institution hashes the electronic purchase order, stores the hash value on a distributed ledger, and other institutions obtain the hash of the electronic bill from the distributed ledger. , Compare with the electronic bill to determine the authenticity and integrity of the electronic purchase order. But for non-bank acquirers, there may be data fraud.
  • Embodiments of the present invention provide an electronic voucher uploading method and device, which are used to solve the problem of falsification of uploaded information by a third-party acquirer.
  • the front-end terminal obtains an electronic certificate
  • the front-end terminal performs hash processing on the electronic certificate to determine a hash value of the electronic certificate
  • the front-end terminal determines signature information according to the front-end terminal's private key, merchant number, terminal number and hash value of the electronic certificate;
  • the front-end terminal uploads the merchant number and terminal number of the front-end terminal, the hash value of the electronic voucher and the signature information to the blockchain node, so that the blockchain node After the signature information is verified, it is registered in the blockchain network.
  • the front-end terminal directly processes the electronic voucher and uploads it to the blockchain network, which solves the problem that the electronic voucher tampering occurs when the front-end terminal uploads the electronic voucher to the blockchain through the background terminal in the prior art.
  • the problem is that the electronic voucher tampering occurs when the front-end terminal uploads the electronic voucher to the blockchain through the background terminal in the prior art.
  • the front-end terminal determines signature information according to the front-end terminal's private key, merchant number, terminal number, and hash value of the electronic certificate, including:
  • the front-end terminal uses the private key of the front-end terminal to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic certificate to determine the signature information.
  • the front-end terminal determines signature information according to the front-end terminal's private key, merchant number, terminal number, and hash value of the electronic certificate, including:
  • the front-end terminal signs the merchant number and terminal number of the front-end terminal and the hash value of the electronic voucher using an elliptic curve digital signature ECDSA algorithm through the private key of the front-end terminal to determine the signature information.
  • an embodiment of the present invention also provides a method for uploading electronic credentials, including:
  • the blockchain node obtains the transaction information sent by the front-end terminal, the transaction information includes the hash value of the electronic voucher, the merchant number and terminal number of the front-end terminal, and signature information; the hash value of the electronic voucher is The front-end terminal determines after hashing the electronic voucher; the signature information is the hash value of the front-end terminal to the electronic voucher according to the private key of the front-end terminal, the front end The merchant number and terminal number of the terminal are determined after processing;
  • the blockchain node determines the public key of the front-end terminal according to the merchant number and terminal number of the front-end terminal;
  • the blockchain node verifies the signature information according to the public key of the front-end terminal, and registers the hash value of the electronic voucher to the blockchain network after verification and consensus of other blockchain nodes in.
  • an embodiment of the present invention also provides an electronic voucher uploading device, including:
  • Communication module used to obtain electronic credentials
  • Upload pre-processing module for hashing the electronic voucher to determine the hash value of the electronic voucher; according to the private key of the front-end terminal, merchant number, terminal number and the electronic voucher Hope to determine the signature information; upload the merchant number and terminal number of the front-end terminal, the hash value of the electronic certificate and the signature information to the blockchain node, so that the blockchain node After verifying the signature information, it is registered in the blockchain network.
  • the upload preprocessing module is specifically used to:
  • the upload preprocessing module is specifically used to:
  • the elliptic curve digital signature ECDSA algorithm is used to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic voucher through the private key of the front-end terminal to determine the signature information.
  • an embodiment of the present invention also provides an electronic voucher uploading device, including:
  • An obtaining module used to obtain the transaction information sent by the front terminal, the transaction information includes the hash value of the electronic voucher, the merchant number and terminal number of the front terminal, and signature information; the hash value of the electronic voucher is The front-end terminal determines the hash value of the electronic voucher after hashing it; the signature information is the hash value of the front-end terminal to the electronic voucher according to the private key of the front-end terminal, the front end The merchant number and terminal number of the terminal are determined after processing;
  • a processing module configured to determine the public key of the front-end terminal based on the merchant number and terminal number of the front-end terminal; and verify the signature information based on the public key of the front-end terminal and verify the signature information After consensus with other blockchain nodes, the hash value of the electronic certificate is registered in the blockchain network.
  • an embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to perform the above-mentioned electronic credential uploading method.
  • an embodiment of the present invention also provides a computing device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory and execute the above method of uploading electronic credentials according to the obtained program.
  • an embodiment of the present invention also provides a front-end terminal, including: a processor, a memory, a transceiver, and a bus interface, where the processor, the memory, and the transceiver are connected by a bus interface;
  • the processor is configured to read the program in the memory and perform the following methods: obtain an electronic certificate; perform hash processing on the electronic certificate to determine a hash value of the electronic certificate; according to the preamble The private key of the terminal, the merchant number, the terminal number and the hash value of the electronic certificate determine the signature information;
  • the memory is used to store one or more executable programs, and can store data used by the processor when performing operations;
  • the transceiver is used to upload the merchant number and terminal number of the front terminal, the hash value of the electronic voucher and the signature information to a blockchain node under the control of the processor, so that After verifying the signature information, the blockchain node is registered in the blockchain network;
  • the bus interface is used to provide an interface.
  • an embodiment of the present invention also provides a blockchain node, including: a processor, a memory, a transceiver, and a bus interface, where the processor, the memory, and the transceiver are connected by a bus interface;
  • the transceiver is used to obtain the transaction information sent by the front terminal under the control of the processor, the transaction information includes a hash value of the electronic voucher, the merchant number and terminal number of the front terminal, and signature information ;
  • the hash value of the electronic voucher is determined by the front-end terminal hashing the electronic voucher;
  • the signature information is the front-end terminal according to the private key of the front-end terminal to the The hash value of the electronic certificate, the merchant number and the terminal number of the front terminal are determined after processing;
  • the processor is configured to read the program in the memory and execute the following method: determine the public key of the front-end terminal according to the merchant number and terminal number of the front-end terminal; and according to the front-end
  • the public key of the terminal verifies the signature information, and after the verification is passed and the consensus of other blockchain nodes, the hash value of the electronic certificate is registered in the blockchain network.
  • the memory is used to store one or more executable programs, and can store data used by the processor when performing operations;
  • the bus interface is used to provide an interface.
  • FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for uploading electronic credentials provided by an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a smart contract in a blockchain network provided by an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a system architecture provided by an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an electronic voucher uploading device according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an electronic voucher uploading device according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a front-end terminal according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a blockchain node according to an embodiment of the present invention.
  • FIG. 1 is a system architecture applicable to an embodiment of the present invention.
  • the system architecture may include a front-end terminal 100 and a blockchain network system 200.
  • the front-end terminal 100 may be a payment terminal or a bank card acceptance terminal, such as a POS machine. It can also be other hand-held terminals, such as tax-controlled cash registers of taxation departments, hand-held terminals of couriers, etc. It may include a communication unit 110 and an upload pre-processing unit 120, where the communication unit 110 is used to send the generated electronic voucher to the background acquiring terminal. The upload pre-processing unit 120 is used to process the electronic certificate and upload it to the blockchain network system 200.
  • the blockchain network system 200 is composed of multiple blockchain nodes 210. After receiving the electronic voucher sent by the front-end terminal 100, the blockchain node 210 needs to verify it and register with the blockchain after the verification is passed In the network.
  • FIG. 1 the structure shown in FIG. 1 above is just an example, which is not limited by the embodiment of the present invention.
  • FIG. 2 exemplarily shows a flow of a method for uploading electronic credentials provided by an embodiment of the present invention, and the flow may be executed by an apparatus for uploading electronic credentials.
  • the process of uploading the electronic voucher will be described below through the interaction between the front-end terminal and blockchain nodes.
  • the process specifically includes:
  • Step 201 The front-end terminal obtains an electronic certificate, performs hash processing on the electronic certificate, and determines a hash value of the electronic certificate.
  • the front-end terminal Before step 201, the front-end terminal needs to be registered on the blockchain network platform, that is, the merchant number, terminal number and public key of the front-end terminal are registered on the blockchain network platform.
  • the front-end terminal generates an electronic voucher.
  • the electronic voucher may be an electronic purchase order, an electronic invoice, an electronic waybill, etc. There is no restriction on this, and all electronic documents can be used as an electronic voucher in the present invention Examples.
  • the front-end terminal After the front-end terminal generates the electronic voucher, it can call the communication module to send the electronic voucher to the back-end system for storage by the back-end system.
  • the upload preprocessing module is called to hash the electronic voucher to obtain the hash value of the electronic voucher, that is, the hash value of the electronic screen.
  • Step 202 The front-end terminal determines signature information according to the front-end terminal's private key, merchant number, terminal number, and hash value of the electronic certificate.
  • the front-end terminal can use its own private key to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic certificate to determine the signature information.
  • the ECDSA algorithm can be used for signature.
  • Step 203 the front-end terminal sends transaction information to the blockchain node.
  • the front-end terminal sends the hash value, merchant number, terminal number and signature information of the electronic certificate to the blockchain node as transaction information for verification by the blockchain node.
  • the front-end terminal uploads the transaction information
  • it can be directly uploaded through the upload preprocessing module, or it can be uploaded through the blockchain middleware service, such as the web-service service.
  • Step 204 The blockchain node determines the public key of the front terminal according to the merchant number and terminal number of the front terminal, verifies the signature information according to the public key of the front terminal, and After verification and consensus of other blockchain nodes, the hash value of the electronic certificate is registered in the blockchain network.
  • the blockchain node After receiving the hash value of the electronic voucher sent by the front-end terminal, the merchant number and terminal number of the front-end terminal, and signature information, the blockchain node can determine the front-end based on the merchant number and terminal number of the front-end terminal The public key of the terminal. The public key of the front-end terminal has been registered on the blockchain network platform. Therefore, the blockchain node can query from the blockchain network platform according to the merchant number and terminal number of the front-end terminal.
  • the smart contract running on each blockchain node in the blockchain website verifies the relevant information of the uploaded electronic certificate, mainly by finding the public key corresponding to the front terminal through the merchant number and terminal number, and then using the public key to sign Information verification. If the verification is passed, the hash value of the electronic certificate is registered in the blockchain network.
  • FIG. 3 is a system architecture of an electronic purchase order uploading device based on a traditional POS machine.
  • the system architecture may include a communication module, an acquiring application, a security kernel, a card reader interface module, an upload preprocessing module, and certificate management.
  • FIG. 4 is a system architecture of an electronic signing order uploading device based on a smart POS machine.
  • the system architecture may include an application processing system and a security processing system, where the application processing system includes a communication layer, an acquiring application, an upload preprocessing module, and an interface Layer; security processing system includes interface layer, security kernel, certificate management and card reader interface module.
  • This POS machine can also be called a bank card acceptance terminal.
  • the structure shown in FIG. 3 and FIG. 4 has an additional upload pre-processing module.
  • the upload pre-processing module can realize hash calculation and signature processing, as well as upload the blockchain function.
  • Hash is to hash the electronic purchase order generated by the POS terminal acquiring application
  • signature is to call the certificate management module of the POS terminal system service layer to obtain the private key to sign the upload information.
  • the information interaction process in the embodiment of the present invention may be as shown in FIG. 5, specifically:
  • the embodiment of the present invention uses Ethereum as a blockchain network platform for electronic vouchers, on which smart contracts of electronic vouchers are deployed, and the functions of registering POS machine information, hashing the hash value of the electronic purchase order, and chaining are implemented in solidity language.
  • the POS machine uses a smart POS terminal to transform it.
  • a pair of public and private keys is added to the certificate management module of its security processing system, and an upload preprocessing module is added to the application processing system of the POS machine.
  • the module implements the SHA-256 hash algorithm , And ECDSA signature algorithm.
  • the steps for uploading the information of the electronic purchase order are as follows:
  • the acquirer first calls the POS machine information registration contract to register the POS machine's merchant number, terminal number, and public key on the electronic voucher blockchain platform;
  • the acquiring application module of the POS machine generates an electronic signing order, calls the communication module and sends it to the acquiring background system of the acquiring institution.
  • the upload preprocessing module obtains the electronic signing order from the acquiring application module, and uses the SHA-256 algorithm to hash the electronic signing order to obtain a hash value.
  • the upload preprocessing module calls the private key from the secure processing system and uses the ECDSA algorithm to sign the hash value, merchant number, and terminal number of the electronic signing order.
  • the upload preprocessing module calls the communication module to send the hash value, merchant number, terminal number, and signature information of the electronic signing order to the Ethereum network in grpc format.
  • the accounting node in the Ethereum network executes an electronic certificate smart contract.
  • the contract finds the public key of the POS machine from the POS machine information registration contract through the merchant number and terminal number, and then the public key verifies the signature.
  • the other nodes use the same operations in steps 6 and 7 to execute the smart contract. If the results are consistent, the consensus is completed, and the hash value of the electronic purchase order is registered on the blockchain.
  • Users of the electronic voucher blockchain platform can verify the electronic signing order by calling the hash value of the electronic signing order.
  • FIG. 6 shows the steps performed on the blockchain platform side in scenario 1, which includes a POS machine registration contract and an electronic voucher contract.
  • POS machine registration contract we must first obtain registration information such as the merchant number, terminal number, and public key from the transaction. Then write the registration information into the state, and finally the formula is completed.
  • the first is to obtain the hash value, merchant number, terminal number and signature of the electronic purchase order from the transaction, and then obtain the POS machine public key based on the merchant number and terminal number, and use the ECDSA algorithm to verify the signature. If the verification is passed, the hash value of the electronic signing order is written into the state, and finally the consensus is completed.
  • the upload pre-processing module is implemented in software or hardware, and the communication protocol adopts other communication protocols, which are encrypted during transmission.
  • the public-private key pair of the POS machine is not managed by the certificate management module, but is managed by the pre-processing module itself.
  • the front-end terminal is a tax-controlled cash register, and the electronic voucher is an electronic invoice.
  • the embodiment of the present invention uses Ethereum as an electronic voucher blockchain platform, on which the smart contract of electronic vouchers is deployed, and the functions of registering tax control cash register information, electronic invoice hash value verification, and on-chain are implemented in solidity language.
  • the tax-controlled cash register adopts a tax-controlled cash register that complies with national standards. Its architecture is shown in Figure 7. Add electronic invoice information upload preprocessing logic to the MCU module of the tax control cash register.
  • the upload preprocessing logic has the following functions:
  • Hash hash the generated electronic invoice.
  • Its core process includes:
  • the first step need to upload information to the tax-controlled cash register on the blockchain-based electronic voucher platform, first register on the electronic voucher platform, that is, the taxpayer's tax number, terminal number and public key of the tax-controlled cash register The information is registered on the electronic voucher platform.
  • the second step the tax-controlled cash register generates an electronic invoice and transfers it to the tax-controlled cash register management system by calling an external communication extension interface.
  • the third step the upload pre-processing module of the tax-controlled cash register hashes the electronic invoice to generate a hash value.
  • the fourth step the upload preprocessing module of the tax control cash register calls the private key of the tax control card to sign the hash value generated in the previous step together with the sales party's tax number, terminal number, and time stamp.
  • Step 5 Upload preprocessing module calls the communication module to directly upload the hash value, sales party tax number, terminal number, time stamp and signature information or upload it to the electronic voucher blockchain platform through the blockchain middleware service.
  • the sixth step the consensus of the electronic voucher blockchain platform, that is, the smart contract running on each node verifies the relevant information of the uploaded electronic invoice: find the public key corresponding to the tax control cash register through the sales party's tax number and terminal number, Then use the public key to verify the signature information.
  • Step 7 Pass the verification, then register the hash value of the electronic invoice in the blockchain state.
  • the front-end terminal is the hand-held terminal of the courier, and the electronic voucher is the electronic waybill.
  • the embodiment of the present invention uses Ethereum as an electronic voucher blockchain platform, on which the smart contract of electronic vouchers is deployed, and the functions of receiving handheld terminal information, electronic waybill hash value verification, and on-chain are implemented in solidity language.
  • the terminal uses a hand-held terminal for express delivery.
  • the upload pre-processing logic has the following functions:
  • Hash Hash the generated electronic waybill.
  • Its core process includes:
  • the first step the handheld terminal that needs to upload information to the electronic waybill based on the blockchain-based electronic voucher platform, first register on the electronic voucher platform, that is, the information of the express company, terminal number and public key of the handheld terminal will be registered to the electronic Credential platform.
  • the second step the courier handheld terminal scans the courier note to generate an electronic waybill, calls the communication module and sends it to the back-end system of the courier company.
  • Step 3 The upload pre-processing module of the hand-held terminal of the express expresses the electronic waybill to generate a hash value.
  • the fourth step the upload preprocessing module of the express hand-held terminal calls the private key of the underlying security module to sign the hash value generated in the previous step together with the express company information, terminal number, and time stamp.
  • Step 5 Upload preprocessing module calls the communication module to upload the hash value, express company information, terminal number, time stamp and signature information directly or through the blockchain middleware service to the electronic voucher blockchain platform.
  • the sixth step the consensus of the electronic voucher blockchain platform, that is, the smart contract running on each node verifies the information related to the uploaded electronic waybill: find the public key corresponding to the hand-held terminal of the express through the information of the express company and the terminal number, and then use the public Key signature verification.
  • Step 7 Pass the signature verification, then register the hash value of the electronic signing waybill to the blockchain status.
  • the above embodiment shows that the front-end terminal obtains the electronic voucher, performs hash processing on the electronic voucher, and determines the hash value of the electronic voucher, based on the private key, merchant number, terminal number and hash of the electronic voucher Value, determine the signature information, and upload the merchant number and terminal number of the front-end terminal, the hash value and signature information of the electronic certificate to the blockchain node, so that the blockchain node can register to after verifying the signature information.
  • the front-end terminal processes the electronic certificate and uploads it directly to the blockchain network, which solves the problem of tampering with the electronic certificate when the front-end terminal uploads the electronic certificate to the blockchain through the background terminal in the prior art.
  • FIG. 8 exemplarily shows an electronic voucher uploading device provided by an embodiment of the present invention.
  • the device can execute the process of uploading electronic vouchers.
  • the device may be the aforementioned front-end terminal.
  • the device specifically includes:
  • the communication module 801 is used to obtain electronic credentials
  • Upload pre-processing module 802 used to hash the electronic voucher to determine the hash value of the electronic voucher; according to the private key of the front-end terminal, merchant number, terminal number and the electronic voucher Hash value to determine the signature information; upload the merchant number and terminal number of the front-end terminal, the hash value of the electronic certificate and the signature information to the blockchain node, so that the blockchain node After verifying the signature information, it is registered in the blockchain network.
  • the upload preprocessing module 802 is specifically used to:
  • the upload preprocessing module 802 is specifically used to:
  • the elliptic curve digital signature ECDSA algorithm is used to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic voucher through the private key of the front-end terminal to determine the signature information.
  • FIG. 9 exemplarily shows an electronic voucher uploading device provided by an embodiment of the present invention.
  • the device can execute an electronic voucher uploading process.
  • the device may be the aforementioned blockchain node.
  • the device specifically includes:
  • the obtaining module 901 is used to obtain the transaction information sent by the front-end terminal, the transaction information includes the hash value of the electronic voucher, the merchant number and terminal number of the front-end terminal, and signature information; the hash value of the electronic voucher It is determined by the front-end terminal hashing the electronic voucher; the signature information is the hash value of the front-end terminal to the electronic voucher according to the private key of the front-end terminal, the The merchant number and terminal number of the front terminal are determined after processing;
  • the processing module 902 is configured to determine the public key of the front-end terminal according to the merchant number and terminal number of the front-end terminal; and verify the signature information according to the public key of the front-end terminal, and After verification and consensus of other blockchain nodes, the hash value of the electronic certificate is registered in the blockchain network.
  • an embodiment of the present invention also provides a computer-readable storage medium that stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the foregoing electronic How to upload credentials.
  • an embodiment of the present invention also provides a computing device, including:
  • Memory used to store program instructions
  • the processor is configured to call the program instructions stored in the memory and execute the above method of uploading electronic credentials according to the obtained program.
  • an embodiment of the present invention also provides a front-end terminal.
  • the front-end terminal mainly includes: a processor 111, a memory 112, a transceiver 113, and a bus interface 114, in which the processor 111 1.
  • the memory 112 and the transceiver 113 are connected through a bus interface 114;
  • the processor 111 is configured to read the program in the memory 112 and perform the following methods: obtain an electronic certificate; perform hash processing on the electronic certificate to determine a hash value of the electronic certificate; according to the The private key, the merchant number, the terminal number and the hash value of the electronic certificate determine the signature information;
  • the memory 112 is used to store one or more executable programs, and can store data used by the processor 111 when performing operations;
  • the transceiver 113 is used to upload the merchant number and terminal number of the front terminal, the hash value of the electronic voucher and the signature information to the blockchain node under the control of the processor 111, so that the After verifying the signature information, the blockchain node is registered in the blockchain network;
  • the bus interface 114 provides an interface, and the processor is responsible for managing the bus architecture and general processing.
  • the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by the processor 111 and various circuits of the memory represented by the memory 112 are linked together.
  • the bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, and therefore, they will not be further described in this article.
  • the processor 111 is specifically configured to: use the private key of the front-end terminal to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic voucher to determine the signature information .
  • the processor 111 is specifically configured to: use the elliptic curve digital signature ECDSA algorithm to sign the merchant number and terminal number of the front-end terminal and the hash value of the electronic voucher through the private key of the front-end terminal, The signature information is determined.
  • An embodiment of the present invention also provides a blockchain node.
  • the blockchain node mainly includes a processor 121, a memory 122, a transceiver 123, and a bus interface 124, in which the processor 121 and the memory 122 Connected to the transceiver 123 through the bus interface 124;
  • the transceiver 123 is used to obtain the transaction information sent by the front terminal under the control of the processor 121, the transaction information includes the hash value of the electronic voucher, the merchant number and terminal number of the front terminal, and signature information;
  • the hash value of the electronic voucher is determined after the front-end terminal performs hash processing on the electronic voucher;
  • the signature information is that the front-end terminal compares the electronic voucher according to the private key of the front-end terminal
  • the hash value, the merchant number and the terminal number of the front terminal are determined after processing;
  • the processor 121 is configured to read the program in the memory 122 and execute the following method: read the program in the memory 122 and execute the following method: determine the front-end terminal according to the merchant number and terminal number of the front-end terminal The public key of; and the signature information is verified according to the public key of the front-end terminal, and after the verification is passed and the consensus of other blockchain nodes is registered, the hash value of the electronic certificate is registered in the blockchain network ;
  • the memory 122 is used to store one or more executable programs, and can store data used by the processor 121 when performing operations;
  • the bus interface 124 provides an interface, and the processor is responsible for managing the bus architecture and general processing.
  • the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by the processor 121 and various circuits of the memory represented by the memory 122 are linked together.
  • the bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, etc., which are well known in the art, and therefore, they will not be further described in this article.
  • each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions.
  • These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processing machine, or other programmable data processing device to produce a machine that enables the generation of instructions executed by the processor of the computer or other programmable data processing device
  • These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instructions
  • the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device
  • the instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Development Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种电子凭证上传的方法及装置,该方法包括前置终端获取电子凭证,对电子凭证进行哈希处理,确定出电子凭证的哈希值,根据所述前置终端的私钥、商户号、终端号和电子凭证的哈希值,确定出签名信息,将前置终端的商户号和终端号、电子凭证的哈希值和签名信息上传至区块链节点,以使区块链节点在对签名信息进行验证后,登记到区块链网络中。前置终端通过对电子凭证进行处理后直接上传到区块链网络中,解决了现有技术中前置终端将电子凭证通过后台终端上传至区块链时会产生电子凭证篡改的问题。

Description

一种电子凭证上传的方法及装置
相关申请的交叉引用
本申请要求在2018年12月26日提交中国专利局、申请号为201811604746.8、申请名称为“一种电子凭证上传的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及区块链技术领域,尤其涉及一种电子凭证上传的方法及装置。
背景技术
在基于区块链的电子凭证项目中,各个收单机构把电子签购单进行哈希,把哈希值存储与分布式账本上进行存证,其他机构从分布式账本获取电子票据的哈希,与电子票据进行比较,确定电子签购单的真实性和完整性。但对于非银行的收单机构,可能存在数据造假的情况。
发明内容
本发明实施例提供一种电子凭证上传的方法及装置,用以解决第三方收单机构上传信息造假的问题。
本发明实施例提供的一种电子凭证上传的方法,包括:
前置终端获取电子凭证;
所述前置终端对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;
所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;
所述前置终端将所述前置终端的商户号和终端号、所述电子凭证的哈希 值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中。
上述技术方案中,前置终端通过对电子凭证进行处理后直接上传到区块链网络中,解决了现有技术中前置终端将电子凭证通过后台终端上传至区块链时会产生电子凭证篡改的问题。
可选的,所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息,包括:
所述前置终端使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
可选的,所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息,包括:
所述前置终端通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
相应的,本发明实施例还提供了一种电子凭证上传的方法,包括:
区块链节点获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
所述区块链节点根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;
所述区块链节点根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
相应的,本发明实施例还提供了一种电子凭证上传的装置,包括:
通信模块,用于获取电子凭证;
上传预处理模块,用于对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中。
可选的,所述上传预处理模块具体用于:
使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
可选的,所述上传预处理模块具体用于:
通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
相应的,本发明实施例还提供了一种电子凭证上传的装置,包括:
获取模块,用于获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
处理模块,用于根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
相应的,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述电子凭证上传的方法。
相应的,本发明实施例还提供了一种计算设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述电子凭证上传的方法。
相应的,本发明实施例还提供了一种前置终端,包括:处理器、存储器、收发机、总线接口,其中处理器、存储器与收发机之间通过总线接口连接;
所述处理器,用于读取所述存储器中的程序,执行下列方法:获取电子凭证;对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;
所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据;
所述收发机,用于在所述处理器的控制下将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中;
所述总线接口,用于提供接口。
相应的,本发明实施例还提供了一种区块链节点,包括:处理器、存储器、收发机、总线接口,其中处理器、存储器与收发机之间通过总线接口连接;
所述收发机,用于在所述处理器的控制下获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
所述处理器,用于读取所述存储器中的程序,执行下列方法:根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在 执行操作时所使用的数据;
所述总线接口,用于提供接口。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构的示意图;
图2为本发明实施例提供的一种电子凭证上传的方法的流程示意图;
图3为本发明实施例提供的一种系统架构的示意图;
图4为本发明实施例提供的一种系统架构的示意图;
图5为本发明实施例提供的一种系统架构的示意图;
图6为本发明实施例提供的一种区块链网络中智能合约的示意图;
图7为本发明实施例提供的一种系统架构的示意图;
图8为本发明实施例提供的一种电子凭证上传的装置的结构示意图;
图9为本发明实施例提供的一种电子凭证上传的装置的结构示意图;
图10为本发明实施例提供的一种前置终端的结构示意图;
图11为本发明实施例提供的一种区块链节点的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
图1为本发明实施例所适用的系统架构。参考图1所示,该系统架构可以包括前置终端100和区块链网络系统200。
该前置终端100可以为收款终端,也可以称为银行卡受理终端,如POS机。也可以为其它的手持终端,如税务部门的税控收款机、快递员的手持终端等。其可以包括通信单元110和上传预处理单元120,其中,通信单元110用于将产生的电子凭证发送给后台收单终端。上传预处理单元120用于对电子凭证进行处理后上传至区块链网络系统200。
该区块链网络系统200由多个区块链节点210组成,区块链节点210在接收到前置终端100发送的电子凭证后要对其进行验证,并在验证通过后登记到区块链网络中。
需要说明的是,上述图1所示的结构仅是一种示例,本发明实施例对此不做限定。
基于上述描述,图2示例性的示出了本发明实施例提供的一种电子凭证上传的方法的流程,该流程可以由电子凭证上传的装置执行。下面将通过前置终端与区块链节点交互的方式来描述该电子凭证上传的流程。
如图2所示,该流程具体包括:
步骤201,前置终端获取电子凭证,对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值。
在步骤201之前,前置终端和需要先在区块链网络平台上进行注册,即为将前置终端的商户号、终端号和公钥登记到区块链网络平台上。
然后,前置终端生成电子凭证,在本发明实施例中,电子凭证可以为电子签购单、电子发票、电子运单等,对此不做限制,一切电子单据都可以作为电子凭证应用在本发明实施例中。
前置终端生成电子凭证后,可以调用通信模块先将该电子凭证发送到后台系统,以供后台系统进行存储。
然后调用上传预处理模块对该电子凭证进行哈希处理,得到该电子凭证的哈希值,也就是该电子屏的散列值。
步骤202,前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息。
前置终端可以对使用自身的私钥,对前置终端的商户号和终端号以及电子凭证的哈希值进行签名,确定出签名信息。具体的,可以使用ECDSA算法进行签名。
步骤203,前置终端向区块链节点发送交易信息。
前置终端将该电子凭证的哈希值、商户号、终端号以及签名信息作为交易信息发送给区块链节点,以供区块链节点进行验证。
前置终端在将交易信息进行上传时,可以通过上传预处理模块直接上传,也可以通过区块链中间件服务进行上传,例如web-service服务。
步骤204,区块链节点根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥,根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
区块链节点在接收到前置终端发送的电子凭证的哈希值、前置终端的商户号和终端号、签名信息之后,就可以根据前置终端的商户号和终端号,确定出前置终端的公钥。该前置终端的公钥已经在区块链网络平台上进行了注册,因此,区块链节点可以根据前置终端的商户号和终端号从区块链网络平台中进行查询。
查询到前置终端的公钥之后,就可以根据前置终端的公钥对签名信息进行验证,并在验证通过以及其它区块链节点共识之后将电子凭证的哈希值登记到区块链网络中。区块链网站中的各个区块链节点上运行的智能合约对上传的电子凭证的相关信息进行验证,主要是通过商户号和终端号找到前置终端对应的公钥,然后用公钥对签名信息验签。验签通过,则将电子凭证的哈希值登记到区块链网络中。
为了更好的解释本发明实施例,下面将通过具体的实施场景来描述电子凭证上传的流程。
场景一
前置终端为POS机时,此时POS机的结构可以如图3和图4所示的结构。其中,图3为基于传统POS机的电子签购单上传装置的系统架构,该系统架构可以包括通讯模块、收单应用、安全内核、读卡器接口模块、上传预处理模块和证书管理。图4为基于智能POS机的电子签购单上传装置的系统架构,该系统架构可以包括应用处理系统和安全处理系统,其中,应用处理系统包括通讯层、收单应用、上传预处理模块和接口层;安全处理系统包括接口层、安全内核、证书管理和读卡器接口模块。该POS机也可以称为银行卡受理终端。相比于现有的POS机,图3和图4所示结构多出了上传预处理模块,该上传预处理模块可以实现哈希计算和签名处理,以及上传区块链的功能。哈希是对POS终端收单应用生成的电子签购单进行哈希,签名是调用POS终端系统服务层的证书管理模块获取私钥对上传信息进行签名。
本发明实施例的信息交互流程可以如图5所示,具体的:
本发明实施例采用以太坊作为电子凭证的区块链网络平台,其上部署电子凭证的智能合约,采用solidity语言实现登记POS机信息、电子签购单哈希值验签、上链等功能。
POS机采用智能POS终端,对其进行改造,在其安全处理系统的证书管理模块添加一对公私钥,并在POS机的应用处理系统上添加上传预处理模块,模块实现SHA-256哈希算法,以及ECDSA签名算法。
电子签购单信息上传的步骤如下:
1、收单机构首先调用POS机信息登记合约,将POS机的商户号、终端号、公钥登记到电子凭证区块链平台上;
2、POS机的收单应用模块生成一个电子签购单,调用通信模块发送到收单机构的收单后台系统。
3、同时,上传预处理模块从收单应用模块获取电子签购单,采用SHA-256算法对电子签购单进行哈希,得到哈希值。
4、上传预处理模块从安全处理系统中调用私钥采用ECDSA算法对电子 签购单散列值、商户号、终端号进行签名。
5、上传预处理模块调用通信模块将电子签购单散列值、商户号、终端号、签名信息以grpc格式发送到以太坊网络。
6、以太坊网络中的记账节点执行电子凭证智能合约,合约通过商户号和终端号从POS机信息登记合约中查到此POS机的公钥,然后公钥对签名进行验证。
7、如果签名验证通过,则将电子签购单的散列值登记到以太坊的状态中。
8、其他节点采用6、7步相同的操作执行智能合约,如果结果一致,则共识完成,电子签购单的散列值则登记到区块链上。
9、电子凭证区块链平台的用户可以通过调用电子签购单的哈希值对电子签购单进行验证。
需要说明的是,图6示出了场景一中区块链平台侧执行的步骤,其中,包括POS机登记合约和电子凭证合约。在POS机登记合约中,首先要从交易中获取商户号、终端号、公钥等登记信息。然后将登记信息写入状态,最后公式完成。
在电子凭证合约中,首先是从交易中获取电子签购单散列值、商户号、终端号和签名,然后根据商户号、终端号获取POS机公钥,采用ECDSA算法对签名进行验证,若验证通过,则将电子签购单的散列值写入状态,最后共识完成。
需要说明的是,对实施例的以下修改也属于本发明实施例保护的范围:
1、采用其他区块链平台,或将POS登记智能合约与电子凭证合约合并。
2、采用其他哈希方法或签名方法。
3、上传预处理模块采用软件实现或硬件实现,通信协议采用其他通信协议,在传输过程中进行加密。
4、上链是通过调用中间件服务。
5、POS机的公私钥对不是有证书管理模块管理,而是预处理模块自己管理。
6、不是通过商户号和终端号确定一台POS机,而是通过POS的标识。
场景二
前置终端为税控收款机,电子凭证为电子发票。
本发明实施例采用以太坊作为电子凭证区块链平台,其上部署电子凭证的智能合约,采用solidity语言实现登记税控收款机信息、电子发票哈希值验签、上链等功能。
税控收款机采用符合国家标准的税控收款机,其架构图如图7所示。在税控收款机的MCU模块添加电子发票信息上传预处理逻辑,上传预处理逻辑具备以下功能:
1、哈希:对生成的电子发票进行哈希。
2、签名:通过私钥对上传的信息进行签名。
其核心流程包括:
第一步:需要上传信息到基于区块链的电子凭证平台的税控收款机,先在电子凭证平台上进行注册,即将税控收款机的销方纳税号、终端号和公钥等信息登记到电子凭证平台上。
第二步:税控收款机生成电子发票,调用外部通信扩展接口发送到税控收款机管理系统。
第三步:税控收款机的上传预处理模块对电子发票进行哈希生成散列值。
第四步:税控收款机的上传预处理模块调用税控卡的私钥对上一步生成的散列值连同销方税号、终端号、时间戳进行签名。
第五步:上传预处理模块调用通信模块将散列值、销方税号、终端号、时间戳和签名信息直接上传或者通过区块链中间件服务上传到电子凭证区块链平台上。
第六步:电子凭证区块链平台进行共识,即各个节点上运行的智能合约对上传的电子发票相关信息进行验证:通过销方税号和终端号找到税控收款机对应的公钥,然后用公钥对签名信息验签。
第七步:验签通过,则将电子发票的散列值登记到区块链状态中。
场景三
前置终端为快递员的手持终端,电子凭证为电子运单。
本发明实施例采用以太坊作为电子凭证区块链平台,其上部署电子凭证的智能合约,采用solidity语言实现收件手持终端信息、电子运单哈希值验签、上链等功能。
终端采用快递收件的手持终端。在税控收款机的添加电子运单信息上传预处理逻辑并在底层安全模块灌入私钥,上传预处理逻辑具备以下功能:
1.哈希:对生成的电子运单进行哈希。
2.签名:通过私钥对上传的信息进行签名。
其核心流程包括:
第一步:需要上传信息到基于区块链的电子凭证平台的电子运单的手持终端,先在电子凭证平台上进行注册,即将手持终端的快递公司信息、终端号和公钥等信息登记到电子凭证平台上。
第二步:快递手持终端扫描快递单生成电子运单,调用通信模块发送到快递公司后台系统。
第三步:快递手持终端的上传预处理模块对电子运单进行哈希生成散列值。
第四步:快递手持终端的上传预处理模块调用底层安全模块的私钥对上一步生成的散列值连同快递公司信息、终端号、时间戳进行签名。
第五步:上传预处理模块调用通信模块将散列值、快递公司信息、终端号、时间戳和签名信息直接上传或者通过区块链中间件服务上传到电子凭证区块链平台上。
第六步:电子凭证区块链平台进行共识,即各个节点上运行的智能合约对上传的电子运单相关信息进行验证:通过快递公司信息和终端号找到快递手持终端对应的公钥,然后用公钥对签名信息验签。
第七步:验签通过,则将电子签运单的散列值登记到区块链状态中。
上述实施例表明,前置终端获取电子凭证,对电子凭证进行哈希处理, 确定出电子凭证的哈希值,根据所述前置终端的私钥、商户号、终端号和电子凭证的哈希值,确定出签名信息,将前置终端的商户号和终端号、电子凭证的哈希值和签名信息上传至区块链节点,以使区块链节点在对签名信息进行验证后,登记到区块链网络中。前置终端通过对电子凭证进行处理后直接上传到区块链网络中,解决了现有技术中前置终端将电子凭证通过后台终端上传至区块链时会产生电子凭证篡改的问题。
基于相同的技术构思,图8示例性的示出了本发明实施例提供的一种电子凭证上传的装置,该装置可以执行电子凭证上传的流程。该装置可以为上述前置终端。
如图8所示,该装置具体包括:
通信模块801,用于获取电子凭证;
上传预处理模块802,用于对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中。
可选的,所述上传预处理模块802具体用于:
使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
可选的,所述上传预处理模块802具体用于:
通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
基于相同的技术构思,图9示例性的示出了本发明实施例提供的一种电子凭证上传的装置,该装置可以执行电子凭证上传的流程。该装置可以为上述区块链节点。
如图9所示,该装置具体包括:
获取模块901,用于获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
处理模块902,用于根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
基于相同的技术构思,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行上述电子凭证上传的方法。
基于相同的技术构思,本发明实施例还提供了一种计算设备,包括:
存储器,用于存储程序指令;
处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行上述电子凭证上传的方法。
基于相同的原理,本发明实施例还提供了一种前置终端,如图10所示,该前置终端主要包括:处理器111、存储器112,收发机113、总线接口114,其中处理器111、存储器112与收发机113之间通过总线接口114连接;
处理器111,用于读取存储器112中的程序,执行下列方法:获取电子凭证;对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;
存储器112,用于存储一个或多个可执行程序,可以存储处理器111在执行操作时所使用的数据;
收发机113,用于在处理器111的控制下将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区 块链节点在对所述签名信息进行验证后,登记到区块链网络中;
总线接口114提供接口,处理器负责管理总线架构和通常的处理。
其中,在图11中,总线构架可以包括任意数量的互联的总线和桥,具体由处理器111代表的一个或多个处理器和存储器112代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。
优选地,处理器111具体用于:使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
优选地,处理器111具体用于:通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
本发明实施例还提供了一种区块链节点,如图11所示,该区块链节点主要包括:处理器121、存储器122,收发机123、总线接口124,其中处理器121、存储器122与收发机123之间通过总线接口124连接;
收发机123,用于在处理器121的控制下获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
处理器121,用于读取存储器122中的程序,执行下列方法:读取存储器122中的程序,执行下列方法:根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中;
存储器122,用于存储一个或多个可执行程序,可以存储处理器121在执 行操作时所使用的数据;
总线接口124提供接口,处理器负责管理总线架构和通常的处理。
其中,在图11中,总线构架可以包括任意数量的互联的总线和桥,具体由处理器121代表的一个或多个处理器和存储器122代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本 发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (14)

  1. 一种电子凭证上传的方法,其特征在于,包括:
    前置终端获取电子凭证;
    所述前置终端对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;
    所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;
    所述前置终端将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中。
  2. 如权利要求1所述的方法,其特征在于,所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息,包括:
    所述前置终端使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  3. 如权利要求2所述的方法,其特征在于,所述前置终端根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息,包括:
    所述前置终端通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  4. 一种电子凭证上传的方法,其特征在于,包括:
    区块链节点获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前 置终端的商户号和终端号进行处理后确定的;
    所述区块链节点根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;
    所述区块链节点根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
  5. 一种电子凭证上传的装置,其特征在于,包括:
    通信模块,用于获取电子凭证;
    上传预处理模块,用于对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中。
  6. 如权利要求5所述的装置,其特征在于,所述上传预处理模块具体用于:
    使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  7. 如权利要求6所述的装置,其特征在于,所述上传预处理模块具体用于:
    通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  8. 一种电子凭证上传的装置,其特征在于,包括:
    获取模块,用于获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所 述前置终端的商户号和终端号进行处理后确定的;
    处理模块,用于根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中。
  9. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使所述计算机执行如权利要求1至4中任一项所述的方法。
  10. 一种计算设备,其特征在于,包括:
    存储器,用于存储程序指令;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行如权利要求1至4中任一项所述的方法。
  11. 一种前置终端,其特征在于,包括:处理器、存储器、收发机、总线接口,其中处理器、存储器与收发机之间通过总线接口连接;
    所述处理器,用于读取所述存储器中的程序,执行下列方法:获取电子凭证;对所述电子凭证进行哈希处理,确定出所述电子凭证的哈希值;根据所述前置终端的私钥、商户号、终端号和所述电子凭证的哈希值,确定出签名信息;
    所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据;
    所述收发机,用于在所述处理器的控制下将所述前置终端的商户号和终端号、所述电子凭证的哈希值和所述签名信息上传至区块链节点,以使所述区块链节点在对所述签名信息进行验证后,登记到区块链网络中;
    所述总线接口,用于提供接口。
  12. 如权利要求11所述的终端,其特征在于,所述处理器,用于:
    使用所述前置终端的私钥,对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  13. 如权利要求12所述的终端,其特征在于,所述处理器,用于:
    通过所述前置终端的私钥使用椭圆曲线数字签名ECDSA算法对所述前置终端的商户号和终端号以及所述电子凭证的哈希值进行签名,确定出所述签名信息。
  14. 一种区块链节点,其特征在于,包括:处理器、存储器、收发机、总线接口,其中处理器、存储器与收发机之间通过总线接口连接;
    所述收发机,用于在所述处理器的控制下获取前置终端发送的交易信息,所述交易信息包括电子凭证的哈希值、所述前置终端的商户号和终端号、签名信息;所述电子凭证的哈希值是所述前置终端对所述电子凭证进行哈希处理后确定的;所述签名信息是所述前置终端根据所述前置终端的私钥对所述电子凭证的哈希值、所述前置终端的商户号和终端号进行处理后确定的;
    所述处理器,用于读取所述存储器中的程序,执行下列方法:根据所述前置终端的商户号和终端号,确定出所述前置终端的公钥;以及根据所述前置终端的公钥对所述签名信息进行验证,并在验证通过以及其它区块链节点共识之后将所述电子凭证的哈希值登记到区块链网络中;
    所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据;
    所述总线接口,用于提供接口。
PCT/CN2019/117271 2018-12-26 2019-11-11 一种电子凭证上传的方法及装置 WO2020134653A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811604746.8 2018-12-26
CN201811604746.8A CN109741056B (zh) 2018-12-26 2018-12-26 一种电子凭证上传的方法及装置

Publications (1)

Publication Number Publication Date
WO2020134653A1 true WO2020134653A1 (zh) 2020-07-02

Family

ID=66361363

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117271 WO2020134653A1 (zh) 2018-12-26 2019-11-11 一种电子凭证上传的方法及装置

Country Status (3)

Country Link
CN (1) CN109741056B (zh)
TW (1) TWI714359B (zh)
WO (1) WO2020134653A1 (zh)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035896A (zh) * 2020-07-20 2020-12-04 江苏傲为控股有限公司 一种基于交易方式的电子合同存证系统
CN112035893A (zh) * 2020-07-20 2020-12-04 江苏傲为控股有限公司 区块链电子合同管理系统
CN112765622A (zh) * 2021-01-13 2021-05-07 中国外运股份有限公司 一种电子提单的数字证书管理方法、装置、设备及介质
CN113570194A (zh) * 2021-06-28 2021-10-29 北京电链科技有限公司 一种基于区块链的电力施工业务数据处理方法及系统
CN114547641A (zh) * 2022-01-05 2022-05-27 山东浪潮工业互联网产业股份有限公司 一种基于区块链的工业数据追踪方法、装置、设备及介质
CN114666353A (zh) * 2022-03-16 2022-06-24 南京邮电大学 一种基于区块链的电子存取证系统及方法
CN114884672A (zh) * 2022-04-29 2022-08-09 华控清交信息科技(北京)有限公司 一种数据流通网络系统、数据流通消息传输方法及装置
CN118152999A (zh) * 2024-05-11 2024-06-07 深圳中科保泰科技有限公司 数据治理平台及面向数据治理的数据确权方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741056B (zh) * 2018-12-26 2023-06-16 中国银联股份有限公司 一种电子凭证上传的方法及装置
CN110599176B (zh) * 2019-09-24 2024-05-17 腾讯科技(深圳)有限公司 基于区块链的数据处理方法、装置、存储介质及节点设备
CN110766579B (zh) * 2019-10-22 2022-08-02 深圳技术大学 一种基于区块链平台的在线教育管理验证系统及方法
CN111355592B (zh) * 2020-03-03 2022-06-10 泰华智慧产业集团股份有限公司 一种基于区块链的以太坊智能合约电子签章系统及方法
CN111680324B (zh) * 2020-05-28 2023-09-22 中国工商银行股份有限公司 用于区块链的凭证验证方法、管理方法以及签发方法
CN112100142A (zh) * 2020-08-13 2020-12-18 广州汇才创智科技有限公司 基于区块链的数字资产处理方法及系统
CN112787808B (zh) * 2020-12-31 2023-05-02 能链物流科技有限公司 一种共管账户的业务数据处理方法和装置
CN113468549A (zh) * 2021-04-29 2021-10-01 深圳前海移联科技有限公司 基于区块链的加密信息存证的检索方法、系统及电子设备
CN114172890B (zh) * 2021-11-03 2024-02-27 阿里巴巴(中国)有限公司 文件秒传处理方法、装置、存储介质及电子设备
CN115277716A (zh) * 2022-06-21 2022-11-01 芯安微众(上海)微电子技术有限公司 一种支持区块链的车联网终端

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180083786A1 (en) * 2016-09-22 2018-03-22 Google Inc. Methods and systems of performing tamper-evident logging using block lattices
CN109034921A (zh) * 2018-07-13 2018-12-18 江苏恒宝智能系统技术有限公司 一种基于区块链的电子凭证管理方法及系统
CN109741056A (zh) * 2018-12-26 2019-05-10 中国银联股份有限公司 一种电子凭证上传的方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101828358B (zh) * 2007-06-27 2012-07-04 环球标志株式会社 服务器认证书发行系统
CN102916811B (zh) * 2012-10-18 2015-04-15 中国科学院信息工程研究所 一种多元实体身份凭证信息存储方法
TW201510764A (zh) * 2013-09-05 2015-03-16 Trade Van Information Services Co 數位方式簽署與驗證文件之方法與系統
KR101666374B1 (ko) * 2015-02-13 2016-10-14 크루셜텍 (주) 사용자 인증서 발급과 사용자 인증을 위한 방법, 장치 및 컴퓨터 프로그램
KR101661933B1 (ko) * 2015-12-16 2016-10-05 주식회사 코인플러그 블록체인을 기반으로 하는 공인인증서 인증시스템 및 이를 이용한 인증방법
KR101841566B1 (ko) * 2016-10-11 2018-05-04 주식회사 코인플러그 블록체인 내의 블록별로 발란스 데이터베이스를 관리하여 전자 바우처를 발행, 사용, 환불, 정산 및 파기하는 방법과 이를 이용한 서버
CN107396360B (zh) * 2017-08-15 2020-04-07 中国联合网络通信集团有限公司 区块验证方法及装置
CN107888375A (zh) * 2017-11-08 2018-04-06 深圳市携网科技有限公司 一种基于区块链技术的电子证据保全系统及方法
CN109035024A (zh) * 2018-08-15 2018-12-18 杭州链汇通区块链科技有限公司 电子签约的方法、系统和存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180083786A1 (en) * 2016-09-22 2018-03-22 Google Inc. Methods and systems of performing tamper-evident logging using block lattices
CN109034921A (zh) * 2018-07-13 2018-12-18 江苏恒宝智能系统技术有限公司 一种基于区块链的电子凭证管理方法及系统
CN109741056A (zh) * 2018-12-26 2019-05-10 中国银联股份有限公司 一种电子凭证上传的方法及装置

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035896A (zh) * 2020-07-20 2020-12-04 江苏傲为控股有限公司 一种基于交易方式的电子合同存证系统
CN112035893A (zh) * 2020-07-20 2020-12-04 江苏傲为控股有限公司 区块链电子合同管理系统
CN112035896B (zh) * 2020-07-20 2024-03-29 傲为有限公司 一种基于交易方式的电子合同存证系统
CN112765622A (zh) * 2021-01-13 2021-05-07 中国外运股份有限公司 一种电子提单的数字证书管理方法、装置、设备及介质
CN112765622B (zh) * 2021-01-13 2024-04-16 中国外运股份有限公司 一种电子提单的数字证书管理方法、装置、设备及介质
CN113570194A (zh) * 2021-06-28 2021-10-29 北京电链科技有限公司 一种基于区块链的电力施工业务数据处理方法及系统
CN114547641A (zh) * 2022-01-05 2022-05-27 山东浪潮工业互联网产业股份有限公司 一种基于区块链的工业数据追踪方法、装置、设备及介质
CN114547641B (zh) * 2022-01-05 2024-04-26 浪潮工业互联网股份有限公司 一种基于区块链的工业数据追踪方法、装置、设备及介质
CN114666353A (zh) * 2022-03-16 2022-06-24 南京邮电大学 一种基于区块链的电子存取证系统及方法
CN114884672A (zh) * 2022-04-29 2022-08-09 华控清交信息科技(北京)有限公司 一种数据流通网络系统、数据流通消息传输方法及装置
CN118152999A (zh) * 2024-05-11 2024-06-07 深圳中科保泰科技有限公司 数据治理平台及面向数据治理的数据确权方法

Also Published As

Publication number Publication date
CN109741056A (zh) 2019-05-10
TW202025661A (zh) 2020-07-01
CN109741056B (zh) 2023-06-16
TWI714359B (zh) 2020-12-21

Similar Documents

Publication Publication Date Title
WO2020134653A1 (zh) 一种电子凭证上传的方法及装置
US10977632B2 (en) Electronic bill management method, apparatus, and storage medium
US20210256510A1 (en) Computer implemented method for processing a financial transaction and a system therefor
WO2020082889A1 (zh) 征信评估方法及装置、电子设备
US20210383388A1 (en) Systems and methods for use in managing digital identities
CN113537984A (zh) 基于区块链的内容验证方法及装置、电子设备
WO2020073491A1 (zh) 基于区块链的供应链支付方法、收款方法、装置、设备及介质
US20140067661A1 (en) Virtual check system and method
WO2022001526A1 (zh) 基于区块链的贸易数据处理方法及其相关设备
CN111178894B (zh) 资产类型注册、交易记录验证方法及系统
US20210192520A1 (en) Distributed credit ecosystem
CN111373431A (zh) 基于区块链的可信保函
US12028458B2 (en) Systems and methods for user identity
US20230020190A1 (en) Techniques For Performing Secure Operations
CN114761952A (zh) 提供安全联合机器学习的技术
US20210334809A1 (en) Transaction method and apparatus based on blind signature
US20230368136A1 (en) Distributed ledger system for automated claim adjudication
US20240080208A1 (en) Blockchain application method and blockchain application terminal apparatus
CN116210200A (zh) 区块链通证
CN111311259A (zh) 票据处理方法、装置、终端及计算机可读存储介质
US11900337B1 (en) Distributed ledger receipt wallet system and method
CN110766403A (zh) 基于区块链的数据处理装置、方法及存储介质
CN111681141B (zh) 文件认证方法、文件认证装置及终端设备
WO2021120760A1 (zh) 一种基于区块链的电子发票的开具方法及装置
CN112184216A (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: 19906403

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

Country of ref document: EP

Kind code of ref document: A1