CN111598556A - Digital currency exchange method, device, equipment and medium - Google Patents

Digital currency exchange method, device, equipment and medium Download PDF

Info

Publication number
CN111598556A
CN111598556A CN202010455102.8A CN202010455102A CN111598556A CN 111598556 A CN111598556 A CN 111598556A CN 202010455102 A CN202010455102 A CN 202010455102A CN 111598556 A CN111598556 A CN 111598556A
Authority
CN
China
Prior art keywords
token
user terminal
digital currency
transaction
transaction request
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
CN202010455102.8A
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.)
Oxford Hainan Blockchain Research Institute Co ltd
Original Assignee
Oxford Hainan Blockchain Research Institute 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 Oxford Hainan Blockchain Research Institute Co ltd filed Critical Oxford Hainan Blockchain Research Institute Co ltd
Priority to CN202010455102.8A priority Critical patent/CN111598556A/en
Publication of CN111598556A publication Critical patent/CN111598556A/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/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/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules

Abstract

The embodiment of the invention discloses a digital currency exchange method, a device, equipment and a medium, wherein a hosting node receives digital currency uploaded by a user terminal; a token contract is selected that matches the type of token to which the digital currency belongs, and the digital currency is converted to tokens according to the token contract. The alliance chain stores tokens corresponding to all user terminals transmitted by the hosting node; and when a transaction request transmitted by the user terminal is received, updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and cross-chain transaction among multiple chains can be realized. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.

Description

