Blockchain-based Smart Card Transaction Method, Device and Electronic Device

The integration of smart card transactions with blockchain technology through private and public key encryption and verification processes addresses compatibility issues, ensuring secure and efficient transactions between smart cards and smart card readers/writers.

CN115081561BActive Publication Date: 2025-07-15CHINA TELECOM CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110270927.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-12
Publication Date
2025-07-15
Estimated Expiration
2041-03-12

AI Technical Summary

Technical Problem

The existing technology cannot effectively combine blockchain network transactions with traditional smart card transactions, resulting in users facing compatibility issues when using blockchain transactions.

Method used

Receive transaction requests through smart cards, use the smart card private key to encrypt and authorize, generate encrypted authorization transaction information, and upload it to the target blockchain after verification through the smart card reading and writing device, completing transactions between the smart card and the smart card reading and writing device.

Benefits of technology

It realizes compatibility between blockchain transactions and traditional transactions, ensures the security and transparency of transactions, and reduces the user's operational complexity and understanding requirements for blockchain technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081561B_ABST
    Figure CN115081561B_ABST
Patent Text Reader

Abstract

The present disclosure provides a blockchain-based smart card transaction method, apparatus, electronic device, and computer-readable storage medium, including: the smart card receives a transaction request sent by the smart card reader / writer device, and the transaction request includes target transaction information; the smart card uses a smart card private key to encrypt and authorize the target transaction information to obtain encrypted and authorized transaction information; the smart card sends the encrypted and authorized transaction information to the smart card reader / writer device so that the smart card reader / writer device verifies the encrypted and authorized transaction information and uploads the verified encrypted and authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer device according to the encrypted and authorized transaction information. The technical solution provided by the embodiments of the present disclosure can transfer the offline transaction between the smart card and the smart card reader / writer device to the blockchain through blockchain technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain technology, and in particular, to a method and device for smart card transactions based on blockchain, an electronic device, and a computer-readable storage medium. Background Art

[0002] Essentially, a blockchain is a decentralized database, which is a series of data blocks generated by cryptographic methods. Each data block contains information on the transactions across the network within a certain period of time. A blockchain system consists of many nodes, which are generally computers. The nodes that generate transactions need to broadcast to the whole network and report all the information of this transaction. After receiving these transaction information, the consensus nodes will reach a consensus on the transaction sorting, and then perform calculations and executions on the transactions, and finally record them on the blockchain. When a node submits a transaction, the transaction will be broadcast to all other nodes in the blockchain network. After receiving the transaction notification, the nodes will first perform some simple validations on the transaction. After successful validation, the transaction will be put into a transaction pool for execution and storage by the blockchain.

[0003] Meanwhile, blockchain transactions are widespread on the Internet. Due to users' lack of understanding of blockchain, users always face the trouble of incompatibility between using blockchain for transactions and traditional transactions. And the existing technologies cannot well combine blockchain network transactions with traditional transaction methods. For example, it is impossible to convert the traditional transaction between a smart card and a smart card reading and writing device into a transaction realized through blockchain.

[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0005] The purpose of the present disclosure is to provide a method, device, and electronic device for smart card transactions based on blockchain, which can realize traditional smart card transactions through blockchain technology.

[0006] Other features and advantages of the present disclosure will become apparent through the following detailed description, or be learned in part through the practice of the present disclosure.

[0007] An embodiment of the present disclosure provides a blockchain-based smart card transaction method, including: the smart card receives a transaction request sent by the smart card reader / writer device, and the transaction request includes target transaction information; the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted and authorized transaction information; the smart card sends the encrypted and authorized transaction information to the smart card reader / writer device, so that the smart card reader / writer device verifies the encrypted and authorized transaction information and uploads the verified encrypted and authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer device according to the encrypted and authorized transaction information.

[0008] In some embodiments, the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted and authorized transaction information, including: the smart card obtains a smart contract generated according to the target transaction information and verifies the smart contract; after the verification passes, the target transaction information is updated according to the smart contract; the smart card uses the smart card private key to encrypt and authorize the updated target transaction information to obtain the encrypted and authorized transaction information.

[0009] In some embodiments, the smart card exists in a target device; wherein, the smart card obtains a smart contract generated according to the target transaction information and verifies the smart contract, including: the smart card sends the smart contract to the target device, so that the target device displays the smart contract to a target object; the smart card receives the target biometric feature of the target object obtained through the target device; the smart card performs an authentication operation on the target biometric feature; if the authentication operation passes, the verification of the smart contract is completed.

[0010] In some embodiments, the smart card reader / writer device includes a reader / writer public key and a reader / writer private key; wherein, the smart card reader / writer device verifies the encrypted and authorized transaction information and uploads the verified encrypted and authorized transaction information to the target blockchain, including: the smart card reader / writer device obtains the smart card public key of the smart card; the smart card reader / writer device decrypts the encrypted and authorized transaction information according to the smart card public key to obtain authorized transaction information; the smart card reader / writer device verifies the transaction content of the authorized transaction information; when the transaction content verification of the authorized transaction information passes, the smart card reader / writer device signs the encrypted and authorized transaction information with the smart card read private key; the smart card reader / writer device uploads the signed encrypted and authorized transaction information to the target blockchain.

