CN110659994A - Data transaction method, data transaction device and system based on block chain - Google Patents

Data transaction method, data transaction device and system based on block chain Download PDF

Info

Publication number
CN110659994A
CN110659994A CN201910925452.3A CN201910925452A CN110659994A CN 110659994 A CN110659994 A CN 110659994A CN 201910925452 A CN201910925452 A CN 201910925452A CN 110659994 A CN110659994 A CN 110659994A
Authority
CN
China
Prior art keywords
data
sold
data transaction
transaction device
sale
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201910925452.3A
Other languages
Chinese (zh)
Inventor
张骁
来鑫
李武璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910925452.3A priority Critical patent/CN110659994A/en
Publication of CN110659994A publication Critical patent/CN110659994A/en
Pending legal-status Critical Current

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a data transaction method based on a block chain.A first data transaction device issues a data pre-sale plan by utilizing a block chain intelligent contract; the second data transaction device purchases the data to be sold through the intelligent contract of the block chain; the first data transaction device encrypts the data to be sold and uploads the data to a file system, and respectively uploads a hash value corresponding to the data to be sold and/or a hash value corresponding to the encrypted data to be sold to a block chain; the second data transaction device downloads the encrypted data for sale from the file system and decrypts the encrypted data for sale. The invention also discloses a data transaction device and a data transaction system based on the block chain. In the scheme, the seller encrypts the data to be sold and uploads the data to the file system. The buyer and the seller buy and sell the data to be sold through the intelligent block chain contract, and the buyer downloads the encrypted data to be sold from the file system and decrypts the encrypted data after obtaining the purchase proof of the intelligent block chain contract, so that the data purchase efficiency and the data purchase safety are improved.

Description

