CN111325533B - Decentralizing transaction method, transaction system and computer equipment - Google Patents

Decentralizing transaction method, transaction system and computer equipment Download PDF

Info

Publication number
CN111325533B
CN111325533B CN201911411573.2A CN201911411573A CN111325533B CN 111325533 B CN111325533 B CN 111325533B CN 201911411573 A CN201911411573 A CN 201911411573A CN 111325533 B CN111325533 B CN 111325533B
Authority
CN
China
Prior art keywords
result
user side
matching
balance
user
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
CN201911411573.2A
Other languages
Chinese (zh)
Other versions
CN111325533A (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 CN201911411573.2A priority Critical patent/CN111325533B/en
Publication of CN111325533A publication Critical patent/CN111325533A/en
Application granted granted Critical
Publication of CN111325533B publication Critical patent/CN111325533B/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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • 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/0613Third-party assisted
    • 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/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • 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)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Computer Security & Cryptography (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a decentralization transaction method, a transaction system and computer equipment, wherein the transaction method comprises the following steps: matching the received orders, after the matching is completed, sending a matching result, a target identifier and historical hanging list data to the user side, and inquiring whether the matching result comprises a target matching result corresponding to the user side according to the target identifier; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side; and receiving the voting result fed back by the user side, and executing the operation corresponding to the voting result based on the blockchain network to complete the transaction. Therefore, the user can verify whether the historical data of the hanging published by the exchange end is real or not, and can verify whether the published matching result is fair and reasonable, so that the exchange end cannot market through false historical data of hanging and cannot match the matched user, and therefore fair mutual trust between the user and the exchange is ensured.

Description

Decentralizing transaction method, transaction system and computer equipment
Technical Field
The present invention relates to the field of transaction technologies, and in particular, to a method, a system, and a computer device for decentralizing transactions.
Background
In recent years, blockchain technology has been developed, and the core value of blockchains is decentralization, multiparty trust, data non-falsifiability, traceability, auditability and the like. Currently mainstream exchanges remain centrally operated. This is contrary to the concept of decentralization of blockchain, which results from decentralization of exchanges.
The decentralised exchange is characterized in that the user does not need to pre-store funds to the exchange, and the real-time on-line settlement of the transaction can solve the problem of fund security trust to a certain extent. However, most of the existing decentralizing exchanges cannot realize complete decentralization due to the problems of efficiency, resource consumption and the like, and the matching function is still put under the chain, and even a part of trust of users is still required. Placing the matching function under the chain may result in problems of insufficient market availability, such as opaque information, unreliable transaction data, black box matching, etc.
Accordingly, there is a need for further improvements in the art.
Disclosure of Invention
The invention aims to solve the technical problem of providing a decentralised transaction method, a transaction system and computer equipment, which can ensure the real transparency of transaction information on the premise of ensuring the safety of user assets and not damaging the exchange and the benefits of users.
In a first aspect, the present invention provides a method for decentralizing a transaction, the method being applied to a transaction center in a decentralizing transaction system, the decentralizing transaction system further including a user end, the method comprising:
After the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side;
Responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result;
And receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network.
As a further improved technical scheme, the exchange end runs an intelligent contract based on zero knowledge proof; the responding to the verification information sent by the user side, and feeding back the proving result corresponding to the verification information to the user side, includes:
When the verification message comprises a listing identifier corresponding to the historical listing data, acquiring the balance of a first account and the balance of an intelligent contract corresponding to the historical listing data according to the listing identifier, wherein the balance of the first account is the balance of a user side in the historical listing data, and the balance of the intelligent contract is the amount of deducting the first account for the intelligent contract in the historical listing data;
determining a proving result corresponding to the historical hanging data under the chain based on zero knowledge proving according to the balance of the first account and the intelligent contract balance;
and sending the proving result corresponding to the history hanging data to the user side.
As a further improvement technical solution, the determining, under the chain, a proof result corresponding to the history hanging data based on the zero knowledge proof according to the balance of the first account and the intelligent contract balance includes:
And if the balance of the first account and the state of the intelligent contract balance change, determining that the corresponding proving result of the history hanging data is true.
As a further improved technical solution, the responding to the verification information sent by the user side, and feeding back the proof result corresponding to the verification information to the user side, includes:
when the verification message comprises a matching identifier corresponding to a matching result, acquiring the balance of a second account corresponding to the matching result according to the matching identifier, wherein the balance of the second account is the balance of the second account after submitting an order to an intelligent contract;
according to the balance of the second account, determining a proving result corresponding to the matching result under the chain based on zero knowledge proving;
and sending the proving result corresponding to the matching result to the user side.
As a further improvement technical scheme, the determining, under the chain, the proof result corresponding to the matching result based on the zero knowledge proof according to the balance of the second account includes:
And inputting the balance of the second account into a gate circuit corresponding to zero knowledge proof, and if the output result of the gate circuit is the balance of the second account predicted by the exchange end according to the matching result, determining that the proof result corresponding to the matching result is true.
In a second aspect, the present invention provides a method for decentralizing a transaction, the method being applied to a user terminal in a decentralizing transaction system, the method comprising:
Receiving a matching result, a target identifier and historical ticket data sent by the exchange terminal;
Sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier;
And receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
As a further improved technical solution, the method for receiving the proof result fed back by the exchange according to the verification information includes:
when the verification message comprises a matching identifier corresponding to a matching result, receiving a proving result corresponding to the matching result;
And when the verification message comprises a list identifier corresponding to the history list data, receiving a proving result corresponding to the history list data.
In a third aspect, the present invention provides a decentralised trading system, including a exchange end and a user end;
The exchange end is used for matching a plurality of received orders, and after the matching is completed, the exchange end sends a matching result, a target identifier and historical hanging bill data to the user end, so that the user end sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user end or not according to the target identifier, wherein the target identifier is the identifier of the target matching result corresponding to the user end; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result; receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
The user terminal is used for receiving the matching result, the target identifier and the history list data sent by the exchange terminal; sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier; and receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
In a fourth aspect, the present invention provides a computer device comprising a memory storing a computer program and a processor implementing the following steps when executing the computer program:
After the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side;
Responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result;
Receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
or receiving a matching result, a target identifier and historical ticket data sent by the exchange terminal;
Sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier;
And receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
In a fifth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Receiving a matching result, a target identifier and historical ticket data sent by the exchange terminal;
Sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier;
And receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
The method provided by the embodiment of the invention comprises the following steps: after the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result; and receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network. Therefore, the user can verify whether the historical data of the hanging published by the exchange end is real or not, and can verify whether the published matching result is fair and reasonable, so that the exchange end cannot market through false historical data of hanging and cannot match the matched user, and therefore fair mutual trust between the user and the exchange is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
FIG. 1 is a flow chart of a method of decentralized transaction according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a decentralized transaction system according to one embodiment of the invention;
fig. 3 is an internal structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the present invention better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The inventor finds that the existing decentralization exchange still does not completely realize decentralization at present.
In order to solve the above problems, in the embodiment of the present invention, a plurality of received orders are matched, and after the matching is completed, a matching result and history list data are sent to the user side, so that the user side sends a verification message according to the matching result and history list data; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result; and receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network. Therefore, the user can verify whether the historical data of the hanging published by the exchange end is real or not, and can verify whether the published matching result is fair and reasonable, so that the exchange end cannot market through false historical data of hanging and cannot match the matched user, and therefore fair mutual trust between the user and the exchange is ensured.
Various non-limiting embodiments of the present invention are described in detail below with reference to the attached drawing figures.
Referring to fig. 1, a schematic diagram of a method for decentralizing a transaction applied to a transaction center in a decentralizing transaction system is provided, the decentralizing transaction system further includes a user end, and the method includes the steps of:
S1, the exchange terminal matches the received orders, and after the matching is completed, the matching result, a target identifier and historical hanging list data are sent to the user terminal, so that the user terminal sends verification information according to the matching result and the historical hanging list data, and whether the matching result comprises a target matching result corresponding to the user terminal or not is inquired according to the target identifier, wherein the target identifier is the identifier of the target matching result corresponding to the user terminal.
In the embodiment of the invention, the exchange end runs an intelligent contract, which is a computer protocol aiming at propagating, verifying or executing the contract in an informationized mode, and the intelligent contract is an important reason for realizing the decentralization of the blockchain, so that the traceable, irreversible and safe transaction can be executed without a third party. At the beginning of a transaction, a user first performs a token registration, the token being digital currency, the token registration being possible using smart contracts, ERC20 being a token standard requiring compliance with the agreement at the time of the token registration, the token registration including a token name, a token symbol, an issue total amount, a contract address, and the like; after registering the medal, the user side executes the user order-hanging operation, namely, the user side submits an order to the intelligent contract, wherein the order comprises transaction information, and the transaction information comprises currency A required by the transaction, commission and continuous order-hanging time of the payment exchange side after the transaction is completed and currency B required by the transaction; after submitting the order to the smart contract, the user pays the monetary amount to the smart contract that is needed to be paid to complete the transaction.
In the embodiment of the invention, after the user submits the order to the intelligent contract, signing the order, submitting the order with the signature to the exchange end, and submitting ciphertext corresponding to the order simultaneously with the order with the signature; the signature is a signature using ecrecover functions, the intelligent contract can authenticate the signature of the user using ecrecover functions, and if the intelligent contract can obtain the address of the user according to the signature, the signature is true. The ciphertext is known only to the user, and the user can inquire the state of the order according to the ciphertext. The ciphertext is the target identifier, the ciphertext of each order is known only to the user and the exchange, and other users cannot know the ciphertext, namely the exchange terminal intelligently sends the target identifier to the user terminal corresponding to the target identifier.
In the embodiment of the invention, after receiving the order and the ciphertext, the exchange verifies whether the received order is matched with the order in the intelligent contract, specifically, the exchange verifies whether the order hung on the intelligent contract by the user has enough funds, whether the order is out of date, (the order submitted by the user and matched with the exchange has the deadline) or not, and whether the order is cancelled or not, and if all the verification passes, the order is put into a matching queue.
In the embodiment of the invention, the user does not need to care about a specific matching method, and the user only care about whether the submitted order can be fairly matched if the matching condition is met, so that in the embodiment of the invention, the concurrency performance can be improved and the consumption can be saved by adopting the existing under-chain matching mode. But the existing under-chain matching is black box matching.
When the system is opened (matching is completed), the exchange end sends the matching results of all orders in a matching queue and the historical hanging data of the exchange end (the matching results only have matching identifications, the historical hanging data only have the matching identifications and do not contain identity information such as a user public key, an address and the like) to the user end, and the user end can verify the authenticity of the matching results and the historical hanging data; meanwhile, the exchange end sends a target mark to the user end, wherein the target mark is ciphertext submitted together with the order when the user end submits the order to the exchange end, and the user end can verify whether a target matching result corresponding to the order submitted by the user end exists in the matching results according to the target mark. If the matching result comprises the target matching result, the user side can verify the authenticity of the target result when verifying the authenticity of the matching result; the target identifier can also be used for the user to conveniently inquire about the matching progress of the corresponding order. And zero knowledge proof is provided for the user to verify the authenticity of the matching result and the authenticity of the historical list data without worrying about the removal or interception of the list.
S2, the user side receives the matching result, the target identification and the history list data sent by the exchange side.
In the embodiment of the invention, the user side receives the matching result and the historical hanging data sent by the transaction side, wherein the historical hanging data is an order for completing the transaction at the exchange side, and the user can know information such as the market exchange rate of the current transaction according to the hanging data so as to judge whether the matching result accords with the current market.
In the embodiment of the invention, a user side sends a target identifier to a transaction side so as to inquire the state of an order corresponding to the target identifier, wherein the target identifier is ciphertext; the ciphertext corresponds to an order submitted to the exchange end by the user end, the exchange end receives a query instruction, and the state of the order corresponding to the ciphertext is fed back to the user end.
And S3, the user side sends verification information to the exchange side according to the received matching result and the history hanging data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target identifier.
In the embodiment of the invention, the user receives the matching results corresponding to all orders in the matching queue of the round; and the historical hanging list data corresponding to the historical order of the transaction completed at the exchange end; obviously, the historical hanging data received by the user side is multiple, and the received matching results are also multiple; the user may choose to verify several matching results, as well as several historical coupon data. And the user side receives the matching result and the history hanging data and displays the matching result and the history hanging data on the user side. The user inquires whether the received matching result comprises a target matching result corresponding to the order submitted by the user according to the target identifier.
In the embodiment of the invention, when whether a certain matching result is true or not is to be verified, the user side sends verification information corresponding to the matching result to the exchange side, and the verification information corresponding to the matching result comprises a matching identifier corresponding to the matching result. The matching identifier can be a section of character, so that the exchange end can be matched with the matching result according to the matching identifier and can prove the matching result. When whether a certain history hanging data is real or not is verified, the user side sends verification information corresponding to the history hanging data, and the verification information corresponding to the history hanging data comprises a hanging list identifier corresponding to the history hanging data.
S4, the exchange end responds to the verification information sent by the user end and feeds back a proving result corresponding to the verification information to the user end so that the user end can obtain the verification result according to the proving result.
In the embodiment of the invention, when a user side sends a query instruction to a transaction center side, the query instruction comprises a target identifier (ciphertext), when the transaction center side receives the query instruction, the target identifier in the query instruction is obtained, a target matching result corresponding to the target identifier is sent to the user side according to the obtained target identifier (ciphertext), and the target matching result obtained by querying according to the target identifier comprises identity information such as a user public key, an address and the like. The user receives the target matching result corresponding to the query instruction, can determine whether the received matching result comprises the target matching result, and verifies the matching result.
Specifically, step S4 includes:
S41a, when the verification message comprises a listing identifier corresponding to the historical listing data, acquiring the balance of a first account and the balance of an intelligent contract corresponding to the historical listing data according to the listing identifier, wherein the balance of the first account is the balance of a user side in the historical listing data, and the balance of the intelligent contract is the amount of the first account deducted for the intelligent contract in the historical listing data.
In the embodiment of the invention, the user submits the order to the intelligent contract and the amount required by the transaction is required to be delivered to the intelligent contract, so that the balance of the intelligent contract is increased and the balance of the account is reduced due to the fact that the order is suspended. The method comprises the steps that a user side receives a plurality of history list data, list identifiers corresponding to each history list data are different, and when a transaction terminal receives verification information comprising the list identifiers, the balance of a first account corresponding to the list identifiers and the balance of an intelligent contract are obtained.
S42a, determining a proving result corresponding to the historical hanging data under the chain based on zero knowledge proving according to the balance of the first account and the intelligent contract balance.
In the embodiment of the invention, zero-Knowledge Proof (Zero-knowledgeproof) is proposed by S.Goldwasser, S.Micali and C.rackoff in the beginning of the 80 th century. It refers to the ability of a prover to trust that a certain assertion is correct without providing any useful information to the verifier. Zero knowledge proof is essentially a protocol involving two or more parties, i.e., a series of steps that two or more parties need to take to complete a task. The prover proves to the verifier and believes itself to know or own a certain message, but the proving process cannot reveal any information about the proved message to the verifier. In the embodiment of the invention, the verifier is a user terminal, and the prover is a transaction terminal. The zero knowledge proof can be divided into three parts of Setup (CRS) generation public data, prove proof and Vfy verification, and then specific mathematical logic calculation is designed into a corresponding 'calculation gate circuit' through basic operators. In the current problem, the input to the gate is the balance status of the account.
In the embodiment of the invention, in order to ensure the information taking safety, a transaction center end proves whether the hanging data is real under a chain, the input of a gate circuit is the balance state of an account, and if the balance of the first account and the balance state of an intelligent contract change, the corresponding proof result of the history hanging data is determined to be real. When the first account submits an order to the intelligent contract, the amount required by the transaction order is required to be paid to the intelligent contract, so that if the balance of the intelligent contract and the balance of the first account are changed, the evidence result corresponding to the hanging data corresponding to the order can be determined to be true.
The transaction terminal needs to determine the balance of the first account before submitting the order to the intelligent contract, determine the balance of the first account after submitting the order to the intelligent contract, and further determine whether the balance of the first account changes; the exchange end also needs to acquire the balance of the intelligent contract before receiving the order submitted by the first account and acquire the balance of the intelligent contract after receiving the order submitted by the first account, so as to determine whether the balance of the intelligent contract changes. If the balance of the first account and the balance of the intelligent contract are changed, determining that the certification result corresponding to the hanging note identification is true; and if the balance of the first account and the balance of the intelligent contract are not changed at the same time, determining that the proving result corresponding to the hanging note identification is false.
S43a, sending the proving result corresponding to the history hanging data to the user side.
In the embodiment of the invention, the proving result comprises reality and false, the area for displaying the proving result can be divided in the same column of the historical hanging data of the user side, and when the proving result sent by the server side is obtained, the proving result is displayed in the area of the proving result corresponding to the historical hanging data, so that the proving result can be clearly known by the user.
The user can also verify whether the matching result is true, and step S4 further includes:
S41b, when the verification message comprises a matching identifier corresponding to a matching result, acquiring the balance of a second account corresponding to the matching result according to the matching identifier, wherein the balance of the second account is the balance of the second account after submitting an order to the intelligent contract.
In the embodiment of the present invention, the matching result may include a target matching result. The second account is one account in the matching results, and the exchange end predicts the balance of the account after the transaction according to the matching results. The balance of the second account is the balance of the account after the account submits the order to the intelligent contract and the amount required by the transaction is drawn to the intelligent contract.
S42b, determining a proving result corresponding to the matching result under the chain based on zero knowledge proving according to the balance of the second account.
In the embodiment of the invention, in order to ensure the information taking safety, the exchange end proves whether the hanging data is real under the chain, the balance of the second account is input into the gate circuit corresponding to zero knowledge proof, and if the output result of the gate circuit is the balance of the second account predicted by the exchange end according to the matching result, the corresponding proof result of the matching result is determined to be real.
S43b, sending the proving result corresponding to the matching result to the user side.
In the embodiment of the invention, the proving result comprises true and false, and the region for displaying the proving result can be divided in the same column of the matching result of the user side, and when the proving result sent by the server side is obtained, the proving result is displayed in the region of the proving result corresponding to the matching result, so that the proving result can be clearly known by the user.
S5, the user side receives the proving result fed back by the exchange side according to the verifying information, verifies the proving result to obtain a verifying result, and feeds back the voting result based on the block chain network.
Specifically, step S5 includes: and when the verification message comprises a matching identifier corresponding to the matching result, receiving a proving result corresponding to the matching result. And when the verification message comprises a list identifier corresponding to the history list data, receiving a proving result corresponding to the history list data.
In the embodiment of the invention, the user side receives the proving result, verifies the proving result through the zero knowledge proof, takes the proving result as the input of the zero knowledge proof, and outputs the verifying result corresponding to the proving result through the zero knowledge proof.
In the embodiment of the invention, the user side verifies the proving result, and the user does not need to provide any information and can trust to obtain the verifying result based on zero knowledge proving. The verification result intuitively displays whether the historical hanging list data and the matching result of the user verification are real, the verification result is convenient for the user side to feed back the voting result, and the majority voting result comprises agreeing to the transaction and giving up the transaction. If the verification result is mostly true, the transaction can be selected to be agreed, and if the verification result is partly false, the user can not trust the exchange end, and the transaction can be selected to be abandoned.
S6, the exchange end receives the voting result fed back by the user end and executes operation corresponding to the voting result based on the blockchain network so as to complete the transaction.
In the embodiment of the present invention, the trading end receives the voting results fed back by the plurality of clients to determine whether to execute the trade, which is part of the prior art and is not described herein in detail. Executing the trade function in the intelligent contract only has the trade right to execute, after the trade execution is finished, the intelligent contract transfers the commission to the account of the trade center after the transfer of the two sides of the user is finished, and the whole trade execution is finished.
In the embodiment of the invention, a plurality of received orders are matched, after the matching is completed, a matching result, a target identifier and historical hanging bill data are sent to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and whether the matching result comprises a target matching result corresponding to the user side or not is inquired according to the target identifier, wherein the target identifier is the identifier of the target matching result corresponding to the user side; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result; and receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network. Thus, the user side can verify whether the historical hanging data published by the exchange side are real or not, and also can verify whether the published matching result is fair and reasonable or not, on the premise of not revealing the privacy of the user, the historical orders published by the exchange side are all transaction orders which are correctly executed in the past, the public orders are ensured to be truly hung by the intelligent contract and the balance is locked, the possibility that the exchange side maliciously makes a market does not exist, the transaction data is falsified and drawn, and the user side can acquire the truest and intuitive price guidance; the order initiated by the user terminal can be practically executed by the exchange terminal in the matcher. The user terminal can identify the order of the user terminal at the exchange terminal according to the ciphertext of the user terminal and verify the matching result, so that the exchange terminal cannot match users which are not matched, and the fairness and transparency between the user and the exchange are ensured through zero knowledge proof on the premise of ensuring the safety of the user assets and not damaging the exchange and the benefits of the user.
The embodiment of the invention also provides a decentralised transaction system, referring to fig. 2, the system comprises: a exchange end 100 and a user end 200;
The exchange end 100 is configured to match a plurality of received orders, and after the matching is completed, send a matching result, a target identifier, and historical hanging order data to the user end, so that the user end sends a verification message according to the matching result and the historical hanging order data, and inquires whether the matching result includes a target matching result corresponding to the user end according to the target identifier, where the target identifier is an identifier of the target matching result corresponding to the user end; responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result; receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
The user terminal 200 is configured to receive a matching result, a target identifier, and historical ticket data sent by the exchange terminal; sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier; and receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
Referring to fig. 3, a computer device, which may be a terminal, is shown in an embodiment of the present invention, and the internal structure is shown in fig. 3. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by the processor to implement a decentralised transaction method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the block diagram of FIG. 3 is merely a partial structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or less components than those shown, or may combine some of the components, or have a different arrangement of components.
An embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to implement the following steps:
After the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side;
Responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result;
Receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
or receiving a matching result, a target identifier and historical ticket data sent by the exchange terminal;
Sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier;
And receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, characterized in that the computer program when executed by a processor realizes the following steps:
After the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side;
Responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result;
Receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
or receiving a matching result, a target identifier and historical ticket data sent by the exchange terminal;
Sending verification information to the exchange terminal according to the received matching result and the history hanging data so as to facilitate the exchange terminal to feed back a proving result according to the verification information and inquire whether the matching result comprises a target matching result corresponding to the user terminal according to the target identifier;
And receiving a proving result fed back by the exchange terminal according to the verification information, verifying the proving result to obtain a verification result, and feeding back a voting result based on a blockchain network, wherein the exchange terminal and the user terminal are both in the blockchain network.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
It is to be understood that the invention is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.

Claims (3)

1. A method of decentralized transaction, wherein the method of transaction is applied to a transaction center in a decentralized transaction system, the decentralized transaction system further comprising a user end, the method of transaction comprising:
After the matching is completed, sending a matching result, a target mark and historical hanging bill data to the user side, so that the user side sends a verification message according to the matching result and the historical hanging bill data, and inquires whether the matching result comprises a target matching result corresponding to the user side or not according to the target mark, wherein the target mark is the mark of the target matching result corresponding to the user side;
Responding to the verification information sent by the user side, and feeding back a proving result corresponding to the verification information to the user side so that the user side can obtain a verification result according to the proving result;
Receiving a voting result fed back by the user side, and executing an operation corresponding to the voting result based on a blockchain network to complete a transaction, wherein the exchange side and the user side are both in the blockchain network;
The responding to the verification information sent by the user side, and feeding back the proving result corresponding to the verification information to the user side, includes:
when the verification message comprises a matching identifier corresponding to a matching result, acquiring the balance of a second account corresponding to the matching result according to the matching identifier, wherein the balance of the second account is the balance of the second account after submitting an order to an intelligent contract;
according to the balance of the second account, determining a proving result corresponding to the matching result under the chain based on zero knowledge proving;
sending the certification result corresponding to the matching result to the user side;
And determining a proving result corresponding to the matching result under the chain based on zero knowledge proving according to the balance of the second account, wherein the proving result comprises the following steps:
inputting the balance of the second account into a gate circuit corresponding to zero knowledge proof, and if the output result of the gate circuit is the balance of the second account predicted by the exchange end according to the matching result, determining that the proof result corresponding to the matching result is true;
The target mark is ciphertext submitted together with the order when the user side submits the order to the exchange, and the user side verifies whether a target matching result corresponding to the order submitted by the user side exists in the matching results according to the target mark;
The exchange end runs an intelligent contract based on zero knowledge proof; the responding to the verification information sent by the user side, and feeding back the proving result corresponding to the verification information to the user side, includes:
When the verification message comprises a listing identifier corresponding to the historical listing data, acquiring the balance of a first account and the balance of an intelligent contract corresponding to the historical listing data according to the listing identifier, wherein the balance of the first account is the balance of a user side in the historical listing data, and the balance of the intelligent contract is the amount of deducting the first account for the intelligent contract in the historical listing data;
determining a proving result corresponding to the historical hanging data under the chain based on zero knowledge proving according to the balance of the first account and the intelligent contract balance;
Sending the proving result corresponding to the history hanging data to the user side;
The determining, based on zero knowledge proof, a proof result corresponding to the historical hanging data under the chain according to the balance of the first account and the intelligent contract balance comprises:
if the balance of the first account and the state of the intelligent contract balance change, determining that the corresponding proof result of the history hanging data is true;
The user side sends the target identifier to the exchange side so as to inquire the state of an order corresponding to the target identifier, wherein the target identifier is ciphertext; the ciphertext corresponds to the order submitted to the exchange end by the user end, the exchange end receives the query instruction, and the state of the order corresponding to the ciphertext is fed back to the user end.
2. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of claim 1 when executing the computer program.
3. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of claim 1.
CN201911411573.2A 2019-12-31 2019-12-31 Decentralizing transaction method, transaction system and computer equipment Active CN111325533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911411573.2A CN111325533B (en) 2019-12-31 2019-12-31 Decentralizing transaction method, transaction system and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911411573.2A CN111325533B (en) 2019-12-31 2019-12-31 Decentralizing transaction method, transaction system and computer equipment

Publications (2)

Publication Number Publication Date
CN111325533A CN111325533A (en) 2020-06-23
CN111325533B true CN111325533B (en) 2024-05-14

Family

ID=71163249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911411573.2A Active CN111325533B (en) 2019-12-31 2019-12-31 Decentralizing transaction method, transaction system and computer equipment

Country Status (1)

Country Link
CN (1) CN111325533B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493126A (en) * 2018-10-26 2019-03-19 中国工商银行股份有限公司 Integration data processing method and processing device based on block chain
CN113283889B (en) * 2021-06-04 2022-08-16 杭州复杂美科技有限公司 Decentralized exchange system, trading method, equipment and storage medium
CN116029825B (en) * 2022-12-29 2024-02-02 胖迪科技(深圳)有限公司 Block chain transaction method, device and system, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761146A (en) * 2016-01-24 2016-07-13 杭州复杂美科技有限公司 Block link matching exchange
WO2016172912A1 (en) * 2015-04-30 2016-11-03 深圳市星电商科技有限公司 Electronic transaction certificate management system
CN107133872A (en) * 2017-05-06 2017-09-05 杭州复杂美科技有限公司 Block chain information brings platform together
CN109447791A (en) * 2018-11-09 2019-03-08 北京邮电大学 A kind of funds transaction method and device based on block chain
CN109636605A (en) * 2018-12-13 2019-04-16 南京区盟链信息科技有限公司 A kind of monitoring and managing method and system of digital asset exchange
WO2019227336A1 (en) * 2018-05-30 2019-12-05 重庆小雨点小额贷款有限公司 Blockchain-based information processing method and device, and blockchain network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016172912A1 (en) * 2015-04-30 2016-11-03 深圳市星电商科技有限公司 Electronic transaction certificate management system
CN105761146A (en) * 2016-01-24 2016-07-13 杭州复杂美科技有限公司 Block link matching exchange
CN107133872A (en) * 2017-05-06 2017-09-05 杭州复杂美科技有限公司 Block chain information brings platform together
WO2019227336A1 (en) * 2018-05-30 2019-12-05 重庆小雨点小额贷款有限公司 Blockchain-based information processing method and device, and blockchain network
CN109447791A (en) * 2018-11-09 2019-03-08 北京邮电大学 A kind of funds transaction method and device based on block chain
CN109636605A (en) * 2018-12-13 2019-04-16 南京区盟链信息科技有限公司 A kind of monitoring and managing method and system of digital asset exchange

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
姚前.数字货币研究前沿.中国金融出版社,2018,304-305. *

Also Published As

Publication number Publication date
CN111325533A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
CN111325533B (en) Decentralizing transaction method, transaction system and computer equipment
TW201944757A (en) Computer-implemented system and method suitable for increasing the security of instant off-line blockchain transactions
TW201810151A (en) Blockchain-implemented method and system
CN110570282A (en) cross-region resource transfer method, device, equipment and storage medium
CN108154439A (en) Asset data processing unit and method
CN111738725B (en) Cross-border resource transfer authenticity auditing method and device and electronic equipment
CN111612600B (en) Block chain auction method, equipment, storage medium and block chain system
CN101739624A (en) Trusted payment network system
KR20220093198A (en) Execution of transactions using dedicated and open blockchains
CN109643415A (en) Trade management technology
US10810586B2 (en) Currency information processor and currency information processing system
CN109191123A (en) A kind of digital cash is issued as agent amount control system and method
CH714242B1 (en) Method and system for generating federated user-identity identities.
US20210398112A1 (en) Computer-Implemented Method and System for Digital Signing of Transactions
CN111639347A (en) Electronic warehouse receipt verification method, device, terminal and storage medium
US20210019739A1 (en) Transfer gateway systems and methods with prolonged vetting of new participants
WO2020231288A1 (en) Information system for buying and selling electrical energy
CN108229954B (en) Coin storage method and system based on digital currency wallet
CN114358766A (en) Method, equipment and blockchain system for trading green electric certificates
JP2024052790A (en) Peer-to-peer distributed ledger integration system for digital asset token transfer transaction and peer-to-peer distributed ledger recording method
KR102333811B1 (en) System and method for processing card payment based on block-chain
CN108183889A (en) Identity identifying method and identification authentication system
CN114820188A (en) Virtual asset transaction method and device, electronic equipment and readable storage medium
US20200242573A1 (en) Cryptographic transactions supporting real world requirements
TWM568433U (en) Third party transaction information exchange system based on blockchain technology

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