[0011] In some embodiments, the target blockchain completes the transaction between the smart card and the smart card reader / writer according to the encrypted authorization transaction information, including: the target blockchain obtains the public key of the smart card and the public key of the reader / writer; the target blockchain verifies and decrypts the signed encrypted authorization transaction information through the public key of the reader / writer and the public key of the smart card to obtain the authorization transaction information; the target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card reader / writer according to the authorization transaction information to complete the transaction between the smart card and the smart card reader / writer.

[0012] In some embodiments, the authorization transaction information instructs the smart card to transfer target electronic assets to the smart card reader / writer; wherein, before the target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card reader / writer according to the authorization transaction information, it includes: the target blockchain determines the wallet address of the smart card according to the public key of the smart card; the target blockchain determines whether the electronic assets in the wallet of the smart card are greater than the target electronic assets according to the wallet address of the smart card; if the electronic assets in the wallet of the smart card are greater than the target electronic assets, the target blockchain will transfer the target electronic assets from the wallet of the smart card to the wallet of the smart card reader / writer to complete the transfer transaction between the smart card and the smart card reader / writer.

[0013] In some embodiments, the smart card stores account information and wallet information on multiple blockchains, the multiple blockchains include the target blockchain, the smart card reader / writer includes a target blockchain identifier, and the target blockchain identifier is used to indicate that the smart card reader / writer is a node on the target blockchain, and the transaction request further includes the target blockchain identifier; wherein, before the smart card encrypts and authorizes the target transaction information with the smart card private key to obtain the encrypted authorization transaction information, it includes: the smart card determines that the smart card reader / writer is a node on the target blockchain according to the target blockchain identifier in the transaction request; the smart card obtains the public key of the smart card reader / writer from the stored target blockchain; the smart card determines the account address of the smart card reader / writer through the public key of the reader / writer; if the address of the smart card reader / writer determined according to the public key of the reader / writer is consistent with the address sending the transaction request, it is determined that the transaction request is legal.

[0014] An embodiment of the present disclosure provides a smart card transaction device based on a blockchain, including: a transaction request receiving module, an authorized transaction information receiving module, and an encrypted authorization transaction information sending module.

[0015] Among them, the transaction request receiving module can be configured to receive, by the smart card, a transaction request sent by the smart card reader / writer device, and the transaction request includes target transaction information; the authorized transaction information receiving module can be configured to encrypt and authorize, by the smart card using the smart card private key, the target transaction information to obtain encrypted authorized transaction information; the encrypted authorized transaction information sending module can be configured to send, by the smart card, the encrypted authorized transaction information to the smart card reader / writer device, so that the smart card reader / writer device verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer device according to the encrypted authorized transaction information.

[0016] An embodiment of the present disclosure provides an electronic device, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based smart card transaction method described in any one of the above.

[0017] An embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the blockchain-based smart card transaction method described in any one of the above.

[0018] An embodiment of the present disclosure provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the blockchain-based smart card transaction method described above.

[0019] The blockchain-based smart card transaction method, device, electronic device, and computer-readable storage medium provided by the embodiments of the present disclosure upload the target transaction information verified and authorized by the smart card and the smart card reader / writer device to the target blockchain, so that the target blockchain completes the asset transfer between the wallets corresponding to the smart card and the smart card reader / writer device, and further completes the transaction between the smart card and the smart card reader / writer device.

[0020] It should be understood that the above general description and the following detailed description are only exemplary and do not limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0022] Figure 1 A schematic diagram showing an exemplary system architecture of a blockchain-based smart card transaction method or a blockchain-based smart card transaction device applied to an embodiment of the present disclosure.

[0023] Figure 2 A schematic structural diagram of a computer system applied to a blockchain-based smart card transaction device shown according to an exemplary embodiment.

[0024] Figure 3 A flowchart of a blockchain-based smart card transaction method shown according to an exemplary embodiment.

[0025] Figure 4 is Figure 3 A flowchart of step S2 in an exemplary embodiment in

[0026] Figure 5 is Figure 3 A flowchart of step S3 in an exemplary embodiment in

[0027] Figure 6 A block diagram of a blockchain-based smart card transaction device shown according to an exemplary embodiment. Detailed implementation manners

[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. Like reference numerals in the figures denote like or similar parts, and thus their repeated description will be omitted.

[0029] The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will realize that one or more of the specific details can be omitted in practicing the technical solutions of this disclosure, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of this disclosure.

[0030] The accompanying drawings are only schematic diagrams of the present disclosure, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some block diagrams shown in the accompanying drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0031] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and steps, nor must they be executed in the order described. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0032] In this specification, the terms "a", "an", "the", "said" and "at least one" are used to indicate the presence of one or more elements / components / etc.; the terms "comprising", "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first", "second" and "third" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0033] The exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0034] Figure 1 A schematic diagram of an exemplary system architecture of a blockchain-based smart card transaction method or a blockchain-based smart card transaction device that can be applied to an embodiment of the present disclosure is shown.

[0035] like Figure 1 As shown, the system architecture 100 may include a terminal smart card 101 and a smart card reader / writer 102 .

