Blockchain-based computing system and method for managing transaction thereof

A method for managing transaction is performed in a blockchain-based computing system and includes receiving a request for processing a first individual transaction from a client terminal, generating a batch transaction by aggregating a plurality of individual transactions including the first individual transaction, processing the generated batch transaction via a blockchain network, such that a status record associated with the batch transaction is recorded in the blockchain, and providing the client terminal with an identifier of the batch transaction and index information on the first individual transaction, wherein the status record associated with the batch transaction includes a first status record associated with the first individual transaction, and wherein the index information on the first individual transaction is determined based on a location of the first status record in the status record.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from Korean Patent Application No.

10-2019-0065588 filed on Jun. 3, 2019 in the Korean Intellectual Property Office, and all the benefits accruing therefrom under 35 U.S.C. 119, the contents of which in their entirety are herein incorporated by reference.

BACKGROUND

1. Technical Field

The present disclosure relates to a blockchain-based computing system and a method for managing transaction thereof. More specifically, it relates to a computing system performing accelerative processing for a blockchain transaction via batch processing and a method for managing a transaction being performed by the system.

2. Description of the Related Art

Blockchain is a data management technology or data structure itself that records continuously increasing data in a particular unit of block, and each blockchain node constituting a peer-to-peer (P2P) network manages the block as a chain-type data structure. Blockchain technology may ensure the integrity and security of transactions via a consensus process in which all blockchain nodes in a network record and verify transactions.

However, since the consensus process limits the processing power of the network to the processing power of a single node, it is also a major factor that degrades the transaction processing performance of blockchain-based computing systems. In other words, in the blockchain-based computing system, even if the number of blockchain nodes is increased, the performance improvement of the system cannot be guaranteed. Therefore, it is practically impossible to introduce the blockchain technology to a field requiring rapid processing of a large amount of transactions. Further, it is still a long way from the blockchain-based computing system to replace a legacy system.

In conclusion, in order to advance the practical use of the blockchain technology and expand the scope of application, it is urgently needed to solve performance issues of the blockchain-based computing system.

SUMMARY

Aspects of the present disclosure provide a blockchain-based computing system that performs accelerative processing on a blockchain transaction based on batch processing to improve transaction processing performance, and a method performed in the system.

Aspects of the present disclosure also provide a method for managing a transaction capable of solving a query problem that may be caused by batch processing, and a blockchain-based computing system performing the method.

According to an aspect of the inventive concept, there is provided a method for managing a transaction. The method is performed in a blockchain-based computing system and comprises receiving a request for processing a first individual transaction from a client terminal, generating a batch transaction by aggregating a plurality of individual transactions including the first individual transaction, processing the generated batch transaction via a blockchain network, such that a status record associated with the batch transaction is recorded in the blockchain, and providing the client terminal with an identifier of the batch transaction and index information on the first individual transaction, wherein the status record associated with the batch transaction includes a first status record associated with the first individual transaction, and wherein the index information on the first individual transaction is determined based on a location of the first status record in the status record.

According to another aspect of the inventive concept, there is provided a method for managing a transaction. The method is performed in a blockchain-based computing system and comprises receiving a request for processing an first individual transaction along with a transaction code of the first individual transaction from a client terminal, generating a batch transaction by aggregating a plurality of individual transactions including the first individual transaction, processing the generated batch transaction via a blockchain network, such that a plurality of status records associated with the batch transaction are recorded in the blockchain, and providing the client terminal with an identifier of the batch transaction, wherein the plurality of status records includes a first status record associated with the first individual transaction, and wherein the first status record is recorded in the blockchain in an encrypted state by the transaction code.

DETAILED DESCRIPTION

Hereinafter, preferred embodiments of the present invention will be described with reference to the attached drawings. Advantages and features of the present invention and methods of accomplishing the same may be understood more readily by reference to the following detailed description of preferred embodiments and the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of the invention to those skilled in the art, and the present invention will only be defined by the appended claims. Like numbers refer to like elements throughout.

Unless otherwise defined, all terms including technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Further, it will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. The terms used herein are for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms are intended to include the plural forms as well, unless the context clearly indicates otherwise.

FIG.1is an exemplary configuration diagram illustrating a blockchain-based computing system according to various embodiments of the present disclosure.

As shown inFIG.1, the computing system may provide a transaction processing and management function to a client terminal400in cooperation with a blockchain network300. In addition, the computing system may include a transaction accelerative processing device100and a plurality of blockchain nodes200constituting the blockchain network300. However, this is only a preferred embodiment for achieving the object of the present disclosure. Naturally, some components may be added or deleted as necessary. For example, the computing system may include only the transaction accelerative processing device100.

In addition, it is noted that each apparatus illustrated inFIG.1represents functionally distinct functional elements, and at least one device may be implemented to be integrated with each other in an actual physical environment. For example, the transaction accelerative processing device100, the client terminal400, and/or the blockchain node200may be implemented in the form of different logic within the same physical computing device. In other words, the transaction accelerative processing device100may operate as the blockchain node200, and the transaction accelerative processing function (e.g., a batch processing function) may be implemented at the client terminal400side.

Hereinafter, a reference numeral “200” is used to mean an each arbitrary blockchain node, and when it distinguishes and refers to blockchain nodes, the alphabet (e.g., a, b, and c) shall be recorded together with the reference numeral “200.” Similarly, a reference numeral “400” is used to mean any client terminal, and when it distinguishes and refers to client terminals, the alphabet (e.g., a, b, and c) shall be recorded together with the reference numeral “400.” In addition, for convenience of description, the transaction accelerative processing device100will be abbreviated as an accelerator.

