CN114626852A - Transaction method based on block chain and transaction block chain system - Google Patents

Transaction method based on block chain and transaction block chain system Download PDF

Info

Publication number
CN114626852A
CN114626852A CN202210302405.5A CN202210302405A CN114626852A CN 114626852 A CN114626852 A CN 114626852A CN 202210302405 A CN202210302405 A CN 202210302405A CN 114626852 A CN114626852 A CN 114626852A
Authority
CN
China
Prior art keywords
price
auction
buyer
random number
comparison
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210302405.5A
Other languages
Chinese (zh)
Inventor
雷舒娅
梁潇
黄成�
赵勇
俞耀文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Smart Grid Research Institute Co ltd
Huazhong University of Science and Technology
State Grid Corp of China SGCC
State Grid Jiangsu Electric Power Co Ltd
Original Assignee
State Grid Smart Grid Research Institute Co ltd
Huazhong University of Science and Technology
State Grid Corp of China SGCC
State Grid Jiangsu Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Smart Grid Research Institute Co ltd, Huazhong University of Science and Technology, State Grid Corp of China SGCC, State Grid Jiangsu Electric Power Co Ltd filed Critical State Grid Smart Grid Research Institute Co ltd
Priority to CN202210302405.5A priority Critical patent/CN114626852A/en
Publication of CN114626852A publication Critical patent/CN114626852A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • 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/08Auctions
    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Technology Law (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a block chain-based transaction method and a block chain transaction system, wherein the method comprises the following steps: a plurality of buyers respectively give auction prices for the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts; the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; decrypting the price comparison pair by the current highest-bid buyer, determining a high-bid buyer according to the price comparison pair, and determining the high-bid buyer as the current highest-bid buyer; if the buyer giving the auction price aiming at the auction order finishes traversing, determining the buyer with the highest current bid as the successful party of the auction; the administrator forms transaction blocks in combination with the transaction information, and adds the transaction blocks to the blockchain. By implementing the invention, the privacy of the bid price is ensured, and the phenomenon of unfair transactions such as malicious bidding and the like caused by exposure of the bid price is avoided.

Description

Transaction method based on block chain and transaction block chain system
Technical Field
The invention relates to the technical field of blockchain, in particular to a blockchain-based transaction method and a blockchain transaction system.
Background
Currently, constructing a new power system mainly based on new energy becomes the mainstream of energy industry development, and the development of clean energy needs to be focused on. However, as the electric energy assets have the characteristics of one time, detachability, easy loss and the like, for the electric energy asset transaction, various transaction modes are usually provided by combining different market clearing, and the traditional transaction market is difficult to meet the requirement. In addition, under various modes of electric energy transaction, the bidding transaction of the electric energy not only needs to consider the anonymity of address information and the like of two parties in the transaction protection process, but also has an important bidding price of the bidding parties, and once leakage occurs, unfair transaction phenomena such as malicious bidding and the like can be caused.
Disclosure of Invention
Therefore, the technical problem to be solved by the present invention is to overcome the defect that the price of a bidder is easily exposed in the prior art, thereby providing a transaction method based on a blockchain and a transaction blockchain system.
The invention provides a block chain-based transaction method, wherein each buyer, seller and administrator are different nodes of the same alliance chain, and the method comprises the following steps: a plurality of buyers respectively give auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts; the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; decrypting the price comparison pair by the current highest-bid buyer, determining a high-bid buyer according to the price comparison pair, and determining the high-bid buyer as the current highest-bid buyer; if the buyers who give the auction price aiming at the auction order finish the step of generating a price comparison pair by the buyers according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext, and determining the buyer with the highest current bid price as a successful party for auction; the administrator forms a transaction block by combining transaction information, the transaction block is added to the block chain, and the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties.
Optionally, in the block chain-based transaction method provided by the present invention, if there is a buyer in the step of generating a price comparison pair according to the random number, the auction price, and the public key and the price ciphertext of the buyer with the highest current bid among the buyers who offer the auction price for the auction order, determining the buyer in the step of generating the price comparison pair according to the random number, the auction price, and the public key and the price ciphertext of the buyer with the highest current bid among the incomplete buyers, and returning to the buyer in the step of generating the price comparison pair according to the random number, the auction price, and the public key and the price ciphertext of the buyer with the highest current bid; and generating a price comparison pair by the buyer according to the random number, the auction price, the public key of the buyer with the highest bid price and the price ciphertext until the buyer giving the auction price aiming at the auction order completes the step of generating the price comparison pair by the buyer.
Optionally, in the block chain-based transaction method provided by the present invention, a Paillier homomorphic encryption algorithm is used to encrypt the auction price, so as to obtain a price ciphertext.
Optionally, in the block chain-based transaction method provided by the present invention, the step of generating a price comparison pair by the buyer according to the random number, the auction price, and the public key and the price ciphertext of the buyer with the highest current bid includes: generating a first comparison item according to the random number of the buyer and the auction price, wherein the first comparison item is obtained by multiplying the auction price and the first random number and then summing the product and the second random number; encrypting the first comparison item by using a Paillier homomorphic encryption algorithm to obtain a first encrypted comparison item; encrypting the second random number by using a Paillier homomorphic encryption algorithm to obtain an encrypted random number; and determining the product of multiple items of the price ciphertext of the current buyer with the highest bid and the encrypted random number as a second encrypted comparison item, wherein the number of times of the price ciphertext of the current buyer with the highest bid is a first random number in the multiple items of the price ciphertext of the current buyer with the highest bid.
Optionally, in the block chain-based transaction method provided by the present invention, decrypting the price comparison pair by the buyer with the highest current bid and determining the buyer with the highest price according to the price comparison pair includes: decrypting the first encrypted comparison item by using a Paillier homomorphic encryption algorithm to obtain a first comparison item; decrypting the second encrypted comparison item by adopting a Paillier homomorphic encryption algorithm to obtain a second comparison item, wherein the second comparison item is the sum of the product obtained by multiplying the auction price of the current highest bidding buyer by the first random number and the second random number; if the first comparison item is larger than the second comparison item, determining the purchaser as a high price purchaser; if the first comparison item is less than or equal to the second comparison item, the current highest bidding buyer is determined as the high-priced buyer.
Optionally, in the block chain-based transaction method provided by the present invention, if the type of the auction order is a non-public auction, the buyer inputs a password corresponding to the auction order and gives an auction price for the auction order.
Optionally, in the block chain-based transaction method provided by the present invention, a transaction block is formed in combination with the transaction information, and the adding of the transaction block to the block chain includes: the intelligent contract submits the transaction information to an administrator; the administrator packs the transaction information and makes consensus in the administrator; the transaction block with successful consensus is added to the end of the blockchain.
A second aspect of the present invention provides a transaction blockchain system, comprising: a plurality of buyers, sellers and managers which are positioned in the same alliance chain, wherein the sellers are used for issuing auction orders; a plurality of buyers respectively give auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts; the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; decrypting the price comparison pair by the current highest-bid buyer, determining a high-bid buyer according to the price comparison pair, and determining the high-bid buyer as the current highest-bid buyer; if the buyers who give the auction price aiming at the auction order finish the step of generating a price comparison pair by the buyers according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext, and determining the buyer with the highest current bid price as a successful party for auction; the administrator forms a transaction block by combining transaction information, the transaction block is added to the block chain, and the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties.
A third aspect of the present invention provides a computer apparatus comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to perform the blockchain based transaction method as provided by the first aspect of the invention.
A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform a blockchain-based transaction method as provided by the first aspect of the present invention.
The technical scheme of the invention has the following advantages:
in the block chain based transaction method and the transaction block chain system provided by the invention, after each buyer gives the auction price to the same auction order, the auction price is encrypted, when the price comparison is needed, the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext, the price comparison pair is decrypted by the buyer with the highest current bid price and the price comparison is carried out, and the price comparison pair is generated by combining the random number of the buyer, so that even if the buyer with the highest current bid price decrypts the price comparison pair, the auction price of the buyer participating in the auction cannot be determined, the privacy of the bid price is ensured, and the unfair transaction phenomena of malicious bidding caused by exposure of the auction price and the like are avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a diagram illustrating a transaction blockchain system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a specific example of a blockchain-based transaction method according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a specific example of a computer device in the embodiment of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The embodiment of the invention provides a block chain based transaction method, which is applied to a block chain system shown in fig. 1, wherein each buyer, seller and administrator are different nodes of the same alliance chain, and the block chain based transaction method provided by the embodiment of the invention comprises the following steps:
step S11: a plurality of buyers respectively give the auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts.
In an alternative embodiment, the auction orders are placed by the seller, and the auction orders include information such as power, reserve price, expiration time, etc. The buyer having a purchase demand searches for an order desired to be auction through a keyword or an auction order number, and bids on the order before the cut-off time.
In an alternative embodiment, after the buyer gives the auction price to the auction order, the buyer executes the auction agreement, encrypts the auction price by using the key to generate a price ciphertext and submits the price ciphertext. In the block chain, intelligent contracts are called to collect the price ciphertexts of all the bidders.
In an optional embodiment, the types of the auction orders include public auction and non-public auction, if the types of the auction orders are non-public orders, an auction password needs to be set for the non-public orders, and the buyer can participate in bidding only after successfully inputting the auction password.
Step S12: the buyer generates a price comparison pair according to the random number, the auction price, and the public key and the price ciphertext of the buyer with the highest current bid.
In an alternative embodiment, the first participating buyer is initialized as the highest bidding buyer upon the first comparison.
Step S13: the current highest bidding purchaser decrypts the price comparison pair, determines a high-priced purchaser according to the price comparison pair, and determines the high-priced purchaser as the current highest bidding purchaser.
In the embodiment of the invention, after each buyer gives the auction price, the auction price is not published, and even in the price comparison stage, the buyer can generate a price comparison pair according to the random number, the auction price, the public key and the price ciphertext of the buyer with the highest current bid price, and the buyer with the highest current bid price compares the price. After the buyer with the highest bid price decrypts the price comparison pair, the obtained data is calculated with the random number, the auction price of the buyer participating in the auction cannot be known, the bid privacy of the buyer is guaranteed, and the malicious competition is avoided.
If all the buyers who offer the auction price for the auction orders complete the above step S13, the following steps are performed:
step S14: and determining the buyer with the highest current bid as the successful party of the auction.
In the embodiment of the present invention, after comparing the auction prices of all the buyers, the buyer with the highest auction price is determined as the successful party, so that all the buyers who give the auction prices can be guaranteed to have been compared after performing the above step S13. If there is a buyer who has not executed the step S13, the step S13 is executed again for the buyer who has not executed the step S13 until all the auction prices of the buyers are compared.
Step S15: the administrator forms a transaction block by combining transaction information, the transaction block is added to the block chain, and the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties.
After determining the successful party of the auction from a plurality of buyers giving the auction price, the successful party of the auction and the seller successfully reach the transaction, and the transaction records comprise the electric quantity, the bargain price, the seller and the successful party of the auction, etc. The transaction is automatically submitted to an administrator by an intelligent contract to be packaged, consensus is carried out inside the administrator, transaction blocks which are successfully identified are added to the tail end of a block chain, and the chain records are convenient to trace back in the future.
In the block chain-based transaction method provided by the embodiment of the invention, after each buyer gives the auction price to the same auction order, the auction price is encrypted, when the price comparison is needed, the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext, the price comparison pair is decrypted by the buyer with the highest current bid price and the price is compared, and the price comparison pair is generated by combining the random number of the buyer, so that even if the buyer with the highest current bid price decrypts the price comparison pair, the auction price of the buyer participating in the auction cannot be determined, the privacy of the bid price is ensured, and the unfair transaction phenomena of malicious bidding and the like caused by exposure of the auction price are avoided.
In an alternative embodiment, the identities of the buyer and seller are not constant, and a node is defined as a seller when it issues an auction order and as a buyer when there is a purchase demand and an auction price is to be given for the auction order.
In an alternative embodiment, the user registers in the chain after being authorized by the enterprise. The user may be either a seller or a purchaser. The super node in the system is an administrator user, and the administrator user has writing authority of the block chain and also has consensus responsibility after the chain is linked.
In an optional embodiment, when the buyer encrypts the auction price, the buyer encrypts the auction price by using a Paillier homomorphic encryption algorithm to obtain a price ciphertext.
The paillier cryptosystem based on the resultant power residue class problem is a typical additive homomorphic operation, in which,
1) KeyGen () → (n, g), (p, q): and setting p and q as two large prime numbers, setting n as p × q, selecting g as B, and respectively generating a public key (n, g) and a private key (p, q).
2)Encrypt(m)→c=gm·rnmod n2: input plaintext m<n, selecting a random number r<n, generating a required ciphertext through an encryption function;
3)
Figure BDA0003563373480000091
input ciphertext c<n2The corresponding plaintext can be obtained through decoding;
the homomorphism possessed by this algorithm is demonstrated as follows:
Figure BDA0003563373480000092
in an alternative embodiment, in the blockchain-based transaction method provided by the embodiment of the present invention, the random number of the purchaser includes a first random number and a second random number, and the price comparison pair includes a first encrypted comparison item and a second encrypted comparison item.
The step of generating a price comparison pair by the buyer according to the random number, the auction price, the public key of the buyer with the highest current bid and the price ciphertext specifically comprises the following steps:
first, a first comparison item is generated according to a random number of a purchaser and an auction price, and the first comparison item is the auction price aiAnd a first random number xiAfter multiplication, the product is multiplied by a second random number yiAnd summing to obtain: first comparison term ai·xi+yi
Then, encrypting the first comparison item by using a Paillier homomorphic encryption algorithm to obtain a first encrypted comparison item
Figure BDA0003563373480000093
Secondly, a Paillier homomorphic encryption algorithm is adopted to carry out encryption on the second random number yiEncrypting to obtain encrypted random number
Figure BDA0003563373480000094
Finally, the price ciphertext of the buyer with the highest current bid is obtained
Figure BDA0003563373480000095
Is multiplied by the encrypted random number to determine a second encrypted comparison term
Figure BDA0003563373480000096
Among the multiple items of the price ciphertext of the buyer with the highest current bid, the price ciphertext of the buyer with the highest current bid
Figure BDA0003563373480000101
Is a first random number xi
In an optional embodiment, the step S13 specifically includes:
firstly, decrypting a first encryption comparison item by using a Paillier homomorphic encryption algorithm to obtain a first comparison item:
Figure BDA0003563373480000102
then, decrypting the second encrypted comparison item by adopting a Paillier homomorphic encryption algorithm to obtain a second comparison item, wherein the second comparison item is the sum of the product of the current auction price of the buyer with the highest bid and the first random number multiplied by the second random number:
Figure BDA0003563373480000103
if the first comparison item is larger than the second comparison item, determining the purchaser as a high-price purchaser; if the first comparison item is less than or equal to the second comparison item, the current highest bidding buyer is determined as the high-priced buyer.
If (a)i·xi+yi)>(amax·xi+yi) Determining the ith buyer as the current highest bidding buyer, and continuing to compare the auction price of the ith buyer with the auction prices of other buyers; if it is not(ai·xi+yi)≤(amax·xi+yi) And continuously comparing the auction prices of the current highest bidding buyer and other buyers until the highest bidding buyer bidding this time is obtained.
Because (a)i·xi+yi) And (a)max·xi+yi) All contain random numbers, therefore, any party can only know the own bid and the price ciphertext of other parties, can protect the bid privacy of the whole bidding process, but can compare a according to the homomorphism characteristic of the encryption algorithm and the twoiAnd amaxThe size of both.
An embodiment of the present invention provides a transaction blockchain system, as shown in fig. 1, including: a plurality of buyers, sellers and administrators which are positioned in the same alliance,
the seller is used for issuing auction orders. For details, reference is made to the description of the above method embodiments, which are not repeated herein.
A plurality of buyers respectively give auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts; the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; decrypting the price comparison pair by the current highest-bid buyer, determining a high-bid buyer according to the price comparison pair, and determining the high-bid buyer as the current highest-bid buyer; if the buyers who give the auction price aiming at the auction order finish the step of generating a price comparison pair by the buyers according to the random number, the auction price, the public key and the price ciphertext of the buyer with the highest current bid price, and the buyer with the highest current bid price is determined as the successful party for the auction. For details, reference is made to the description of the above method embodiments, which are not repeated herein.
The administrator forms a transaction block by combining transaction information, the transaction block is added to the block chain, and the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties. For details, reference is made to the description of the above method embodiments, which are not repeated herein.
An embodiment of the present invention provides a computer device, as shown in fig. 3, the computer device mainly includes one or more processors 31 and a memory 32, where one processor 31 is taken as an example in fig. 3.
The computer device may further include: an input device 33 and an output device 34.
The processor 31, the memory 32, the input device 33 and the output device 34 may be connected by a bus or other means, and fig. 3 illustrates the connection by a bus as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the transaction blockchain system, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the transaction blockchain system over a network. The input device 33 may receive a calculation request (or other numeric or character information) input by a user and generate a key signal input associated with the transaction blockchain system. The output device 34 may include a display device such as a display screen for outputting the calculation result.
Embodiments of the present invention provide a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and the computer-readable storage medium stores computer-executable instructions, where the computer-executable instructions may execute the transaction block chain method in any of the above method embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (10)