[0036] Among them, smart card is a general term for cards with embedded microchips. Some smart cards may contain a microelectronic chip, and smart cards need to interact with data through a read-write device. Smart cards are equipped with CPU, RAM and I / O, and can process a large amount of data by themselves without interfering with the work of the host CPU. Smart cards can also filter erroneous data to reduce the burden on the host CPU. It is suitable for occasions with a large number of ports and faster communication speed requirements. The integrated circuit in the card includes a central processing unit CPU, an EEPROM, a random access memory RAM, and a chip operating system COS (Chip Operating System) solidified in the read-only memory ROM.

[0037] In addition, a smart card can exist independently, such as a credit card, a bus card, etc. A smart card can also exist in other devices, such as a SIM (Subscriber Identity Module) card that can implement the NFC (Near Field Communication) function and needs to be attached to a mobile phone to be used. The present disclosure does not limit this.

[0038] It should be noted that the smart card 101 can be a node on the target blockchain 103. The smart card can store the account information and wallet information of all nodes on the target blockchain. The account information can include the account address of the node, and the wallet information can include the wallet address of the node. The present disclosure does not limit this.

[0039] To ensure the timeliness of the information in the smart card, the smart card can be connected to the Internet to update the blockchain information stored in the smart card; to ensure the security of the information in the smart card, the smart card can also not be connected to the Internet all the time to protect the security of the information in the smart card. The present disclosure does not limit this.

[0040] In this embodiment, the smart card can receive a transaction request sent by the smart card reader / writer, and the transaction request includes target transaction information; the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted and authorized transaction information; the smart card sends the encrypted and authorized transaction information to the smart card reader / writer so that the smart card reader / writer can verify the encrypted and authorized transaction information and upload the verified encrypted and authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer according to the encrypted and authorized transaction information.

[0041] A smart card reader / writer is a kind of reader that can receive and process information sent by a smart card. The reader can be a mobile phone, a computer or other devices. The present disclosure does not limit this. The smart card reader / writer and the smart card can communicate through wired or wireless means, can communicate through contact or non-contact, and can also communicate through near-field or far-field communication. The present disclosure does not limit the communication method between the smart card and the smart card reader / writer.

[0042] It should be noted that the smart card reader / writer can be a node on the target blockchain 103. The smart card reader / writer can store the account information and wallet information of all nodes on the target blockchain. The account information can include the account address of the node, and the wallet information can include the wallet address of the node. The present disclosure does not limit this.

[0043] The smart card reader / writer can be connected to the Internet in real time or occasionally. The present disclosure does not limit this.

[0044] A smart card reader / writer device can, for example, send a transaction request to a smart card; the smart card reader / writer device can, for example, receive the encrypted authorization information returned by the smart card in response to the transaction request; the smart card reader / writer device can, for example, verify the encrypted authorization information and upload the verified encrypted authorization information to the target blockchain so that the target blockchain can complete the transaction between the smart card and the smart card reader / writer device based on the encrypted authorization transaction information.

[0045] It should be understood that Figure 1 the numbers of the smart card 102 and the smart card reader / writer device 102 in are merely illustrative. The server 105 can be a single physical server or composed of multiple servers, and can have any number of terminal devices, networks, and servers according to actual needs.

[0046] Next, refer to Figure 2 , which shows a schematic structural diagram of a computer system 200 suitable for implementing the smart card or the smart card reader / writer device according to an embodiment of the present application. Figure 2 The terminal device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0047] As Figure 2 shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 202 or the program loaded from the storage section 208 into the random access memory (RAM) 203. In the RAM 203, various programs and data required for the operation of the computer system 200 are also stored. The CPU 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.

[0048] The following components are connected to the I / O interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the I / O interface 205 as needed. A removable medium 211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed so that the computer program read from it can be installed into the storage section 208 as needed.

[0049] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a computer-readable storage medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 209 and / or installed from the removable medium 211. When the computer program is executed by the central processing unit (CPU) 201, the above-described functions defined in the system of the present application are performed.

[0050] It should be noted that the computer-readable storage medium shown in the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable storage medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0051] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, and the above-mentioned module, segment of a program, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0052] The modules and / or sub-modules and / or units involved in the embodiments described in the present application can be implemented in software or in hardware. The described modules and / or sub-modules and / or units can also be set in a processor. For example, it can be described as: a processor includes a sending unit, an obtaining unit, a determining unit, and a first processing unit. Among them, the names of these modules and / or sub-modules and / or units do not constitute a limitation on the modules and / or sub-modules and / or units themselves in some cases.

[0053] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the device described in the above embodiments; or it may exist separately and not be assembled into the device. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by a device, the functions that the device can achieve include: the smart card receives a transaction request sent by the smart card reader / writer, and the transaction request includes target transaction information; the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted authorized transaction information; the smart card sends the encrypted authorized transaction information to the smart card reader / writer so that the smart card reader / writer can verify the encrypted authorized transaction information and upload the verified encrypted authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer according to the encrypted authorized transaction information.

[0054] Figure 3 It is a flowchart of a smart card transaction method based on a blockchain shown according to an exemplary embodiment.

