Stable currency issuing method and device based on block chain

文档序号:1783550 发布日期:2019-12-06 浏览:29次 中文

阅读说明:本技术 基于区块链的稳定币发行方法及装置 (Stable currency issuing method and device based on block chain ) 是由 杨慧 吉建勋 于 2019-08-27 设计创作,主要内容包括:本发明实施例提供了一种基于区块链的稳定币发行方法及装置。根据所述稳定币的标识、所述稳定币的总量、交易规则、法币账户以及法币准备金生成智能合约;所述稳定币的总量与所述法币准备金进行绑定,所述,所述法币账户用于存储所述法币准备金,所述交易规则用于定义转账规则;将所述智能合约发布在所述区块链中,以便基于所述智能合约对所述稳定币进行交易。通过区块链实现以法币作为保证金来发行稳定币,在发行时,通过设置智能合约,确保发行的稳定币符合预设的规则,以此可以提高在稳定币发行时,数据的处理效率以及数据的安全性,提升了用户体验。(The embodiment of the invention provides a stable coin issuing method and device based on a block chain. Generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable currency is bound with the legal currency prepared money, the legal currency account is used for storing the legal currency prepared money, and the transaction rule is used for defining a transfer rule; issuing the intelligent contract in the blockchain to trade the stable currency based on the intelligent contract. The method and the device have the advantages that the effect that the legal currency is used as the guarantee fund to issue the stable currency is achieved through the block chain, and when the stable currency is issued, the issued stable currency is guaranteed to accord with preset rules through setting an intelligent contract, so that the processing efficiency of data and the safety of the data can be improved when the stable currency is issued, and the user experience is improved.)

1. A stable currency issuing method based on a block chain is applied to a service node, and the method comprises the following steps:

generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable coins is bound with the legal coin prepared money, the legal coin account is used for storing the legal coin prepared money, and the transaction rule is used for defining a transfer rule;

Issuing the intelligent contract in the blockchain to trade the stable currency based on the intelligent contract.

2. the method of claim 1, further comprising:

Verifying whether the intelligent contract accords with a stable currency issuing rule; the stable currency issuance rule includes one or more of: the transaction rule is legal, the legal currency account is legal, and the legal currency reserve is greater than the minimum value;

if not, prompting the user that the issue fails;

And if so, issuing the intelligent contract in the blockchain.

3. The method of claim 1, further comprising:

Periodically inquiring the balance in the legal coin account;

Judging whether the balance in the legal coin account is less than the legal coin reserve money or not;

And if the number of the stable coins is smaller than the preset value, prompting that the transaction risk exists in the stable coins.

4. The method of claim 3, wherein the periodically querying the balance in the legal account comprises:

periodically sending a balance inquiry request to a bank server corresponding to the legal coin account;

And receiving the balance in the legal money account sent by the bank server.

5. The method of claim 1, wherein the smart contract further comprises a minimum unit and a maximum transfer limit.

6. The method of claim 1, wherein the transaction rules comprise:

Rules for trading the stable currency from user to user; rules for trading the stable currency between the user and the issuer; and the exchange ratio between the stable currency and the legal currency.

7. The method of claim 1, wherein the step of issuing the smart contracts in the blockchain comprises:

Producing a transaction event according to the hash value of the intelligent contract and the address of the intelligent contract;

And sending the transaction event to a block output node so that the block output node can verify, pack and synchronize the transaction event in the whole network.

8. a stable coin issuing apparatus based on a block chain, applied to a service node, the apparatus comprising:

The generating unit is used for generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable coins is bound with the legal coin prepared money, the legal coin account is used for storing the legal coin prepared money, and the transaction rule is used for defining a transfer rule;

and the issuing unit is used for issuing the intelligent contract in the blockchain so as to trade the stable currency based on the intelligent contract.

9. a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1-6 when executing the program.

10. a computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-6.

Technical Field

the invention relates to the technical field of computers, in particular to a stable currency issuing method and device based on a block chain.

background

the currency plays a vital role in the life of people, and people can not leave the currency in clothes, eating and housing. With the rise of third parties, especially the development of mobile phone code scanning payment, the currency circulation industry tends to be paperless.

The third party payment refers to an independent mechanism with certain strength and credit guarantee, adopts a mode of signing a contract with each big bank, and facilitates the network payment mode of transaction between two transaction parties through the interface connection with a bank payment settlement system. The advantages of reducing the cost of directly connecting banks to governments, enterprises and public institutions and guaranteeing the benefits of both transaction parties and the like through third party payment are rapidly developed.