1. A blockchain-based transaction method, wherein each buyer, seller and administrator are different nodes of the same alliance chain, the method comprising:
a plurality of buyers respectively give auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts;
the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext;
the buyer with the highest current bid decrypts the price comparison pair, determines a high-price buyer according to the price comparison pair, and determines the high-price buyer as the buyer with the highest current bid;
if all the buyers giving the auction price aiming at the auction order finish the step of generating a price comparison pair by the buyers according to the random number, the auction price, the public key and the price ciphertext of the buyer with the highest current bid price, and determining the buyer with the highest current bid price as a successful party for auction;
the manager combines transaction information to form a transaction block, and the transaction block is added to a block chain, wherein the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties.
2. The blockchain-based transaction method of claim 1,
if there are buyers who do not complete the price comparison step among the buyers who give the auction price for the auction order according to the random number, the auction price, and the public key and price cryptograph of the buyer with the highest current bid,
determining the buyer who does not finish the step of generating a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext, and returning to the step of generating a price comparison pair by the buyer according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; and generating a price comparison pair by the buyer according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext until the buyer giving the auction price aiming at the auction order completes the step of generating the price comparison pair by the buyer.
3. The blockchain-based transaction method of claim 1,
and encrypting the auction price by adopting a Paillier homomorphic encryption algorithm to obtain the price ciphertext.
4. The blockchain-based transaction method of claim 3, wherein the purchaser's random number includes a first random number and a second random number, the price comparison pair includes a first encrypted comparison item and a second encrypted comparison item,
the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid and the price ciphertext, and the method comprises the following steps:
generating a first comparison item according to the random number of the buyer and the auction price, wherein the first comparison item is obtained by summing the product and the second random number after the auction price is multiplied by the first random number;
encrypting the first comparison item by using a Paillier homomorphic encryption algorithm to obtain the first encrypted comparison item;
encrypting the second random number by using a Paillier homomorphic encryption algorithm to obtain an encrypted random number;
and determining the product of multiple items of the price ciphertext of the current buyer with the highest bid and the encrypted random number as a second encrypted comparison item, wherein the number of times of the price ciphertext of the current buyer with the highest bid is the first random number in the multiple items of the price ciphertext of the current buyer with the highest bid.
5. The blockchain-based transaction method of claim 4, wherein the current highest bidding purchaser decrypts the price comparison pair and determines a high-priced purchaser from the price comparison pair, comprising:
decrypting the first encrypted comparison item by using a Paillier homomorphic encryption algorithm to obtain the first comparison item;
decrypting the second encrypted comparison item by adopting a Paillier homomorphic encryption algorithm to obtain a second comparison item, wherein the second comparison item is the sum of the product of the auction price of the current highest bidding buyer multiplied by the first random number and the second random number;
if the first comparison item is larger than the second comparison item, determining the purchaser as a high-price purchaser;
if the first comparison item is less than or equal to the second comparison item, determining the current highest bidding buyer as a high-priced buyer.
6. The blockchain-based trading method of claim 1, wherein if the type of the auction order is a non-public auction,
and the buyer inputs a password corresponding to the auction order and gives the auction price of the auction order.
7. The blockchain-based transaction method of claim 1, wherein a transaction block is formed in conjunction with transaction information, the transaction block being added to a blockchain including:
the intelligent contract submits the transaction information to the administrator;
the administrator packs the transaction information and makes consensus in the administrator;
adding a transaction block with successful consensus to the end of the block chain.
8. A transaction blockchain system, comprising: a plurality of buyers, sellers, administrators located in the same alliance chain,
the seller is used for issuing auction orders;
a plurality of buyers respectively give auction prices of the same auction order, and the auction prices are encrypted through respective random numbers and public keys to obtain price ciphertexts; the buyer generates a price comparison pair according to the random number, the auction price, the public key of the buyer with the highest current bid price and the price ciphertext; the buyer with the highest current bid decrypts the price comparison pair, determines a high-price buyer according to the price comparison pair, and determines the high-price buyer as the buyer with the highest current bid; if all the buyers giving the auction price aiming at the auction order finish the step of generating a price comparison pair by the buyers according to the random number, the auction price, the public key and the price ciphertext of the buyer with the highest current bid price, and determining the buyer with the highest current bid price as a successful party for auction;
the manager combines transaction information to form a transaction block, the transaction block is added to a block chain, and the transaction information comprises auction orders, seller issuing the auction orders, successful auction parties and auction prices corresponding to the successful auction parties.
9. A computer device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to perform the blockchain based transaction method of any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the blockchain-based transaction method according to any one of claims 1 to 7.
CN202210302405.5A 2022-03-24 2022-03-24 Transaction method based on block chain and transaction block chain system Pending CN114626852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210302405.5A CN114626852A (en) 2022-03-24 2022-03-24 Transaction method based on block chain and transaction block chain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210302405.5A CN114626852A (en) 2022-03-24 2022-03-24 Transaction method based on block chain and transaction block chain system