In the computing system, an accelerator100is a computing device that performs accelerative processing for a transaction based on batch processing. For example, as shown inFIG.2, the accelerator100may generate a batch transaction17by aggregating a plurality of individual transactions11,13, and15requested by the client terminal400, and cooperate with the blockchain network300to batch process the batch transaction17. Details of the batch processing will be described later with reference toFIGS.4to6.

The computing device may be a notebook, a desktop, a laptop, or the like, but are not limited thereto, and may include any kinds of devices equipped with a computing function and a communication function. However, in an environment in which a large amount of transaction processing is required, it may be desirable to implement the accelerator100as a high performance server-class computing device. Reference is made toFIG.17for an example of the computing device.

According to various embodiments of the present disclosure, the accelerator100may adjust a batch size based on monitoring information on a transaction failure event. The batch size may refer to a value or parameter for adjusting the number of individual transactions included in a batch transaction. A detailed description of this embodiment will be described later with reference toFIGS.8to13.

A detailed description of the configuration and operation of the accelerator100will be described in detail with reference toFIG.4and the subsequent drawings.

FIG.1shows that one accelerator100is arranged as an example, but the number and arrangement of the accelerator100may be variously designed and selected according to an embodiment. In other words, in some other embodiments, a plurality of accelerators (e.g.,100aand100bofFIG.3) may be arranged. By doing so, the performance, stability, or availability of a system for processing a transaction may be further improved. Here, the cooperation between the accelerator100and the blockchain node200may be configured in various forms as in the following embodiments.

In some embodiments, each of the plurality of accelerators100is cooperated with all blockchain nodes200, and a transaction requested by the client terminal400may be distributed and processed via the plurality of accelerators100. In other words, the transaction requested by the client terminal400is distributed to any one of the accelerators100, and the accelerator100processes the transaction in cooperation with the entire blockchain node200.

In some other embodiments, as shown inFIG.3, each of the plurality of accelerators100aand100bmay be cooperated with some of the blockchain nodes301or303. For example, a first accelerator100amay be cooperated with a first blockchain node group301, and a second accelerator100bmay be cooperated with a second blockchain node group303. In this embodiment, the accelerators100aand100bcooperate with their own dedicated blockchain node groups301and303, and process the requested transactions21to25in the batch form (e.g.,27and29). In some embodiments, the first blockchain node group301may correspond to a first channel of the blockchain network300, and the second blockchain node group303may correspond to a second channel of the blockchain network300. In other words, a dedicated accelerator (e.g.,100aand100b) may be allocated to each channel of the blockchain network300. Naturally, depending on embodiments, the dedicated accelerator100may be allocated to each blockchain node200.

In some embodiments, particular devices (not shown) may provide a list of accelerators (e.g.,100aand100bofFIG.3) to the client terminal400. The device (not shown) may provide load information on each accelerator (e.g.,100aand100bofFIG.3) together. The load information may include load information (e.g., CPU utilization) of the accelerators (e.g.,100aand100bofFIG.3) and load information on the block chain nodes (e.g.,301and303) cooperated with each accelerator (e.g.,100aand100bofFIG.3). In this embodiment, the client terminal400may select particular accelerators (e.g.,100aand100bofFIG.3) based on the list of the accelerators and the load information, and the requested transaction may be processed via the selected accelerator (e.g.,100aand100bofFIG.3). A function of the device (not shown) may be provided in the accelerator (e.g.,100aand100bofFIG.3), but the technical scope of the present disclosure is not limited thereto.

In the computing system, the blockchain node200is a node constituting the blockchain network300having the P2P structure and operating according to a blockchain protocol. Each blockchain node200may manage a ledger. In some embodiments, the ledger may include a blockchain in which transaction data are recorded and a status database in which status data (e.g., a status key and a corresponding status value) are stored. In addition, the transaction data may include a status record associated with the transaction. The blockchain node200may share various smart contracts and transaction data via the blockchain, and may guarantee the integrity and security of a transaction via a consensus process.

In various embodiments of the present disclosure, the blockchain node200may perform a batch consensus process for batch transactions. Specifically, the blockchain node200may perform a series of consensus processes including executing the smart contract for individual transactions included in a batch transaction, signing an execution result for the smart contract, recording the signature and execution result in a block, propagating it, or the like. A detailed process of the consensus process may vary depending on how the blockchain-based computing system is implemented. Therefore, the technical scope of the present disclosure is not limited to any form of consensus process.

In various embodiments of the present disclosure, the blockchain node200may distinguish execution results of batch transactions by individual transactions (or by status records) via smart contract-based processing, and use the distinguished execution results to update the ledger. A detailed description thereof will be described later with reference toFIGS.5to7.

According to some embodiments of the present disclosure, the plurality of blockchain nodes200may be configured with different types of nodes. In addition, at least some of the different types of blockchain nodes may perform different operations. For example, a first type of blockchain node (e.g., an “endorsing peer” of Hyperledger Fabric) may execute the smart contract and sign on an execution result. A second type of blockchain node (e.g., an “orderer” of Hyperledger Fabric) may perform a main consensus process on the execution result for the smart contract, or perform an operation of recording the execution result in a block and propagating it. Hereinafter, the second type of blockchain node will be referred to as a “consensus node” to distinguish it from the first type of blockchain node. Reference is made toFIG.6for explaining a process for processing a transaction in an environment where a consensus node exists.