Data transaction method, data transaction device and system based on block chain
Technical Field
The invention relates to the technical field of data processing, in particular to a data transaction method, a data transaction device and a data transaction system based on a block chain.
Background
With the development of science and technology, artificial intelligence is gradually widely applied. Artificial intelligence requires training prior to application with large amounts of training data, which typically needs to be purchased from a data vendor.
The current way to purchase training data from data vendors is: the corresponding training data is purchased in an offline copy of the training data. However, on the one hand, due to the influence of the region, the data purchaser needs to go to the region where the data seller is located to copy the training data, and the efficiency of purchasing the training data is very low. On the other hand, because the off-line copy training data lacks copy certification, when disputes occur between the data purchasing side and the data selling side, the disputes cannot be resolved through the copy certification, and the security of purchasing the training data is low.
Therefore, the method of purchasing training data offline has the problems of low purchasing efficiency, low purchasing safety and the like.
Disclosure of Invention
The invention mainly aims to provide a data transaction method, a data transaction device and a data transaction system based on a block chain, and aims to solve the problems of low purchase efficiency, low purchase safety and the like in an off-line purchase training data mode.
In order to achieve the above object, the present invention provides a data transaction method based on a blockchain, including:
the first data transaction device issues a data pre-sale plan using a blockchain smart contract, the data pre-sale plan including at least: the amount of data to be sold, the type of data and the selling price;
the first data transaction device acquires purchase indication information through the blockchain intelligent contract, wherein the indication information is used for indicating that: the second data transaction device purchases the data for sale;
the first data transaction device encrypts the data to be sold; the first data transaction device uploads the encrypted data to be sold to a file system;
and the first data transaction device uploads the hash value corresponding to the data to be sold and/or the encrypted hash value corresponding to the data to be sold to a block chain respectively, so that the second data transaction device downloads the encrypted data to be sold from the file system and decrypts the encrypted data to be sold.
Preferably, the first data transaction device encrypts the data for sale, and the method comprises the following steps:
the first data transaction device acquires a public key of a buyer corresponding to the second data transaction device and acquires a private key of a seller corresponding to the first data transaction device;
the first data transaction device constructs an encryption key by utilizing a hash algorithm based on the seller private key and the buyer public key;
and the first data transaction device encrypts the data to be sold by using the encryption key.
Preferably, the first data transaction device uploads the hash value corresponding to the data for sale and/or the encrypted hash value corresponding to the data for sale to the blockchain respectively, and the uploading includes:
the first data transaction device performs hash on the data to be sold to obtain a first hash value, and/or performs hash on the encrypted data to be sold to obtain a second hash value;
the first data transaction device uploads the first hash value and/or the second hash value to a blockchain.
To achieve the above object, the present invention further provides a data transaction method based on a blockchain, the method including:
the second data transaction device obtains a data pre-sale plan of the first data transaction device from the blockchain intelligent contract, and the data pre-sale plan at least comprises the following components: the amount of data to be sold, the type of data and the selling price;
the second data transaction device purchases the data for sale through the blockchain intelligent contract;
the second data transaction device receives downloadable information fed back by the block chain intelligent contract, wherein the downloadable information is used for indicating that: the data for sale can be downloaded from a file system;
the second data transaction device acquires the encrypted data to be sold from the file system, wherein the data to be sold is encrypted by the first data transaction device and then uploaded to the file system;
and the second data transaction device decrypts the encrypted data to be sold to obtain the unencrypted data to be sold.
Preferably, the second data transaction device decrypts the encrypted data for sale, and includes:
the second data transaction device acquires a seller public key corresponding to the first data transaction device and acquires a buyer private key corresponding to the second data transaction device;
the second data transaction device utilizes the buyer private key and the seller public key to construct a decryption key by utilizing a Hash algorithm, and the decryption key and the encryption key of the data to be sold are symmetric keys;
and the second data transaction device decrypts the encrypted data to be sold by using the decryption key.
Preferably, the method further comprises:
and the second data transaction device compares the hash value of the data to be sold and/or the encrypted hash value of the data to be sold with the hash value stored in the block chain, and determines the authenticity of the obtained data.
To achieve the above object, the present invention further provides a first data transaction device, which includes a processor and a memory, wherein the memory stores a program, and the program, when executed by the processor, implements the blockchain-based data transaction method as provided by the present invention.
To achieve the above object, the present invention further provides a second data transaction apparatus, which includes a processor and a memory, wherein the memory stores a program, and the program, when executed by the processor, implements the blockchain-based data transaction method as provided by the present invention.
In order to achieve the above object, the present invention further provides a data transaction system based on a blockchain, where the data transaction system includes the first data transaction apparatus and the second data transaction apparatus provided by the present invention.
To achieve the above object, the present invention further provides a computer-readable storage medium having a data transaction program stored thereon, where the data transaction program can be executed by one or more processors to implement the blockchain-based data transaction method provided by the present invention as described above.
To achieve the above object, the present invention further provides a computer program product comprising computer instructions, which when run on a computer, enable the computer to execute the blockchain-based data transaction method provided by the present invention.
Based on the data transaction method, the data transaction device and the system based on the block chain, provided by the embodiment of the invention, the first data transaction device issues a data pre-sale plan by using a block chain intelligent contract; the second data transaction device acquires a data pre-sale plan from the intelligent block chain contract; the second data transaction device purchases the data to be sold of the first data transaction device through the intelligent block chain contract; the first data transaction device acquires purchase indication information through a block chain intelligent contract; the first data transaction device encrypts the data to be sold and uploads the data to a file system, and respectively uploads a hash value corresponding to the data to be sold and/or a hash value corresponding to the encrypted data to be sold to a block chain; and the second data transaction device receives the downloadable information fed back by the intelligent block chain contract, acquires the encrypted data to be sold from the file system and decrypts the encrypted data. In the scheme, the buyer and the seller buy and sell the data to be sold through the intelligent block chain contract, and after the buyer buys the data to be sold and obtains a purchase certification of the intelligent block chain contract, the seller encrypts the data to be sold and uploads a file system. The buyer downloads the encrypted data to be sold from the file system and decrypts the data, and the data to be sold does not need to be purchased in an off-line copying mode, so that the data purchasing efficiency and the data purchasing safety are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic flow chart of an embodiment of the present invention;
FIG. 2 is a detailed flow diagram of the step of encrypting the data for sale of FIG. 1;
FIG. 3 is a detailed flow chart of the step of decrypting the encrypted data for sale in FIG. 1;
fig. 4 is a detailed flowchart illustrating a step of uploading hash values corresponding to the data to be sold and/or the encrypted data to be sold respectively to the blockchain in fig. 1;
FIG. 5 is a schematic flow chart of another embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an internal structure of a first data transaction apparatus according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating an internal structure of a second data transaction apparatus according to another embodiment of the present invention;
fig. 8 is a schematic diagram illustrating a content part structure of a data transaction system based on a blockchain according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention provides a data transaction method based on a block chain.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of the present invention, and in an embodiment, the method includes:
step S101: the first data trafficking device issues a data pre-sale plan using a blockchain smart contract.
In the process of implementing step S101 specifically, the first data transaction apparatus is a data seller, and uploads the data pre-sale plan to the block chain intelligent contract to sell the data to be sold by the first data transaction apparatus. Wherein the data pre-sale plan at least comprises: the amount of data to be sold, the type of data, and the price to be sold.
Step S102: the second data transaction device obtains the data pre-sale plan of the first data transaction device from the blockchain intelligent contract.
In the process of implementing step S102, the second data transaction apparatus is a data purchaser.
Step S103: the second data transaction device purchases the data for sale through the blockchain smart contract.
In the process of implementing step S103, the second data transaction apparatus determines the data to be sold to be purchased according to the data pre-sale plan. Purchasing the data for sale through the blockchain smart contract.
In a further implementation, the second data transaction arrangement transfers digital currency to the first data transaction arrangement using a purchase function of the blockchain smart contract when purchasing the data for sale. The blockchain smart contract feeds back proof of purchase to the second data transaction device for proving that the second data transaction device has paid.
Step S104: the first data transaction device obtains purchase indication information through the blockchain intelligent contract.
In the process of implementing step S104, after the second data transaction apparatus purchases the data for sale, the first data transaction apparatus obtains purchase instruction information through the blockchain smart contract, so as to instruct the second data transaction apparatus to purchase the data for sale.
Step S105: the first data transaction device encrypts the data for sale.
In the process of implementing step S105 specifically, when the first data transaction apparatus determines that the second data transaction apparatus has purchased the data for sale, the first data transaction apparatus encrypts the data for sale.
Step S106: and the first data transaction device uploads the encrypted data to be sold to a file system.
Step S107: and the first data transaction device uploads the hash value corresponding to the data to be sold and/or the encrypted hash value corresponding to the data to be sold to a block chain respectively.
In the process of implementing step S107 specifically, after uploading the hash value corresponding to the data to be sold and/or the encrypted hash value corresponding to the data to be sold to a blockchain, the first data transaction apparatus sets the state of the data to be sold as a "data downloadable" state by using the blockchain intelligent contract, so as to notify the second data transaction apparatus that the data to be sold can be downloaded from a file system.
It should be noted that the aforementioned "data downloadable" status for indicating that the data for sale is downloadable is only used for illustration, and other manners may also be used to indicate that the data for sale is downloadable, which is not described herein.
Step S108: and the second data transaction device receives downloadable information fed back by the block chain intelligent contract.
In the specific process of step S108, when the status of the data to be sold in the blockchain intelligent contract is "data downloadable", the blockchain intelligent contract feeds back downloadable information to the second data transaction device, and prompts that the data to be sold can be downloaded from the file system.
It should be noted that the file system is a system having a text transfer function, for example: a blockchain, an Inter-planet File System (IPFS), or a centralized cloud storage server. The specific type of the file system is not limited in the embodiment of the present invention.
Step S109: and the second data transaction device acquires the encrypted data to be sold from the file system.
Step S110: and the second data transaction device decrypts the encrypted data to be sold to obtain the data to be sold.
Preferably, the second data transaction device compares the hash value of the data for sale and/or the encrypted hash value of the data for sale with the hash value stored in the blockchain, and determines the authenticity of the obtained data.
In this embodiment, the buyer and the seller buy and sell the data to be sold through the blockchain intelligent contract, and when the buyer purchases the data to be sold and obtains a purchase proof of the blockchain intelligent contract, the seller encrypts the data to be sold and uploads the encrypted data to the file system. The buyer downloads the encrypted data to be sold from the file system and decrypts the data, and the data to be sold does not need to be purchased in an off-line copying mode, so that the data purchasing efficiency and the data purchasing safety are improved.
Referring to fig. 2, fig. 2 is a detailed flowchart of the step of encrypting the data to be sold in fig. 1, including:
step S201: the first data transaction device acquires a public key of a buyer corresponding to the second data transaction device and acquires a private key of a seller corresponding to the first data transaction device.
It should be noted that, with the preset data difficulty problem, the buyer public key and the buyer private key of the second data transaction apparatus are preset, and the seller private key and the seller public key of the first data transaction apparatus are preset. For example: assuming that the key length is 256 bits, the seller private key a and the buyer private key B are generated respectively by using the elliptic curve difficulty problem, and the seller public key a ═ aG and the buyer public key B ═ bG are generated, G is the common parameter base point of the elliptic curve.
It should be further noted that the seller private key, the seller public key, the buyer private key and the buyer public key may be generated by the first data transaction device and the second data transaction device themselves, or may be generated and distributed to the first data transaction device and the second data transaction device by a third party.
It should be further noted that the public key of the buyer and the public key of the seller may be issued to the blockchain intelligent contract in advance, or the public key of the seller may be uploaded when the first data transaction apparatus uploads the data pre-sale plan, and the public key of the buyer is uploaded when the second data transaction apparatus purchases the data to be sold, where the issuing timing of the public key of the buyer and the public key of the seller is not particularly limited.
Step S202: the first data transaction arrangement constructs an encryption key using a hash algorithm based on the seller private key and the buyer public key.
In the process of implementing step S202, in combination with the above example of step S201 for the buyer public key and the seller private key, the first data transaction apparatus constructs the encryption key K by using formula (1).
K=H(aB)&&(2^128-1) (1)
In the formula (1), H is a general 256-bit hash algorithm, such as SHA256 algorithm.
Step S203: and the first data transaction device encrypts the data to be sold by using the encryption key.
In the process of implementing step S203, the first data transaction apparatus encrypts the data to be sold by using the encryption key constructed in step S202.
In this embodiment, a public key and a private key corresponding to the first data transaction apparatus and the second data transaction apparatus are previously constructed. The first data transaction device utilizes the buyer public key of the second data transaction device to construct an encryption key, and utilizes the encryption key to encrypt data to be sold, so that the data security is improved.
Referring to fig. 3, fig. 3 is a detailed flowchart of the step of decrypting the encrypted data for sale in fig. 1, including:
step S301: the second data transaction device obtains a seller public key corresponding to the first data transaction device and obtains a buyer private key corresponding to the second data transaction device.
The setting of the public and private key pair of the buyer and the public and private key pair of the seller is described in step S201 of fig. 2, and will not be described herein again.
Step S302: the second data transaction arrangement utilizes the buyer private key and the seller public key to construct a decryption key utilizing a hash algorithm.
In the process of implementing step S302, the decryption key and the encryption key of the data to be sold are symmetric keys, and in combination with the above example of the public key of the buyer and the private key of the seller in step S201 in fig. 2, the second data transaction apparatus constructs the decryption key by using formula (2).
K’=H(bA)&&(2^128-1) (2)
In addition, in combination of the above formula (1) and formula (2), since aB ═ bA ═ abG and H are both general 256bit hash algorithms, K ═ K is required. Namely, the second data transaction device can decrypt the encrypted data to be sold by using K' to obtain the data to be sold.
Step S303: and the second data transaction device decrypts the encrypted data to be sold by using the decryption key.
In this embodiment, the second data transaction apparatus constructs a decryption key that is consistent with the encryption key, using the public key of the buyer and the private key of the seller. And decrypting the encrypted data to be sold according to the decryption key to finally obtain the data to be sold, and improving the transmission security of the data in the data transaction process.
Referring to fig. 4, fig. 4 is a schematic detailed flowchart of the step of uploading the hash values corresponding to the data for sale and/or the encrypted data for sale to the blockchain in fig. 1, respectively, where the step includes:
step S401: and the first data transaction device performs hash on the data to be sold to obtain a first hash value, and/or performs hash on the encrypted data to be sold to obtain a second hash value.
Step S402: the first data transaction device uploads the first hash value and/or the second hash value to a blockchain.
In the process of implementing step S402 specifically, the first data transaction apparatus sets a corresponding relationship between the first hash value and the second hash value, and uploads the first hash value and/or the second hash value to the block chain. When the first hash value and the second hash value are uploaded to a block chain, the first hash value and the second hash value are bound together, and the first hash value and the second hash value are uploaded to the block chain together.
Preferably, after the second data transaction device decrypts the encrypted data for sale to obtain the data for sale, the second data transaction device hashes the data for sale to obtain a third hash value, and/or hashes the encrypted data for sale to obtain a fourth hash value. And the second data transaction device compares the third hash value with the first hash value on the blockchain, and/or compares the fourth hash value with the second hash value on the blockchain, and if the comparison result is consistent, the data to be sold acquired by the second data transaction device is determined to be real and accurate data.
In this embodiment, the first data transaction device uploads the hash value of the data to be sold and/or the encrypted hash value corresponding to the data to be sold to the blockchain. And the second data transaction device compares the obtained data to be sold and/or the encrypted hash value of the data to be sold with the hash value stored in the block chain, so that the authenticity and accuracy of the obtained data are further determined, and the safety of purchasing the data is improved.
To better explain the contents shown in fig. 1 to 4, reference is made to fig. 5, and fig. 5 is a schematic flow chart of another embodiment of the present invention. In fig. 5, the digital representation executing step includes that Provider is the first Data transaction device, layer is the second Data transaction device, Smart Contract is the block chain Smart Contract, Blockchain is the block chain, File System is the File System, Data is the Data for sale, and Encrypted Data is the Data for sale. The specific contents of the fig. 5 are as follows:
step 1: the first data trafficking device issues the data pre-sale plan through the blockchain smart contract.
Step 2: the second data transaction device purchases the data for sale through the blockchain smart contract.
And step 3: and the first data transaction device constructs the encryption key, encrypts the data to be sold by using the encryption key, and uploads the encrypted data to be sold to a file system.
And 4, step 4: and the first data transaction device hashes the data to be sold and/or the encrypted data to be sold, uploads a hash value to the block chain, and sets the state of the data to be sold as 'data downloadable' in the intelligent contract of the block chain.
And 5: and the second data transaction device determines that the data to be sold can be downloaded through the intelligent block chain contract, acquires the encrypted data to be sold from the file system, and decrypts the encrypted data to be sold by using a pre-established decryption key to obtain the data to be sold. And comparing the hash value of the data to be sold and/or the encrypted hash value of the data to be sold with the hash value stored in the block chain, and further determining the authenticity of the obtained data.
It should be noted that the execution principle of steps 1 to 5 can refer to the content of each step in fig. 1 to 4, and is not described herein again.
In this embodiment, the buyer and the seller buy and sell the data to be sold through the blockchain intelligent contract, and after the buyer purchases the data to be sold and obtains a purchase certification of the blockchain intelligent contract, the seller encrypts the data to be sold by using the encryption key and uploads the data to be sold to the file system. The buyer downloads the encrypted data to be sold from the file system and decrypts the data by using the decryption key, and the data to be sold does not need to be purchased by adopting an off-line copying mode, so that the data purchasing efficiency and the data purchasing safety are improved.
Corresponding to the above-mentioned data transaction method based on block chain according to the embodiment of the present invention, referring to fig. 6, fig. 6 is a schematic view of an internal structure of a first data transaction apparatus according to an embodiment of the present invention, where the first data transaction apparatus can execute the contents shown in the above-mentioned method embodiment. The first data transaction apparatus includes: a sending unit 601, a receiving unit 602, an encrypting unit 603, a first uploading unit 604 and a second uploading unit 605;
a sending unit 601, configured to issue a data pre-sale plan by using a blockchain intelligent contract, where the data pre-sale plan at least includes: the amount of data to be sold, the type of data, and the price to be sold.
A receiving unit 602, configured to obtain, by the blockchain intelligent contract, purchase indication information, where the indication information is used to indicate: the second data transaction device has purchased the data for sale.
An encryption unit 603, configured to encrypt the data for sale.
In a specific implementation, the encryption unit 603 is specifically configured to: and acquiring a buyer public key corresponding to the second data transaction device and a seller private key corresponding to the first data transaction device, constructing an encryption key by using a hash algorithm based on the seller private key and the buyer public key, and encrypting the data to be sold by using the symmetric encryption key.
A first uploading unit 604, configured to upload the encrypted data for sale to a file system.
A second uploading unit 605, configured to upload the hash value corresponding to the data for sale and/or the encrypted hash value corresponding to the data for sale to a block chain, so that the second data transaction apparatus downloads the encrypted data for sale from the file system, and decrypts the encrypted data for sale.
In a specific implementation, the second uploading unit 605 is specifically configured to: and hashing the data to be sold to obtain a first hash value, and/or hashing the encrypted data to be sold to obtain a second hash value, and uploading the first hash value and/or the second hash value to a block chain.
In this embodiment, the buyer and the seller buy and sell the data to be sold through the blockchain intelligent contract, and after the buyer purchases the data to be sold and obtains a purchase certification of the blockchain intelligent contract, the seller encrypts the data to be sold by using the encryption key and uploads the data to be sold to the file system. The buyer downloads the encrypted data to be sold from the file system and decrypts the data by using the decryption key, and the data to be sold does not need to be purchased by adopting an off-line copying mode, so that the data purchasing efficiency and the data purchasing safety are improved.
Corresponding to the above-mentioned data transaction method based on block chain according to the embodiment of the present invention, referring to fig. 7, fig. 7 is a schematic diagram of an internal structure of a second data transaction apparatus according to another embodiment of the present invention, where the second data transaction apparatus can execute the contents shown in the above-mentioned method embodiment. The second data transaction apparatus includes: a first acquisition unit 701, a purchase unit 702, a reception unit 703, a second acquisition unit 704, and a decryption unit 705;
a first obtaining unit 701, configured to obtain a data pre-sale plan of a first data transaction apparatus from a blockchain intelligent contract, where the data pre-sale plan includes at least: the amount of data to be sold, the type of data, and the price to be sold.
A purchasing unit 702, configured to purchase the data for sale through the blockchain smart contract.
A receiving unit 703, configured to receive downloadable information fed back by the blockchain intelligent contract, where the downloadable information is used to indicate: the data for sale may be downloaded from a file system.
A second obtaining unit 704, configured to obtain the encrypted data for sale from the file system, where the data for sale is encrypted by the first data transaction apparatus and then uploaded to the file system.
The decryption unit 705 is configured to decrypt the encrypted data for sale to obtain the data for sale.
In a specific implementation, the decryption unit 705 is specifically configured to: the second data transaction device obtains a seller public key corresponding to the first data transaction device and a buyer private key corresponding to the second data transaction device, the buyer private key and the seller public key are used, a Hash algorithm is used for constructing the decryption key, the decryption key and an encryption key of the data to be sold are symmetric keys, and the encrypted data to be sold are decrypted by the decryption key.
In this embodiment, the buyer and the seller buy and sell the data to be sold through the blockchain intelligent contract, and when the buyer purchases the data to be sold and obtains a purchase certification of the blockchain intelligent contract, the seller encrypts the data to be sold and uploads the data to be sold to the file system. The buyer downloads the encrypted data to be sold from the file system and decrypts the data by using the decryption key, and the data to be sold does not need to be purchased by adopting an off-line copying mode, so that the data purchasing efficiency and the data purchasing safety are improved.
Preferably, as described in conjunction with fig. 7, the second data transaction apparatus further includes:
and the comparison unit is used for comparing the hash value of the data to be sold and/or the encrypted hash value of the data to be sold with the hash value stored in the block chain, and determining the authenticity of the obtained data.
Corresponding to the above-mentioned data transaction method based on a block chain provided in the embodiment of the present invention, referring to fig. 8, fig. 8 is a schematic diagram of a content part structure of a data transaction system based on a block chain disclosed in an embodiment of the present invention, where the data transaction system includes: a first data trafficking device 801 and a second data trafficking device 802.
The implementation principle of the first data transaction apparatus 801 is shown in fig. 6, and the implementation principle of the second data transaction apparatus 802 is shown in fig. 7.
It should be noted that the first data transaction apparatus 801 and the second data transaction apparatus 802 may be both nodes in the blockchain system.
Preferably, the embodiment of the present invention further provides a computer-readable storage medium, where a data transaction program is stored on the computer-readable storage medium, and the data transaction program can be executed by one or more processors to implement the data transaction method based on the blockchain as described in any of the above embodiments.
Further, an embodiment of the present invention also discloses a computer program product, which includes computer instructions, when the computer program product runs on a computer, the computer can execute the data transaction method based on the blockchain as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (11)