[0055] It should be noted that both the smart card and the smart card reader / writer provided in the embodiments of the present disclosure are nodes on the target blockchain. The smart card and the smart card reader / writer both store the account information and wallet information of all nodes on the target blockchain. The account information of the target blockchain stored in the smart card reader / writer may include the public key information of the smart card (i.e., the smart card public key), and the account information of the target blockchain stored in the smart card reader / writer may include the public key information of the smart card reader / writer (i.e., the reader / writer public key).

[0056] Referring to Figure 3 , the blockchain-based smart card transaction method provided in the embodiments of the present disclosure may include the following steps.

[0057] Step S1, the smart card receives a transaction request sent by the smart card reader / writer, and the transaction request includes target transaction information.

[0058] In some embodiments, the smart card reader / writer can exchange information with the smart card through near-field communication, and can also exchange information with the smart card through contact communication. In short, any form that can exchange information is within the protection scope of the present disclosure, and the present disclosure does not limit this.

[0059] In this embodiment, it can be taken as an example that the smart card and the smart card reader / writer communicate through near-field communication for illustration, but the present disclosure is not limited thereto.

[0060] In some embodiments, the transaction request may include a transaction command and target transaction information. The target transaction information may include specific transaction content. The present disclosure does not limit this, and any information that needs to be interacted in the transaction can be reflected in the transaction request. For example, for a credit card and a credit card reader / writer, the transaction request may include a transaction command initiated by the credit card reader / writer to the credit card, as well as information such as the items to be deducted and the amount to be deducted for this transaction. The present disclosure does not limit this.

[0061] In some embodiments, the transaction request between the smart card and the smart card reader / writer may be initiated by the smart card reader / writer or by the smart card. Regardless of who initiates the transaction request, its transaction logic is basically the same as that of the embodiments provided in the present disclosure and should be within the protection scope of the present disclosure.

[0062] In some embodiments, in order to ensure that the transaction request sent by the smart card reader / writer is not tampered with, etc., the smart card reader / writer may use its own private key to encrypt or sign the smart card reader / writer.

[0063] Step S2, the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted and authorized transaction information.

[0064] In some embodiments, after the smart card receives a transaction request sent by the smart card reader / writer device, it uses the public key of the smart card to decrypt or verify the signature of the transaction request to determine that the transaction request is indeed sent by the smart card reader / writer device and has not been tampered with, so as to achieve secure verification of the transaction request.

[0065] In some embodiments, after the above-mentioned transaction request passes the security verification of the smart card, the smart card verifies the target transaction information in the transaction request. This information verification can be completed by the transaction logic stored on the smart card. For example, it can be verified by the smart contract on the target blockchain stored on the smart card for the information in the target transaction information, so as to verify whether the transaction logic in the target transaction information conforms to the preset transaction logic, or verify whether the information in the target transaction information is consistent with the facts recorded in the smart card (for example, the transaction request sent by the bus card reader / writer to the bus card includes the riding record of this bus ride, and the bus card may verify whether the riding record is correct after receiving the transaction request); this information verification can also be completed manually. For example, the smart card can send the target transaction information to the device where the smart card is located (such as the mobile phone where the smart card is located) so that the device where the smart card is located can display the target transaction information to the target object for the target object to verify the target transaction information.

[0066] In some embodiments, if the information verification of the target transaction information passes, the smart card can use the private key to encrypt and authorize the target transaction information to obtain the encrypted authorized transaction information.

[0067] Step S3, the smart card sends the encrypted authorized transaction information to the smart card reader / writer device, so that the smart card reader / writer device verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer device according to the encrypted authorized transaction information.

[0068] In some embodiments, after obtaining the encrypted authorized transaction information, the smart card can sign the encrypted authorized transaction information and send the signed authorized encrypted transaction information to the smart card reader / writer device.

[0069] After receiving the authorized encrypted transaction information, the smart card reader / writer first needs to perform a security signature verification on the signed encrypted authorized transaction information using the public key of the smart card. If the security signature verification passes, the smart card reader / writer may also need to verify the information content in the encrypted authorized transaction information. Specifically, the above information verification can be completed through the smart contract of the target blockchain stored in the smart card reader / writer, or the encrypted authorized transaction information can be displayed to the target user through the smart card reader / writer so that the target user can verify the information content in the encrypted authorized transaction information.

[0070] If the encrypted authorized transaction information passes the security verification and information verification of the smart card reader / writer, the smart card reader / writer can send the encrypted authorized transaction information to the target blockchain for the nodes on the target blockchain to reach a consensus when connected to the Internet.

[0071] In some embodiments, after the target blockchain reaches a consensus on the encrypted authorized transaction information, the target blockchain will determine the wallet address corresponding to the smart card and the wallet address corresponding to the public key of the smart card reader / writer according to the public key of the smart card and the public key of the smart card reader / writer respectively, and transfer assets between the wallet corresponding to the smart card and the wallet corresponding to the smart card reader / writer according to the information content in the encrypted authorized transaction information to complete the transaction between the smart card and the smart card reader / writer. Among them, the asset is a virtual asset defined in the target blockchain and can correspond to the specific asset in the smart card in the display. For example, a virtual asset in the target blockchain can correspond to 100 yuan in reality (this correspondence can be defined by the target blockchain according to actual needs, and the present disclosure does not limit this).