The client terminal400is a terminal that receives a service for processing a transaction. The client terminal400may generate a transaction, send the generated transaction to the accelerator100and/or the blockchain network300, and be provided with a processing result for the transaction from the accelerator100and/or the blockchain network300.

In various embodiments of the present disclosure, the client terminal400, the accelerator100, and the blockchain node200may communicate over a network. The network may be implemented as any type of wired/wireless network such as a local area network (LAN), a wide area network (WAN), a mobile radio communication network, a wireless broadband Internet (Wibro), or the like.

The system for processing the transaction based on the blockchain according to some embodiments of the present disclosure has been described with reference toFIGS.1to3. Hereinafter, the configuration and batch processing function of the accelerator100according to some embodiments of the present disclosure will be described in detail with reference toFIGS.4to6.

FIG.4is an exemplary block diagram illustrating the accelerator100in accordance with some embodiments of the present disclosure.

As shown inFIG.4, the accelerator100may include a classifier110, a batch generator130, a handler150, a result provider170, and a batch size adjuster190.FIG.4only illustrates components related to an embodiment of the present disclosure. Therefore, it will be appreciated by those skilled in the art that it may further include other general purpose components in addition to the components illustrated inFIG.4. In addition, each component of the accelerator100illustrated inFIG.4represents functionally divided functional elements, and may be implemented in a form in which at least one component is integrated with each other in an actual physical environment.

Looking into each component, the classifier110classifies individual transactions requested by the client terminal400according to predetermined classification criteria. Here, the predetermined classification criteria may include an identifier of a smart contract, a channel identifier, and/or a type of transaction, importance of a transaction, or the like, but is not limited thereto. The type of transaction may include a write type and a read type. However, the technical scope of the present disclosure is not limited thereto, and the type of transaction may be defined in various ways.

In more detail, the classifier110may classify each transaction by a channel, a smart contract, a type of transaction, and/or importance (e.g., classifying it into a write type transaction using a first smart contract of a first channel), and provide a classification result to the batch generator130.

Next, the batch generator130generates a batch transaction by aggregating a plurality of individual transactions classified by the classifier110. Specifically, the batch generator130inserts each classified individual transaction into a batch queue corresponding to the classification result. For example, the batch generator130may insert a first individual transaction classified as a first classification result into a first batch queue, and insert a second individual transaction classified as a second classification result into a second batch queue. Further, the batch generator130may generate a batch transaction by aggregating individual transactions included a particular batch queue in response to determining that the particular batch queue (e.g., the first batch queue or the second batch queue) satisfies a predetermined batch generation condition.

The batch queue refers to a place for storing a transaction until a batch transaction is generated, and may be understood as a kind of transaction buffer or a transaction pool. As may be seen from a name of a buffer queue, the batch queue may be implemented as a queue-based data structure. However, a scheme for implementing the batch queue may vary, and the technical scope of the present disclosure is not limited to the scheme for implementing the batch queue.

In various embodiments of the present disclosure, the predetermined batch generation condition may include at least one of a condition based on whether a batch timer expires, a batch size (i.e., the number of transactions), a data size of the entire transaction, presence or absence of association between transactions, or the like. Hereinafter, for convenience of understanding, a process for generating a batch transaction according to each batch generation condition will be described in detail.

In a first embodiment, the batch generator130may generate a batch transaction by aggregating individual transactions in a particular batch queue in response to an expiration event of a batch timer. Here, the batch timer may exist for each batch queue, but the scope of the present disclosure is not limited thereto. A timer period of each batch queue may be the same or may be different. For example, a timer period of a batch queue with a high priority may be set relatively short, and a timer period of a batch queue with a low priority may be set relatively long. Thus, a differential transaction processing service may be provided. According to this embodiment, a transaction waiting time due to the batch processing may be limited within a predetermined time (e.g., a batch timer period). Thus, a problem of delaying the processing of some individual transactions due to the batch processing may be alleviated.

In a second embodiment, the batch generator130may generate a batch transaction in response to determining that a data size of the entire transaction included in a particular batch queue is greater than or equal to a threshold value. Here, the data size of the entire transaction may be calculated as a sum of data sizes of the individual transactions, and the data sizes of the individual transactions may refer to, for example, a size of transaction data recorded in a blockchain. However, the technical scope of the present disclosure is not limited thereto. The threshold value may be a predetermined fixed value or a changeable variation value that varies depending on a situation. For example, the threshold value may be a fixed value set based on a maximum size of a block. For another example, the threshold value may be a fixed value or a variation value set based on a priority of a corresponding batch queue. As another example, the threshold value may be a variation value set to a larger value as a load of the batch generator130increases. According to the embodiment, it may be prevented that too much data is included in one batch transaction, thereby decreasing the probability of failing to process a batch transaction.

In a third embodiment, the batch generator130may generate a batch transaction in response to determining that the number of individual transactions included in a particular batch queue satisfies a batch size. Here, the batch size may be variably adjusted by the batch size adjuster190.

]In a fourth embodiment, the batch generator130may generate a batch transaction based on an association between individual transactions. Specifically, the batch generator130determines whether there is an associated transaction of a particular transaction. Here, the associated transaction refers to a transaction in which an association exists with the particular transaction. For example, it may be a transaction (e.g., a transaction causing an MVCC conflict) including an identification key (i.e., a status key) of the same status record as the particular transaction. In other words, transactions that access the same status record as the particular transaction may be determined to be an associated transaction that has an association with the particular transaction. When it is determined that there is the associated transaction, the batch generator130may perform the batch processing in a variety of ways. Specific examples are as follows.