due to the fact that corresponding transaction costs of different banks, different regions, different businesses and the like are different, clearing modes are also diversified, particularly for clearing across banks and regions, transfer of central banks and even unions of bank needs to be carried out, the process is complex, efficiency is low, in order to improve circulation, third-party payment usually adopts the mode of points as assistance, but the points also have the problem of inconvenience.

Disclosure of Invention

Based on the above problems, embodiments of the present invention provide a stable coin issuing method and apparatus based on a block chain.

In a first aspect, a stable coin distribution method based on blockchains is provided. Applied to a service node, the method comprising: generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable currency is bound with the legal currency prepared money, the legal currency account is used for storing the legal currency prepared money, and the transaction rule is used for defining a transfer rule; issuing the intelligent contract in the blockchain to trade the stable currency based on the intelligent contract.

In some optional implementations, further comprising: verifying whether the intelligent contract accords with a stable currency issuing rule; the stable currency issuance rule includes one or more of: the transaction rule is legal, the legal currency account is legal, and the legal currency reserve is greater than the minimum value; if not, prompting the user that the issue fails; and if so, issuing the intelligent contract in the blockchain.

In some optional implementations, further comprising: periodically inquiring the balance in the legal coin account; judging whether the balance in the legal coin account is less than the legal coin reserve money or not; and if the number of the stable coins is smaller than the preset value, prompting that the transaction risk exists in the stable coins.

in some optional implementations, the periodically querying the balance in the legal coin account includes periodically sending a balance query request to a bank server corresponding to the legal coin account; and receiving the balance in the legal money account sent by the bank server.

in some optional implementations, the smart contract further includes a minimum unit and a maximum transfer limit.

in some optional implementations, the transaction rules include: rules for trading the stable currency from user to user; rules for trading the stable currency between the user and the issuer; and the exchange ratio between the stable currency and the legal currency.

In some optional implementations, the step of issuing the smart contract in the blockchain includes: producing a transaction event according to the hash value of the intelligent contract and the address of the intelligent contract; and sending the transaction event to a block output node so that the block output node can verify, pack and synchronize the transaction event in the whole network.

in a second aspect, a stable coin issuing apparatus based on a blockchain is provided. Applied to a service node, the apparatus comprising: the generating unit is used for generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable coins is bound with the legal coin prepared money, the legal coin account is used for storing the legal coin prepared money, and the transaction rule is used for defining a transfer rule; and the issuing unit is used for issuing the intelligent contract in the blockchain so as to trade the stable currency based on the intelligent contract.

in some optional implementations, further comprising: the verification unit is used for verifying whether the intelligent contract accords with a stable currency issuing rule or not; the stable currency issuance rule includes one or more of: the transaction rule is legal, the legal currency account is legal, and the legal currency reserve is greater than the minimum value; the prompting unit is used for prompting the user that the issue fails if the number of the users is not enough; and if so, issuing the intelligent contract in the blockchain.

in some optional implementations, further comprising: the query unit is used for periodically querying the balance in the legal coin account; the judging unit is used for judging whether the balance in the legal coin account is less than the legal coin prepared money or not; and the prompting unit is used for prompting that the stable currency has a transaction risk if the stable currency is smaller than the stable currency.

In some optional implementations, the query unit is specifically configured to: periodically sending a balance inquiry request to a bank server corresponding to the legal coin account; and receiving the balance in the legal money account sent by the bank server.

In some optional implementations, the smart contract further includes a minimum unit and a maximum transfer limit.

in some optional implementations, the transaction rules include: rules for trading the stable currency from user to user; rules for trading the stable currency between the user and the issuer; and the exchange ratio between the stable currency and the legal currency.

In some optional implementations, the publishing unit is specifically configured to: producing a transaction event according to the hash value of the intelligent contract and the address of the intelligent contract; and sending the transaction event to a block output node so that the block output node can verify, pack and synchronize the transaction event in the whole network.

in a third aspect, the present specification provides a computer device, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method steps of the first aspect when executing the program.

In a fourth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out the method steps of the first aspect described above.

in a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps of the first aspect described above.

