Disclosure of Invention
The technical problems solved by the invention are as follows: in view of this, embodiments of the present invention provide a method and a system for dynamically generating and monitoring a digital currency prefix number, which can solve the problem that digital currency tracks the flow direction of funds layer by layer across banks, support directional tracking of the flow direction of the currency, and ensure that a currency authority supervises digital currency issuing, circulation and returning in a penetrating manner, thereby protecting user privacy.
The technical scheme is as follows: in order to solve the above technical problem, in a first aspect, the present invention provides a method for dynamically generating and supervising a digital currency crown number, including:
building a block chain union chain by using currency authorities and commercial banks;
the first digital currency issued by a currency authority is used as a source currency, the first digital currency signed by a commercial bank is used as a destination currency, an initial transaction block is generated, and a plurality of transaction blocks are generated in the subsequent transaction of the currency;
and combining the block hash, the timestamp and the transaction pointer of the block to which the digital currency belongs for each transaction into a unique number of each digital currency to serve as a crown number of the digital currency.
Furthermore, the block hash, the timestamp and the transaction pointer are dynamically generated during the blockchain transaction, and cannot be forged or tampered after the blockchain record and the certificate are stored.
Further, the crown numbers of the digital currency and the transaction list thereof can be inquired and supervised by a blockchain browser.
Further, the transaction list includes a crown number transaction track and chain of digital currency and transaction information.
Further, the transaction information includes account name, ID, financial institution code, usage, amount, transaction serial number, source currency and destination currency identification.
Further, the crown-word number transaction track and the chain of the digital currency comprise one or any combination of transaction time, transaction amount, source currency owner information, destination currency and destination currency owner information.
In a second aspect, the present invention further provides a system for dynamically generating and supervising a digital currency crown number, including:
a building module for building a federation chain of blockchains with currency authorities and commercial banks;
a transaction block generation module; the system is used for generating an initial transaction block by taking a first digital currency issued by a currency authority as a source currency and a first digital currency signed by a commercial bank as a destination currency, and generating a plurality of transaction blocks by the subsequent transaction of the currency;
the crown word number generation module is used for synthesizing the unique number of each digital currency by using the block hash, the timestamp and the transaction pointer of the block to which the digital currency belongs in each transaction as the crown word number of the digital currency;
and the blockchain browser is used for inquiring and supervising the crown word numbers of the digital currency and the transaction list thereof.
Furthermore, the block hash, the timestamp and the transaction pointer are dynamically generated during the blockchain transaction, and cannot be forged or tampered after the blockchain record and the certificate are stored.
Further, the transaction list includes a crown number transaction track and chain of digital currency and transaction information.
Further, the transaction information includes account name, ID, financial institution code, usage, amount, transaction serial number, source currency and destination currency identification.
Has the advantages that: compared with the prior art, the invention has the following advantages:
the digital currency crown word number is dynamically generated based on the alliance chain, the autonomous controllable advantage of the alliance chain can be exerted, the existing financial infrastructure is reused, the cash production and operation cost is reduced, the digital currency crown word number is generated safely, efficiently and dynamically in real time, the currency authority is facilitated to monitor the whole life cycle of the digital currency in a penetrating mode, the currency policy is regulated and controlled, crimes are prevented and attacked, and the privacy of users is protected.
Detailed Description
The present invention will be further illustrated by the following specific examples, which are carried out on the premise of the technical scheme of the present invention, and it should be understood that these examples are only for illustrating the present invention and are not intended to limit the scope of the present invention.
First, the related art related in the embodiment of the present invention includes: tiles, hash algorithms, timestamps, and transaction pointers.
A Block (Block) consists of a Block Header (Block Header) and a transaction list contained in the Block. A chunk is a data packet carrying transaction data over a blockchain network, and is a data structure that is tagged with a timestamp and a hash value of a previous chunk, which verifies and validates the transaction in the chunk via a consensus mechanism of the network.
Parent Block refers to the Block immediately preceding the Block, and the Block chain is sorted in time by recording the Block at the Block head and the hash value of the Parent Block.
The block header records meta-information of the current block, including data such as a current version number, a hash value of the parent block, a timestamp, a random number, and a hash value of the MerkleRoot. In addition, the data record of the block body generates a unique Merkleroot record in the block head through the Hash process of MerkleTree.
The hash algorithm, also called one-way hash function, transforms an input of arbitrary length (also called pre-map image) into an output of fixed length through a hash algorithm, and the output is a hash value. This transformation is a kind of compression mapping, i.e. the space of hash values is usually much smaller than the space of inputs, different inputs may hash to the same output, so it is not possible to determine a unique input value from a hash value. In short, it is a function of compressing a message of an arbitrary length to a message digest of a certain fixed length.
A function of a character string, where the message is denoted as M, the one-way hash function is H (), and the hash value is H, then H ═ H (M). Normally outputting characters
The length of the string h is much shorter than the length of the input digit string M.
A secure one-way hash function should satisfy at least the following requirements:
1. the input length is arbitrary;
2. the length of the output is fixed;
3. h is easily calculated given M;
4. given h, calculating M from h (M) ═ h is difficult, i.e., inversion is not feasible;
5. given M, it is computationally infeasible to find another message M 'and satisfy H (M) ═ H (M');
6. given H (), it is computationally infeasible to find two different M1 and M2 such that H (ml) ═ H (M2).
Currently common hash functions are SM3, SHA256, etc.
And time stamp, wherein the block chain ensures that each block is sequentially connected in sequence through the time stamp. The time stamp makes each data in the block chain have a time mark. In short, the time stamp proves when something happened on the blockchain and anyone cannot tamper with it. The time stamp plays the role of a notary in the blockchain.
The transaction pointer is a data structure, specifically, a pointer to a data storage location, and is also a hash value of the location data. In contrast to ordinary pointers, transaction pointers not only tell you where to store, but also verify that the data has not been tampered with.
As shown in fig. 1, the method for dynamically generating and supervising a digital currency crown number according to the embodiment of the present invention includes:
a federation chain of blockchains is built with monetary authorities and commercial banks.
The first digital currency issued by the currency authority is used as a source currency, the first digital currency signed by the commercial bank is used as a destination currency, an initial transaction block is generated, and a plurality of transaction blocks are generated in the subsequent transaction of the currency.
And combining the block hash, the timestamp and the transaction pointer of the block to which the digital currency belongs for each transaction into a unique number of each digital currency to serve as a crown number of the digital currency. The block hash is the hash value of the block to which the digital currency belongs in each transaction. Because hash pointers are linked with causal links among the blocks, the crown word numbers of the digital currency are inquired to know the source currency, the destination currency, the transaction track and the chain thereof, and the privacy of users is protected.
The block hash, the timestamp and the transaction pointer of the embodiment of the invention are dynamically generated during the block chain transaction, and cannot be forged or tampered after being recorded and stored in the block chain.
The crown numbers of the digital currency and its transaction list may be queried and supervised by a blockchain browser. Wherein the transaction list comprises a crown number transaction track of the digital currency, a chain and transaction information. The transaction information includes account name, ID, financial institution code, usage, amount, transaction serial number, source currency, and destination currency identification. The digital currency crown word number is inquired on the blockchain browser, so that the transaction information such as account name, ID, financial institution code, purpose, amount, transaction serial number, source currency, destination currency identification and the like can be inquired; otherwise, the crown word numbers of the source currency and the destination currency associated with the transaction block can be checked back through certain transaction information. The transaction track and the chain of the crown word numbers of the digital currency comprise one or any combination of transaction time, transaction amount, source currency owner information, destination currency and destination currency owner information.
Based on the above embodiments, those skilled in the art can understand that the embodiment of the present invention further provides a system for dynamically generating and supervising a digital currency crown number, including:
and the building module is used for building a block chain union chain by the currency authorities and the commercial banks.
A transaction block generation module; the method is used for generating an initial transaction block by taking the first digital currency issued by a currency authority as a source currency and the first digital currency signed by a commercial bank as a destination currency, and generating a plurality of transaction blocks by the subsequent transaction of the currency.
And the crown word number generation module is used for synthesizing the unique number of each digital currency by using the block hash, the timestamp and the transaction pointer of the block to which the digital currency belongs in each transaction as the crown word number of the digital currency. The block hash is the hash value of the block to which the digital currency belongs in each transaction. Because hash pointers are linked with causal links among the blocks, the crown word numbers of the digital currency are inquired to know the source currency, the destination currency, the transaction track and the chain thereof, and the privacy of users is protected. After each transaction, the block hash, the timestamp and the transaction pointer are changed, an effective crown number is generated immediately according to the changed block hash, the timestamp and the transaction pointer, and the crown number before the transaction is invalidated.
And the blockchain browser is used for inquiring and supervising the crown word numbers of the digital currency and the transaction list thereof. The transaction list includes a crown number transaction track and chain and transaction information for the digital currency. The transaction information includes account name, ID, financial institution code, usage, amount, transaction serial number, source currency, and destination currency identification. The digital currency crown word number is inquired on the blockchain browser, so that the transaction information such as account name, ID, financial institution code, purpose, amount, transaction serial number, source currency, destination currency identification and the like can be inquired; otherwise, the crown word numbers of the source currency and the destination currency associated with the transaction block can be checked back through certain transaction information. The transaction track and the chain of the crown word numbers of the digital currency comprise one or any combination of transaction time, transaction amount, source currency owner information, destination currency and destination currency owner information.
The block hash, the timestamp and the transaction pointer of the embodiment of the invention are dynamically generated during the block chain transaction, and cannot be forged or tampered after being recorded and stored in the block chain.
In the embodiment of the invention, the directional tracking of the bank loan scene is taken as an example, and the dynamic generation and the compliance supervision of the digital currency crown word number are realized. An enterprise applies for 1000 ten thousand yuan of loan from a bank, and the application is 500 ten thousand yuan of purchasing steel, 300 ten thousand yuan of purchasing cement and 200 ten thousand yuan of purchasing ceramic tile. After the bank pre-examination passes, opening an enterprise loan account on the alliance chain, storing 1000 ten thousand yuan of digital currency into the loan account, namely the source currency, dynamically generating a crown word number A + + +, and dynamically generating crown word numbers X + + +, Y + + +, and Z + + +, respectively, when 500 ten thousand yuan, 300 ten thousand yuan and 200 ten thousand yuan of digital currency are remitted respectively after the system. The currency authority and the supervision organization thereof input a crown word number A + + +, which can know that the crown word numbers of the loan fund flow direction are X + + +, Y + + +, Z + + +, respectively, and can also know the transaction information such as account name, ID, financial institution code, use, amount, transaction serial number, source currency and destination currency identification, and the like; otherwise, the crown word numbers of the source currency and the destination currency associated with the transaction block can be checked back through certain transaction information.
In conclusion, the digital currency crown word number is dynamically generated based on the alliance chain, the autonomous controllable advantage of the alliance chain can be exerted, the existing financial infrastructure is reused, the cash production and operation cost is reduced, the digital currency crown word number is generated safely, efficiently and dynamically in real time, the currency authority is facilitated to monitor the whole life cycle of the digital currency in a penetrating mode, the currency policy is regulated and controlled, crimes are prevented and attacked, and the privacy of users is protected.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.