In a 4-1th embodiment, the batch generator130may generate and process a first individual transaction and a second individual transaction in which an association exists as different batch transactions.

In a 4-2th embodiment, the batch generator130may generate a batch transaction based on the remaining individual transactions except for the first transaction and the second transaction in which the association exists, and process the first individual transaction and the second individual transaction individually.

In a 4-3th embodiment, the batch generator130may process a first individual transaction in the batch form and process a second individual transaction individually, among the first individual transaction and the second individual transaction in which the association exists. In other words, the batch generator130may process some of a plurality of individual transactions in which an association exists in the batch form within a range in which a transaction conflict does not occur.

In a 4-4th embodiment, the batch generator130may determine whether a first individual transaction and a second individual transaction in which an association exists may be combined, and generate a third transaction in which the first individual transaction and the second individual transaction are combined in response to determining that they may be combined. Here, when an execution result for the third individual transaction is the same as a result for executing the first individual transaction and the second individual transaction, a method for generating the third individual transaction may be performed in any manner. In addition, the third individual transaction may be processed in the batch form, and may be processed individually.

According to the embodiments described above, the batch processing may be performed within a range in which a collision does not occur in consideration of an association between transactions. Accordingly, the problem that the stability of transaction processing is lowered may be alleviated. In the embodiments described above, for convenience of understanding, it has been described assuming that there is an association between two transactions, but those skilled in the art will readily understand that even if there is an association between three or more transactions, they may be processed in the same or similar manner.

In a fifth embodiment, the batch generator130may generate a batch transaction based on various combinations of the embodiments described above. For example, the batch generator130may generate a batch transaction further using a batch timer as well as a batch size. Specifically, the batch generator100may generate a batch transaction in response to determining that the number of transactions of a particular batch queue is greater than or equal to the batch size. In addition, even when the number of transactions of the particular batch queue is less than the batch size, the batch generator130may generate a batch transaction in response to an expiration event of the batch timer. By doing so, the transaction processing performance may be improved while minimizing a processing delay due to the batch processing.

Next, the handler50batch processes an individual transaction or a batch transaction in cooperation with the blockchain network300. The handler module150may include a transmission handler151and a reception handler153.

The transmission handler151performs an overall transmission process for data such as a batch transaction. Specifically, the transmission handler151may transfer the generated batch transaction to the blockchain network300in response to the batch transaction being generated. In addition, the transmission handler151may further perform operations such as sending an execution result (e.g., endorsement result) of the batch transaction signed by a blockchain node to a consensus node, retrying the batch transaction that has been failed to process, or the like.

The reception handler153performs an overall process for data received from the blockchain network300, such as a processing result for a batch transaction. Specifically, the reception handler153provides the processing result to the result provider170in response to receiving a processing result for an individual transaction or a batch transaction. In addition, the reception handler153may further perform operations such as receiving a processing result for the signed batch transaction from the blockchain network300and transferring it to the transmission handler151.

For further description of the handler150, refer to the description ofFIGS.5to6.

Next, the result provider170receives the processing result for the individual transaction or the batch transaction from the reception handler153, and provides the processing result to the client terminal400. More specifically, the result provider170may divide the processing result for the batch transaction into individual transaction units, and provide the divided processing result to each client terminal400. For example, the result provider170may generate a reference table including an identifier of the client terminal400, a transaction identifier, an address of the client terminal400, or the like, and provide the processing result for the individual transaction to the corresponding client terminal400using the reference table. However, the technical scope of the present disclosure is not limited thereto.

Next, the batch size adjuster190adjusts a batch size based on whether the blockchain network300is in a congested state. In addition, the batch size adjuster190may activate or deactivate a batch processing function. Here, deactivation of the batch processing function may be performed by setting the batch size to “1,” but it may be done in any other way.

For example, the accelerator100may increase the batch size or activate the batch processing function in response to determining that the blockchain network300is in the congested state. In the opposite case, the batch size adjuster190may reduce the batch size or deactivate the batch processing function.

Each component110to190illustrated inFIG.4may refer to software or hardware such as a field programmable gate array (FPGA) or an application-specific integrated circuit (ASIC). However, the components are not limited to software or hardware, and may be configured to be in an addressable storage medium, or may be configured to execute one or more processors. Functions provided in the components may be implemented by more subdivided components, or may be implemented as one component that performs a specific function by combining a plurality of components.

Meanwhile, according to some embodiments of the present disclosure, the batch processing function of the accelerator100may be implemented on the client terminal400side. For example, when a particular client terminal400generates a plurality of individual transactions, a batch transaction may be generated by aggregating the plurality of individual blockchain transactions directly. As another example, when the particular client terminal400receives a plurality of individual transactions from another client terminal, a batch transaction may be generated by aggregating the plurality of individual transactions.

Hereinafter, for convenience of understanding, a process for processing a write type transaction via the accelerator100will be described with reference toFIGS.5and6.FIGS.5to7show an example in which the batch size is “3.”

FIG.5illustrates a process in which a write type transaction is processed in accordance with some embodiments of the present disclosure.

As shown inFIG.5, the accelerator100may generate a batch transaction30by aggregating a plurality of write type transactions Txw1, Txw2, and Txw3({circle around (1)} and {circle around (2)}). In detail, depending on a classification result for the classifier110, the batch generator130may insert the write type transactions Txw1, Txw2, and Txw3into the same batch queue, and generate the batch transaction30in response to determining that the number of the write type transactions Txw1, Txw2, and Txw3inserted in the batch queue satisfies the batch size.

