CN111242718A - Block chain-based data transaction method, device, equipment and medium - Google Patents

Block chain-based data transaction method, device, equipment and medium Download PDF

Info

Publication number
CN111242718A
CN111242718A CN201911313439.9A CN201911313439A CN111242718A CN 111242718 A CN111242718 A CN 111242718A CN 201911313439 A CN201911313439 A CN 201911313439A CN 111242718 A CN111242718 A CN 111242718A
Authority
CN
China
Prior art keywords
blockchain
user
block chain
data transaction
credit value
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.)
Granted
Application number
CN201911313439.9A
Other languages
Chinese (zh)
Other versions
CN111242718B (en
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 University
Original Assignee
Shenzhen University
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 University filed Critical Shenzhen University
Priority to CN201911313439.9A priority Critical patent/CN111242718B/en
Publication of CN111242718A publication Critical patent/CN111242718A/en
Application granted granted Critical
Publication of CN111242718B publication Critical patent/CN111242718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Computer Security & Cryptography (AREA)
  • Technology Law (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a data transaction method, a device, equipment and a medium based on a block chain, wherein the method comprises the following steps: when a completion instruction of data transaction completion is received based on a preset block chain, selecting a first target block chain user recording the data transaction from block chain users of the preset block chain through a preset data volume proof consensus algorithm; in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user; recording and processing the data transaction through the first target block chain user to obtain accounting information; and carrying out consensus verification on the accounting information by other block chain users outside the first target block chain user, and updating the transaction record information corresponding to the first target block chain user based on the accounting information when the verification is passed. The invention solves the technical problem of low data transaction consensus efficiency in the data transaction process of the existing block chain.

Description

Block chain-based data transaction method, device, equipment and medium
Technical Field
The invention relates to the technical field of block chains, in particular to a data transaction method, a device, equipment and a medium based on a block chain.
Background
As an important component of the block chain technology, consensus algorithms become the key point of learning and research, and various existing consensus algorithms for data transaction are still endless, but they also expose corresponding problems, for example, a Work Proof of progress of Work (PoW) based consensus algorithm has low efficiency of consensus, easily causes resource waste and computational monopoly, and a closed equity Proof of reserve (DPoS) separates equity from mining equity, but it is difficult to ensure that there is no cheating behavior in the data transaction consensus process, and further, the transaction consensus efficiency is also reduced, that is, there is a technical problem of low data transaction consensus efficiency in the data transaction process of the existing block chain.
Disclosure of Invention
The invention mainly aims to provide a data transaction method, a device, equipment and a medium based on a block chain, and aims to solve the technical problem of low data transaction consensus efficiency in the data transaction process of the existing block chain.
In order to achieve the above object, an embodiment of the present invention provides a data transaction method based on a blockchain, where the data transaction method based on a blockchain includes:
when a completion instruction of data transaction completion is received based on a preset block chain, selecting a first target block chain user recording the data transaction from block chain users of the preset block chain through a preset data volume proof consensus algorithm;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
recording and processing the data transaction through the first target block chain user to obtain accounting information;
and carrying out consensus verification on the accounting information by other block chain users outside the first target block chain user, and updating the transaction record information corresponding to the first target block chain user based on the accounting information when the verification is passed.
Optionally, when a completion instruction for completing the data transaction is received based on the blockchain, the step of selecting a first target blockchain user for recording the data transaction from preset blockchain users in competition by using a preset data volume identification consensus algorithm includes:
acquiring historical transaction records of each blockchain user;
determining an initial credit value of each block chain user according to the historical transaction record and a preset credit value determination mode;
and determining the current credit value of each block chain user according to the initial credit value.
Optionally, the blockchain-based data transaction method further includes:
acquiring buyer blockchain users and seller blockchain users in the preset blockchain related to the data transaction;
and selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain through a preset data volume identification consensus algorithm in a competition manner so as to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction, and updating credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information to obtain an updated credit value of the seller and an updated credit value of the buyer.
Optionally, the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value includes:
and performing consensus verification on the seller update credit value and the buyer update credit value by other blockchain users outside the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller update credit value and the buyer update credit value when the verification is passed.
Optionally, the step of selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain in a competitive manner by using a preset data volume identification consensus algorithm to receive the comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction includes:
and acquiring comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value includes:
if the sub-feedback information of the buyer to the seller in the comprehensive feedback information is matched with the preset positive feedback information, increasing the credit value of the seller block chain user to obtain the updated credit value of the seller;
and if the sub-feedback information of the seller to the buyer in the comprehensive feedback information is matched with the preset positive feedback information, increasing the credit value of the buyer block chain user to obtain the updated credit value of the buyer.
Optionally, the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value includes:
and if the credit value of any block chain user is detected to be lower than the preset credit value, pulling the block chain user with the credit value lower than the preset credit value into a blacklist of the block chain.
The invention also provides a data transaction device based on the block chain, which comprises:
the system comprises a first selection module, a second selection module and a third selection module, wherein the first selection module is used for selecting a first target blockchain user recording data transaction in a competitive mode through a preset data volume certification consensus algorithm from blockchain users of a preset blockchain when a completion instruction of data transaction completion is received based on the preset blockchain;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
the recording module is used for recording and processing the data transaction through the first target block chain user to obtain accounting information;
and the first verification module is used for performing consensus verification on the accounting information through other block chain users outside the first target block chain user, and updating the transaction record information of the corresponding record of the first target block chain user based on the accounting information when the verification is passed.
Optionally, the blockchain-based data transaction apparatus further includes:
the first acquisition module is used for acquiring historical transaction records of each blockchain user;
the first determining module is used for determining the initial credit value of each block chain user according to the historical transaction record and a preset credit value determining mode;
and the second determining module is used for determining the current credit value of each block chain user according to the initial credit value.
Optionally, the blockchain-based data transaction apparatus further includes:
the second acquisition module is used for acquiring buyer block chain users and seller block chain users in the preset block chain related to the data transaction;
the first selection module is used for selecting a second target block chain user recording the data transaction from block chain users of a preset block chain in a competitive mode through a preset data volume identification consensus algorithm so as to receive comprehensive feedback information of the buyer block chain user and the seller block chain user on the data transaction, and updating credit values of the buyer block chain user and the seller block chain user based on the comprehensive feedback information to obtain a seller update credit value and a buyer update credit value.
Optionally, the blockchain-based data transaction apparatus further includes:
and the second verification module is used for performing consensus verification on the seller update credit value and the buyer update credit value through other blockchain users outside the second target blockchain user, and updating the credit record information correspondingly recorded by the second target blockchain user based on the seller update credit value and the buyer update credit value when the verification is passed.
Optionally, the blockchain-based data transaction apparatus further includes:
and the third acquisition module is used for acquiring comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the second authentication module comprises:
the first adding unit is used for adding the credit value of the seller block chain user to obtain an updated credit value of the seller if the sub-feedback information of the buyer to the seller in the comprehensive feedback information is matched with preset positive feedback information;
and the second adding unit is used for adding the credit value of the buyer block chain user to obtain the updated credit value of the buyer if the sub-feedback information of the seller to the buyer in the comprehensive feedback information is matched with the preset positive feedback information.
Optionally, the blockchain-based data transaction apparatus further includes:
and the pull-in unit is used for pulling the block chain user with the credit value lower than the preset credit value into a blacklist of the block chain if the credit value of any block chain user is detected to be lower than the preset credit value.
The invention also provides a medium, on which a blockchain-based data transaction program is stored, and when being executed by a processor, the blockchain-based data transaction program realizes the steps of the blockchain-based data transaction method.
When a finishing instruction of finishing data transaction is received based on a preset block chain, a first target block chain user recording the data transaction is selected in a competitive mode through a preset data volume identification consensus algorithm from block chain users of the preset block chain; in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user; recording and processing the data transaction through the first target block chain user to obtain accounting information; and carrying out consensus verification on the accounting information by other block chain users outside the first target block chain user, and updating the transaction record information corresponding to the first target block chain user based on the accounting information when the verification is passed. In the application, a preset data volume certification consensus algorithm is provided, in which the difficulty of competitive selection, i.e., the difficulty of ore excavation, is inversely proportional to the current credit value of the blockchain user, i.e., the competitive accounting difficulty of the blockchain user is dynamically adjusted according to the credit value of the user, so that after receiving a completion instruction of data transaction completion based on the preset blockchain, users with higher utilization among the blockchain users can compete to obtain the accounting right of the data transaction, and users with higher utilization among the blockchain users can compete to obtain the accounting right of the data transaction, which shortens the time for reaching consensus to a certain extent, further reduces the calculation power consumption, and improves the consensus efficiency. The technical problem that the data transaction consensus efficiency is low in the data transaction process of the existing block chain is solved.
Drawings
FIG. 1 is a schematic flow chart illustrating a block chain-based data transaction method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a detailed process of determining a notch depth of each damaged notch in the damaged area and determining a cutting method of the incomplete wafer according to the notch depth in a second embodiment of the data transaction method based on the blockchain according to the present invention;
FIG. 3 is a schematic diagram of an apparatus architecture of a hardware operating environment to which a method of an embodiment of the invention relates;
FIG. 4 is a schematic view of a block chain-based data transaction method according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a data transaction method based on a block chain, and in an embodiment of the data transaction method based on the block chain, referring to fig. 1, the data transaction method based on the block chain comprises the following steps:
step S10, when a completion instruction of data transaction completion is received based on a preset blockchain, selecting a first target blockchain user recording the data transaction from blockchain users of the preset blockchain through a preset data volume certification consensus algorithm;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
step S20, recording the data transaction by the first target block chain user to obtain accounting information;
and step S30, performing consensus verification on the accounting information through other users of the blockchain outside the first target blockchain user, and updating the transaction record information recorded corresponding to the first target blockchain user based on the accounting information when the verification is passed.
The method comprises the following specific steps:
step S10, when a completion instruction of data transaction completion is received based on a preset blockchain, selecting a first target blockchain user recording the data transaction from blockchain users of the preset blockchain through a preset data volume certification consensus algorithm;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
it should be noted that, in this embodiment, the data transaction method based on the blockchain is applied to a data transaction system based on the blockchain, where the data transaction system based on the blockchain belongs to a data transaction device based on the blockchain, and in the data transaction system based on the blockchain, a plurality of or one preset blockchain is provided, and the plurality of or one preset blockchain correspond to a plurality of blockchain users, and the plurality of blockchain users may perform data transaction with each other, for example, an a blockchain user performs data transaction with a B blockchain user through the blockchain, if the a blockchain user is a data purchaser, that is, a blockchain user, and the B blockchain user is a data provider, that is, a seller blockchain user, the specific data transaction process may be: in order to ensure the authenticity and credibility in the transaction process, in this embodiment, the data transaction is placed into a transaction pool, the users of the blockchain of the preset blockchain compete to obtain the accounting right of the data transaction from the transaction pool, the users of the blockchain of the preset blockchain compete to obtain the accounting right of the data transaction, the users of the blockchain of the preset blockchain obtain the accounting right of the transaction information from the transaction pool, namely the process of competing for mining right, and the users of the blockchain obtaining the accounting right have an incentive to mine mining, the block chain user acquiring the accounting right may be set as an accounting miner, so that each block chain user of the preset block chain participates in the competitive accounting process, after the a block chain user is used as a data purchaser and trades with the B block chain user as a data provider, the a block chain user and the B block chain user may also participate in the competitive accounting as block chain users of the preset block chain, and of course, the a block chain user and the B block chain user may not participate in the competitive accounting as block chain users of the preset block chain.
It should be noted that, the user participating in the data transaction may not belong to the blockchain user, but the user competing for accounting necessarily belongs to the blockchain user, so as to ensure the authenticity and reliability in the accounting process.
When a completion instruction of data transaction completion is received based on a preset blockchain, a first target blockchain user recording the data transaction is selected in a competitive mode through a preset data volume proof consensus algorithm from blockchain users of the preset blockchain, wherein in the preset data volume proof consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user.
Specifically, when a completion instruction of data transaction completion is received based on a preset block link, the current credit value of each block chain user is obtained, and according to the current credit value of each block chain user, the ore excavation difficulty of each block chain user in the competition accounting process, namely the ore excavation process, is determined, the higher the current credit value of each block chain user is, the lower the ore excavation difficulty is, and the specific formula of the preset data volume certification consensus algorithm can be as follows:
Figure RE-GDA0002463728990000072
in the above formula, nonce is a random number, pre _ hash is a hash value of a previous blockchain block, merkel _ root is a hash value of a root of a Merkel tree of all transactions to be packed in a current block, D is an average difficulty value of current whole-network mining, i is an index of a bookkeeping miner, and T is an index of a bookkeeping mineriCurrent credit value of miners booked for competition, λ is for guaranteeing normalization
Figure RE-GDA0002463728990000071
The coefficient of (a).
As can be seen from the above formula, when a completion instruction for completing data transaction is received based on a predetermined blockchain, a first target blockchain user for recording the data transaction is selected in competition from blockchain users of the predetermined blockchain by a predetermined data volume certification consensus algorithm, and specifically, a first target blockchain user meeting the data transaction is found first
Figure RE-GDA0002463728990000081
The first target blockchain user, the higher the current credit value of miners (blockchain users) competing for billing, and thus,
Figure RE-GDA0002463728990000082
the smaller the value is, the H function finds a suitable nonce, i.e. random number, from a smaller range (it should be noted that the process of all blockchain users finding nonces is a traversal process), and thus, the speed of finding nonces by blockchain users with higher current credit value is faster or more efficient, and thus, the competitiveness of miners is higher, and thus, the transaction efficiency of the whole data transaction based on blockchain is improved. In this embodiment, miners competing for billing rights are set as the first target blockchain user.
It should be noted that, in this embodiment, in order to improve transaction efficiency, a blockchain user of a preset blockchain may be subjected to fragment division processing, and then, if there are multiple pieces of transaction data, the multiple pieces of transaction data are first allocated to each sub-transaction pool in the transaction pool, then each fragment selects corresponding transaction data from the corresponding sub-transaction pool, and then the transaction data is provided to each blockchain user in the fragment so that each blockchain user in the corresponding fragment performs accounting or competition of mining.
Referring to fig. 2, when a completion instruction for completing a data transaction is received based on a blockchain, the step of selecting a first target blockchain user for recording the data transaction from preset blockchain users in a competitive manner through a preset data volume identification consensus algorithm includes:
step S01, obtaining the historical transaction records of each block chain user;
in this embodiment, before data transaction, the blockchain-based data transaction system obtains past transaction records, i.e., historical transaction records, of the data provider, i.e., the seller blockchain user, and the data buyer, i.e., the buyer blockchain user.
Step S02, determining the initial credit value of each block chain user according to the historical transaction record and a preset credit value determination mode;
after obtaining the historical transaction record, obtaining the number of historical transactions, and if the number of historical transactions reaches a preset number, obtaining a credit value determination mode from the data transaction system based on the blockchain, for example, the credit value determination mode of the vendor blockchain user is as follows: and determining the initial credit value of each blockchain user after obtaining the historical transaction record and a preset credit value determination mode according to the rating and the rating occupation ratio of the buyer blockchain user.
And step S03, determining the current credit value of each block chain user according to the initial credit value.
After the initial credit value is obtained, determining the current credit value of each blockchain user according to the initial credit value, specifically, obtaining the feedback of each blockchain user according to the transaction behavior and the like in the subsequent transaction process, and determining the current credit value of each blockchain user according to the feedback of each blockchain user.
Step S20, recording the data transaction by the first target block chain user to obtain accounting information;
in this embodiment, after obtaining the first target blockchain user, the first target blockchain user performs recording processing on the data transaction to obtain accounting information, that is, in this embodiment, the detailed content of the data transaction is accounted in the transaction recording information corresponding to the first target blockchain user.
And step S30, performing consensus verification on the accounting information through other users of the blockchain outside the first target blockchain user, and updating the transaction record information recorded corresponding to the first target blockchain user based on the accounting information when the verification is passed.
After the data transaction is recorded and processed by the first target blockchain user to obtain the accounting information, in order to ensure the safety and reliability of the accounting information, in this embodiment, the accounting information needs to be identified and verified by other blockchain users outside the first target blockchain user, and when the verification is passed, the transaction record information recorded corresponding to the first target blockchain user is updated based on the accounting information, where the process of identifying and verifying the accounting information by other blockchain users outside the first target blockchain user may be: the first target block chain sends the acquired nonce to other blocksThe chain user can ensure that other block chain users can obtain the nonce
Figure RE-GDA0002463728990000091
If yes, the consensus verification is passed, and when the verification is passed, the transaction record information recorded correspondingly by the first target blockchain user is updated based on the accounting information. And broadcasting the transaction record information to the blockchain for other blockchain users to obtain.
When a finishing instruction of finishing data transaction is received based on a preset block chain, a first target block chain user recording the data transaction is selected in a competitive mode through a preset data volume identification consensus algorithm from block chain users of the preset block chain; in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user; recording and processing the data transaction through the first target block chain user to obtain accounting information; and carrying out consensus verification on the accounting information by other block chain users outside the first target block chain user, and updating the transaction record information corresponding to the first target block chain user based on the accounting information when the verification is passed. In the application, a preset data volume certification consensus algorithm is provided, in which the difficulty of competitive selection, i.e., the difficulty of ore excavation, is inversely proportional to the current credit value of the blockchain user, i.e., the competitive accounting difficulty of the blockchain user is dynamically adjusted according to the credit value of the user, so that after receiving a completion instruction of data transaction completion based on the preset blockchain, users with higher utilization among the blockchain users can compete to obtain the accounting right of the data transaction, and users with higher utilization among the blockchain users can compete to obtain the accounting right of the data transaction, which shortens the time for reaching consensus to a certain extent, further reduces the calculation power consumption, and improves the consensus efficiency. The technical problem that the data transaction consensus efficiency is low in the data transaction process of the existing block chain is solved.
Further, based on the foregoing embodiment, the present invention provides another embodiment of a data transaction method based on a blockchain, in which the data transaction method based on a blockchain further includes:
step A1, obtaining buyer blockchain users and seller blockchain users in the preset blockchain related to the data transaction;
in this embodiment, after the data transaction is completed, the buyer blockchain user and the seller blockchain user in the preset blockchain associated with the data transaction are also obtained, and the purpose of obtaining the buyer blockchain user and the seller blockchain user is to update their credit values.
Step A2, selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain through a preset data volume identification consensus algorithm in a competition manner, so as to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction, and updating credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information, so as to obtain an updated credit value of the seller and an updated credit value of the buyer.
In this embodiment, after the transaction is completed, the buyer blockchain user and the seller blockchain user perform comprehensive feedback on the data transaction to obtain comprehensive feedback information, after the comprehensive feedback information is obtained, a second target blockchain user recording the data transaction is selected in a competitive manner from blockchain users of a preset blockchain through a preset data volume certification consensus algorithm, that is, each blockchain user records the comprehensive feedback information in a competitive manner, and credit values of the buyer blockchain user and the seller blockchain user are updated based on the comprehensive feedback information to obtain an updated credit value of the seller and an updated credit value of the buyer. It should be noted that the process of selecting the second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through the preset data volume proof consensus algorithm in a competitive manner is substantially the same as the process of selecting the first target blockchain user recording the data transaction from the blockchain users of the preset blockchain through the preset data volume proof consensus algorithm in a competitive manner, and details are not repeated here.
Wherein, the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information to obtain the seller updated credit value and the buyer updated credit value comprises the following steps:
and step B1, performing consensus verification on the seller update credit value and the buyer update credit value by other users of the blockchain outside the second target blockchain user, and updating the credit record information recorded corresponding to the second target blockchain user based on the seller update credit value and the buyer update credit value when the verification is passed.
In this embodiment, after obtaining a second target blockchain user, obtaining a nonce corresponding to the accounting right of the second target blockchain user in competition, sending the nonce of the second target blockchain user to another blockchain user outside the second target blockchain user for consensus verification, and when the verification passes, updating the credit record information recorded corresponding to the second target blockchain user based on the seller update credit value and the buyer update credit value, and broadcasting and storing the credit record information.
The step of updating the credit values of the buyer blockchain users and the seller blockchain users based on the comprehensive feedback information to obtain the seller updated credit value and the buyer updated credit value comprises the following steps:
step C1, if it is detected that the credit value of any user of the blockchain is lower than the preset credit value, pulling the user of the blockchain whose credit value is lower than the preset credit value into the blacklist of the blockchain.
In this embodiment, if it is detected that the credit value of any user of the block chain is lower than the preset credit value, the user of the block chain with the credit value lower than the preset credit value is pulled into the blacklist of the block chain, so as to prevent other users of the block chain from being cheated, thereby improving user experience.
In this embodiment, the buyer blockchain user and the seller blockchain user in the preset blockchain associated with the data transaction are obtained; and selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain through a preset data volume identification consensus algorithm in a competition manner so as to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction, and updating credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information to obtain an updated credit value of the seller and an updated credit value of the buyer. In the embodiment, a feedback mechanism is provided, and the user credit is updated on the feedback mechanism, so that the deterrence is formed, and the user with good credit and high credit competes for obtaining the accounting right of the data transaction.
Further, based on the foregoing embodiment, the present invention provides another embodiment of a data transaction method based on a blockchain, in which the step of selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain in a competition manner by using a preset data volume certification consensus algorithm to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction includes:
and step D1, acquiring the comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction from a preset transaction pool through the preset blockchain.
In this embodiment, there may be a plurality of buyer blockchain users, and thus, the comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction is obtained from the preset transaction pool through the preset blockchain, so as to change the credit value according to the comprehensive feedback information.
The step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information to obtain the seller updated credit value and the buyer updated credit value comprises the following steps:
step E1, if the sub-feedback information of the buyer to the seller in the comprehensive feedback information matches with the preset positive feedback information, increasing the credit value of the seller blockchain user to obtain the updated credit value of the seller;
step E2, if the sub-feedback information of the buyer by the seller in the comprehensive feedback information matches the preset positive feedback information, increasing the credit value of the buyer block chain user to obtain the updated credit value of the buyer.
The flow of the feedback mechanism is shown in fig. 4, where the data purchaser submits a purchase order for the service S to the data provider by submitting the purchase order to the system, the data provider makes a payment request P to the data purchaser after receiving the purchase order, and the data purchaser pays for the payment request to complete the payment. The data purchaser can use the service S after the payment is completed. Thereafter, the data provider(s) signs a voucher V (sub-feedback information including positive and negative signatures) for the transaction and sends the voucher V to the data purchaser requesting a joint signature, and if the data purchaser is satisfied with the service provided by the data provider and is willing to leave positive feedback, the voucher V is positively signed (sub-feedback information), and if the data purchaser is not satisfied with the service provided by the data provider and is willing to leave negative feedback, the voucher V is negatively signed or does not need to be signed (sub-feedback information), and the transaction is directly ended. That is, if the sub-feedback information of the buyer to the seller in the integrated feedback information matches the preset positive feedback information, the credit value (general credit value +1) of the seller blockchain user is increased to obtain the updated credit value of the seller, and if the sub-feedback information of the seller to the buyer in the integrated feedback information matches the preset positive feedback information, the credit value of the buyer blockchain user is increased to obtain the updated credit value (general credit value +1) of the buyer.
In this embodiment, the comprehensive feedback information signed by the buyer blockchain user and the plurality of seller blockchain users for the data transaction is acquired from a preset transaction pool through the preset blockchain. And the user experience is improved.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The data transaction device based on the block chain in the embodiment of the invention can be a PC, and can also be a terminal device such as a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 3, the blockchain-based data trafficking device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the blockchain-based data transaction device may further include a target user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. The target user interface may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the selectable target user interfaces may also include standard wired interfaces, wireless interfaces. The network interface optionally may include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the blockchain based data trafficking device architecture shown in fig. 3 does not constitute a limitation of blockchain based data trafficking devices and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, and a block chain-based data transaction program. The operating system is a program for managing and controlling hardware and software resources of the data transaction device based on the blockchain, and supports the operation of the data transaction program based on the blockchain and other software and/or programs. The network communication module is used for realizing communication among components in the memory 1005 and communication with other hardware and software in the data transaction device based on the blockchain.
In the blockchain-based data transaction apparatus shown in fig. 3, the processor 1001 is configured to execute a blockchain-based data transaction program stored in the memory 1005, so as to implement any of the steps of the blockchain-based data transaction method described above.
The specific implementation of the data transaction device based on the blockchain is basically the same as that of the data transaction method based on the blockchain, and is not described herein again.
In addition, an embodiment of the present invention further provides a data transaction apparatus based on a blockchain, where the data transaction apparatus based on a blockchain includes:
the system comprises a first selection module, a second selection module and a third selection module, wherein the first selection module is used for selecting a first target blockchain user recording data transaction in a competitive mode through a preset data volume certification consensus algorithm from blockchain users of a preset blockchain when a completion instruction of data transaction completion is received based on the preset blockchain;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
the recording module is used for recording and processing the data transaction through the first target block chain user to obtain accounting information;
and the first verification module is used for performing consensus verification on the accounting information through other block chain users outside the first target block chain user, and updating the transaction record information of the corresponding record of the first target block chain user based on the accounting information when the verification is passed.
Optionally, the blockchain-based data transaction apparatus further includes:
the first acquisition module is used for acquiring historical transaction records of each blockchain user;
the first determining module is used for determining the initial credit value of each block chain user according to the historical transaction record and a preset credit value determining mode;
and the second determining module is used for determining the current credit value of each block chain user according to the initial credit value.
Optionally, the blockchain-based data transaction apparatus further includes:
the second acquisition module is used for acquiring buyer block chain users and seller block chain users in the preset block chain related to the data transaction;
the first selection module is used for selecting a second target block chain user recording the data transaction from block chain users of a preset block chain in a competitive mode through a preset data volume identification consensus algorithm so as to receive comprehensive feedback information of the buyer block chain user and the seller block chain user on the data transaction, and updating credit values of the buyer block chain user and the seller block chain user based on the comprehensive feedback information to obtain a seller update credit value and a buyer update credit value.
Optionally, the blockchain-based data transaction apparatus further includes:
and the second verification module is used for performing consensus verification on the seller update credit value and the buyer update credit value through other blockchain users outside the second target blockchain user, and updating the credit record information correspondingly recorded by the second target blockchain user based on the seller update credit value and the buyer update credit value when the verification is passed.
Optionally, the blockchain-based data transaction apparatus further includes:
and the third acquisition module is used for acquiring comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the second authentication module comprises:
the first adding unit is used for adding the credit value of the seller block chain user to obtain an updated credit value of the seller if the sub-feedback information of the buyer to the seller in the comprehensive feedback information is matched with preset positive feedback information;
and the second adding unit is used for adding the credit value of the buyer block chain user to obtain the updated credit value of the buyer if the sub-feedback information of the seller to the buyer in the comprehensive feedback information is matched with the preset positive feedback information.
Optionally, the blockchain-based data transaction apparatus further includes:
and the pull-in unit is used for pulling the block chain user with the credit value lower than the preset credit value into a blacklist of the block chain if the credit value of any block chain user is detected to be lower than the preset credit value.
The specific implementation of the data transaction apparatus based on the blockchain is substantially the same as that of each embodiment of the data transaction method based on the blockchain, and is not described herein again.
Furthermore, the present invention also provides a computer medium storing one or more programs, which are further executable by one or more processors for implementing the steps of the embodiments of the above-mentioned blockchain-based data transaction method.
The specific implementation of the device and medium (i.e., computer medium) of the present invention is basically the same as the embodiments of the data transaction method based on the blockchain, and is not described herein again.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A data transaction method based on a blockchain is characterized in that the data transaction method based on the blockchain comprises the following steps:
when a completion instruction of data transaction completion is received based on a preset block chain, selecting a first target block chain user recording the data transaction from block chain users of the preset block chain through a preset data volume proof consensus algorithm;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
recording and processing the data transaction through the first target block chain user to obtain accounting information;
and carrying out consensus verification on the accounting information by other block chain users outside the first target block chain user, and updating the transaction record information corresponding to the first target block chain user based on the accounting information when the verification is passed.
2. The blockchain-based data transaction method of claim 1, wherein the step of selecting a first target blockchain user for recording the data transaction from predetermined blockchain users in competition by a predetermined data volume identification consensus algorithm when a completion command for completing the data transaction is received based on the blockchain comprises:
acquiring historical transaction records of each blockchain user;
determining an initial credit value of each block chain user according to the historical transaction record and a preset credit value determination mode;
and determining the current credit value of each block chain user according to the initial credit value.
3. The blockchain-based data transaction method according to any one of claims 1 to 2, wherein the blockchain-based data transaction method further includes:
acquiring buyer blockchain users and seller blockchain users in the preset blockchain related to the data transaction;
and selecting a second target blockchain user recording the data transaction from blockchain users of a preset blockchain through a preset data volume identification consensus algorithm in a competition manner so as to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction, and updating credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information to obtain an updated credit value of the seller and an updated credit value of the buyer.
4. The blockchain-based data transaction method of claim 3, wherein the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value includes:
and performing consensus verification on the seller update credit value and the buyer update credit value by other blockchain users outside the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller update credit value and the buyer update credit value when the verification is passed.
5. The blockchain-based data transaction method of claim 3, wherein the step of selecting a second target blockchain user for recording the data transaction from the blockchain users of the predetermined blockchain in a competition manner through a predetermined data volume identification consensus algorithm to receive the comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction comprises:
and acquiring comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction from a preset transaction pool through the preset blockchain.
6. The blockchain-based data transaction method of claim 3, wherein the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value comprises:
if the sub-feedback information of the buyer to the seller in the comprehensive feedback information is matched with the preset positive feedback information, increasing the credit value of the seller block chain user to obtain the updated credit value of the seller;
and if the sub-feedback information of the seller to the buyer in the comprehensive feedback information is matched with the preset positive feedback information, increasing the credit value of the buyer block chain user to obtain the updated credit value of the buyer.
7. The blockchain-based data transaction method of claim 3, wherein the step of updating the credit values of the buyer blockchain user and the seller blockchain user based on the integrated feedback information to obtain the seller updated credit value and the buyer updated credit value includes:
and if the credit value of any block chain user is detected to be lower than the preset credit value, pulling the block chain user with the credit value lower than the preset credit value into a blacklist of the block chain.
8. A blockchain-based data transaction apparatus, the blockchain-based data transaction apparatus comprising:
the system comprises a first selection module, a second selection module and a third selection module, wherein the first selection module is used for selecting a first target blockchain user recording data transaction in a competitive mode through a preset data volume certification consensus algorithm from blockchain users of a preset blockchain when a completion instruction of data transaction completion is received based on the preset blockchain;
in the preset data volume certification consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the block chain user;
the recording module is used for recording and processing the data transaction through the first target block chain user to obtain accounting information;
and the first verification module is used for performing consensus verification on the accounting information through other block chain users outside the first target block chain user, and updating the transaction record information of the corresponding record of the first target block chain user based on the accounting information when the verification is passed.
9. A blockchain-based data transaction apparatus, the apparatus comprising: memory, a processor and a blockchain based data transaction program stored on the memory and executable on the processor, the blockchain based data transaction program when executed by the processor implementing the steps of the blockchain based data transaction method according to any one of claims 1 to 7.
10. A medium having stored thereon a blockchain based data transaction program, which when executed by a processor implements the steps of the blockchain based data transaction method according to any one of claims 1 to 7.
CN201911313439.9A 2019-12-18 2019-12-18 Block chain-based data transaction method, device, equipment and medium Active CN111242718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911313439.9A CN111242718B (en) 2019-12-18 2019-12-18 Block chain-based data transaction method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911313439.9A CN111242718B (en) 2019-12-18 2019-12-18 Block chain-based data transaction method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111242718A true CN111242718A (en) 2020-06-05
CN111242718B CN111242718B (en) 2024-01-19

Family

ID=70875853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911313439.9A Active CN111242718B (en) 2019-12-18 2019-12-18 Block chain-based data transaction method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111242718B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180174143A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Differential commit time in a blockchain
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment
WO2019157740A1 (en) * 2018-02-14 2019-08-22 华为技术有限公司 Method for processing data, apparatus for processing data and device for processing data
CN110232634A (en) * 2019-06-05 2019-09-13 湖南道业信息科技有限公司 Block chain common recognition method, block chain common recognition system and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180174143A1 (en) * 2016-12-19 2018-06-21 International Business Machines Corporation Differential commit time in a blockchain
WO2019157740A1 (en) * 2018-02-14 2019-08-22 华为技术有限公司 Method for processing data, apparatus for processing data and device for processing data
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment
CN110232634A (en) * 2019-06-05 2019-09-13 湖南道业信息科技有限公司 Block chain common recognition method, block chain common recognition system and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
宋焘谊等: "区块链共识算法的比较研究", 《计算机应用与软件》 *

Also Published As

Publication number Publication date
CN111242718B (en) 2024-01-19

Similar Documents

Publication Publication Date Title
CN107566124B (en) Hash operation-based consensus establishing method, block chain system and storage medium
JP6703013B2 (en) Payment threshold acquisition method and device
US20140128164A1 (en) Server device, and non-transitory computer-readable storage medium storing game program
CN104965844A (en) Information processing method and apparatus
CN110276369B (en) Feature selection method, device and equipment based on machine learning and storage medium
US20220164791A1 (en) Method for distributing collectables ownership based on blockchain networks and online transaction server using the same
US11979485B2 (en) Electronic device providing blockchain account information and method of operating the same
CN107784504B (en) Method for generating return visit event of client and terminal equipment
CN105378661A (en) Resource package indexing
CN105378662A (en) Bundle package generation
CN114047971B (en) Edge computing resource allocation method and device
CN107807935B (en) Using recommended method and device
CN108022096A (en) A kind of method of mobile payment, device, terminal and readable storage medium storing program for executing
CN110992139B (en) Bidding price realizing method and related product
CN111242718A (en) Block chain-based data transaction method, device, equipment and medium
CN112100491A (en) Information recommendation method, device and equipment based on user data and storage medium
US20180088930A1 (en) Updating code within an application
CN110585733B (en) Virtual asset transaction method and related device
CN109313771A (en) The degree of reiability of real-time auction
CN110570190A (en) Method and device for block chain user credit mortgage borrowing digital currency
CN114827251B (en) Subscription page pushing method and device
CN108846702B (en) Electronic pet transaction method and device based on user points
CN108804263B (en) Terminal verification method, device and computer readable medium
KR102582328B1 (en) Game system based on blockchain and the method thereof
CN112070561B (en) Electronic coupon recommendation method and device

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
GR01 Patent grant
GR01 Patent grant