1. A blockchain-based data transaction method, the method comprising:
the first data transaction device issues a data pre-sale plan using a blockchain smart contract, the data pre-sale plan including at least: the amount of data to be sold, the type of data and the selling price;
the first data transaction device acquires purchase indication information through the blockchain intelligent contract, wherein the indication information is used for indicating that: the second data transaction device purchases the data for sale;
the first data transaction device encrypts the data to be sold;
the first data transaction device uploads the encrypted data to be sold to a file system;
and the first data transaction device uploads the hash value corresponding to the data to be sold and/or the encrypted hash value corresponding to the data to be sold to a block chain respectively, so that the second data transaction device downloads the encrypted data to be sold from the file system and decrypts the encrypted data to be sold.
2. The method of claim 1, wherein the first data transaction device encrypts the data for sale, comprising:
the first data transaction device acquires a public key of a buyer corresponding to the second data transaction device and acquires a private key of a seller corresponding to the first data transaction device;
the first data transaction device constructs an encryption key by utilizing a hash algorithm based on the seller private key and the buyer public key;
and the first data transaction device encrypts the data to be sold by using the encryption key.
3. The method according to claim 1, wherein the first data transaction device uploads the hash value corresponding to the data for sale and/or the encrypted hash value corresponding to the data for sale to a blockchain respectively, and the method comprises:
the first data transaction device performs hash on the data to be sold to obtain a first hash value, and/or performs hash on the encrypted data to be sold to obtain a second hash value;
the first data transaction device uploads the first hash value and/or the second hash value to a blockchain.
4. A blockchain-based data transaction method, the method comprising:
the second data transaction device obtains a data pre-sale plan of the first data transaction device from the blockchain intelligent contract, and the data pre-sale plan at least comprises the following components: the amount of data to be sold, the type of data and the selling price;
the second data transaction device purchases the data for sale through the blockchain intelligent contract;
the second data transaction device receives downloadable information fed back by the block chain intelligent contract, wherein the downloadable information is used for indicating that: the data for sale can be downloaded from a file system;
the second data transaction device acquires the encrypted data to be sold from the file system, wherein the data to be sold is encrypted by the first data transaction device and then uploaded to the file system;
and the second data transaction device decrypts the encrypted data to be sold to obtain the unencrypted data to be sold.
5. The method of claim 4, wherein the second data transaction device decrypts the encrypted data for sale, comprising:
the second data transaction device acquires a seller public key corresponding to the first data transaction device and acquires a buyer private key corresponding to the second data transaction device;
the second data transaction device utilizes the buyer private key and the seller public key to construct a decryption key by utilizing a Hash algorithm, and the decryption key and the encryption key of the data to be sold are symmetric keys;
and the second data transaction device decrypts the encrypted data to be sold by using the decryption key.
6. The method of claim 4, further comprising:
and the second data transaction device compares the hash value of the data to be sold and/or the encrypted hash value of the data to be sold with the hash value stored in the block chain, and determines the authenticity of the obtained data.
7. A first data transaction arrangement, characterized in that the first data transaction arrangement comprises a processor and a memory, wherein the memory stores a program which, when executed by the processor, carries out the method according to any one of claims 1-3.
8. A second data trafficking device comprising a processor and a memory, wherein the memory stores a program that when executed by the processor implements the method of any of claims 4-6.
9. A blockchain-based data transaction system, the data transaction system comprising: a first data transaction apparatus as claimed in claim 7 and a second data transaction apparatus as claimed in claim 8.
10. A computer readable storage medium having stored thereon a data trafficking program executable by one or more processors to implement the blockchain based data trafficking method of any one of claims 1 to 3 or the blockchain based data trafficking method of any one of claims 4 to 6.
11. A computer program product comprising computer instructions which, when run on a computer, cause the computer to perform the blockchain based data transaction method of any one of the preceding claims 1 to 3 or the blockchain based data transaction method of any one of the preceding claims 4 to 6.
CN201910925452.3A 2019-09-27 2019-09-27 Data transaction method, data transaction device and system based on block chain Pending CN110659994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910925452.3A CN110659994A (en) 2019-09-27 2019-09-27 Data transaction method, data transaction device and system based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910925452.3A CN110659994A (en) 2019-09-27 2019-09-27 Data transaction method, data transaction device and system based on block chain