[0072] It should be noted that the wallet corresponding to the smart card or the smart card reader / writer can be a cold wallet or a hot wallet, and can be a custodial wallet, a Bitcoin wallet, etc., and the present disclosure does not limit this.

[0073] The technical solution provided by the above embodiments, on the one hand, completes the transaction between the smart card and the smart card reader / writer through the blockchain, which not only ensures the security of the transaction but also makes the transaction transparent and traceable; on the other hand, through a blockchain transaction method that is more user-friendly, it reduces the user's operations and understanding of blockchain technology and quickly combines blockchain transactions with traditional transaction methods, and ensures the security and high imitation of the transaction.

[0074] Figure 4 Yes Figure 3 It is the flowchart of step S2 in an exemplary embodiment. Refer to Figure 4 As described above, step S2 may include the following steps.

[0075] In step S21, the smart card obtains the smart contract generated according to the target transaction information and verifies the smart contract.

[0076] In some embodiments, the smart contract may be generated by the smart reading device according to the stored smart contract and the target transaction information, or may be generated by the smart card according to the stored smart contract and the target transaction information. The present disclosure does not limit this. The smart contract may include information related to the transaction such as the transaction content, transaction amount, and transaction logic of the transaction between the smart card and the smart card reading and writing device. It can be understood that the present disclosure does not limit the specific content of the generated smart contract, and any information related to the transaction between the smart card and the smart card reading and writing device may exist in the smart contract.

[0077] In some embodiments, after the smart card obtains the smart contract, it will verify the specific content in the smart contract. This verification may be completed by the smart contract stored in the smart card or displayed to the target object by the device where the smart card is located and completed by the target object. The present disclosure does not limit the verification method for the smart contract. For example, the smart card may send the smart contract to the target device where the smart card is located so that the target device can display the smart contract to the target object; if the target object determines that the contract content in the smart contract is correct, it will send a confirmation message through the target device. The confirmation message may be the target biometric feature of the target object; the smart card receives the target biometric feature of the target object obtained through the target device and performs an authentication operation on the target biometric feature; if the authentication operation passes, the verification of the smart contract is completed. Among them, the target biometric feature may refer to fingerprint feature, facial feature, eye iris feature, etc., and the present disclosure does not limit this.

[0078] In step S22, after the verification passes, the target transaction information is updated according to the smart contract. In some embodiments, after the verification of the smart contract passes, the target transaction information may be replaced with the smart contract, or the smart contract may be added to the target transaction information to complete the update of the target transaction information. The present disclosure does not limit this.

[0079] In step S23, the smart card uses the private key of the smart card to encrypt and authorize the updated target transaction information to obtain the encrypted authorized transaction information. In the embodiments of the present disclosure, the smart card or the smart card reading and writing device may also be controlled to give priority to processing the technical solution provided in this embodiment through bus arbitration to ensure the security of transaction behavior.

[0080] The technical solution provided by the present disclosure combines a blockchain wallet with a smart card, monitors transaction behaviors through a security chip, and interacts with an external blockchain system through a near field communication module. Preferably, in the form of a cold wallet, offline signatures are performed on transactions to implement local blockchain transactions of users, greatly reducing the operations of users and their understanding of blockchain technology, quickly combining blockchain transactions with traditional transaction methods, and ensuring the security and high imitation of transactions.

[0081] The technical solution provided by this embodiment completes the verification of the target transaction information by verifying the smart contract generated according to the target transaction information, so as to better complete the transaction between the smart card and the smart card reading and writing device.

[0082] Figure 5 is Figure 3 The flowchart of step S3 in an exemplary embodiment.

[0083] In some embodiments, the smart card reading and writing device may store a public key of the reading and writing device and a private key of the reading device for reference Figure 5 , and the above step S3 may include the following steps.

[0084] In step S31, the smart card reading and writing device obtains the smart card public key of the smart card.

[0085] In step S32, the smart card reading and writing device decrypts the encrypted authorized transaction information according to the smart card public key to obtain the authorized transaction information. In some embodiments, this encrypted authorized transaction information may have been encrypted and signed by the smart card using the smart card private key. The smart reading and writing device can verify the signature and decrypt the encrypted authorized transaction information using the smart card public key. While obtaining the authorized transaction information, it can also determine that the encrypted authorized transaction information indeed comes from the smart card and has not been tampered with. Among them, the authorized transaction information may refer to the target transaction information authorized by the smart card. The authorized target transaction information may include the original transaction information sent by the smart card reading and writing device, and may also include the transaction information updated by the smart card. The present disclosure does not limit this.

[0086] In step S33, the smart card reading and writing device verifies the transaction content of the authorized transaction information.

[0087] In step S34, if the verification of the transaction content of the authorized transaction information passes, the smart card reading and writing device signs the encrypted authorized transaction information with the private key read out by the smart card.

[0088] In step S35, the smart card reading and writing device uploads the signed encrypted authorized transaction information to the target blockchain.