Next, the accelerator100may request the blockchain network300to process the batch transaction30({circle around (3)}). Then, the blockchain nodes200aand200bconstituting the blockchain network300may perform the consensus process for the batch transaction30and record an execution result for the batch transaction30on ledgers230aand230b.

As shown inFIG.5, each blockchain node230aand230bmay include processing modules210aand210bfor processing the batch transaction30. The processing modules210aand210bmay use a smart contract to divide the execution result for the batch transaction30by transactions (or by status records), and update the ledger (e.g., a status DB) based on the divided execution results. Here, the execution result for the batch transaction30may include a signature of a blockchain node, an identifier of an individual transaction, identification keys A, B, and C and values1,2, and3of status record, or the like. Accordingly, the processing module210aor210bmay divide the execution result for the batch transaction30by transaction (or by statuses) using the identification keys A, B, and C and/or the identifier of the transaction.

Next, the accelerator100may receive the processing result for the batch transaction30from the blockchain network300and provide the received processing result to the corresponding client terminal400({circle around (5)} and {circle around (6)}).

Here, when the processing result indicates a failure, the handler150of the accelerator100may retry the processing for the batch transaction30.

FIG.6illustrates a process in which a write type batch transaction is processed in a blockchain-based computing system in which a separate consensus node exists such as Hyperledger Fabric.

As shown inFIG.6, the accelerator100may generate a batch transaction40and transmit the generated batch transaction40to a blockchain node201({circle around (2)} and {circle around (3)}). In addition, the accelerator100may receive an execution result for the batch transaction40from the blockchain node201({circle around (4)}-1). As described above, the execution result may include a signature of the blockchain node201for the batch transaction40, the identification keys A, B, and C and values1,2, and3of the status record, or the like.

Next, the accelerator100may submit the received execution result to a separate consensus node205({circle around (4)}-2). Then, the consensus node205may verify the batch transaction40based on the execution result for the blockchain node201, record the execution result to a new block, and propagate the new block onto the blockchain network300({circle around (4)}-3 and {circle around (4)}-4). Finally, each blockchain node201and203receiving the new block may divide the execution result for the batch transaction40by transactions (or by status records) via a processing module211, and update a ledger based on the divided execution result ({circle around (4)}-5).

As described with reference toFIGS.5and6, when the transaction is processed via the accelerator100, a plurality of transactions may be batch processed via the batch processing. In other words, the consensus process is not performed on an individual transaction basis, but a plurality of transactions may be batch processed by performing the consensus process on a batch transaction basis. Therefore, the performance of processing a transaction may be dramatically improved. In an ideal environment, the performance of processing the transaction would be improved in proportion to a batch size. Particularly, the batch processing described above is performed by the separate accelerator100and therefore does not require modification of an internal logic of a blockchain network (or platform). Therefore, the technical teaching described above may provide excellent portability and may be widely used in various blockchain networks (or platforms).

So far, the configuration and batch processing functions of the accelerator100according to some embodiments of the present disclosure have been described with reference toFIGS.5and6. As described above, the performance of the system may be greatly improved when the batch processing is performed. However, due to the batch processing, a problem may occur when performing a query with a transaction identifier. Hereinafter, a problem for a query due to the batch processing and the technical teaching of the present disclosure to solve the problem for the query will be described in detail.

FIGS.7and8are exemplary diagrams illustrating a query related problem that may occur due to the batch processing.FIG.7illustrates that a plurality of individual transactions Tx1and Tx2requested by the client terminals400aand400bare processed by a batch transaction51via the accelerator100.

As shown inFIG.7, once the batch transaction51has completed processing, a status record63associated with the batch transaction51may be recorded in a particular block61of a blockchain60. Naturally, in addition to the status record63, various transaction data may be recorded together in the particular block61. However, for clarity of the specification, the focus will be on the status record63to continue the description.

The status record63associated with the batch transaction51may refer to status data (i.e., a set of status keys and values) in which a processing result (or execution result) of a batch transaction is reflected. Hereinafter, for convenience of description, the status record63associated with the batch transaction51will be abbreviated as a “batch record63” and a status record associated with an individual transaction will be abbreviated as an “individual record.” Subsequently, the description will be continued with reference toFIG.7.

In response to the processing, an identifier53of the batch transaction51may be provided to the client terminals400aand400brather than identifiers of the individual transactions Tx1and Tx2.

In such a case, the query related problem may occur when the client terminal400aor400brequests a query with the identifier53of the batch transaction51. For example, assume that the client terminal400bhas requested a query with the identifier53of the batch transaction51, as shown inFIG.8. Then, the blockchain network300provide a batch record65as a query result, and the client terminal400bis provided with a query result which also includes a status record (e.g., {A,1}) irrelevant to the individual transaction Tx2requested by the client terminal400bitself. In other word, a problem arises that a transaction identifier cannot accurately query a status record recorded in a blockchain. Hereinafter, various embodiments of the present disclosure for solving the problem will be described.

Each step of the methods according to various embodiments of the present disclosure, which will be described below, may be performed by a computing device. In other words, each step of the methods may be implemented with one or more instructions executed by a processor of a computing device. For the convenience of understanding, the description will be continued on the assumption that the methods are performed by the blockchain-based computing system illustrated inFIG.1. For example, first steps of the methods may be performed by the accelerator100and second steps may be performed by the blockchain network300. Alternatively, all steps of the methods may be performed by the accelerator100. Hereinafter, it may be understood that when a subject of each operation is omitted in the description of this embodiment, it may be performed by the illustrated device (e.g.,100and300). In addition, the methods may change an order of performing each operation within a range in which an order of execution may be logically changed as necessary.

