CN107330681B - Method and equipment for determining transaction time of transaction outside block chain - Google Patents
Method and equipment for determining transaction time of transaction outside block chain Download PDFInfo
- Publication number
- CN107330681B CN107330681B CN201710500957.6A CN201710500957A CN107330681B CN 107330681 B CN107330681 B CN 107330681B CN 201710500957 A CN201710500957 A CN 201710500957A CN 107330681 B CN107330681 B CN 107330681B
- Authority
- CN
- China
- Prior art keywords
- transaction
- blockchain
- responder
- contract
- billing
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000012546 transfer Methods 0.000 claims abstract description 135
- 239000003999 initiator Substances 0.000 claims abstract description 98
- 230000006870 function Effects 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 6
- 230000000977 initiatory effect Effects 0.000 claims description 5
- 230000015654 memory Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 9
- 238000013459 approach Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000014759 maintenance of location Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/10—Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
- G06Q20/102—Bill distribution or payments
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3829—Payment protocols; Details thereof insuring higher security of transaction involving key management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Computer Security & Cryptography (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a method for determining a transaction time for an out-of-blockchain transaction, the method comprising: the initiator participating in the off-chain transaction generates a billing key based on billing information of the current off-chain transaction of the block; the initiator generates a bill key hash value of the current off-blockchain transaction based on the bill key; the initiator sends the hash value of the bill key to the responder; the responder initiates a contract transfer associated with the current out-of-blockchain transaction according to the billing key hash value, and takes the height of the blockchain of the responder when the contract transfer occurs as the pre-registered transaction time of the current out-of-blockchain transaction; after the initiator receives transfer information related to the contract transfer from the responder, the transfer information is checked; and when the transfer information is determined to be correct, the initiator determines the pre-registered transaction time as contract transaction time and sends the transfer information including the contract transaction time to the server.
Description
Technical Field
The present invention relates to the field of blockchain technology, and more particularly, to a method and apparatus for determining a transaction time for a transaction outside a blockchain.
Background
The out-of-chain transaction network of a block chain is an extension of the block chain link point network. The core protocol of the out-of-chain transaction network is that the transfer parties realize mass and high-frequency transfer of one or more digital assets through one transfer channel in an intelligent contract mode under the condition that no intermediate person participates. In the out-of-chain transaction network, two or more parties can participate in the transfer, that is, the transfer channel can be participated by other nodes. The creation of each off-chain channel first requires a transaction on one chain. The chain is locked with funds for an unspent Transaction output utxo (outstanding Transaction output) as an input. The output of the transaction is a multiple signed output and the chain transaction also includes a withdrawable transaction that returns the funds of both parties to their respective hands. The transaction spends the locked funds in the chain in multiple signatures, and each multiple-signed off-chain transaction is a true blockchain transaction. Since any party of the transaction can freely broadcast the latest amount spending state to the main chain and take back the funds due to the party, the local consensus can be converted into the global consensus at any time.
However, the prior art has an unsolved key problem, namely the time axis problem of the off-link network transaction. Because both parties to the transaction have made multiple transfers over the off-link network, the time of each transfer does not have a time commonly agreed by both or more parties to indicate the time at which the transaction occurred. Currently, the parties to a transaction are marked with respective computer local times as the transaction time. However, this method of time stamping is clearly not reasonable because the computers involved in the transaction may be in different time zones. Furthermore, even if the computers participating in the transaction are in the same time zone, the local time of the computers may not be synchronized with the server, thus resulting in different transaction times being recorded by the respective parties to the transaction. This difference in time poses a significant security threat to the security of the transaction.
Disclosure of Invention
In view of the above, the present invention provides a method for participating in an off-chain transaction in different time zones with reference to the same time sequence. According to an aspect of the invention, there is provided a method for determining a transaction time for an out-of-blockchain transaction, the method comprising:
the initiator participating in the off-chain transaction generates a billing key based on billing information of the current off-chain transaction of the block;
generating, by the initiator, a billing key hash value for the current off-blockchain transaction based on the billing key;
the initiator sends the bill key hash value to a responder;
the responder initiating a contract transfer associated with the current out-of-blockchain transaction according to the billing key hash value and taking the responder's blockchain height at which the contract transfer occurred as the pre-registered transaction time for the current out-of-blockchain transaction;
after the initiator receives transfer information related to the contract transfer from the responder, checking the transfer information, wherein the transfer information comprises the pre-registered transaction time; and
and when the transfer information is determined to be correct, the initiator determines the pre-registered transaction time as contract transaction time, and sends the transfer information comprising the contract transaction time to the server.
Preferably, the initiator and the responder are capable of conducting an off-link transaction over an off-link transaction network of a blockchain.
Preferably, the billing information includes: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information.
Preferably, the billing key is a character string generated based on the billing information and used to represent a unique secret value.
Preferably, wherein the billing key is calculated according to a hash function, thereby generating a billing key hash value for the current off-blockchain transaction.
Preferably, the billing key cannot be obtained by a reverse operation according to the billing key hash value.
Preferably, the server utilizes an off-chain transaction recorder to store transfer information including contract transaction time.
Preferably, the off-link transaction recorder is a central relational database or data store for storing data relating to the off-link transactions.
Preferably, when a plurality of off-blockchain transactions occur between the initiator and the responder and contract transaction times of at least two off-blockchain transactions in the plurality of off-blockchain transactions are associated with the same block, each off-blockchain transaction in the at least two off-blockchain transactions is distinguished according to an occurrence order.
Preferably, the sequence of transactions occurring within the same block is distinguished by adding a subscript numeric sequence number to each of the at least two off-chain transactions.
According to another aspect of the present invention, there is provided an apparatus for determining a transaction time for a blockchain out-of-chain transaction, the apparatus comprising:
the bill key generation unit is used for generating a bill key based on the bill information of the current off-chain transaction;
a hash calculation unit that generates a billing key hash value for the current out-of-block-chain transaction based on the billing key;
an interface unit, which sends the billing key hash value to a responder, receives a contract transfer associated with the current out-of-blockchain transaction initiated by the responder according to the billing key hash value, wherein the height of the responder's blockchain when the contract transfer occurs is used as the pre-registered transaction time of the current out-of-blockchain transaction; sending transfer information including contract transaction time to a server
The checking unit is used for checking the transfer information after the initiator receives the transfer information related to the contract transfer from the responder, wherein the transfer information comprises the pre-registered transaction time; determining the pre-registered transaction time as a contract transaction time when the transfer information is determined to be correct.
Preferably, the initiator and the responder are capable of conducting an off-link transaction over an off-link transaction network of a blockchain.
Preferably, the billing information includes: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information.
Preferably, the billing key is a character string generated based on the billing information and used to represent a unique secret value.
Preferably, the hash calculation unit calculates the billing key according to a hash function, thereby generating a billing key hash value for the current off-blockchain transaction.
Preferably, the billing key cannot be obtained by a reverse operation according to the billing key hash value.
Preferably, the server utilizes an off-chain transaction recorder to store transfer information including contract transaction time.
Preferably, the off-link transaction recorder is a central relational database or data store for storing data relating to the off-link transactions.
Preferably, the system further comprises a sequence identification unit, and when multiple off-blockchain transactions occur between the initiator and the responder and contract transaction times of at least two off-blockchain transactions in the multiple off-blockchain transactions are associated with the same block, each off-blockchain transaction in the at least two off-blockchain transactions is distinguished according to an occurrence sequence.
Preferably, the sequence of transactions occurring within the same block is distinguished by adding a subscript numeric sequence number to each of the at least two off-chain transactions.
According to another aspect of the present invention, there is provided a transaction server comprising:
at least one processor;
a memory for storing instructions executable by the processor;
the processor is configured to perform the method for determining a transaction time for an out-of-blockchain transaction as previously described.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent from the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
FIG. 1 shows a block diagram of a system for determining a transaction time for an out-of-blockchain transaction in accordance with a preferred embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for determining a transaction time for an out-of-blockchain transaction according to a preferred embodiment of the present invention; and
fig. 3 shows a flow diagram of a method for determining a transaction time for an out-of-blockchain transaction in accordance with a preferred embodiment of the present invention.
Detailed Description
The present invention will be described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth. It will be apparent to one skilled in the art that the present invention may be practiced without these specific details. Well-known methods, procedures, components and circuits have not been described in detail so as not to obscure the present invention.
Further, those of ordinary skill in the art will appreciate that the drawings provided herein are for illustrative purposes and are not necessarily drawn to scale.
Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is, what is meant is "including, but not limited to".
In the description of the present invention, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Fig. 1 shows a schematic block diagram of a system 100 for determining a transaction time for an out-of-blockchain transaction according to a preferred embodiment of the present invention. The system 100 causes initiator devices participating in the off-chain transaction to generate a billing key based on billing information for the current off-block-chain transaction and, in turn, a billing key hash value for the current off-block-chain transaction based on the billing key. The system 100 then causes the initiator device to send the billing key hash value to the responder device, and a contract transfer associated with the current out-of-blockchain transaction is initiated by the responder device according to the billing key hash value. The system 100 causes the responder device to take the blockchain height of the responder at the time the contract transfer occurred as the pre-registered transaction time for the current blockchain out-of-transaction. Subsequently, after the initiator device receives transfer information related to the contract transfer from the responder device, the system 100 causes the initiator device to check the transfer information and, when the transfer information is determined to be correct, determines the pre-registered transaction time as the contract transaction time, and transmits the transfer information including the contract transaction time to the server.
As shown in fig. 1, the system 100 includes: initiator device 101, out-of-chain network 102, responder device 103, and out-of-chain transaction recorder 104. The initiator device 101 and the responder device 103 are both devices capable of performing intra-chain and out-of-chain transactions of a block chain. The initiator device 101 and the responder device 103 may each be a general-purpose data processing device, such as a smartphone, a tablet, a laptop, or a desktop computer, with a predetermined computer program installed. According to an embodiment of the present invention, the initiator device 101 and responder device 103 conduct mass and high frequency transfers of one or more digital assets through a transfer channel in an intelligent contractual manner over the out-of-chain network 102 and without intermediary participation. It should be appreciated by those skilled in the art that although the present application illustrates two parties conducting an off-link transaction as an example, the parties conducting the off-link transaction through the off-link network 102 may be more than two parties. That is, multiple parties may participate in the transfer, meaning that the transfer channel may be participated by other nodes.
Preferably, the initiator device 101 is capable of generating a billing key based on billing information for the current off-chain transaction of blocks. Generally, to improve transaction efficiency, out-of-blockchain transactions have become a very important approach when conducting transactions between trusted parties. The initiator device 101 and responder device 103 are able to conduct an off-link transaction over the off-link transaction network of the blockchain. Among other things, out-of-blockchain transactions can support various types of transactions. Typically, in order to record and indicate out-of-blockchain transactions, billing information is used to describe the transactions. Wherein the billing information includes: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information. Preferably, the initiator identifier is an identifier for identifying the initiator device, which is capable of uniquely identifying the initiator device. The responder identifier is an identifier for identifying a responder device, which is capable of uniquely identifying an initiating responder. The transfer amount is used to identify an amount involved in a transaction conducted between the initiator device and the responder device, e.g., the responder device transfers 50000 dollars to the initiator device. The transaction time is used to identify the time of a transaction conducted between the initiator device and the responder device. Typically, the initial value of the transaction time may be a time set by the initiator device that is expected to complete the transaction. As will be described below, the transaction time may be set to the pre-registered transaction time after the blockchain height of the responder at the time the contract transfer occurred is taken as the pre-registered transaction time for the current out-of-blockchain transaction. Finally, when the transfer information is determined to be correct, the initiator device determines the pre-registered transaction time as a contract transaction time. At this time, the transaction time indicates a pre-registered transaction time. The additional information may be any information related to the current out-of-blockchain transaction, such as a transfer epilogue, etc. Preferably, the billing key is a character string generated based on the billing information and used to represent a unique secret value. The billing key of the off-chain transaction is a unique secret value (Pre-image) represented by a string, which cannot be calculated by any computer according to the hash of the secret value, but once the secret value is available, anyone can easily calculate the same hash by using the hash function, and the hash time lock intelligent contract is used for preventing the distrusted node from doing malicious work.
Preferably, the initiator device 101 generates a billing key hash value for the current off-blockchain transaction based on the billing key. The initiator device 101 may calculate the billing key according to MD5 or SHA-1 hash function to generate a billing key hash value for the current out-of-blockchain transaction. As is known, any computer device cannot obtain an initial billing key through a reverse operation according to the hash value of the billing key.
Preferably, the initiator device 101 sends the billing key hash value to the responder device 103. The responder device 103 initiates a contract transfer associated with the current out-of-blockchain transaction according to the billing key hash value, and takes the responder's blockchain height at the time the contract transfer occurred as the pre-registered transaction time for the current out-of-blockchain transaction. For example, the responder device 103, based on the information indicated in the billing information: initiator identifier-initiator device 101, responder identifier-responder device 103, transfer amount-50000 yuan, transaction time-2017, 6 months and 6 days, and additional information-engineering money to make transactions. The responder device 103 then takes the blockchain height of the responder device 103 at the time the contract transfer occurred, i.e., the current block of the blockchain, as the pre-registered transaction time for the current out-of-blockchain transaction. When multiple off-chain block transactions occur between the initiator device 101 and the responder device 103 and contract transaction times of at least two off-chain block transactions in the multiple off-chain block transactions are associated with the same block, each off-chain block transaction in the at least two off-chain block transactions is distinguished according to an occurrence sequence. In other words, when contract transaction times of at least two off-blockchain transactions fall into the same block of the blockchain, the at least two off-blockchain transactions cannot be distinguished. In this case, the present application distinguishes the order in which transactions occur within the same block by adding a subscript numeric sequence number for each of the at least two out-of-block-chain transactions.
Preferably, the initiator apparatus 101 checks transfer information related to the contract transfer after receiving the transfer information from the responder apparatus 103. For example, the initiator device 101 may check whether the received money is 50000 dollars and whether the transferor is the responder device 103. Preferably, in the current transfer information, the value of the transaction time is a pre-registered transaction time. Upon determining that the transfer information is correct, the initiator apparatus 101 determines the pre-registered transaction time as a contract transaction time, and transmits the transfer information including the contract transaction time to the server. The server then utilizes the off-chain transaction recorder 104 to store transfer information including the contract transaction time. The off-link transaction recorder 104 is preferably a central relational database or data store for storing data relating to the off-link transactions. Typically, after the contract trade time is determined, the application uses the off-link transaction recorder 104 to record relevant information (including the contract trade time) for later querying and retention as evidence. Preferably, this application is illustrated with a central relational database or data store, but it will be appreciated by those skilled in the art that any type of store may be used to record the relevant information, including contract trade time.
The off-link network 102 is preferably a network external to the blockchain network and is used to enable the initiator device 101 and responder device 103 to conduct off-blockchain transactions. In the blockchain technology, any node can record all transaction histories and can route information such as transaction data transmitted by other nodes to more nodes. Meanwhile, the nodes in the blockchain network can also have a transaction function and a function of acquiring blockchain information. In a blockchain network, a new transaction can be created between any two nodes, the transaction propagates in a point-to-point (P2P) manner, and all nodes in the blockchain network verify the transaction. The result of the verification is also propagated in a point-to-point manner, so that all nodes write transactions into the blockchain. Thereby, a distributed transaction record is formed. However, in the out-of-link network 102, transaction information is not propagated using a point-to-point (P2P) approach, and typically a centralized server is used for information processing services and a centralized storage is used to store transaction information.
Fig. 2 shows a schematic structural diagram of an apparatus 200 for determining a transaction time for an out-of-blockchain transaction according to a preferred embodiment of the present invention. The device 200 causes an initiator device participating in the off-chain transaction to generate a billing key based on billing information for the current off-block-chain transaction and in turn generate a billing key hash value for the current off-block-chain transaction based on the billing key. The device 200 then causes the initiator device to send a billing key hash value to the responder device, and a contract transfer associated with the current out-of-blockchain transaction is initiated by the responder device according to the billing key hash value. Device 200 causes the responder device to take the block chain height of the responder at the time the contract transfer occurred as the pre-registered transaction time for the current out-of-block-chain transaction. Subsequently, after the initiator device receives transfer information related to the contract transfer from the responder device, the device 200 causes the initiator device to check the transfer information and, when it is determined that the transfer information is correct, determines the pre-registered transaction time as the contract transaction time, and transmits the transfer information including the contract transaction time to the server.
As shown in fig. 2, the apparatus 200 includes: a billing key generation unit 201, a hash calculation unit 202, an interface unit 203, a collation unit 204, and an order identification unit 205. According to the embodiment of the invention, the initiator and the responder can transfer massive and high-frequency one or more digital assets through a transfer channel in an intelligent contract mode without participation of an intermediate. It should be understood by those skilled in the art that although the present application is illustrated with two parties conducting an off-chain transaction as an example, the parties involved in conducting the off-chain transaction may be more than two parties. That is, multiple parties may participate in the transfer, meaning that the transfer channel may be involved by other parties.
Preferably, the billing key generation unit 201 is capable of generating a billing key based on billing information of the current off-chain transaction of blocks. Generally, to improve transaction efficiency, out-of-blockchain transactions have become a very important approach when conducting transactions between trusted parties. The initiator and the responder can perform off-link transaction through an off-link transaction network of the blockchain. Among other things, out-of-blockchain transactions can support various types of transactions. Typically, in order to record and indicate out-of-blockchain transactions, billing information is used to describe the transactions. Wherein the billing information includes: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information. Preferably, the initiator identifier is an identifier for identifying the initiator device, which is capable of uniquely identifying the initiator device. The responder identifier is an identifier for identifying a responder device, which is capable of uniquely identifying an initiating responder. The transfer amount is used to identify an amount involved in a transaction conducted between the initiator device and the responder device, e.g., the responder device transfers 50000 dollars to the initiator device. The transaction time is used to identify the time of a transaction conducted between the initiator device and the responder device. Typically, the initial value of the transaction time may be a time set by the initiator device that is expected to complete the transaction. As will be described below, the transaction time may be set to the pre-registered transaction time after the blockchain height of the responder at the time the contract transfer occurred is taken as the pre-registered transaction time for the current out-of-blockchain transaction. Finally, when the transfer information is determined to be correct, the initiator device determines the pre-registered transaction time as a contract transaction time. At this time, the transaction time indicates a pre-registered transaction time. The additional information may be any information related to the current out-of-blockchain transaction, such as a transfer epilogue, etc. Preferably, the billing key is a character string generated based on the billing information and used to represent a unique secret value. The billing key of the off-chain transaction is a unique secret value (Pre-image) represented by a string, which cannot be calculated by any computer according to the hash of the secret value, but once the secret value is available, anyone can easily calculate the same hash by using the hash function, and the hash time lock intelligent contract is used for preventing the distrusted node from doing malicious work.
Preferably, the hash calculation unit 202 generates a billing key hash value for the current off-blockchain transaction based on the billing key. The initiator may calculate the billing key according to MD5 or SHA-1 hash functions to generate a billing key hash value for the current off-blockchain transaction. As is known, any computer device cannot obtain an initial billing key through a reverse operation according to the hash value of the billing key.
Preferably, the interface unit 203 transmits the billing key hash value to the responder. The responder initiates a contract transfer associated with the current out-of-blockchain transaction based on the billing key hash value, and takes the responder's blockchain height at which the contract transfer occurred as the pre-registered transaction time for the current out-of-blockchain transaction. For example, the responder, based on the information indicated in the billing information: initiator identifier-initiator AAA, responder identifier-responder CCC, transfer amount-50000 yuan, transaction time-2017, 6 months and 6 days, and additional information-engineering money to perform the transaction. The responder then uses the blockchain height of the responder at the time the contract transfer occurred, i.e., the current block of the blockchain, as the pre-registered transaction time for the current out-of-blockchain transaction.
When a plurality of external block chain transactions occur between the initiator and the responder and contract transaction times of at least two external block chain transactions in the plurality of external block chain transactions are associated with the same block, the sequence identification unit 205 distinguishes each external block chain transaction in the at least two external block chain transactions according to an occurrence sequence. In other words, when contract transaction times of at least two off-blockchain transactions fall into the same block of the blockchain, the at least two off-blockchain transactions cannot be distinguished. In this case, the present application distinguishes the order in which transactions occur within the same block by adding a subscript numeric sequence number for each of the at least two out-of-block-chain transactions.
Preferably, the collation unit 204 collates transfer information after receiving transfer information related to the contract transfer from the responder. For example, the checking unit 204 may check whether the received money is 50000 dollars and whether the transferring party is the answering party CCC. Preferably, in the current transfer information, the value of the transaction time is a pre-registered transaction time. Upon determining that the transfer information is correct, the collation unit 204 determines the pre-registered transaction time as the contract transaction time, and causes the interface unit 203 to transmit the transfer information including the contract transaction time to the server. The server then utilizes an off-link transaction recorder to store transfer information including the contract transaction time. Preferably, the off-link transaction recorder is a central relational database or data store for storing data relating to said off-link transactions. Typically, after the contract trade time is determined, the application uses an off-chain transaction recorder to record relevant information (including the contract trade time) for later querying and retention as evidence. Preferably, this application is illustrated with a central relational database or data store, but it will be appreciated by those skilled in the art that any type of store may be used to record the relevant information, including contract trade time.
Fig. 3 shows a flow diagram of a method 300 for determining a transaction time for an out-of-blockchain transaction in accordance with a preferred embodiment of the present invention. The method 300 causes an initiator device participating in the off-chain transaction to generate a billing key based on billing information for the current off-block-chain transaction and, in turn, a billing key hash value for the current off-block-chain transaction based on the billing key. The method 300 then causes the initiator device to send the billing key hash value to the responder device, and a contract transfer associated with the current out-of-blockchain transaction is initiated by the responder device according to the billing key hash value. The method 300 causes the responder device to take the blockchain height of the responder at the time the contract transfer occurred as the pre-registered transaction time for the current blockchain out-of-transaction. Subsequently, after the initiator device receives transfer information related to the contract transfer from the responder device, the method 300 causes the initiator device to check the transfer information and, upon determining that the transfer information is correct, determine a pre-registered transaction time as the contract transaction time, and transmit the transfer information including the contract transaction time to the server.
As shown in fig. 3, method 300 begins at step 301. At step 301, an initiator participating in an off-link transaction generates a billing key based on billing information for the current block off-link transaction. Generally, to improve transaction efficiency, out-of-blockchain transactions have become a very important approach when conducting transactions between trusted parties. The initiator and the responder can perform off-link transaction through an off-link transaction network of the blockchain. Among other things, out-of-blockchain transactions can support various types of transactions. Typically, in order to record and indicate out-of-blockchain transactions, billing information is used to describe the transactions. Wherein the billing information includes: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information. Preferably, the initiator identifier is an identifier for identifying the initiator device, which is capable of uniquely identifying the initiator device. The responder identifier is an identifier for identifying a responder device, which is capable of uniquely identifying an initiating responder. The transfer amount is used to identify an amount involved in a transaction conducted between the initiator device and the responder device, e.g., the responder device transfers 50000 dollars to the initiator device. The transaction time is used to identify the time of a transaction conducted between the initiator device and the responder device. Typically, the initial value of the transaction time may be a time set by the initiator device that is expected to complete the transaction. As will be described below, the transaction time may be set to the pre-registered transaction time after the blockchain height of the responder at the time the contract transfer occurred is taken as the pre-registered transaction time for the current out-of-blockchain transaction. Finally, when the transfer information is determined to be correct, the initiator device determines the pre-registered transaction time as a contract transaction time. At this time, the transaction time indicates a pre-registered transaction time. The additional information may be any information related to the current out-of-blockchain transaction, such as a transfer epilogue, etc. Preferably, the billing key is a character string generated based on the billing information and used to represent a unique secret value. The billing key of the off-chain transaction is a unique secret value (Pre-image) represented by a string, which cannot be calculated by any computer according to the hash of the secret value, but once the secret value is available, anyone can easily calculate the same hash by using the hash function, and the hash time lock intelligent contract is used for preventing the distrusted node from doing malicious work.
Preferably, the initiator generates a billing key hash value for the current off-blockchain transaction based on the billing key at step 302. The initiator may calculate the billing key according to MD5 or SHA-1 hash functions to generate a billing key hash value for the current off-blockchain transaction. As is known, any computer device cannot obtain an initial billing key through a reverse operation according to the hash value of the billing key.
Preferably, the billing key hash value is sent to the responder in step 303.
Preferably, at step 304, the responder initiates a contract transfer associated with the current out-of-blockchain transaction based on the billing key hash value, and the responder's blockchain height at which the contract transfer occurred is taken as the pre-registered transaction time for the current out-of-blockchain transaction. For example, the responder, based on the information indicated in the billing information: initiator identifier-initiator AAA, responder identifier-responder CCC, transfer amount-50000 yuan, transaction time-2017, 6 months and 6 days, and additional information-engineering money to perform the transaction. The responder then uses the blockchain height of the responder at the time the contract transfer occurred, i.e., the current block of the blockchain, as the pre-registered transaction time for the current out-of-blockchain transaction. Preferably, when a plurality of off-blockchain transactions occur between the initiator and the responder and contract transaction times of at least two off-blockchain transactions in the plurality of off-blockchain transactions are associated with the same block, each off-blockchain transaction in the at least two off-blockchain transactions is distinguished according to an occurrence order. In other words, when contract transaction times of at least two off-blockchain transactions fall into the same block of the blockchain, the at least two off-blockchain transactions cannot be distinguished. In this case, the present application distinguishes the order in which transactions occur within the same block by adding a subscript numeric sequence number for each of the at least two out-of-block-chain transactions.
Preferably, at step 305, the transfer information is checked after the initiator receives transfer information associated with the transfer of the contract from the responder, wherein the transfer information includes the pre-registered transaction time. For example, step 305 may check whether the received money is 50000 dollars and whether the transferor is the responder CCC. Preferably, in the current transfer information, the value of the transaction time is a pre-registered transaction time.
In step 306, upon determining that the transfer information is correct, the pre-registered trade time is determined to be contract trade time, and the transfer information including the contract trade time is sent to the server. The server then utilizes an off-link transaction recorder to store transfer information including the contract transaction time. Preferably, the off-link transaction recorder is a central relational database or data store for storing data relating to said off-link transactions. Typically, after the contract trade time is determined, the application uses an off-chain transaction recorder to record relevant information (including the contract trade time) for later querying and retention as evidence. Preferably, this application is illustrated with a central relational database or data store, but it will be appreciated by those skilled in the art that any type of store may be used to record the relevant information, including contract trade time.
The foregoing detailed description has set forth numerous embodiments of the devices and/or methods via the use of block diagrams, flowcharts, and/or examples. Insofar as such block diagrams, flowcharts, and/or examples contain one or more functions and/or operations, it will be understood by those within the art that each function and/or operation within such block diagrams, flowcharts, or examples can be implemented, individually and/or collectively, by a wide range of hardware, software, firmware, or virtually any combination thereof. In one embodiment, portions of the subject matter described herein may be implemented via an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), or other integrated format. However, those skilled in the art will recognize that some aspects of the embodiments disclosed herein, in whole or in part, can be equivalently implemented in integrated circuits, as one or more computer programs running on one or more computers (e.g., as one or more programs running on one or more computer systems), as one or more programs running on one or more processors (e.g., as one or more programs running on one or more microprocessors), as firmware, or as virtually any combination thereof, and that designing the circuitry and/or writing the code for the software and or firmware would be well within the skill of one of skill in the art in light of the present disclosure. Moreover, those skilled in the art will appreciate that the mechanisms of the present invention are capable of being distributed as a program product in a variety of forms, and that an illustrative embodiment of the subject matter described herein applies regardless of the particular type of signal bearing media used to actually carry out the distribution. Examples of signal bearing media include, but are not limited to: recordable type media such as floppy disks, hard disk drives, Compact Disks (CDs), Digital Video Disks (DVDs), digital tapes, computer memories, etc.; and a transmission type medium such as a digital and/or an analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link and/or channel, a wireless communication link and/or channel, etc.).
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (21)
1. A method for determining a transaction time for an out-of-blockchain transaction, the method comprising:
the initiator participating in the off-chain transaction generates a billing key based on billing information of the current off-chain transaction of the block;
generating, by the initiator, a billing key hash value for the current off-blockchain transaction based on the billing key;
the initiator sends the bill key hash value to a responder;
the responder initiating a contract transfer associated with the current out-of-blockchain transaction according to the billing key hash value and taking the responder's blockchain height at which the contract transfer occurred as the pre-registered transaction time for the current out-of-blockchain transaction;
after the initiator receives transfer information related to the contract transfer from the responder, checking the transfer information, wherein the transfer information comprises the pre-registered transaction time; and
and when the transfer information is determined to be correct, the initiator determines the pre-registered transaction time as contract transaction time, and sends the transfer information comprising the contract transaction time to the server.
2. The method of claim 1, the initiator and the responder being capable of conducting an off-chain transaction over an off-chain transaction network of a blockchain.
3. The method of claim 1, the billing information comprising: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information.
4. The method of claim 1, the billing key being a string generated based on billing information and used to represent a unique secret value.
5. The method of claim 4, wherein the billing key is computed according to a hash function, thereby generating a billing key hash value for the current off-blockchain transaction.
6. The method of claim 5, wherein the billing key cannot be obtained by a reverse operation based on a billing key hash value.
7. The method of claim 1, the server storing transfer information including contract transaction time with an off-link transaction recorder.
8. The method of claim 7, the off-chain transaction recorder being a central relational database or data store for storing data relating to the off-chain transactions.
9. The method of claim 1, when a plurality of out-of-blockchain transactions occur between the initiator and the responder and contract transaction times for at least two out-of-blockchain transactions of the plurality of out-of-blockchain transactions are associated with the same tile, differentiating each out-of-blockchain transaction of the at least two out-of-blockchain transactions in order of occurrence.
10. The method of claim 9, wherein the order in which transactions occur within the same block is differentiated by adding a subscript numeric sequence number for each of the at least two off-chain transactions.
11. An apparatus for determining a transaction time for an out-of-blockchain transaction, the apparatus comprising:
the bill key generation unit is used for generating a bill key based on the bill information of the current off-chain transaction;
a hash calculation unit that generates a billing key hash value for the current out-of-block-chain transaction based on the billing key;
an interface unit, which sends the billing key hash value to a responder, receives a contract transfer associated with the current out-of-blockchain transaction initiated by the responder according to the billing key hash value, wherein the height of the responder's blockchain when the contract transfer occurs is used as the pre-registered transaction time of the current out-of-blockchain transaction; sending transfer information including contract transaction time to a server
The checking unit is used for checking the transfer information after the initiator receives the transfer information related to the contract transfer from the responder, wherein the transfer information comprises the pre-registered transaction time; determining the pre-registered transaction time as a contract transaction time when the transfer information is determined to be correct.
12. The apparatus of claim 11, the initiator and the responder capable of conducting an off-chain transaction over an off-chain transaction network of a blockchain.
13. The apparatus of claim 11, the billing information comprising: an initiator identifier, a responder identifier, a transfer amount, a transaction time, and additional information.
14. The apparatus of claim 11, the billing key is a string of characters generated based on billing information and used to represent a unique secret value.
15. The apparatus of claim 14, wherein the hash calculation unit calculates the billing key according to a hash function, thereby generating a billing key hash value for the current out-of-blockchain transaction.
16. The apparatus of claim 15, wherein the billing key cannot be obtained by a reverse operation based on a billing key hash value.
17. The apparatus of claim 11, the server utilizing an off-chain transaction recorder to store transfer information including contract transaction time.
18. The apparatus of claim 17, the off-chain transaction recorder being a central relational database or data store for storing data relating to the off-chain transactions.
19. The apparatus of claim 11, further comprising an order identification unit to distinguish each of the at least two out-of-blockchain transactions by order of occurrence when a plurality of out-of-blockchain transactions occur between the initiator and the responder and contract transaction times for at least two out-of-blockchain transactions of the plurality of out-of-blockchain transactions are associated with the same tile.
20. The apparatus of claim 19, the order in which transactions occur within the same block is differentiated by adding a subscript numeric sequence number for each of the at least two off-chain block transactions.
21. A transaction server, comprising:
at least one processor;
a memory for storing instructions executable by the processor;
the processor is configured to perform the method of any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710500957.6A CN107330681B (en) | 2017-06-27 | 2017-06-27 | Method and equipment for determining transaction time of transaction outside block chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710500957.6A CN107330681B (en) | 2017-06-27 | 2017-06-27 | Method and equipment for determining transaction time of transaction outside block chain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107330681A CN107330681A (en) | 2017-11-07 |
CN107330681B true CN107330681B (en) | 2021-04-13 |
Family
ID=60197263
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710500957.6A Expired - Fee Related CN107330681B (en) | 2017-06-27 | 2017-06-27 | Method and equipment for determining transaction time of transaction outside block chain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107330681B (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11842335B2 (en) * | 2017-12-01 | 2023-12-12 | Quant Network Ltd. | Blockchain communications and ordering |
TWI670657B (en) * | 2017-12-12 | 2019-09-01 | 中國信託金融控股股份有限公司 | Payment confirmation system |
JP2019109635A (en) * | 2017-12-16 | 2019-07-04 | 株式会社bitFlyer | Method for enabling past transaction to be accessed in block chain network and node to configure block chain network |
CN108199842B (en) * | 2018-02-13 | 2021-03-02 | 克洛斯比尔有限公司 | Method and system for delaying publishing information |
CN110490723A (en) * | 2018-05-15 | 2019-11-22 | 全球智能股份有限公司 | Loan administration method and system under block chain |
CN108764870B (en) | 2018-05-29 | 2020-07-07 | 阿里巴巴集团控股有限公司 | Transaction processing method and device based on block chain and electronic equipment |
CN108876946A (en) | 2018-05-31 | 2018-11-23 | 阿里巴巴集团控股有限公司 | Non-stop charging method and device, electronic equipment |
CN108805995B (en) | 2018-05-31 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Parking charging method and device and electronic equipment |
CN108876947B (en) * | 2018-05-31 | 2020-07-14 | 阿里巴巴集团控股有限公司 | Electronic equipment and electronic equipment |
CN109146448B (en) * | 2018-07-13 | 2021-02-09 | 杭州复杂美科技有限公司 | Cross-chain asset transfer method, device and storage medium |
CN109102404B (en) * | 2018-08-09 | 2021-07-30 | 全链通有限公司 | Privacy protection method and system for block chain real-name communication |
CN108960832B (en) * | 2018-08-09 | 2021-07-30 | 全链通有限公司 | Privacy protection method and system for block chain real-name communication |
CN111210344A (en) * | 2018-11-21 | 2020-05-29 | 北京京东金融科技控股有限公司 | Transaction method, device and storage medium of block chain network |
CN109727131A (en) * | 2018-12-28 | 2019-05-07 | 苏州鸿链信息科技有限公司 | Method of commerce and system are executed under a kind of chain based on block chain contract layer |
EP3862957B1 (en) * | 2019-01-03 | 2024-04-24 | Huawei Technologies Co., Ltd. | Blockchain-based data processing method, device and medium |
CN111612612B (en) * | 2019-02-22 | 2023-09-08 | 海南趣块飞扬科技有限公司 | Block chain-based decentralization transaction method and device and electronic equipment |
CN110599143B (en) * | 2019-07-31 | 2021-05-28 | 腾讯科技(深圳)有限公司 | Data processing method, related device and medium |
CN110727712B (en) * | 2019-10-15 | 2021-06-04 | 腾讯科技(深圳)有限公司 | Data processing method and device based on block chain network, electronic equipment and storage medium |
CN110932864B (en) * | 2019-11-20 | 2022-06-28 | 上海欧冶金融信息服务股份有限公司 | Transaction instruction preauthorization and transaction execution method and system based on intelligent contract |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106682907A (en) * | 2016-12-10 | 2017-05-17 | 江苏恒为信息科技有限公司 | Comparison and consensus method for block chain data |
CN106780032A (en) * | 2016-12-16 | 2017-05-31 | 杭州云象网络技术有限公司 | A kind of block chain interchain assets transfer method under multichain scene |
CN106846666A (en) * | 2017-01-18 | 2017-06-13 | 北京云知科技有限公司 | A kind of withdrawal method based on block chain |
CN106874440A (en) * | 2017-02-07 | 2017-06-20 | 杭州秘猿科技有限公司 | A kind of block chain state storage method based on SQL database |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170178127A1 (en) * | 2015-12-18 | 2017-06-22 | International Business Machines Corporation | Proxy system mediated legacy transactions using multi-tenant transaction database |
-
2017
- 2017-06-27 CN CN201710500957.6A patent/CN107330681B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106682907A (en) * | 2016-12-10 | 2017-05-17 | 江苏恒为信息科技有限公司 | Comparison and consensus method for block chain data |
CN106780032A (en) * | 2016-12-16 | 2017-05-31 | 杭州云象网络技术有限公司 | A kind of block chain interchain assets transfer method under multichain scene |
CN106846666A (en) * | 2017-01-18 | 2017-06-13 | 北京云知科技有限公司 | A kind of withdrawal method based on block chain |
CN106874440A (en) * | 2017-02-07 | 2017-06-20 | 杭州秘猿科技有限公司 | A kind of block chain state storage method based on SQL database |
Also Published As
Publication number | Publication date |
---|---|
CN107330681A (en) | 2017-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107330681B (en) | Method and equipment for determining transaction time of transaction outside block chain | |
KR102652551B1 (en) | Smart contract execution using distributed coordination | |
CN109639714B (en) | Internet of things identity registration and verification method based on block chain | |
US10614456B2 (en) | Dynamic cryptocurrency aliasing | |
EP3345360B1 (en) | Method for storing an object on a plurality of storage nodes | |
CN109902071A (en) | Business diary storage method, system, device and equipment | |
TWI731569B (en) | Anonymous transaction method and device based on ring signature | |
CN113595734B (en) | Methods, systems, and apparatus for managing transactions in a plurality of blockchain networks | |
CN106650495A (en) | File verification method and device | |
WO2021204273A1 (en) | Asset type registration and transaction record verification | |
CN113568946A (en) | Method, system and apparatus for managing transactions in multiple blockchain networks | |
US11570005B2 (en) | Systems and methods for proving immutability of blockchains | |
KR102627868B1 (en) | Method and system for authenticating data generated in blockchain | |
US11924348B2 (en) | Honest behavior enforcement via blockchain | |
US11343313B1 (en) | Fault tolerant periodic leader rotation for blockchain | |
CN115769206A (en) | Cryptographic data entry blockchain data structure | |
CN113595733A (en) | Method, system and apparatus for managing transactions in multiple blockchain networks | |
CN111292190A (en) | Transaction generation method, block creation method, related device and equipment | |
CN111461881A (en) | Data management method and device, computer equipment and storage medium | |
JP7447127B2 (en) | Preventing the sending of accidental copies of data records to a distributed ledger system | |
CN110192212B (en) | Digital asset platform | |
CN112291321B (en) | Service processing method, device and system | |
CN111198763B (en) | Method for detecting reuse of resources, terminal and computer-readable storage medium | |
CN110852887B (en) | Method and device for acquiring transaction processing state in decentralized application cluster | |
CN103647650A (en) | Rule definition based automatic signature/signature verification device and method |
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 | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20180427 Address after: 650200 room 1, unit 6, 6 Wu Jing Road, Guandu District, Kunming, Yunnan, 202 Applicant after: Chen Quan Address before: 100000 4008, 4 floor, 9 building, 56 half moon street, Xicheng District, Beijing. Applicant before: SINOCHAIN TECHNOLOGY Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210413 |
|
CF01 | Termination of patent right due to non-payment of annual fee |