[0089] In some embodiments, after the target blockchain receives the signed and encrypted authorization transaction information uploaded by the smart card read / write transposition, the following steps are completed: The target blockchain obtains the public key of the smart card and the public key of the read / write device; The target blockchain verifies and decrypts the signed and encrypted authorization transaction information through the public key of the read / write device and the public key of the smart card to obtain the authorization transaction information; The target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card read / write device according to the authorization transaction information to complete the transaction between the smart card and the smart card read / write device.

[0090] Wherein, if the authorization transaction information indicates that the smart card needs to transfer the target electronic assets to the smart card read / write device; then, before the target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card read / write device according to the authorization transaction information, it may further include: The target blockchain determines the wallet address of the smart card according to the public key of the smart card; The target blockchain determines whether the electronic assets in the wallet of the smart card are greater than the target electronic assets according to the wallet address of the smart card; If the electronic assets in the wallet of the smart card are greater than the target electronic assets, the target blockchain will transfer the target electronic assets from the wallet of the smart card to the wallet of the smart card read / write device to complete the transfer transaction between the smart card and the smart card read / write device.

[0091] In some other embodiments, if the smart card stores account information and wallet information on multiple blockchains, and the multiple blockchains include the target blockchain, the smart card read / write device includes a target blockchain identifier, where the target blockchain identifier is used to indicate that the smart card read / write device is a node on the target blockchain, and the transaction request further includes the target blockchain identifier; then, before the smart card encrypts and authorizes the target transaction information with the smart card private key to obtain the encrypted authorization transaction information, the smart card transaction method based on the blockchain further includes: The smart card determines that the smart card read / write device is a node on the target blockchain according to the target blockchain identifier in the transaction request; The smart card obtains the public key of the smart card read / write device from the stored target blockchain; The smart card determines the account address of the smart card read / write device through the public key of the read / write device; If the address of the smart card read / write device determined according to the public key of the read / write device is consistent with the address sending the transaction request, the transaction request is determined to be legal.

[0092] The technical solution provided by the embodiments of the present disclosure enables the smart card to adaptively transact with smart card read / write devices on multiple blockchains.

[0093] Figure 6 It is a block diagram of a smart card transaction device based on a blockchain shown according to an exemplary embodiment. Refer to Figure 6, the blockchain-based smart card transaction device 600 provided by the embodiments of the present disclosure may include: a transaction request receiving module 601, an authorized transaction information receiving module 602, and an encrypted authorized transaction information sending module 603.

[0094] Among them, the transaction request receiving module 601 may be configured to receive, by the smart card, a transaction request sent by the smart card reader / writer device, where the transaction request includes target transaction information; the authorized transaction information receiving module 602 may be configured to encrypt and authorize, by the smart card using a smart card private key, the target transaction information to obtain encrypted authorized transaction information; the encrypted authorized transaction information sending module 603 may be configured to send, by the smart card, the encrypted authorized transaction information to the smart card reader / writer device, so that the smart card reader / writer device verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain, and the target blockchain completes the transaction between the smart card and the smart card reader / writer device according to the encrypted authorized transaction information.

[0095] In some embodiments, the authorized transaction information receiving module 602 may include: a smart contract generation sub-module, an update sub-module, and an encryption authorization sub-module.

[0096] Among them, the smart contract generation sub-module may be configured to obtain, by the smart card, a smart contract generated according to the target transaction information and verify the smart contract; the update sub-module may be configured to update, after verification is passed, the target transaction information according to the smart contract; the encryption authorization sub-module may be configured to encrypt and authorize, by the smart card using the smart card private key, the updated target transaction information to obtain the encrypted authorized transaction information.

[0097] In some embodiments, the smart card exists in a target device; among them, the smart contract generation sub-module may include: a contract sending unit, a biometric acquisition unit, an authentication unit, and a verification completion unit.

[0098] Among them, the contract sending unit may be configured to send, by the smart card, the smart contract to the target device, so that the target device displays the smart contract to a target object; the biometric acquisition unit may be configured to receive, by the smart card, target biometrics of the target object acquired through the target device; the authentication unit may be configured to perform an authentication operation on the target biometrics by the smart card; the verification completion unit may be configured to complete the verification of the smart contract if the authentication operation passes.

[0099] In some embodiments, the smart card reading and writing device includes a public key of the reading and writing device and a private key of the reading and writing device; wherein, the encrypted authorization transaction information sending module 603 may include: a smart card public key acquisition sub-module, a decryption sub-module, a verification sub-module, a signature sub-module, and an upload sub-module.

[0100] Among them, the smart card public key acquisition sub-module may be configured to enable the smart card reading and writing device to acquire the smart card public key of the smart card; the decryption sub-module may be configured to enable the smart card reading and writing device to decrypt the encrypted authorization transaction information according to the smart card public key to obtain the authorization transaction information; the verification sub-module may be configured to enable the smart card reading and writing device to verify the transaction content of the authorization transaction information; the signature sub-module may be configured to, if the transaction content verification of the authorization transaction information passes, enable the smart card reading and writing device to sign the encrypted authorization transaction information through the private key read by the smart card; the upload sub-module may be configured to enable the smart card reading and writing device to upload the signed encrypted authorization transaction information to the target blockchain.