Digital currency exchange method, device, equipment and medium
Technical Field
The present invention relates to the field of information security technologies, and in particular, to a digital currency exchange method, apparatus, device, and computer-readable storage medium.
Background
The digital assets refer to assets which are owned or controlled by individuals and enterprises and exist in an electronic data form, and are used for exchanging or performing rights corresponding to physical assets in daily activities.
With the increase of the variety and value of various digital assets, how to establish value transfer channels of different block chain networks, how to develop financial and related business innovations based on various digital assets is a necessary problem in the development of block chains.
Notary mechanisms are currently the most widely used and simple technique for crossing chains. The notary mechanism removes the trust required by the transaction participants and the default connector does not discard or steal funds, meaning that the notary mechanism does not need to be protected from legal contracts and too much auditing, greatly reducing the authentication threshold. In practical application, a central mechanism such as a trading exchange may have behaviors of closing down a broken product of a company, appropriating user funds, and performing illegal profit by using information difference, and a cross-chain scheme of a notary mechanism is too centralized, so that the reliability of cross-chain trading cannot be ensured.
In order to realize decentralized cross-chain transaction, the related art adopts a side chain technology to solve the cross-chain problem, and the side chain technology can realize the transfer of the digital assets from the first block chain to the second block chain and can safely return to the first block chain from the second block chain at a later time point. The first block chain is usually called the main block chain or main chain, and the second block chain is called the side chain. The technical basis of the side chain implementation is bidirectional anchoring, through which the digital assets can be temporarily locked in the main chain, and the digital assets of the main chain can be released. However, the technical scheme uses a bidirectional anchoring technology, only supports a form of single-chain to single-chain, and cannot achieve cross-chain transaction between multiple chains.
It can be seen that how to implement decentralized cross-chain transactions between multiple chains is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device and a computer readable storage medium for exchanging digital currency, which can implement decentralized cross-chain transactions between multiple chains.
To solve the above technical problem, an embodiment of the present invention provides a digital currency exchange method, which is applicable to a federation chain, and the method includes:
storing tokens corresponding to all user terminals transmitted by the managed node;
receiving a transaction request transmitted by a user terminal;
and updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
Optionally, when the transaction request is a cross-chain transaction request carrying a token transaction type and a token transaction amount, correspondingly, updating tokens corresponding to user terminals in the transaction request according to a rule matched with the transaction request includes:
selecting a target atomic exchange contract matched with the token transaction type from preset atomic exchange contracts;
and updating the token types and the token amounts corresponding to the user terminals in the cross-chain transaction request according to the target atomic exchange contract and the token transaction amounts.
Optionally, when the transaction request is a transfer transaction request carrying a transaction amount of a token, correspondingly, updating the token corresponding to each user terminal in the transaction request according to a rule matched with the transaction request includes:
and calling a preset transfer function, and updating the token amount corresponding to each user terminal in the transfer transaction request according to the token transaction amount.
Optionally, after the token corresponding to each user terminal in the transaction request is updated according to the rule matching with the transaction request, the method further includes:
and recording token transaction information corresponding to all user terminals.
Optionally, the method further comprises:
monitoring whether the digital currency of each user terminal maintained in the hosting node is matched with the token of each user terminal recorded on the alliance chain or not according to the set cycle time;
and when the digital currency of each user terminal maintained in the hosting node is not matched with the token of each user terminal recorded on the alliance chain, feeding back prompt information that the digital currency is unsafe to the user terminal.
The embodiment of the invention also provides a digital currency exchange device which is suitable for the alliance chain and comprises a storage unit, a receiving unit and an updating unit;
the storage unit is used for storing tokens corresponding to the user terminals transmitted by the managed node;
the receiving unit is used for receiving a transaction request transmitted by a user terminal;
and the updating unit is used for updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
Optionally, when the transaction request is a cross-chain transaction request carrying a token transaction type and a token transaction amount, the updating unit is specifically configured to select a target atomic exchange contract matching the token transaction type from preset atomic exchange contracts; and updating the token types and the token amounts corresponding to the user terminals in the cross-chain transaction request according to the target atomic exchange contract and the token transaction amounts.
Optionally, when the transaction request is a transfer transaction request carrying a transaction amount of a token, correspondingly, the updating unit is specifically configured to invoke a preset transfer function, and update the token amount corresponding to each user terminal in the transfer transaction request according to the transaction amount of the token.
Optionally, a recording unit is further included;
and the recording unit is used for recording token transaction information corresponding to all the user terminals.
Optionally, the system further comprises a monitoring unit and a feedback unit;
the monitoring unit is used for monitoring whether the digital currency of each user terminal maintained in the hosting node is matched with the token of each user terminal recorded on the alliance chain or not according to the set cycle time;
and the feedback unit is used for feeding back prompt information that the digital currency is unsafe to the user terminal when the digital currency of each user terminal maintained in the hosting node is not matched with the token of each user terminal recorded on the alliance chain.
The embodiment of the invention also provides a digital currency exchange method, which is suitable for the managed node and comprises the following steps:
receiving digital currency uploaded by a user terminal;
selecting a token contract matched with the token type of the digital currency, and converting the digital currency into tokens according to the token contract;
and transmitting the token corresponding to each user terminal to a alliance chain.
Optionally, before the receiving the digital currency uploaded by the user, the method further comprises:
and generating a public key address by using a threshold signature technology, and transmitting the public key address to the user terminal which finishes registration in the alliance chain.
Optionally, the method further includes, after receiving the digital currency uploaded by the user terminal:
when a digital currency retrieval request transmitted by a user terminal is received, performing threshold signature verification on the digital currency retrieval request;
when the digital currency retrieval request passes threshold signature verification, calling a retrieval function to cancel the token of the user terminal on the alliance chain; and sending the digital currency of the amount corresponding to the user terminal to a terminal account of the user terminal.
Optionally, the method further includes, after receiving the digital currency uploaded by the user terminal:
and performing confusion processing on all the digital currencies of the user terminal, and displaying the digital currencies after the confusion processing to the user terminal.
The embodiment of the invention also provides a digital currency exchange device which is suitable for hosting nodes and comprises a receiving unit, a conversion unit and a transmission unit;
the receiving unit is used for receiving the digital currency uploaded by the user terminal;
the conversion unit is used for selecting a token contract matched with the token type of the digital currency and converting the digital currency into the token according to the token contract;
and the transmission unit is used for transmitting the token corresponding to each user terminal to a alliance chain.
Optionally, the system further comprises a generating unit;
the generating unit is used for generating a public key address by using a threshold signature technology and transmitting the public key address to the user terminal which finishes registration in the alliance chain.
Optionally, the system further comprises a verification unit, a cancellation unit and a sending unit;
the verification unit is used for carrying out threshold signature verification on the digital currency retrieval request when receiving the digital currency retrieval request transmitted by the user terminal;
the canceling unit is used for calling a retrieving function to cancel the token of the user terminal on the alliance chain when the digital currency retrieving request passes threshold signature verification;
and the sending unit is used for sending the digital currency of the amount corresponding to the user terminal to the terminal account of the user terminal.
Optionally, a processing unit is further included;
and the processing unit is used for performing confusion processing on all the digital currencies of the user terminal and displaying the digital currencies after the confusion processing to the user terminal.
The embodiment of the invention also provides a digital currency exchange system, which comprises a hosting node and a alliance chain;
the hosting node is used for receiving the digital currency uploaded by the user terminal; selecting a token contract matched with the token type of the digital currency, and converting the digital currency into tokens according to the token contract; transmitting the token corresponding to each user terminal to a alliance chain;
the alliance chain is used for storing tokens corresponding to all user terminals transmitted by the managed node; receiving a transaction request transmitted by a user terminal; and updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
An embodiment of the present invention further provides a digital currency exchange apparatus, including:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the digital currency exchange method as claimed in any one of the above.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the digital money exchange method according to any one of the above.
According to the technical scheme, the trusteeship node receives the digital currency uploaded by the user terminal; selecting a token contract matched with the token type to which the digital currency belongs, and converting the digital currency into the token according to the token contract; and transmitting the token corresponding to each user terminal to the alliance chain. The processing efficiency of the token is far higher than that of the digital currency, cross-link transactions between user terminals are conducted in the form of the token, and the processing efficiency of digital currency exchange is greatly improved. The alliance chain stores tokens corresponding to all user terminals transmitted by the hosting node; and when a transaction request transmitted by the user terminal is received, updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and can realize transactions among different user terminals, namely cross-chain transactions among multiple chains. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a signaling diagram of a digital currency exchange method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a digital currency exchange apparatus suitable for use in a federation chain according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a digital currency exchange apparatus suitable for hosting nodes according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a digital currency exchange system according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a digital currency exchange apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a digital money exchange method according to an embodiment of the present invention will be described in detail. Fig. 1 is a signaling diagram of a digital currency exchange method according to an embodiment of the present invention, where the method includes:
s101: the hosting node receives digital currency uploaded by the user terminal.
The escrow node may be composed of a plurality of companies or institutions that collectively host digital currency deposited by the user terminal.
In the embodiment of the present invention, in order to ensure the reliability of the managed node, a threshold signature technology may be set for the managed node.
The companies or institutions that make up the managed node may be viewed as a group, with each company or institution being a member of the group. The group has a pair of public key and private key, the combination of more than or equal to t legal and honest members in the group can represent the whole group to use the group private key to sign, and any member can use the public key of the group to sign and verify. Where t represents a threshold value.
For example, the number of companies or institutions constituting the escrow node is n, and when the number of signatures of the escrow node is greater than or equal to t when a retrieval operation of digital money is involved, the signature is valid; wherein t is less than n.
The right distribution can be realized by adopting a threshold signature mode, the condition that the managed node abuses the authority is avoided, and the decentralization effect is achieved.
In practical application, the escrow node may generate a public key address by using a threshold signature technology, and transmit the public key address to the user terminal that completes registration in the federation chain.
Wherein the public key address can be regarded as an account address of the hosting node.
After knowing the public key address of the managed node, the user terminal can directly upload the digital currency which the user terminal has to the public key address.
S102: the escrow node selects a token contract that matches the type of token to which the digital currency belongs and converts the digital currency to tokens according to the token contract.
The processing efficiency of the token is much higher than that of the digital money, and therefore, in the embodiment of the present invention, the digital money of the user terminal is converted into the form of the token to be managed.
After the user terminal sends the digital currency to the public key address of the escrow node, the escrow node can call the issuing function to perform the operation of issuing the token.
There are a variety of token types, with common token types being bitcoin, ethercoin, and the like.
The type of token to which the digital currency belongs refers to the type of token that the digital currency needs to be converted into. In practical applications, the user terminal may specify the type of token to be converted into from the digital currency, or the escrow node may convert the digital currency of the user terminal into a default type of token.
Each type of token has its corresponding token contract according to which the digital currency of the user terminal can be converted into tokens.
S103: and the hosting node transmits the tokens corresponding to the user terminals to the alliance chain.
After the escrow node converts the digital money of the user terminals into tokens, tokens of the user terminals may be stored in a federation chain in order to process a cross-chain transaction between the user terminals in the form of tokens.
S104: the alliance chain stores tokens corresponding to all the user terminals transmitted by the hosting node.
The alliance chain can store and manage tokens corresponding to each user terminal. Transactions between different user terminals are implemented in the form of tokens. The token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
S105: and the alliance chain receives the transaction request transmitted by the user terminal, and updates the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
In practical application, a user terminal needing to implement cross-chain transaction will register on a federation chain, and the user terminal completing the registration can be regarded as a member of the federation chain. Only the league members can participate in the trading of tokens on the league chain.
There are various types of transaction requests. The cross-chain transaction and the transfer transaction are mainly taken as an example in the embodiment of the invention for explanation.
Taking a cross-chain transaction as an example, to perform a cross-chain transaction of tokens, a federation chain may maintain a plurality of atomic exchange contracts, with different atomic exchange contracts being used to implement different types of token exchanges.
In practical application, when the transaction request is a cross-chain transaction request carrying a token transaction type and a token transaction amount, the alliance chain can select a target atomic exchange contract matched with the token transaction type from preset atomic exchange contracts; and updating the token types and the token amounts corresponding to the user terminals in the cross-chain transaction request according to the target atomic exchange contract and the token transaction amounts.
For example, a user a has 1 bitcoin, a user B has 10 ethernet coins, and when the user a needs to exchange 1 bitcoin of the user a with 10 ethernet coins of the user B, the alliance chain may call an atomic exchange contract to modify the token type of the user a into an ethernet coin, and the corresponding token amount is 10; the token type of the user B is modified into bitcoin, the corresponding token amount is 1, at this time, the account of the user A has 10 Ether coins, and the account of the user B has 1 bitcoin.
Taking the transfer transaction as an example, when the transaction request is a transfer transaction request carrying a transaction amount of the token, the league chain can call a preset transfer function, and the token amount corresponding to each user terminal in the transfer transaction request is updated according to the transaction amount of the token.
For example, a user a has 1 bitcoin, a user B does not have the bitcoin, and when the user a needs to transfer 0.5 bitcoins to the user B, the alliance chain may call a transfer function to modify the amount of the token of the user a to 0.5; the token amount corresponding to the bitcoin of the user B is set to 0.5, at this time, the account of the user A owns 0.5 bitcoins, and the account of the user B owns 0.5 bitcoins.
According to the technical scheme, the trusteeship node receives the digital currency uploaded by the user terminal; selecting a token contract matched with the token type to which the digital currency belongs, and converting the digital currency into the token according to the token contract; and transmitting the token corresponding to each user terminal to the alliance chain. The processing efficiency of the token is far higher than that of the digital currency, cross-link transactions between user terminals are conducted in the form of the token, and the processing efficiency of digital currency exchange is greatly improved. The alliance chain stores tokens corresponding to all user terminals transmitted by the hosting node; and when a transaction request transmitted by the user terminal is received, updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and can realize transactions among different user terminals, namely cross-chain transactions among multiple chains. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
The federation chain implements transactions between user terminals in the form of tokens, while digital currency owned by the user terminals is managed by the escrow node.
In practical applications, when the user terminal needs to retrieve its own digital currency, the user terminal may transmit a digital currency retrieval request to the escrow node. When the hosting node receives the digital currency retrieval request transmitted by the user terminal, threshold signature verification is carried out on the digital currency retrieval request.
The amount currently owned by the user terminal is recorded in the alliance chain, and when the hosting node sends the digital money of the amount corresponding to the user terminal to the terminal account of the user terminal, the amount currently owned by the user terminal recorded in the alliance chain needs to be destroyed.
Taking (t, n) threshold signature as an example, when member signatures greater than or equal to t host nodes exist, it indicates that the digital currency retrieval request passes threshold signature verification, and at this time, the host nodes may call a retrieval function to cancel tokens of user terminals in a federation chain; and sending the digital money of the amount corresponding to the user terminal to the terminal account of the user terminal.
The digital currency retrieving operation of the user terminal is verified through the threshold signature technology, so that the condition that few members in the escrow node call the digital currency maliciously is effectively avoided, and the reliability of digital currency issuing is improved. And when the hosting node sends the digital money of the amount corresponding to the user terminal to the terminal account of the user terminal, the token of the user terminal on the alliance chain is cancelled, so that the consistency between the digital money managed by the hosting node and the token on the alliance chain is effectively ensured.
In the embodiment of the present invention, the escrow node may perform obfuscation processing on the digital currencies of all the user terminals, and display the obfuscated digital currencies to the user terminals.
By performing obfuscation processing on digital money, it is difficult for a user terminal to track the usage of the digital money and the owner of the digital money, and privacy and anonymity of the digital money are improved.
In consideration of the fact that in practical application, a transaction accident may exist, and the transaction amount may not match with the digital currency actually owned by the user terminal, in the embodiment of the present invention, in order to facilitate forensics, the alliance chain may record token transaction information corresponding to all user terminals.
The transaction flow of each user terminal can be clearly known according to the token transaction information. When a transaction accident occurs, the problem in which link occurs can be clearly judged by inquiring the token transaction information, so that the evidence obtaining judgment of the transaction accident is quickly realized.
In the embodiment of the invention, the hosting node is used for managing the digital assets of the user, and in order to avoid illegal transfer of the digital assets of the user by the hosting node, the alliance chain can realize supervision on the hosting node based on the recorded token of each user terminal.
In practical applications, the hosting node may monitor whether the digital money of each user terminal maintained in the hosting node matches the token of each user terminal recorded on the alliance chain according to a set cycle time.
The value of the cycle time may be set according to actual requirements, and is not limited herein.
Token transactions on the federation chain are performed by program code, and therefore tokens for user terminals recorded on the federation chain have a higher reliability. When the digital currency of each user terminal maintained in the hosting node is not matched with the token of each user terminal recorded on the alliance chain, the problem of the digital currency maintained by the hosting node is shown, and in order to reduce the loss of the user, prompt information that the digital currency is unsafe can be fed back to the user terminal.
By setting a supervision mechanism of the alliance chain on the escrow node, the reliability of digital currency transaction can be further improved, and the safety of digital assets on the escrow node is ensured.
Fig. 2 is a schematic structural diagram of a digital money exchange apparatus suitable for use in a federation chain according to an embodiment of the present invention, the apparatus including a storage unit 21, a receiving unit 22 and an updating unit 23;
a storage unit 21, configured to store tokens corresponding to user terminals transmitted by a managed node;
a receiving unit 22, configured to receive a transaction request transmitted by a user terminal;
and the updating unit 23 is configured to update tokens corresponding to the user terminals in the transaction request according to a rule matched with the transaction request.
Optionally, when the transaction request is a cross-chain transaction request carrying a token transaction type and a token transaction amount, the updating unit is specifically configured to select a target atomic exchange contract matching the token transaction type from preset atomic exchange contracts; and updating the token types and the token amounts corresponding to the user terminals in the cross-chain transaction request according to the target atomic exchange contract and the token transaction amounts.
Optionally, when the transaction request is a transfer transaction request carrying a transaction amount of the token, the updating unit is specifically configured to invoke a preset transfer function, and update the token amount corresponding to each user terminal in the transfer transaction request according to the transaction amount of the token.
Optionally, a recording unit is further included;
and the recording unit is used for recording token transaction information corresponding to all the user terminals.
Optionally, the system further comprises a monitoring unit and a feedback unit;
the monitoring unit is used for monitoring whether the digital currency of each user terminal maintained in the hosting node is matched with the token of each user terminal recorded on the alliance chain or not according to the set cycle time;
and the feedback unit is used for feeding back prompt information that the digital currency is unsafe to the user terminal when the digital currency of each user terminal maintained in the hosting node is not matched with the token of each user terminal recorded on the alliance chain.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the alliance chain stores tokens corresponding to all user terminals transmitted by the managed node; the processing efficiency of the token is far higher than that of the digital currency, cross-link transactions between user terminals are conducted in the form of the token, and the processing efficiency of digital currency exchange is greatly improved. When the alliance link receives the transaction request transmitted by the user terminal, the token corresponding to each user terminal in the transaction request is updated according to the rule matched with the transaction request. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and can realize transactions among different user terminals, namely cross-chain transactions among multiple chains. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
Fig. 3 is a schematic structural diagram of a digital money exchange device according to an embodiment of the present invention, which is suitable for hosting nodes, and includes a receiving unit 31, a converting unit 32, and a transmitting unit 33;
a receiving unit 31 for receiving digital money uploaded by a user terminal;
a conversion unit 32 for selecting a token contract matching the token type to which the digital money belongs, and converting the digital money into tokens according to the token contract;
a transmission unit 33, configured to transmit the token corresponding to each ue to the alliance chain.
Optionally, the system further comprises a generating unit;
and the generating unit is used for generating a public key address by using a threshold signature technology and transmitting the public key address to the user terminal which finishes registration in the alliance chain.
Optionally, the system further comprises a verification unit, a cancellation unit and a sending unit;
a verification unit, configured to perform threshold signature verification on the digital currency retrieval request when receiving the digital currency retrieval request transmitted by the user terminal;
a cancellation unit for calling a retrieval function to cancel the token of the user terminal on the alliance chain when the digital currency retrieval request passes the threshold signature verification;
and the sending unit is used for sending the digital currency of the amount corresponding to the user terminal to the terminal account of the user terminal.
Optionally, a processing unit is further included;
and the processing unit is used for performing confusion processing on the digital currencies of all the user terminals and displaying the digital currencies after the confusion processing to the user terminals.
The description of the features in the embodiment corresponding to fig. 3 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the trusteeship node receives the digital currency uploaded by the user terminal; a token contract is selected that matches the type of token to which the digital currency belongs, and the digital currency is converted to tokens according to the token contract. The processing efficiency of the token is far higher than that of the digital currency, cross-link transactions between user terminals are conducted in the form of the token, and the processing efficiency of digital currency exchange is greatly improved. And the hosting node transmits the token corresponding to each user terminal to the alliance chain, and the user terminals realize the transaction of the digital assets through the token recorded on the alliance chain. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and can realize transactions among different user terminals, namely cross-chain transactions among multiple chains. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
Fig. 4 is a schematic structural diagram of a digital currency exchange system 40 according to an embodiment of the present invention, which includes a hosting node 41 and a federation chain 42;
a hosting node 41 for receiving digital money uploaded by a user terminal; selecting a token contract matched with the token type to which the digital currency belongs, and converting the digital currency into the token according to the token contract; transmitting the token corresponding to each ue to alliance chain 42;
a alliance chain 42, configured to store tokens corresponding to the user terminals transmitted by the hosting node 41; receiving a transaction request transmitted by a user terminal; and updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
The description of the features in the embodiment corresponding to fig. 4 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, the trusteeship node receives the digital currency uploaded by the user terminal; selecting a token contract matched with the token type to which the digital currency belongs, and converting the digital currency into the token according to the token contract; and transmitting the token corresponding to each user terminal to the alliance chain. The processing efficiency of the token is far higher than that of the digital currency, cross-link transactions between user terminals are conducted in the form of the token, and the processing efficiency of digital currency exchange is greatly improved. The alliance chain stores tokens corresponding to all user terminals transmitted by the hosting node; and when a transaction request transmitted by the user terminal is received, updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request. The digital currency corresponding to the user terminal is stored in a token form on the alliance chain, and the purpose of executing digital currency transaction by the user terminal is achieved by updating the token corresponding to each user terminal. The alliance chain records tokens of different user terminals, and can realize transactions among different user terminals, namely cross-chain transactions among multiple chains. And the token exchange is to execute the transaction flow by the program code, thereby ensuring the reliability of the transaction and realizing the decentralization effect.
Fig. 5 is a schematic structural diagram of a digital money exchange device 50 according to an embodiment of the present invention, including:
a memory 51 for storing a computer program;
a processor 52 for executing a computer program for implementing the steps of the digital money exchange method according to any of the embodiments described above.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the digital money exchange method according to any of the embodiments described above.
A digital money exchange method, apparatus, device and computer-readable storage medium according to embodiments of the present invention have been described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1. A digital currency exchange method, adapted for use in a federation chain, the method comprising:
storing tokens corresponding to all user terminals transmitted by the managed node;
receiving a transaction request transmitted by a user terminal;
and updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
2. The method according to claim 1, wherein when the transaction request is a cross-chain transaction request carrying a token transaction type and a token transaction amount, the updating the tokens corresponding to the user terminals in the transaction request according to the rule matching with the transaction request comprises:
selecting a target atomic exchange contract matched with the token transaction type from preset atomic exchange contracts;
and updating the token types and the token amounts corresponding to the user terminals in the cross-chain transaction request according to the target atomic exchange contract and the token transaction amounts.
3. The method for exchanging digital money according to claim 1, wherein when the transaction request is a transfer transaction request carrying a transaction amount of a token, correspondingly, the updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request comprises:
and calling a preset transfer function, and updating the token amount corresponding to each user terminal in the transfer transaction request according to the token transaction amount.
4. The digital money exchange method according to claim 1, further comprising:
monitoring whether the digital currency of each user terminal maintained in the hosting node is matched with the token of each user terminal recorded on the alliance chain or not according to the set cycle time;
and when the digital currency of each user terminal maintained in the hosting node is not matched with the token of each user terminal recorded on the alliance chain, feeding back prompt information that the digital currency is unsafe to the user terminal.
5. A digital money exchange apparatus adapted for use in a federation chain, the apparatus comprising a storage unit, a receiving unit and an updating unit;
the storage unit is used for storing tokens corresponding to the user terminals transmitted by the managed node;
the receiving unit is used for receiving a transaction request transmitted by a user terminal;
and the updating unit is used for updating the token corresponding to each user terminal in the transaction request according to the rule matched with the transaction request.
6. A digital currency exchange method, adapted for hosting nodes, the method comprising:
receiving digital currency uploaded by a user terminal;
selecting a token contract matched with the token type of the digital currency, and converting the digital currency into tokens according to the token contract;
and transmitting the token corresponding to each user terminal to a alliance chain.
7. The digital money exchange method according to claim 6, further comprising, after receiving the digital money uploaded by the user terminal:
when a digital currency retrieval request transmitted by a user terminal is received, performing threshold signature verification on the digital currency retrieval request;
when the digital currency retrieval request passes threshold signature verification, calling a retrieval function to cancel the token of the user terminal on the alliance chain; and sending the digital currency of the amount corresponding to the user terminal to a terminal account of the user terminal.
8. A digital currency exchange device adapted to host a node, the device comprising a receiving unit, a converting unit and a transmitting unit;
the receiving unit is used for receiving the digital currency uploaded by the user terminal;
the conversion unit is used for selecting a token contract matched with the token type of the digital currency and converting the digital currency into the token according to the token contract;
and the transmission unit is used for transmitting the token corresponding to each user terminal to a alliance chain.
9. A digital currency exchange apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the digital currency exchange method according to any one of claims 1 to 4 and/or any one of claims 6 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the digital money exchange method according to any one of claims 1 to 4 and/or claims 6 to 7.
CN202010455102.8A 2020-05-26 2020-05-26 Digital currency exchange method, device, equipment and medium Pending CN111598556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010455102.8A CN111598556A (en) 2020-05-26 2020-05-26 Digital currency exchange method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010455102.8A CN111598556A (en) 2020-05-26 2020-05-26 Digital currency exchange method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN111598556A true CN111598556A (en) 2020-08-28