Hereinafter, a method for managing a transaction according to some embodiments of the present disclosure will be described with reference toFIGS.9to12.

The method for managing the transaction may include a transaction processing process for processing a transaction based on batch processing and a query process for querying a status record. First, the transaction processing process will be described with reference toFIGS.9to11, and then the query process will be described.

FIG.9is an exemplary flowchart illustrating a transaction processing process according to some embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure. Naturally, some steps may be added or deleted as necessary.

As shown inFIG.9, the transaction processing process may begin at step S100of receiving a request for processing an individual transaction from the client terminal400. For example, a request for processing a plurality of individual transactions may be received from one or more client terminals400.

In step S120, a batch transaction is generated by aggregating the plurality of individual transactions. For details of the present step, refer to the description ofFIGS.4to6.

In step S140, the batch transaction is processed via the blockchain network300. In the process, index information on an individual transaction may be generated, and the index information may be determined based on a location where the individual record exists in a batch record recorded in a blockchain. For example, the index information on a first individual transaction may indicate where a first status record for the first individual transaction is located in a batch record. A method for determining and generating the index information will be described later with reference toFIGS.10and11.

In step S160, an identifier of the batch transaction and index information on the requested individual transaction are provided to the corresponding client terminal400. The identifier of the batch transaction and the index information may be used by the client terminal400to query its individual record, which will be described later with reference toFIG.12.

For convenience of understanding, the method for managing the transaction described above will be further described with reference to an example illustrated inFIG.10.FIG.10illustrates that two individual transactions Tx1and Tx2requested by the client terminals400aand400bare processed by a batch transaction75via the accelerator100.

As shown inFIG.10, a batch record for the batch transaction75will include a first individual record for a first individual transaction Tx1and a second individual record for a second individual transaction Tx2.

In such a case, the first individual record and the second individual record are aggregated into one batch record83, and index information may be determined in the aggregation process. For example, as shown inFIG.11, the first individual record91and the second individual record93may be aggregated into a batch record97by a smart contract95uploaded to the blockchain network300. Specifically, each status record91,93, and97may be composed of a key field and a value field, in which the first individual record91and the second individual record93may be inserted in the form of a list in the value field of the batch record97. In addition, index information on an individual transaction may be determined based on a location where each individual record is inserted in the value field of the batch record97. For example, index information on the first individual transaction Tx1may be determined as “1,” and index information on the second individual transaction Tx2may be determined as “2.”

In addition, certain additional information (e.g., BATCH) may be inserted into the key field of the batch record97to indicate that the batch record97is associated with a batch transaction. The additional information may determine which status record is associated with the batch transaction.

The smart contract95may be called by the accelerator100and executed on the blockchain network300. However, it may be implemented in other ways, and thus, the technical scope of the present disclosure is not limited thereto.

For reference, a status record associated with a transaction (e.g.,91,93, or the like ofFIG.11) may correspond to a read/write set in Hyperledger Fabric, and a smart contract may be named as a chaincode in the art.

It will be described with reference toFIG.10again.

After the batch record83generated via aggregating is recorded to a particular block81of a blockchain80, the blockchain network300may provide the accelerator100with an identifier (e.g., B-Tx1ID) of the batch transaction and index information77on the individual transaction. In addition, the accelerator100may provide the client terminal400aor400bwith the identifier (e.g., B-Tx1ID) of the batch transaction and the index information77on the requested individual transaction. For example, index information71(e.g., 1) on the first individual transaction Tx1may be provided to the first client terminal400a, and index information73(e.g., 2) on the second individual transaction Tx2is provided to the second client terminal400bmay be provided.

The client terminals400aand400bmay accurately query for an individual record to be queried using the identifier of the batch transaction and the index information71and73on the individual transactions Tx1and Tx2. Hereinafter, the query process will be described with reference toFIG.12.

FIG.12is an exemplary flowchart illustrating a query process according to some embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure. Naturally, some steps may be added or deleted as necessary.

As shown inFIG.12, the query process may be started in step S200of receiving a query request from the client terminal400. For example, the accelerator100may receive a query request including an identifier of a batch transaction and index information on an individual transaction from the client terminal400.

In step S220, a blockchain is queried to obtain a status record (i.e., an individual record) corresponding to the identifier and the index information. For example, when the accelerator100forwards the query request to the blockchain network300, the blockchain network300may query the blockchain with the identifier to determine a batch record matching the identifier. In addition, the accelerator100may extract an individual record corresponding to the index information from a value field of the batch record and provide it to the accelerator100. In another example, the accelerator100may extract the individual record corresponding to the index information from the value field of the batch record.

In step S240, the individual record corresponding to the index information may be provided to the client terminal400. For example, the accelerator100may provide the individual record to the client terminal400.

So far, the method for managing the transaction according to some embodiments of the present disclosure has been described with reference toFIGS.9to12. According to the description above, the problem that the individual record could not be queried correctly due to the batch processing may be solved, so that the convenience of a query function may be improved.

Meanwhile, in some other embodiments of the present disclosure, a batch record may be recorded in a blockchain in a compressed form for the storage efficiency of the blockchain. In such a case, a compressed batch record may be obtained by querying a blockchain with an identifier of a batch transaction, and an individual record corresponding to index information may be determined by decompressing. In addition, the individual record may be provided as a query result.