The embodiment of the invention provides a stable coin issuing method and device based on a block chain. Generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency preparation fund; the total amount of the stable currency is bound with the legal currency prepared money, the legal currency account is used for storing the legal currency prepared money, and the transaction rule is used for defining a transfer rule; issuing the intelligent contract in the blockchain to trade the stable currency based on the intelligent contract. The embodiment of the application realizes issuing stable currency by using the legal currency as the guarantee money through the block chain, and ensures that the issued stable currency accords with the preset rule by setting the intelligent contract when issuing, thereby improving the processing efficiency of data and the safety of the data when issuing the stable currency and improving the user experience.

Drawings

FIG. 1 illustrates an exemplary architecture for applying embodiments provided herein;

FIG. 2 is a flowchart of a stable coin issuing method based on block chains according to an embodiment of the present invention;

FIG. 3 is a schematic structural diagram of a stable coin issuing apparatus based on a block chain according to an embodiment of the present invention;

fig. 4 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

the embodiment of the invention provides a stable coin issuing method and device based on a block chain. Fig. 1 shows an exemplary architecture to which embodiments provided herein apply.

as shown in fig. 1, the exemplary architecture may include one or more terminals 101, one or more merchant platforms 102, and one or more block-link nodes 103, when there are multiple block-link points 103, forming a block-link point network. The terminal 101 or the e-commerce platform 102 may be configured to interact with the blockchain link point 102, for example, the terminal 101 or the e-commerce platform 102 may query records in the blockchain and may also record information in the blockchain.

It should be noted that the terminal 101 is relative to the e-commerce platform 103, and the architecture of the embodiment is not limited to implement other functions, for example, the terminal may also be used as a block link node.

As an application scenario, shopping is performed through a client of the e-commerce platform 102 on the terminal 101, and payment can be performed by using the client of the block chain at the time of checkout. As another application scenario, shopping is performed through a client of the e-commerce platform 102 on the terminal 101, and payment can be performed by using the client of the e-commerce platform 102 when checkout is performed, and the client of the e-commerce platform 102 can implement the function of the client of the block chain.

For the purpose of facilitating understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.

Fig. 2 is a schematic flow chart of a stable coin issuing method based on a block chain according to the present invention. As shown in fig. 2, the method includes:

S210, generating an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account and the legal currency prepared money; the total amount of the stable currency is bound with the legal currency prepared money, the legal currency account is used for storing the legal currency prepared money, and the transaction rule is used for defining a transfer rule;

the intelligent contract can be a filling page of the terminal, and after being filled by the user, the intelligent contract can be sent to the blockchain node and then is issued to the blockchain by the blockchain node.

A stable currency issuing standard may be predefined. The issuing standard requires agreements that must be observed in implementing the stable currency, such as specifying the stable currency name, total amount, implementing the stable currency transaction function, and the like. For example, a smart contract may include a minimum unit and a maximum transfer limit. As another example, the transaction rules may include: rules for transaction stabilization between users; rules for transaction stabilization between the user and the issuer; and stabilizing the exchange ratio between the currency and the legal currency.

For example, the release criteria may include the following parameters: a stable currency name, a stable currency symbol, a stable currency decimal place number (the smallest unit of a stable currency, 18 indicates that we can own. 0000000000000000001 units of stable currency), issue a stable currency total, view the stable currency balance of the corresponding account, implement a stable currency transaction, be used to send a stable currency to the user, implement a transaction between stable currency users, control the transaction of the stable currency, such as tradeable account numbers and assets, the number of stable currencies that the user is allowed to spend, and the like.

The balance of the stable currency of the corresponding account is checked, stable currency transaction is realized, and the stable currency transaction is used for sending the stable currency to the user, realizing the transaction among stable currency users and controlling the transaction of the stable currency, wherein the transaction rules can belong to the number of the stable currency which can be paid by the user, such as a tradable account and assets, and the like.

And S220, issuing the intelligent contracts in the blockchain so as to trade the stable coins based on the intelligent contracts.

After determining the intelligent contracts, the intelligent contracts may be recorded in a blockchain. For example, a transaction event may be generated by an intelligent contract, sent to a block-out node, verified by the block-out node, packaged, and time-stamped for network-wide synchronization.

In some embodiments, a value of a minimum fund may be preset, and the digital currency may be issued only after the fund reaches a certain amount, and based thereon, the method may further include:

step 1), verifying whether the intelligent contract accords with a stable currency issuing rule; the stable currency issuance rule includes one or more of: the transaction rule is legal, the legal currency account is legal, and the legal currency reserve is greater than the minimum value;

step 2), if not enough, prompting the user that the issue fails;