Family

ID=72186505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010455102.8A Pending CN111598556A (en) 2020-05-26 2020-05-26 Digital currency exchange method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111598556A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113052576A (en) * 2020-11-05 2021-06-29 北京跨联元焕网络科技有限公司 Method and system for hosting cross-chain exchange
TWI786477B (en) * 2020-11-26 2022-12-11 財金資訊股份有限公司 System and method for virtualized inter-bank fund transfer

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009345A (en) * 2018-11-26 2019-07-12 林吓洪 Transaction cochain method and Related product based on block chain
CN111126533A (en) * 2020-01-08 2020-05-08 牛津(海南)区块链研究院有限公司 Identity authentication method and device based on dynamic password and dynamic token

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110009345A (en) * 2018-11-26 2019-07-12 林吓洪 Transaction cochain method and Related product based on block chain
CN111126533A (en) * 2020-01-08 2020-05-08 牛津(海南)区块链研究院有限公司 Identity authentication method and device based on dynamic password and dynamic token

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113052576A (en) * 2020-11-05 2021-06-29 北京跨联元焕网络科技有限公司 Method and system for hosting cross-chain exchange
CN113052576B (en) * 2020-11-05 2024-02-27 北京跨联元焕网络科技有限公司 Hosting method and system for cross-chain exchange
TWI786477B (en) * 2020-11-26 2022-12-11 財金資訊股份有限公司 System and method for virtualized inter-bank fund transfer

