Method for associating data between a plurality of blockchain networks and apparatus thereof
A method for interconnecting data between a plurality of blockchain networks according to an embodiment of the present invention includes receiving a request of an interconnecting transaction for interconnecting data between a plurality of blockchain networks, querying information of an ongoing or scheduled transaction through the plurality of blockchain networks in response to the request, and selectively determining any one of a plurality of interconnecting schemes as an interconnecting scheme of the interconnecting transaction with reference to the queried information, and performing the interconnecting transaction according to the determined interconnecting scheme.
1. A method for interconnecting data between a plurality of blockchain networks, the method comprising:
receiving a request of an interconnecting transaction for interconnecting data between a plurality of blockchain networks;
querying information of an ongoing or scheduled transaction through the plurality of blockchain networks in response to the request;
selecting, with reference to the queried information, one of a plurality of interconnecting schemes as an interconnecting scheme of the interconnecting transaction; and
performing the interconnecting transaction according to the selected interconnecting scheme,
wherein the selecting comprises:
determining whether reference information of the interconnecting transaction and the queried information match with each other by comparing a chain identification (ID) or a chain code ID of the interconnecting transaction with the ongoing or scheduled transaction; and
selecting an asynchronous scheme of the plurality of interconnecting schemes as the interconnecting scheme based on a determination that the reference information and the queried information do not match with each other.
2. The method of claim 1 , wherein performing the interconnecting transaction comprises:
recording information of the interconnecting transaction and independently performing a first interconnecting transaction through a first blockchain network of the plurality of blockchain networks if the selected interconnecting scheme is an asynchronous scheme.
3. The method of claim 2 , wherein performing the interconnecting transaction further comprises:
requesting an interconnecting device connected to a second blockchain network of the plurality of blockchain networks to perform a second interconnecting transaction,
wherein the second interconnecting transaction is performed through the second blockchain network by the interconnecting device.
4. The method of claim 3 , wherein performing the interconnecting transaction further comprises:
updating the information of the interconnecting transaction based on a performing result of the first interconnecting transaction and a performing result of the second interconnecting transaction after receiving the performing result of the second interconnecting transaction from the interconnecting device.
5. The method of claim 1 , wherein performing the interconnecting transaction comprises:
requesting the interconnecting transaction to be registered in a transaction queue if the selected interconnecting scheme is not the asynchronous scheme.
6. The method of claim 5 , wherein performing the interconnecting transaction further comprises:
fetching the interconnecting transaction from the transaction queue of a database;
performing a first phase of the interconnecting transaction by: performing a first step among the plurality of steps of a first interconnecting transaction through a first blockchain network of the plurality of blockchain networks; and
requesting an interconnecting device connected to a second blockchain network of the plurality of blockchain networks to perform a first step of a plurality of steps of a second interconnecting transaction corresponding to the first interconnecting transaction; and
performing a second phase of the interconnecting transaction according to a result of performing the first phase.
7. The method of claim 1 , wherein information of an ongoing or scheduled transaction of the network is queried from a database; and
the database stores information related to a transaction performed through the plurality of blockchain networks or backup information of data recorded in the plurality of blockchain networks.
8. An apparatus for interconnecting data between a plurality of blockchain networks, the apparatus comprising:
a processor;
a memory for loading a computer program executed by the processor; and
a storage;
the computer program stored in the storage, the computer program comprising instructions to perform operations comprising:
receiving a request of an interconnecting transaction for interconnecting the data between the plurality of blockchain networks;
querying information of an ongoing or scheduled transaction of the plurality of blockchain networks in response to the request;
selecting an interconnecting scheme among a plurality of interconnecting schemes as the interconnecting scheme of the interconnecting transaction with reference to the queried information; and
performing the interconnecting transaction according to the selected interconnecting scheme,
wherein the selecting comprises:
determining whether reference information of the interconnecting transaction and the queried information match with each other by comparing a chain Identification (ID) or a chain code ID of the interconnecting transaction with the ongoing or scheduled transaction; and
selecting an asynchronous scheme of the plurality of interconnecting schemes as the interconnecting scheme based on a determination that the reference information and the queried information do not match with each other.
9. A computer program combined with a computing device for performing a method of interconnecting data between a plurality of blockchain networks, wherein the computer program is stored in a non-volatile computer readable recording medium to perform operations comprising:
receiving a request of an interconnecting transaction for interconnecting data between a plurality of blockchain networks;
querying information of an ongoing or scheduled transaction of the plurality of blockchain networks in response to the request;
selecting, with reference to the queried information, one of a plurality of interconnecting schemes as an interconnecting scheme of the interconnecting transaction; and
performing the interconnecting transaction according to the selected interconnecting scheme,
wherein the selecting comprises:
determining whether reference information of the interconnecting transaction and the queried information match with each other by comparing a chain Identification (ID) or a chain code ID of the interconnecting transaction with the ongoing or scheduled transaction; and
selecting an asynchronous scheme of the plurality of interconnecting schemes as the interconnecting scheme based on a determination that the reference information and the queried information do not match with each other.