[0101] In some embodiments, the encrypted authorization transaction information sending module 603 may further include: a reading and writing device public key acquisition sub-module, a signature verification sub-module, and a transfer sub-module.

[0102] Among them, the reading and writing device public key acquisition sub-module may be configured to enable the target blockchain to acquire the smart card public key and the public key of the reading and writing device; the signature verification sub-module may be configured to enable the target blockchain to verify the signature and decrypt the signed encrypted authorization transaction information through the public key of the reading and writing device and the smart card public key to obtain the authorization transaction information; the transfer sub-module may be configured to enable the target blockchain to transfer funds between the wallet of the smart card and the wallet of the smart card reading and writing device according to the authorization transaction information to complete the transaction between the smart card and the smart card reading and writing device.

[0103] In some embodiments, the authorization transaction information instructs the smart card to transfer target electronic assets to the smart card reading and writing device; wherein, the encrypted authorization transaction information sending module 603 may further include: an address determination sub-module, an asset determination sub-module, and an asset transfer sub-module.

[0104] Among them, the address determination sub-module can be configured such that the target blockchain determines the wallet address of the smart card according to the public key of the smart card; the asset determination sub-module can be configured such that the target blockchain determines whether the electronic assets in the wallet of the smart card are greater than the target electronic assets according to the wallet address of the smart card; the asset transfer sub-module can be configured such that if the electronic assets in the wallet of the smart card are greater than the target electronic assets, the target blockchain will transfer the target electronic assets from the wallet of the smart card to the wallet of the smart card reading and writing device to complete the transfer transaction between the smart card and the smart card reading and writing device.

[0105] In some embodiments, the smart card stores account information and wallet information on multiple blockchains, the multiple blockchains include the target blockchain, the smart card reading and writing device includes a target blockchain identifier, and the target blockchain identifier is used to indicate that the smart card reading and writing device is a node on the target blockchain. The transaction request further includes the target blockchain identifier; among them, the blockchain-based smart card transaction device 600 may further include: a node legitimacy determination sub-module, a read-write device public key acquisition sub-module, an account address determination sub-module, and an address consistency judgment sub-module.

[0106] Among them, the node legitimacy determination sub-module can be configured such that the smart card determines that the smart card reading and writing device is a node on the target blockchain according to the target blockchain identifier in the transaction request; the read-write device public key acquisition sub-module can be configured such that the smart card acquires the read-write device public key of the smart card reading and writing device from the stored target blockchain; the account address determination sub-module can be configured such that the smart card determines the account address of the smart card reading and writing device through the read-write device public key; the address consistency judgment sub-module can be configured such that if the address of the smart card reading and writing device determined according to the read-write device public key is consistent with the address sending the transaction request, it is determined that the transaction request is legal.

[0107] Since the functions of the device 600 have been described in detail in their corresponding method embodiments, the present disclosure will not be elaborated herein.

[0108] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for causing a computing device (which can be a personal computer, a server, a mobile terminal, or a smart device, etc.) to execute the method according to the embodiments of the present disclosure, such as Figure 3One or more of the steps shown.

[0109] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, rather than for limiting purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.

[0110] Other embodiments of the present disclosure will be readily contemplated by those skilled in the art upon considering the specification and practicing the disclosure herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not claimed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the claims.

[0111] It should be understood that the present disclosure is not limited to the detailed structures, drawing methods, or implementation methods shown herein. On the contrary, the present disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A blockchain-based smart card transaction method, characterized in that, The target blockchain includes multiple nodes, and the multiple nodes include a smart card reader / writer and a smart card. Both the smart card and the smart card reader / writer store account information and wallet information on the target blockchain. The method includes: The smart card receives a transaction request sent by the smart card reader / writer, and the transaction request includes target transaction information; after the transaction request passes security verification, the information in the target transaction information is verified through a smart contract on the target blockchain stored on the smart card, so as to verify whether the transaction logic in the target transaction information conforms to the preset transaction logic, or verify whether the information in the target transaction information is consistent with the facts recorded in the smart card; If the information verification of the target transaction information passes, the smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted authorized transaction information; The smart card sends the encrypted authorized transaction information to the smart card reader / writer, so that the smart card reader / writer verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain. After the target blockchain passes the consensus on the encrypted authorized transaction information, the wallet address corresponding to the smart card and the wallet address corresponding to the smart card reader / writer are determined according to the smart card public key and the reader / writer public key respectively, and target electronic assets are transferred between the wallet corresponding to the smart card and the wallet corresponding to the smart card reader / writer according to the information content in the encrypted authorized transaction information, completing the transaction between the smart card and the smart card reader / writer.

2. The method according to claim 1, wherein The smart card uses the smart card private key to encrypt and authorize the target transaction information to obtain encrypted authorized transaction information, including: The smart card obtains a smart contract generated according to the target transaction information and verifies the smart contract; After the verification passes, the target transaction information is updated according to the smart contract; The smart card uses the smart card private key to encrypt and authorize the updated target transaction information to obtain the encrypted authorized transaction information.