Similar Documents

Publication Publication Date Title
CN106982205B (en) Block chain-based digital asset processing method and device
CN108389047B (en) Method for trading between parent chain and child chain in block chain and block chain network
CN108418680B (en) Block chain key recovery method and medium based on secure multi-party computing technology
CN108764874B (en) Anonymous transfer method, system and storage medium based on block chain
TWI716140B (en) Data processing method and device based on blockchain
CN109314637B (en) Method and apparatus for efficient transfer of cryptocurrency over a blockchain
CN110363527B (en) Block chain-based evidence storage and supervision method and device
CN110288480B (en) Private transaction method and device for blockchain
US20200027080A1 (en) Scalable reconciliation of crypto assets in a blockchain network
CN106780032A (en) A kind of block chain interchain assets transfer method under multichain scene
KR20180115768A (en) Encryption method and system for secure extraction of data from a block chain
CN109903026A (en) Event-handling method and device, electronic equipment based on block chain
CN110612547A (en) System and method for information protection
CN109614813B (en) Privacy transaction method and device based on block chain and application method and device thereof
WO2020125234A1 (en) Blockchain-based data processing method and apparatus
CN110458560A (en) For carrying out the method and device of transaction verification
CN111260485A (en) Mutual-aid insurance method, equipment and medium based on block chain
Kolachala et al. SoK: Money laundering in cryptocurrencies
Nick et al. Liquid: A bitcoin sidechain
CN111598556A (en) Digital currency exchange method, device, equipment and medium
CN111126987B (en) Resource transfer information processing method and device, storage medium and electronic device
CN113486407B (en) Deposit list management system and method based on block chain
US20230259899A1 (en) Method, participant unit, transaction register and payment system for managing transaction data sets
WO2019106768A1 (en) Insurance system and insurance method
CN109889343B (en) Electronic invoice circulation control method, device and system

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