Publications (1)

Publication Number Publication Date
CN110659994A true CN110659994A (en) 2020-01-07

Family

ID=69039624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910925452.3A Pending CN110659994A (en) 2019-09-27 2019-09-27 Data transaction method, data transaction device and system based on block chain

Country Status (1)

Country Link
CN (1) CN110659994A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369236A (en) * 2020-02-19 2020-07-03 中国建设银行股份有限公司 Data management method and device applied to block chain
CN111401891A (en) * 2020-02-19 2020-07-10 中国建设银行股份有限公司 Data management method and device applied to block chain
CN113015973A (en) * 2020-06-17 2021-06-22 达闼机器人有限公司 Data processing method, storage medium, electronic device and data transaction system
CN116561739A (en) * 2023-04-06 2023-08-08 北京熠智科技有限公司 Data transaction method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018115567A1 (en) * 2016-12-19 2018-06-28 Nokia Technologies Oy Method and apparatus for private data transfer between parties
CN109768987A (en) * 2019-02-26 2019-05-17 重庆邮电大学 A kind of storage of data file security privacy and sharing method based on block chain
CN109889504A (en) * 2019-01-23 2019-06-14 北京航空航天大学 Decentralization data access rights method of commerce and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018115567A1 (en) * 2016-12-19 2018-06-28 Nokia Technologies Oy Method and apparatus for private data transfer between parties
CN109889504A (en) * 2019-01-23 2019-06-14 北京航空航天大学 Decentralization data access rights method of commerce and system
CN109768987A (en) * 2019-02-26 2019-05-17 重庆邮电大学 A kind of storage of data file security privacy and sharing method based on block chain

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111369236A (en) * 2020-02-19 2020-07-03 中国建设银行股份有限公司 Data management method and device applied to block chain
CN111401891A (en) * 2020-02-19 2020-07-10 中国建设银行股份有限公司 Data management method and device applied to block chain
CN111401891B (en) * 2020-02-19 2023-06-16 建信金融科技有限责任公司 Data management method and device applied to blockchain
CN111369236B (en) * 2020-02-19 2023-07-07 建信金融科技有限责任公司 Data management method and device applied to blockchain
CN113015973A (en) * 2020-06-17 2021-06-22 达闼机器人有限公司 Data processing method, storage medium, electronic device and data transaction system
CN116561739A (en) * 2023-04-06 2023-08-08 北京熠智科技有限公司 Data transaction method and device, electronic equipment and storage medium
CN116561739B (en) * 2023-04-06 2024-04-16 北京熠智科技有限公司 Data transaction method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109462588B (en) Decentralized data transaction method and system based on block chain
CN110570313A (en) data transaction method, data transaction device and system based on block chain
CN110659994A (en) Data transaction method, data transaction device and system based on block chain
US11750591B2 (en) Key attestation statement generation providing device anonymity
CN110786032B (en) Device supply
EP3404891B1 (en) Method and system for distributing digital content in peer-to-peer network
EP3813324B1 (en) Data processing method and device
US9735962B1 (en) Three layer key wrapping for securing encryption keys in a data storage system
US20190074968A1 (en) Method, apparatus and system for data encryption and decryption
US20200014545A1 (en) Method for Using Cryptography to Protect Deployable Rapid On-Site Manufacturing 3D Printing Systems and Enable a Single Time Printing Protocol
CN113095749A (en) Logistics information transmission method, system and device based on block chain
US20120130900A1 (en) System and Method for Trading Unused Digital Rights
WO2019204094A1 (en) Systems and methods for decentralized content distribution
CN107408183A (en) The equipment carried out by hardening administration agent safely confirms
US20190354962A1 (en) Distributed Ledger Payments Platform for Telecoms
CN110503560A (en) Data trade method, data trade apparatus and system based on block chain
US11133936B1 (en) Methods and systems for introducing self-contained intent functionality into decentralized computer networks
CN101571900A (en) Software copyright protection method, device and system
KR101979254B1 (en) Apparatus for matching transactions for exchanging cryptocurrencies and method thereof
JP7302664B2 (en) Information processing device, data recording system, data recording method and program
CN110188551A (en) A kind of declaration form encrypted transmission method and system
US11870654B2 (en) Methods and systems for introducing self-contained intent functionality into decentralized computer networks
CN110599342A (en) Block chain-based identity information authorization method and device
Chi et al. Secure and reliable blockchain-based eBook transaction system for self-published eBook trading
CN115203749A (en) Data transaction method and system based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210909

Address after: 518000 21 / f-23 / F, block B, building 12, Shenzhen Bay science and technology ecological park, No. 18, South Keji Road, high tech community, Yuehai street, Nanshan District, Shenzhen City, Guangdong Province

Applicant after: Xunlei Networking Technologies, Ltd.

Applicant after: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

Address before: 518052 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: SHENZHEN ONETHING TECHNOLOGIES Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200107