In addition, according to some other embodiments of the present disclosure, an individual record of each individual transaction included in a batch transaction may additionally be stored in a status DB. Here, a new status key may be assigned to each individual record stored in the status DB. For convenience of understanding, this embodiment will be described further with reference to the example shown inFIG.13.

FIG.13illustrates two individual records243and244stored in a status DB242in accordance with some embodiments of the present disclosure.

As shown inFIG.13, a ledger240may include a separate status DB242in addition to a blockchain241. To store status records, the status DB242may be implemented as a DB with a key and value format.

In this embodiment, the individual records243and244are stored in the status DB242as they are in order to provide a query function for status keys (e.g., A and B). In addition, additional individual records245and246may be further stored in status DB242to further provide a query function for batch transaction identifiers. Moreover, new status keys (e.g., Key1and Key2) may be generated and assigned to the additional individual records (245and246).

The specific way of generating the new status keys (e.g., Key1and Key2) may vary depending on embodiments.

In some embodiments, status keys of the additional individual records245and246may be generated based on the combination of the identifier of the batch transaction and the index information on the individual transaction. For example, a status key of a first additional individual record245may be generated as “B-TxID.0” by the combination of an identifier (e.g., B-TxID) and index information (e.g., 0) of a batch transaction. Here, the index information may refer to a location where an individual record is inserted in a batch record, may refer to a location in the status DB242, and may be defined and designed in various ways. Therefore, the technical scope of the present disclosure is not limited by the manner of designating the index information.

In some other embodiments, as shown inFIG.13, additional information (e.g., BATCH) indicative of association with a batch transaction may be further combined to generate the status key of the additional individual records245and246. For example, the status key of the first additional individual record245may be generated as “BATCH.B-TxID.0” by further combining the additional information (e.g., BATCH).

As shown inFIG.13, when the additional individual records245and246are stored in the status DB242, a query function for the individual records may be provided via the status DB242. In other words, when the client terminal400is provided with the identifier of a batch transaction and the index information on the individual transaction as a result for processing the transaction, the client terminal400may query the individual record with the identifier and the index information.

For example, when a query request including an identifier of a batch transaction and index information on an individual transaction is received, a status record (e.g.,245,246) corresponding to the identifier of the batch transaction and the index information may be obtained from the status DB242. The query for the status DB242may be performed by generating a status key in the manner described above and querying the status DB242with the generated status key.

Meanwhile, according to some other embodiments of the present disclosure, each record of individual transactions included in a batch transaction may be stored in a separate DB (e.g., RDB) instead of the status DB. For example, each individual record may be stored in match with an identifier of a batch transaction and index information on an individual transaction. In this case, a query function for an individual record may be provided via the separate DB. For example, when a query request including an identifier of a batch transaction and index information on an individual transaction is received from the client terminal400, it queries and provide an individual record corresponding to the identifier of the batch transaction and the index information via the separate DB thereby enabling to provide the query function for the individual record.

Hereinafter, a method for managing a transaction according to some embodiments of the present disclosure will be described with reference toFIGS.14to16. In the following description, for the sake of clarity, the description of overlapping contents with the foregoing embodiments will be omitted.

In this embodiment, a query function for an individual record may be provided by using a transaction code obtained from the client terminal400without using index information for an individual transaction. The transaction code may be understood as a kind of secret code managed by a client side. The method for managing the transaction may also include a transaction processing process and a query process. Hereinafter, each process will be described.

FIG.14is an exemplary flowchart illustrating a transaction processing process according to some embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure. Naturally, some steps may be added or deleted as necessary.

As shown inFIG.14, the transaction processing process may be started in step S300of receiving a request for processing the individual transaction together with a transaction code of the individual transaction from the client terminal400.

In step S320, a batch transaction is generated by aggregating a plurality of individual transactions.

In step S340, the batch transaction is processed via the blockchain network300, and a batch record which is a processing result for the batch transaction is recorded in a blockchain. In this step, when the batch record is recorded in the blockchain, each individual record included in the batch record may be encrypted by the transaction code. For convenience of understanding, the following description will be further provided with reference to the example shown inFIG.15.

As shown inFIG.15, when transaction codes251and253are received from each of the client terminals400aand400b, among a batch records263associated with a batch transaction255, an individual record (e.g., {A,1}) associated with a first individual transaction Tx1is encrypted by a first transaction code251, and a second individual record (e.g., {B,2}) associated with a second individual transaction Tx2may be encrypted by a second transaction code253. The encrypted status record263may be recorded in a particular block261of a blockchain260.

The encryption may be performed in any manner as long as decoding is possible, and may include any transformation scheme (e.g., encoding, coding, or the like) that changes original data. The encryption may be executed by a smart contract, but the technical scope of the present disclosure is not limited thereto.

In some embodiments of the present disclosure, the transaction code may not be stored in the blockchain network300or the accelerator100. In other words, after encrypting each individual record with the transaction code, the transaction code may be discarded. Therefore, the security of a status record may be greatly improved.

It will be described with reference toFIG.14again.

In step S360, the client terminal400is provided with an identifier of a batch transaction. Then, the client terminal400may query an individual record using the identifier and its transaction code. Hereinafter, the query process will be described with reference toFIG.16.

FIG.16is an exemplary flowchart illustrating a query process according to some other embodiments of the present disclosure. However, this is only a preferred embodiment for achieving the object of the present disclosure. Naturally, some steps may be added or deleted as necessary.