3. The method according to claim 2, wherein The smart card exists in a target device; wherein, the smart card obtains a smart contract generated according to the target transaction information and verifies the smart contract, including: The smart card sends the smart contract to the target device so that the target device displays the smart contract to a target object; The smart card receives the target biometric of the target object obtained through the target device; The smart card performs an authentication operation on the target biometric; If the authentication operation passes, the verification of the smart contract is completed.

4. The method according to claim 1, characterized in that, The smart card reader / writer includes a reader / writer public key and a reader / writer private key; wherein, the smart card reader / writer verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain, including: The smart card reader / writer obtains the smart card public key of the smart card; The smart card reader / writer decrypts the encrypted authorized transaction information according to the public key of the smart card to obtain the authorized transaction information; The smart card reader / writer verifies the transaction content of the authorized transaction information; If the verification of the transaction content of the authorized transaction information passes, the smart card reader / writer signs the encrypted authorized transaction information by reading out the private key through the smart card; The smart card reader / writer uploads the signed encrypted authorized transaction information to the target blockchain.

5. The method according to claim 4, wherein The target blockchain completes the transaction between the smart card and the smart card reader / writer according to the encrypted authorized transaction information, including: The target blockchain obtains the public key of the smart card and the public key of the reader / writer; The target blockchain verifies and decrypts the signed encrypted authorized transaction information through the public key of the reader / writer and the public key of the smart card to obtain the authorized transaction information; The target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card reader / writer according to the authorized transaction information to complete the transaction between the smart card and the smart card reader / writer.

6. The method according to claim 5, wherein The authorized transaction information instructs the smart card to transfer the target electronic assets to the smart card reader / writer; wherein, before the target blockchain transfers funds between the wallet of the smart card and the wallet of the smart card reader / writer according to the authorized transaction information, it includes: The target blockchain determines whether the electronic assets in the wallet of the smart card are greater than the target electronic assets according to the wallet address of the smart card; If the electronic assets in the wallet of the smart card are greater than the target electronic assets, the target blockchain will transfer the target electronic assets from the wallet of the smart card to the wallet of the smart card reader / writer to complete the transfer transaction between the smart card and the smart card reader / writer.

7. The method according to claim 1, wherein The smart card stores account information and wallet information on multiple blockchains, the multiple blockchains include the target blockchain, the smart card reader / writer includes a target blockchain identifier, and the target blockchain identifier is used to indicate that the smart card reader / writer is a node on the target blockchain, and the transaction request also includes a target blockchain identifier; wherein, before the smart card encrypts and authorizes the target transaction information with the smart card private key to obtain the encrypted authorized transaction information, it includes: The smart card determines that the smart card reader / writer is a node on the target blockchain according to the target blockchain identifier in the transaction request; The smart card obtains the public key of the smart card reader / writer from the stored target blockchain; The smart card determines the account address of the smart card reader / writer through the public key of the reader / writer; If the address of the smart card reader / writer determined according to the public key of the reader / writer is consistent with the address sending the transaction request, it is determined that the transaction request is legal.

8. An intelligent card transaction device based on blockchain, characterized in that The target blockchain includes multiple nodes, the multiple nodes include a smart card reader / writer and a smart card, and both the smart card and the smart card reader / writer store the account information and wallet information of the nodes on the target blockchain; The device includes: A transaction request receiving module, configured to receive a transaction request sent by the smart card reader / writer device through the smart card, where the transaction request includes target transaction information; after the transaction request passes security verification, verify the information in the target transaction information through a smart contract on a target blockchain stored on the smart card, so as to verify whether the transaction logic in the target transaction information conforms to the preset transaction logic, or verify whether the information in the target transaction information is consistent with the facts recorded in the smart card; An authorized transaction information receiving module, configured to, if the information verification of the target transaction information passes, use the private key of the smart card to encrypt and authorize the target transaction information through the smart card to obtain encrypted authorized transaction information; An encrypted authorized transaction information sending module, configured to send the encrypted authorized transaction information to the smart card reader / writer device through the smart card, so that the smart card reader / writer device verifies the encrypted authorized transaction information and uploads the verified encrypted authorized transaction information to the target blockchain. After the target blockchain passes the consensus on the encrypted authorized transaction information, determine the wallet address corresponding to the smart card and the wallet address corresponding to the smart card reader / writer device according to the public key of the smart card and the public key of the reader / writer device respectively, and transfer the target electronic assets between the wallet corresponding to the smart card and the wallet corresponding to the smart card reader / writer device according to the information content in the encrypted authorized transaction information, and complete the transaction between the smart card and the smart card reader / writer device.

9. An electronic device, characterized in that, Comprising: A memory; And A processor coupled to the memory, the processor being configured to execute the blockchain-based smart card transaction method according to any one of claims 1-7 based on instructions stored in the memory.

10. A computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, it implements the blockchain-based smart card transaction method according to any one of claims 1-7.

Citation Information

Patent Citations

  • A blockchain-based hardware wallet, a transaction system, and a storage medium

    CN109844787A

  • Using a contactless card to securely share personal data stored in a blockchain

    US10535062B1

  • Method for authenticating a financial transaction in a blockchain-based cryptocurrency, smart card, and blockchain authentication infrastructure

    WO2019020824A1