step 3), if sufficient, S220 is executed.

In some embodiments, to secure the gold preparation and to increase the security of the issued digital currency, the method may further comprise:

step a), periodically inquiring the balance in the legal coin account;

Step b), judging whether the balance in the legal coin account is less than the prepared money of the legal coin;

And c), if the number of the stable coins is smaller than the preset value, prompting that the stable coins have a transaction risk.

In some embodiments, the step a) may be specifically implemented by the following steps: periodically sending a balance inquiry request to a bank server corresponding to the legal coin account; and receiving the balance in the legal money account sent by the bank server.

in some embodiments, the step S220 may be specifically implemented by the following steps: producing a transaction event according to the hash value of the intelligent contract and the address of the intelligent contract; and sending the transaction event to the block output node so that the block output node can verify, pack and synchronize the transaction event in the whole network.

the embodiment of the application realizes issuing stable currency by using the legal currency as the guarantee money through the block chain, and ensures that the issued stable currency accords with the preset rule by setting the intelligent contract when issuing, thereby improving the processing efficiency of data and the safety of the data when issuing the stable currency and improving the user experience.

Fig. 3 is a schematic structural diagram of a stable coin issuing device based on a block chain according to an embodiment of the present application. Applied to a service node, the apparatus comprising:

A generating unit 301, configured to generate an intelligent contract according to the identification of the stable currency, the total amount of the stable currency, the transaction rule, the legal currency account, and the legal currency preparation fund; the total amount of the stable currency is bound with the legal currency prepared money, the legal currency account is used for storing the legal currency prepared money, and the transaction rule is used for defining a transfer rule;

An issuing unit 302, configured to issue the intelligent contract in the blockchain so as to trade the stable currency based on the intelligent contract.

In some embodiments, further comprising:

The verification unit is used for verifying whether the intelligent contract accords with a stable currency issuing rule or not; the stable currency issuance rule includes one or more of: the transaction rule is legal, the legal currency account is legal, and the legal currency reserve is greater than the minimum value;

The prompting unit is used for prompting the user that the issue fails if the number of the users is not enough;

And if so, issuing the intelligent contract in the blockchain.

In some embodiments, further comprising:

the query unit is used for periodically querying the balance in the legal coin account;

The judging unit is used for judging whether the balance in the legal coin account is less than the legal coin prepared money or not;

And the prompting unit is used for prompting that the stable currency has a transaction risk if the stable currency is smaller than the stable currency.

in some embodiments, the query unit is specifically configured to:

Periodically sending a balance inquiry request to a bank server corresponding to the legal coin account;

and receiving the balance in the legal money account sent by the bank server.

In some embodiments, the smart contract further includes a minimum unit and a maximum transfer limit.

In some embodiments, the transaction rules include:

Rules for trading the stable currency from user to user; rules for trading the stable currency between the user and the issuer; and the exchange ratio between the stable currency and the legal currency.

In some embodiments, the publishing unit 301 is specifically configured to:

Producing a transaction event according to the hash value of the intelligent contract and the address of the intelligent contract;

And sending the transaction event to a block output node so that the block output node can verify, pack and synchronize the transaction event in the whole network.

It is understood that the stable coin issuing apparatus based on the blockchain in this embodiment corresponds to the method embodiment shown in fig. 2, and therefore, the above description about the method embodiment shown in fig. 2 is also applicable to the apparatus in this embodiment, and is not repeated herein.

Fig. 4 shows a schematic structural diagram of a computer device provided in an embodiment of the present specification, where the computer device may include: a processor 410, a memory 420, an input/output interface 430, a communication interface 440, and a bus 450. Wherein the processor 440, the memory 420, the input/output interface 430 and the communication interface 440 are communicatively coupled to each other within the device via a bus 450.

The processor 410 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.

the Memory 420 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 420 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 420 and called to be executed by the processor 410.

The input/output interface 430 is used for connecting an input/output module to realize information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.

The communication interface 440 is used for connecting a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).

Bus 450 includes a pathway to transfer information between various components of the device, such as processor 410, memory 420, input/output interface 430, and communication interface 440.

it should be noted that although the above-mentioned device only shows the processor 410, the memory 420, the input/output interface 430, the communication interface 440 and the bus 450, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.

Those of skill would further appreciate that the various illustrative components 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 in hardware, a software module executed by a processor, or 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.

The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only illustrative of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the scope of the present invention should be included in the scope of the present invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:核销电子票的方法以及相关装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!