CN111242718B - 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
CN111242718B
CN111242718B CN201911313439.9A CN201911313439A CN111242718B CN 111242718 B CN111242718 B CN 111242718B CN 201911313439 A CN201911313439 A CN 201911313439A CN 111242718 B CN111242718 B CN 111242718B
Authority
CN
China
Prior art keywords
blockchain
user
preset
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.)
Active
Application number
CN201911313439.9A
Other languages
Chinese (zh)
Other versions
CN111242718A (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

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

Abstract

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

Description

Block chain-based data transaction method, device, equipment and medium
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain-based data transaction method, device, equipment, and medium.
Background
As an important component of the blockchain technology, the consensus algorithm becomes a key point of study and research of people, but the existing various consensus algorithms for data transaction are endless, but also expose corresponding problems, for example, the consensus algorithm based on Proof of Work (PoW) has low efficiency of consensus achievement, is easy to cause resource waste and cause monopoly of calculation, while the proxy equity Proof (Delegated Proof of Stake, DPoS) has difficulty in ensuring no cheating action in the data transaction consensus process, and further, has the technical problem of low consensus efficiency of data transaction in the data transaction process of the existing blockchain.
Disclosure of Invention
The invention mainly aims to provide a data transaction method, device, equipment and medium based on a blockchain, which aim to solve the technical problem of low data transaction consensus efficiency in the data transaction process of the existing blockchain.
To achieve the above object, an embodiment of the present invention provides a blockchain-based data transaction method, including:
when a completion instruction for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
recording the data transaction by the first target blockchain user to obtain billing information;
and carrying out consensus verification on the billing information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes.
Optionally, when receiving a completion instruction for completing the data transaction based on the blockchain, the step of competing and selecting the first target blockchain user for recording the data transaction from the preset blockchain users through the preset data quantity proving consensus algorithm includes:
Acquiring historical transaction records of all blockchain users;
determining initial credit values of all blockchain users according to the historical transaction records and a preset credit value determining mode;
and determining the current credit value of each blockchain user according to the initial credit value.
Optionally, the blockchain-based data transaction method further includes:
acquiring a buyer blockchain user and a seller blockchain user in the preset blockchain associated with the data transaction;
and competing and selecting a second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm, 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 a seller updating credit value and a buyer updating credit value.
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 updating credit value and the buyer updating credit value by other blockchain users except the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller updating credit value and the buyer updating credit value when the verification is passed.
Optionally, the step of competing and selecting a second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through a preset data volume proving consensus algorithm to receive 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 user and a plurality of seller blockchain users aiming at the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the step of updating 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, the credit value of the seller blockchain user is increased, and the updated credit value of the seller is obtained;
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 buyer updating credit value.
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 blockchain user is detected to be lower than the preset credit value, pulling the blockchain user with the credit value lower than the preset credit value into a blacklist of the blockchain.
The invention also provides a data transaction device based on the blockchain, which comprises:
the first selecting module is used for competing and selecting a first target blockchain user for recording the data transaction from blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm when a completion instruction for completing the data transaction is received based on the preset blockchain;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
The recording module is used for recording and processing the data transaction through the first target blockchain user to obtain billing information;
and the first verification module is used for carrying out consensus verification on the billing information through other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes.
Optionally, the blockchain-based data transaction device further includes:
the first acquisition module is used for acquiring historical transaction records of all blockchain users;
the first determining module is used for determining initial credit values of all the blockchain users according to the historical transaction records and a preset credit value determining mode;
and the second determining module is used for determining the current credit value of each blockchain user according to the initial credit value.
Optionally, the blockchain-based data transaction device further includes:
a second acquisition module, configured to acquire a buyer blockchain user and a seller blockchain user in the preset blockchain associated with the data transaction;
the first selecting module is used for competing and selecting a second target blockchain user for recording the data transaction from the blockchain users of the preset blockchain through a preset data volume proving consensus algorithm 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 a seller updating credit value and a buyer updating credit value.
Optionally, the blockchain-based data transaction device further includes:
and the second verification module is used for carrying out consensus verification on the seller updating credit value and the buyer updating credit value through other blockchain users except the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller updating credit value and the buyer updating credit value when the verification passes.
Optionally, the blockchain-based data transaction device further includes:
and the third acquisition module is used for acquiring comprehensive feedback information signed by the buyer blockchain user and a plurality of seller blockchain users aiming at the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the second verification module includes:
the first adding unit is used for adding the credit value of the seller blockchain user to obtain the seller updating credit value if the sub feedback information of the seller to the buyer in the comprehensive feedback information is matched with the 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 buyer updating credit value 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 device further includes:
and the pulling-in unit is used for pulling the blockchain user with the credit value lower than the preset credit value into the blacklist of the blockchain if the credit value of any blockchain user is detected to be lower than the preset credit value.
The present invention also provides 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 as described above.
When a completion instruction for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm; in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user; recording the data transaction by the first target blockchain user to obtain billing information; and carrying out consensus verification on the billing information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes. In the method, a preset data quantity proving consensus algorithm is set, in the preset data quantity proving consensus algorithm, the difficulty of competitive selection, namely mining difficulty, is inversely proportional to the current credit value of the blockchain user, namely, the competitive billing difficulty of the blockchain user is dynamically adjusted through the credit value of the user in the method, so that after a completion instruction of completing data transaction is received based on a preset blockchain, users with higher reliability in the blockchain user can compete to obtain the billing right of the data transaction, and users with higher reliability in the blockchain user can compete to obtain the billing right of the data transaction, the time for achieving consensus is shortened to a certain extent, the consumption of calculation power is further reduced, and the consensus efficiency is improved. The technical problem of low data transaction consensus efficiency in the data transaction process of the existing blockchain is solved.
Drawings
FIG. 1 is a flowchart of a first embodiment of a blockchain-based data transaction method of the present invention;
FIG. 2 is a detailed flowchart of the steps of determining the notch depth of each damaged notch in the damaged area and determining the cutting mode of the incomplete wafer according to the notch depth in a second embodiment of the blockchain-based data transaction method of the present invention;
FIG. 3 is a schematic diagram of a device architecture of a hardware operating environment involved in a method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a block chain based data transaction method according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a data transaction method based on a block chain, 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 for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm;
In the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
step S20, recording and processing the data transaction through the first target blockchain user to obtain billing information;
and step S30, carrying out consensus verification on the accounting information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the accounting information when verification passes.
The method comprises the following specific steps:
step S10, when a completion instruction for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
it should be noted that, in this embodiment, the blockchain-based data transaction method is applied to a blockchain-based data transaction system, where the blockchain-based data transaction system belongs to a blockchain-based data transaction device, and in the blockchain-based data transaction system, a plurality of or one preset blockchain is provided, and the plurality of or one preset blockchain corresponds to a plurality of blockchain users, where the plurality of blockchain users can perform data transactions with each other, for example, an a blockchain user performs data transactions with a B blockchain user through a blockchain, and if the a blockchain user is a data buyer, i.e., a buyer blockchain user, and the B blockchain user is a data provider, i.e., a seller blockchain user, the specific data transaction process may be: in order to ensure the true credibility in the transaction process, in this embodiment, the data transaction is placed in the transaction pool, the blockchain user of the preset blockchain can compete from the transaction pool for acquiring the accounting right of the data transaction, the blockchain user of the preset blockchain can compete from the transaction pool for acquiring the accounting right of the transaction information, namely, the process of competing for the accounting right from the transaction pool, the blockchain user of the accounting right can pay for the accounting right, wherein the blockchain user of the accounting right can be set as the accounting miner, each blockchain user of the accounting chain can participate in the accounting process, and the blockchain user of the preset blockchain can also participate in the accounting process of competing for the accounting right with the accounting user of the accounting user after the blockchain user of the block chain is used as the data buyer, and the blockchain user of the preset blockchain can also participate in the accounting user of the block chain can participate in the accounting user of the block chain, and the blockchain can be used as the accounting user of the block chain can be used as the block chain of the block user of the block B.
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 reality and reliability in the accounting process.
And when a completion instruction for completing the data transaction is received based on the preset block link, competing and selecting a first target block chain user for recording the data transaction from the block chain users of the preset block chain through a preset data volume proving consensus algorithm, wherein the difficulty of competing and selecting is inversely proportional to the current credit value of the block chain user in the preset data volume proving consensus algorithm.
Specifically, when a completion instruction for completing data transaction is received based on a preset block link, current credit values of all the block chain users are obtained, and according to the current credit values of all the block chain users, the mining difficulty in the competitive billing process of all the block chain users, namely the mining process, is determined, the higher the current credit values of the block chain users are, the lower the mining difficulty is, and the specific formula of the preset data quantity evidence consensus algorithm can be as follows:
in the above formula, nonce is a random number, pre_hash is a hash value of a previous blockchain block, merkel_root is a merkel root hash value 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 billing miner, T i The current credit value of miners for competitive billing, lambda being the term used to ensure normalized relationshipIs a coefficient of (a).
As can be seen from the above formula, when a completion instruction for completing a data transaction is received based on a preset blockchain, a first target blockchain user recording the data transaction is selected in competition from blockchain users of the preset blockchain through a preset data amount proving consensus algorithm, specifically, a first target blockchain user meeting the data transaction is found out firstThe higher the current credit value of the miners (blockchain users) competing for accounting, the higher the current credit value of the blockchain user of the nonce, i.e., the first target blockchain user, and thus +.>The smaller the H function finds the appropriate nonce, i.e., the random number, from a smaller range (it should be noted that, the process of searching for the nonce is a traversal process), so that the higher the current credit value, the faster or more efficient the blockchain user can find the nonce accordingly, and thus the greater the competitiveness of the corresponding miners, and thus the transaction efficiency of the entire blockchain-based data transaction will be 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, the blockchain users of the preset blockchain may be subjected to the partition processing, and if there are multiple transaction data, the multiple transaction data are first distributed to each sub-transaction pool in the transaction pool, then each partition selects the corresponding transaction data from the corresponding sub-transaction pool, and then the transaction data are provided to each blockchain user in the partition for each blockchain user in the corresponding partition to perform accounting or mining competition.
Referring to fig. 2, when a block-based link receives a completion instruction for completing a data transaction, the step of competing, by a preset data volume proof consensus algorithm, from preset blockchain users to select a first target blockchain user recording the data transaction includes:
step S01, obtaining historical transaction records of all blockchain users;
in this embodiment, prior to a data transaction, the blockchain-based data transaction system obtains a historical transaction record, which is a transaction record of the past of the data provider, i.e., the seller blockchain user, and the data buyer, i.e., the buyer blockchain user.
Step S02, determining initial credit values of all blockchain users according to the historical transaction records and a preset credit value determining mode;
after obtaining the historical transaction record, obtaining the number of times of historical transactions, and if the number of times reaches a preset number of times, obtaining a credit value determining mode from a blockchain-based data transaction system, for example, the determining mode of the credit value of the seller blockchain user is as follows: and determining initial credit values of the blockchain users after obtaining the historical transaction records and a preset credit value determining mode according to the good grade and the good occupation ratio of the buyer blockchain users.
And step S03, determining the current credit value of each blockchain user according to the initial credit value.
After obtaining the initial credit value, determining the current credit value of each blockchain user according to the initial credit value, specifically, obtaining feedback of each blockchain user according to transaction behaviors 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 and processing the data transaction through the first target blockchain user to obtain billing information;
in this embodiment, after the first target blockchain user is obtained, the first target blockchain user records the data transaction to obtain the accounting information, that is, in this embodiment, the details of the data transaction are accounted for in the transaction record information corresponding to the first target blockchain user.
And step S30, carrying out consensus verification on the accounting information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the accounting information when verification passes.
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 authenticated by other blockchain users outside the first target blockchain user, and when the authentication is passed, the transaction record information corresponding to the first target blockchain user is updated based on the accounting information, where the process of performing the authentication on the accounting information by the other blockchain users outside the first target blockchain user may be: the first target block chain sends the obtained nonce to other block chain users, and if the other block chain users obtain the nonce, the first target block chain can ensure that the second target block chain has the obtained nonce If yes, the consensus verification is passed, and when the verification is passed, the transaction record information corresponding to the first target blockchain user is updated based on the billing information. And broadcasting the transaction record information to the blockchain for other blockchain users to acquire.
When a completion instruction for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm; in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user; recording the data transaction by the first target blockchain user to obtain billing information; and carrying out consensus verification on the billing information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes. In the method, a preset data quantity proving consensus algorithm is set, in the preset data quantity proving consensus algorithm, the difficulty of competitive selection, namely mining difficulty, is inversely proportional to the current credit value of the blockchain user, namely, the competitive billing difficulty of the blockchain user is dynamically adjusted through the credit value of the user in the method, so that after a completion instruction of completing data transaction is received based on a preset blockchain, users with higher reliability in the blockchain user can compete to obtain the billing right of the data transaction, and users with higher reliability in the blockchain user can compete to obtain the billing right of the data transaction, the time for achieving consensus is shortened to a certain extent, the consumption of calculation power is further reduced, and the consensus efficiency is improved. The technical problem of low data transaction consensus efficiency in the data transaction process of the existing blockchain is solved.
Further, based on the above embodiment, the present invention provides another embodiment of the blockchain-based data transaction method, in which the blockchain-based data transaction method further includes:
step A1, acquiring a buyer blockchain user and a seller blockchain user in the preset blockchain associated with 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 acquired, and the purpose of acquiring the buyer blockchain user and the seller blockchain user is to update the credit value thereof.
And A2, competing and selecting a second target blockchain user for recording the data transaction from the blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm 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 a seller updating credit value and a buyer updating credit value.
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, the second target blockchain user recording the data transaction is selected in a competing manner from the blockchain users of the preset blockchain through the preset data quantity proving consensus algorithm, that is, each blockchain user is in a competing manner to record the comprehensive feedback information, and the credit values of the buyer blockchain user and the seller blockchain user are updated based on the comprehensive feedback information to obtain the seller updating credit value and the buyer updating credit value. It should be noted that, the process of competing and selecting the second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through the preset data volume proving consensus algorithm is basically the same as the process of competing and selecting the first target blockchain user recording the data transaction from the blockchain users of the preset blockchain through the preset data volume proving consensus algorithm, which is not described herein again.
The step of obtaining the seller updating credit value and the buyer updating credit value after updating the credit values of the buyer blockchain user and the seller blockchain user based on the comprehensive feedback information comprises the following steps:
and B1, performing consensus verification on the seller updating credit value and the buyer updating credit value through other blockchain users except the second target blockchain user, and updating credit record information corresponding to the second target blockchain user based on the seller updating credit value and the buyer updating credit value when verification passes.
In this embodiment, after the second target blockchain user is obtained, the second target blockchain user competes for obtaining the nonce corresponding to the accounting right, the nonce of the second target blockchain user is sent to other blockchain users except the second target blockchain user to perform consensus verification, and when the verification passes, the credit record information recorded corresponding to the second target blockchain user is updated based on the seller updating credit value and the buyer updating credit value, and the credit record information is broadcasted and stored.
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 updating credit value and the buyer updating credit value comprises the following steps:
And step C1, if the credit value of any blockchain user is detected to be lower than the preset credit value, pulling the blockchain user with the credit value lower than the preset credit value into a blacklist of the blockchain.
In this embodiment, if it is detected that the credit value of any blockchain user is lower than the preset credit value, the blockchain user with the credit value lower than the preset credit value is pulled into the blacklist of the blockchain, so as to avoid cheating other blockchain users, 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 competing and selecting a second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm, 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 a seller updating credit value and a buyer updating credit value. In this embodiment, a feedback mechanism is provided, and the credit of the user is updated on the feedback mechanism, so as to form a deterrent, ensure that the credit is good, and the user with high credit competes for the accounting right of the data transaction.
Further, based on the above embodiment, the present invention provides another embodiment of a blockchain-based data transaction method, in which the step of competing, from blockchain users of a preset blockchain, for selecting a second target blockchain user recording the data transaction by a preset data amount proof consensus algorithm to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction includes:
and D1, acquiring comprehensive feedback information signed by the buyer blockchain user and a 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, so that comprehensive feedback information signed by the buyer blockchain users and the plurality of seller blockchain users for the data transaction is obtained from a 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 updating credit value and the buyer updating credit value comprises the following steps:
Step E1, 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 blockchain user to obtain the seller updating credit value;
and E2, 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 buyer blockchain user to obtain the buyer updating credit value.
The flow of the feedback mechanism is shown in fig. 4, where the data buyer submits a purchase order for the service S to the data provider, and the data provider receives the purchase order and then issues a payment request P to the data buyer, and the data buyer pays the payment request to complete payment. After payment is completed, the data purchaser can use the service S. Thereafter, the data provider(s) will sign a credential V (sub-feedback information, including both positive and non-positive signatures) for the current transaction and send the credential V to the data purchaser requesting a joint signature, the credential V being positively signed (sub-feedback information) if the data purchaser is satisfied with the services provided by the data provider and willing to leave positive feedback, the transaction being terminated directly if the data purchaser is not satisfied with the services provided by the data provider or is unwilling to leave negative feedback or does not need to leave feedback. If the sub-feedback information of the buyer to the seller in the integrated feedback information is matched with the preset positive feedback information, the credit value (general credit value+1) of the seller blockchain user is increased to obtain a seller updating credit value, and if the sub-feedback information of the seller to the buyer in the integrated feedback information is matched with the preset positive feedback information, the credit value of the buyer blockchain user is increased to obtain a buyer updating credit value (general credit value+1), in this embodiment, bidirectional feedback is realized.
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 obtained 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 running environment according to an embodiment of the present invention.
The data transaction device based on the blockchain in the embodiment of the invention can be a PC, or can be terminal devices such as a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 3, the blockchain-based data transaction device may include: a processor 1001, such as a CPU, memory 1005, and a communication bus 1002. Wherein a communication bus 1002 is used to enable connected communication between the processor 1001 and a memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage 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, an RF (Radio Frequency) 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 interface may also include a standard wired interface, a wireless interface. The network interface may optionally 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 transaction device structure shown in fig. 3 does not constitute a limitation of the blockchain-based data transaction device, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in FIG. 3, an operating system, network communication modules, and a blockchain-based data transaction program may be included in memory 1005, which is a type of computer storage medium. The operating system is a program that manages and controls the hardware and software resources of the blockchain-based data transaction device, supporting the execution of blockchain-based data transaction programs and other software and/or programs. The network communication module is used to enable communication between components within the memory 1005 and with other hardware and software in the blockchain-based data transaction device.
In the blockchain-based data transaction device shown in fig. 3, a processor 1001 is configured to execute a blockchain-based data transaction program stored in a memory 1005, to implement the steps of the blockchain-based data transaction method described in any of the above.
The specific implementation manner of the data transaction device based on the blockchain is basically the same as that of each embodiment of the data transaction method based on the blockchain, and is not repeated herein.
In addition, the embodiment of the invention also provides a data transaction device based on the blockchain, which comprises:
the first selecting module is used for competing and selecting a first target blockchain user for recording the data transaction from blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm when a completion instruction for completing the data transaction is received based on the preset blockchain;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
the recording module is used for recording and processing the data transaction through the first target blockchain user to obtain billing information;
and the first verification module is used for carrying out consensus verification on the billing information through other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes.
Optionally, the blockchain-based data transaction device further includes:
the first acquisition module is used for acquiring historical transaction records of all blockchain users;
The first determining module is used for determining initial credit values of all the blockchain users according to the historical transaction records and a preset credit value determining mode;
and the second determining module is used for determining the current credit value of each blockchain user according to the initial credit value.
Optionally, the blockchain-based data transaction device further includes:
a second acquisition module, configured to acquire a buyer blockchain user and a seller blockchain user in the preset blockchain associated with the data transaction;
the first selecting module is used for competing and selecting a second target blockchain user for recording the data transaction from the blockchain users of the preset blockchain through a preset data volume proving consensus algorithm 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 a seller updating credit value and a buyer updating credit value.
Optionally, the blockchain-based data transaction device further includes:
and the second verification module is used for carrying out consensus verification on the seller updating credit value and the buyer updating credit value through other blockchain users except the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller updating credit value and the buyer updating credit value when the verification passes.
Optionally, the blockchain-based data transaction device further includes:
and the third acquisition module is used for acquiring comprehensive feedback information signed by the buyer blockchain user and a plurality of seller blockchain users aiming at the data transaction from a preset transaction pool through the preset blockchain.
Optionally, the second verification module includes:
the first adding unit is used for adding the credit value of the seller blockchain user to obtain the seller updating credit value if the sub feedback information of the seller to the buyer in the comprehensive feedback information is matched with the 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 buyer updating credit value 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 device further includes:
and the pulling-in unit is used for pulling the blockchain user with the credit value lower than the preset credit value into the blacklist of the blockchain if the credit value of any blockchain user is detected to be lower than the preset credit value.
The specific implementation manner of the blockchain-based data transaction device is basically the same as that of each embodiment of the blockchain-based data transaction method, and is not described herein again.
The present invention also provides a computer medium storing one or more programs executable by one or more processors for implementing the steps of the above-described blockchain-based data transaction method embodiments.
The expansion content of the specific implementation manner of the device and the medium (i.e. the computer medium) of the present invention is basically the same as that of each embodiment of the block chain-based data transaction method, and will not be described herein.
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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (10)

1. A blockchain-based data transaction method, characterized in that the blockchain-based data transaction method comprises:
when a completion instruction for completing data transaction is received based on a preset block link, competing and selecting a first target block chain user for recording the data transaction from block chain users of the preset block chain through a preset data quantity proving consensus algorithm;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user;
the specific formula of the preset data quantity evidence consensus algorithm is as follows:
in the above-mentioned formula(s),is a random number +.>Hash value for the previous blockchain block, is->The merkel root hash value for all transactions to be packed for the current block,/->For the average difficulty value of the current whole-net mining, < > for the mine>Index for billing miners>Current credit value of miners for competitive billing, < +.>To ensure a normalized relationship->Coefficients of (2);
finding complianceIs->Is a first target blockchain user;
recording the data transaction by the first target blockchain user to obtain billing information;
performing consensus verification on the billing information by other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes;
And carrying out segmentation and division processing on the blockchain users of the preset blockchain, distributing a plurality of transaction data to each sub-transaction pool in the transaction pool, selecting corresponding transaction data from the corresponding sub-transaction pool by each segmentation, and providing the transaction data for each blockchain user in the segmentation.
2. The blockchain-based data transaction method of claim 1, wherein the step of competing for selection of the first target blockchain user to record the data transaction by the preset data amount proof consensus algorithm from among preset blockchain users upon receiving a completion instruction for completion of the data transaction based on the blockchain comprises:
acquiring historical transaction records of all blockchain users;
determining initial credit values of all blockchain users according to the historical transaction records and a preset credit value determining mode;
and determining the current credit value of each blockchain user according to the initial credit value.
3. The blockchain-based data transaction method of any of claims 1-2, wherein the blockchain-based data transaction method further includes:
acquiring a buyer blockchain user and a seller blockchain user in the preset blockchain associated with the data transaction;
And competing and selecting a second target blockchain user recording the data transaction from the blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm, 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 a seller updating credit value and a buyer updating credit value.
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 update credit value and the buyer update credit value comprises:
and performing consensus verification on the seller updating credit value and the buyer updating credit value by other blockchain users except the second target blockchain user, and updating the credit record information corresponding to the second target blockchain user based on the seller updating credit value and the buyer updating credit value when the verification is passed.
5. The blockchain-based data transaction method of claim 3, wherein the step of competing, from among blockchain users of a preset blockchain, for selecting a second target blockchain user that records the data transaction by a preset data amount proof consensus algorithm to receive comprehensive feedback information of the buyer blockchain user and the seller blockchain user on the data transaction includes, prior to:
And acquiring comprehensive feedback information signed by the buyer blockchain user and a plurality of seller blockchain users aiming at 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 update credit value and the buyer update 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, the credit value of the seller blockchain user is increased, and the updated credit value of the seller is obtained;
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 buyer updating credit value.
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 update credit value and the buyer update credit value comprises:
And if the credit value of any blockchain user is detected to be lower than the preset credit value, pulling the blockchain user with the credit value lower than the preset credit value into a blacklist of the blockchain.
8. A blockchain-based data transaction device, the blockchain-based data transaction device comprising:
the first selecting module is used for competing and selecting a first target blockchain user for recording the data transaction from blockchain users of the preset blockchain through a preset data quantity proving consensus algorithm when a completion instruction for completing the data transaction is received based on the preset blockchain; the method comprises the steps of selecting corresponding transaction data from corresponding sub transaction pools by each partition, and providing the transaction data for each blockchain user in the partition;
in the preset data quantity proving consensus algorithm, the difficulty of competitive selection is inversely proportional to the current credit value of the blockchain user; preset data quantity proving commonThe specific formula of the recognition algorithm is as follows:
in the above-mentioned formula(s),is a random number +.>Hash value for the previous blockchain block, is- >The merkel root hash value for all transactions to be packed for the current block,/->For the average difficulty value of the current whole-net mining, < > for the mine>Index for billing miners>Current credit value of miners for competitive billing, < +.>To ensure a normalized relationship->Coefficients of (2);
finding complianceIs->Is a first target blockchain user;
the recording module is used for recording and processing the data transaction through the first target blockchain user to obtain billing information;
and the first verification module is used for carrying out consensus verification on the billing information through other blockchain users outside the first target blockchain user, and updating transaction record information corresponding to the first target blockchain user based on the billing information when verification passes.
9. A blockchain-based data transaction device, the device comprising: memory, a processor, and a blockchain-based data transaction program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the blockchain-based data transaction method of any 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 of any 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 CN111242718A (en) 2020-06-05
CN111242718B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
区块链共识算法的比较研究;宋焘谊等;《计算机应用与软件》;20180812(第08期);7-14 *

Also Published As

Publication number Publication date
CN111242718A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN107566124B (en) Hash operation-based consensus establishing method, block chain system and storage medium
CN112600841B (en) Credit record sharing method and device based on block chain and electronic equipment
CN108596623B (en) Block chain consensus achieving method
CN108733706B (en) Method and device for generating heat information
CN110944008B (en) Block chain-based task reward processing method, device, equipment and storage medium
US20220164791A1 (en) Method for distributing collectables ownership based on blockchain networks and online transaction server using the same
CN112915548A (en) Data processing method, device and equipment of multimedia playing platform and storage medium
CN112700287A (en) Anti-cheating method and device for application program
KR102204995B1 (en) Method for providing real estate information matching condition informaion of user
US20220343325A1 (en) Assetization of hashtags
CN111242718B (en) Block chain-based data transaction method, device, equipment and medium
KR102186109B1 (en) Method and apparatus for managing event for application
CN112559847A (en) Method and device for searching nodes in network graph, electronic equipment and storage medium
CN111259430A (en) Data processing method and device, electronic equipment and computer storage medium
KR102312363B1 (en) Method and apparatus for selecting a constructor for construction work through optional contract
CN110784552B (en) Information pushing method, device, equipment and medium
CN109313771A (en) The degree of reiability of real-time auction
US9457280B2 (en) Auto program preventing method for auction house for on-line game item and server therefor
CN111539777A (en) Method, server and terminal for realizing service function
US9349144B1 (en) Auction-based requesting of electronic resources
CN114827251B (en) Subscription page pushing method and device
KR101234342B1 (en) Advertisement method and system using mobile application
CN108846702B (en) Electronic pet transaction method and device based on user points
KR102582328B1 (en) Game system based on blockchain and the method thereof
CN109903085B (en) Intelligent exhibition advertisement delivery and equipment

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