Publications (1)

Publication Number Publication Date
CN114626852A true CN114626852A (en) 2022-06-14

Family

ID=81904425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210302405.5A Pending CN114626852A (en) 2022-03-24 2022-03-24 Transaction method based on block chain and transaction block chain system

Country Status (1)

Country Link
CN (1) CN114626852A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116977033A (en) * 2023-09-22 2023-10-31 北京天润基业科技发展股份有限公司 Order splitting method, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190109914A (en) * 2018-03-19 2019-09-27 상명대학교 천안산학협력단 System and method for trading power based on blockchain smart contract
CN110363633A (en) * 2018-04-09 2019-10-22 苏州微拍文化产权交易有限公司 A kind of auction trade method of price ceiling
CN112288555A (en) * 2020-07-31 2021-01-29 山东爱城市网信息技术有限公司 Anonymous auction method, device and medium based on block chain
CN112446771A (en) * 2020-12-17 2021-03-05 北京金山云网络技术有限公司 Online auction system, method, device and electronic equipment
CN113095917A (en) * 2021-04-29 2021-07-09 支付宝(杭州)信息技术有限公司 Auction method based on block chain
CN113112340A (en) * 2021-04-21 2021-07-13 中钞***产业发展有限公司杭州区块链技术研究院 Vikri auction method, device and system based on block chain technology
CN113159898A (en) * 2021-04-29 2021-07-23 支付宝(杭州)信息技术有限公司 Auction method based on block chain
CN113379519A (en) * 2020-03-10 2021-09-10 本无链科技(深圳)有限公司 Credible auction method and system based on block chain
WO2021179840A1 (en) * 2020-03-13 2021-09-16 Alipay Labs (singapore) Pte. Ltd. Methods and devices for providing privacy-preserving blockchain-based auction
CN113657978A (en) * 2021-09-01 2021-11-16 东南大学 Distributed energy auction method and system based on block chain and privacy protection

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190109914A (en) * 2018-03-19 2019-09-27 상명대학교 천안산학협력단 System and method for trading power based on blockchain smart contract
CN110363633A (en) * 2018-04-09 2019-10-22 苏州微拍文化产权交易有限公司 A kind of auction trade method of price ceiling
CN113379519A (en) * 2020-03-10 2021-09-10 本无链科技(深圳)有限公司 Credible auction method and system based on block chain
WO2021179840A1 (en) * 2020-03-13 2021-09-16 Alipay Labs (singapore) Pte. Ltd. Methods and devices for providing privacy-preserving blockchain-based auction
CN112288555A (en) * 2020-07-31 2021-01-29 山东爱城市网信息技术有限公司 Anonymous auction method, device and medium based on block chain
CN112446771A (en) * 2020-12-17 2021-03-05 北京金山云网络技术有限公司 Online auction system, method, device and electronic equipment
CN113112340A (en) * 2021-04-21 2021-07-13 中钞***产业发展有限公司杭州区块链技术研究院 Vikri auction method, device and system based on block chain technology
CN113095917A (en) * 2021-04-29 2021-07-09 支付宝(杭州)信息技术有限公司 Auction method based on block chain
CN113159898A (en) * 2021-04-29 2021-07-23 支付宝(杭州)信息技术有限公司 Auction method based on block chain
CN113657978A (en) * 2021-09-01 2021-11-16 东南大学 Distributed energy auction method and system based on block chain and privacy protection

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
孟仕雨;孙伟卿;韩冬;张巍;杨文威;肖敏;薛贵挺;: "支持现货市场的分布式电力交易机制设计与实现", 电力***保护与控制, no. 07, 1 April 2020 (2020-04-01) *
张小艳 等: "基于数字承诺的区块链交易金额保密验证方法", 计算机科学, vol. 48, no. 09, 30 September 2021 (2021-09-30) *
李龚亮 等: "基于零知识证明的区块链隐私保护算法", 华中科技大学学报(自然科学版), vol. 48, no. 7, 31 July 2020 (2020-07-31) *
陆勤_数据人网: "联邦学习|同态加密:实现数据的"可算不可见"", pages 4 - 5, Retrieved from the Internet <URL:https://cloud.tencent.cn/developer/article/1857222> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116977033A (en) * 2023-09-22 2023-10-31 北京天润基业科技发展股份有限公司 Order splitting method, storage medium and electronic equipment
CN116977033B (en) * 2023-09-22 2023-12-22 北京天润基业科技发展股份有限公司 Order splitting method, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN107454114B (en) Auction method, server and readable storage medium
Bogetoft et al. Secure multiparty computation goes live
CN107392743B (en) McAfe two-way auction privacy protection method and auction method
US8024274B2 (en) Practical secrecy-preserving, verifiably correct and trustworthy auctions
US20170213210A1 (en) Asset transfers using a multi-tenant transaction database
JP6756041B2 (en) Information protection systems and methods
WO2020051710A1 (en) System and process for managing digitized security tokens
WO2001011448A2 (en) Privacy preserving negotiation and computation
Li et al. FAPS: a fair, autonomous and privacy-preserving scheme for big data exchange based on oblivious transfer, ether cheque and smart contracts
WO2021179840A1 (en) Methods and devices for providing privacy-preserving blockchain-based auction
CN116545773B (en) Method, medium and electronic equipment for processing privacy data
WO2022088969A1 (en) Numerical value ranking method and apparatus based on blockchain
Sarfaraz et al. A tree structure-based improved blockchain framework for a secure online bidding system
CN116204912A (en) Data processing method and device based on isomorphic encryption
JP2021019344A (en) Selectively private distributed computation for blockchain
US20230281671A1 (en) Decentralized privacy-preserving rewards with cryptographic black box accumulators
Blake et al. Conditional encrypted mapping and comparing encrypted numbers
Li et al. Secure multi‐unit sealed first‐price auction mechanisms
CN114626852A (en) Transaction method based on block chain and transaction block chain system
WO2020182234A2 (en) Methods and devices for transaction matching based on blockchain system
WO2022089518A1 (en) Address generation method, blockchain information processing method, and related device
CN115599959A (en) Data sharing method, device, equipment and storage medium
Huang et al. BA2P: Bidirectional and Anonymous Auction Protocol with Dispute‐Freeness
CN112734541A (en) Privacy protection supported secret bidding and expert evaluation safe purchasing sourcing system
Xu et al. Privacy-preserving double auction mechanism based on homomorphic encryption and sorting networks

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