As shown inFIG.16, in step S400, the query process starts with step S400of receiving a query request including an identifier of a batch transaction and a transaction code of an individual transaction from the client terminal400. For example, the accelerator100may receive the query request.

In step S420, a batch record corresponding to the identifier of the batch transaction is obtained via the blockchain network300. The batch record may be obtained by querying the blockchain by the identifier. The batch record may include a plurality of individual records encrypted with different transaction codes.

In step S440, a status record decrypted by the transaction code of step S400among the plurality of status records is provided to the client terminal400as a query result. The determination as to whether or not to be decrypted may be performed in any way. In addition, the determination may be performed by a smart contract or may be performed by the accelerator100.

On the other hand, in some other embodiments, the query may be performed using only an identifier of a batch transaction. For example, the accelerator100may receive a query request including only an identifier of a batch transaction from the client terminal400. Then, the accelerator100may provide a batch record queried by the identifier to the client terminal400in cooperation with the blockchain network300. In this embodiment, the client terminal400may directly determine an individual record to be decrypted by its transaction code among a plurality of individual records included in the batch record. In other words, the determination as to whether or not to be decrypted may be performed by the client terminal400.

So far, the method for managing the transaction according to some embodiments of the present disclosure has been described with reference toFIGS.14to16. According to the method as described above, a query function for an individual record may be provided using a transaction code, and the security of a status record may be greatly improved via an encryption process.

Hereinafter, an exemplary computing device500that may implement an apparatus/system (e.g., accelerator100) according to various embodiments of the present disclosure will be described with reference toFIG.17.

FIG.17is a hardware diagram illustrating a computing device500.

As shown inFIG.17, the computing device500may include a one or more processors510, a bus550, a communication interface570, a memory530to load a computer program591executed by the processor510, and a storage590to store the computer program591. However,FIG.17only illustrates components related to an embodiment of the present disclosure. Therefore, it may be understood by those skilled in the art that the present disclosure may further include other general purpose components in addition to the components illustrated inFIG.17.

The processor510controls the overall operation of each component of the computing device500. The processor510may be configured to include a central processing unit (CPU), a microprocessor unit (MPU), a micro controller unit (MCU), a graphics processing unit (GPU), or any type of processor well known in the art. In addition, the processor510may perform an operation on at least one application or program for executing a method/operation according to various embodiments of the present disclosure. The computing device500may have one or more processors.

The memory530stores various data, commands, and/or information. The memory530may load one or more programs591from the storage590to execute methods/operations according to various embodiments of the present disclosure. For example, when the computer program591is loaded into the memory530, a logic (or a module) as shown inFIG.4may be implemented on the memory530. An example of the memory530may be a RAM, but it is not limited thereto.

The bus550provides communication between components of the computing device500. The bus550may be implemented as various types of buses such as an address bus, a data bus, a control bus, or the like.

The communication interface570supports wired and wireless Internet communication of the computing device500. The communication interface570may also support various communication manners other than Internet communication. To this end, the communication interface570may be configured to include a communication module well known in the art.

The storage590may non-temporarily store the one or more computer programs591. The storage590may be configured to include a non-volatile memory such as a read only memory (ROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory, a hard disk, a removable disk, or any form of computer readable recording medium well known in the art to which the present disclosure belongs.

The computer program591may include one or more instructions on which methods/operations according to various embodiments of the present disclosure are implemented. Once the computer program591is loaded into the memory530, the processor510may the perform methods/operations according to various embodiments of the present disclosure by executing the one or more instructions.

For example, the computer program591may include instructions to perform operations of receiving a request for processing a first individual transaction from the client terminal400, generating a batch transaction by aggregating a plurality of individual transactions including the first individual transaction, processing the generated batch transaction via the blockchain network300such that a status record associated with the batch transaction is recorded in a blockchain, and providing an identifier of the batch transaction and index information on the first individual transaction to the client terminal400. In such a case, the accelerator100or the blockchain-based computing system in accordance with some embodiments of the present disclosure may be implemented via the computing device500.

As another example the computer program591may include instructions to perform operations of receiving a request for processing a first individual transaction together with a transaction code for the first individual transaction from the client terminal400, generating a batch transaction by aggregating a plurality of individual transactions including the first individual transaction, processing the generated batch transaction via the blockchain network300to record a plurality of status records associated with the batch transaction in a blockchain, and providing an identifier of the batch transaction to the client terminal400. In such a case, the accelerator100or the blockchain-based computing system in accordance with some other embodiments of the present disclosure may be implemented via the computing device500.

The concepts of the invention described above can be embodied as computer-readable code on a computer-readable medium. The computer-readable medium may be, for example, a removable recording medium (a CD, a DVD, a Blu-ray disc, a USB storage device, or a removable hard disc) or a fixed recording medium (a ROM, a RAM, or a computer-embedded hard disc). The computer program recorded on the computer-readable recording medium may be transmitted to another computing apparatus via a network such as the Internet and installed in the computing apparatus. Hence, the computer program can be used in the computing apparatus.

Although operations are shown in a specific order in the drawings, it should not be understood that desired results can be obtained when the operations must be performed in the specific order or sequential order or when all of the operations must be performed. In certain situations, multitasking and parallel processing may be advantageous. According to the above-described embodiments, it should not be understood that the separation of various configurations is necessarily required, and it should be understood that the described program components and systems may generally be integrated together into a single software product or be packaged into multiple software products.