CN112651738A - Information processing apparatus, information processing method, and computer program - Google Patents

Information processing apparatus, information processing method, and computer program Download PDF

Info

Publication number
CN112651738A
CN112651738A CN201910967627.7A CN201910967627A CN112651738A CN 112651738 A CN112651738 A CN 112651738A CN 201910967627 A CN201910967627 A CN 201910967627A CN 112651738 A CN112651738 A CN 112651738A
Authority
CN
China
Prior art keywords
transaction
conflict
information processing
mode
blockchain
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.)
Pending
Application number
CN201910967627.7A
Other languages
Chinese (zh)
Inventor
周恩策
皮冰锋
孙俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to CN201910967627.7A priority Critical patent/CN112651738A/en
Publication of CN112651738A publication Critical patent/CN112651738A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Computer Security & Cryptography (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The present disclosure relates to an information processing apparatus and an information processing method for analyzing conflicting transactions in a blockchain and optimizing the blockchain according to the analysis result. An information processing apparatus according to the present disclosure includes: a determining unit configured to determine a source transaction of a conflict transaction occurring in the blockchain; a determination unit configured to determine a conflict mode of the conflict transaction according to the source transaction determined by the determination unit; and an optimization unit configured to determine an optimization scheme for eliminating the conflict transaction according to the conflict mode determined by the determination unit. By the information processing device and the information processing method, the subsequent conflict transaction in the block chain can be avoided, and therefore execution efficiency and effectiveness of the transaction of the block chain are improved.

Description

Information processing apparatus, information processing method, and computer program
Technical Field
The present disclosure relates generally to the field of information processing, and more particularly, to an information processing apparatus and an information processing method for analyzing conflicting transactions in a blockchain and optimizing the blockchain according to the analysis result.
Background
The block chain technique originates in bitcoins. A blockchain may be viewed as a distributed database that operates in a decentralized manner. The blockchain technology realizes decentralized point-to-point transaction, coordination and cooperation by means of data encryption, time stamping, distributed consensus, economic incentive and the like under the condition that transaction nodes in a distributed system do not need to trust each other, so that the problems of high cost, low efficiency, unsafe data storage and the like of a centralized mechanism are solved.
With the development and popularization of bitcoin in recent years, the blockchain has been widely applied to various fields such as finance, economy, science and technology, even politics, and the like as a new form of universal distributed underlying architecture.
However, during transactions at the nodes of the blockchain, since there may be concurrent transactions, conflicting transactions may result. Specifically, a conflict transaction refers to a concurrent operation performed on the same block in the block chain during a concurrent execution process by different transactions. For example, two transactions that are concurrent operate on the same tile, where one transaction modifies the data of the tile, resulting in a change to the data of the tile, and the changed data is registered to the blockchain (accounting). During the process, if another transaction also operates on the block to modify the data of the block, the data of the block is inconsistent when the data of the block is verified by the other transaction, and the other transaction is determined to be a conflicting transaction.
When blockchains are applied in high system Throughput (TPS) applications, conflicting transactions may cause numerous transactions to fail, especially if there are frequent transactions. However, no technique exists in the prior art that is capable of determining the source and pattern of conflicting transactions and optimizing for conflicting transactions.
Therefore, there is a need for an information processing technique that is capable of determining the transaction origin (also referred to as "source transaction") and the collision pattern of the conflict transactions in the blockchain, and optimizing the blockchain according to the source transaction and the collision pattern of the conflict transactions.
Disclosure of Invention
To solve the problems in the prior art, the present disclosure proposes an information processing technique for analyzing conflicting transactions in a blockchain and optimizing the blockchain according to the analysis result. The information processing technique first determines, for each conflicting transaction on a blockchain ledger, a source transaction for the conflicting transaction by comparing a read-write set of the transaction with a read-write set of a prior transaction on the ledger. Subsequently, the conflict transactions are clustered into conflict transaction clusters according to the source transactions, and the conflict mode of the conflict transaction cluster is determined by analyzing the call functions and the affected keys of all transactions in the conflict transaction cluster. And then, aiming at the determined conflict mode, giving a corresponding optimization scheme so as to avoid the generation of subsequent conflict transactions.
A brief summary of the disclosure is provided below in order to provide a basic understanding of some aspects of the disclosure. It should be understood that this summary is not an exhaustive overview of the disclosure. It is not intended to identify key or critical elements of the disclosure or to delineate the scope of the disclosure. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is discussed later.
An object of the present disclosure is to provide an information processing apparatus and an information processing method for analyzing conflicting transactions in a blockchain and optimizing the blockchain according to the analysis result.
In order to achieve the object of the present disclosure, there is provided an information processing apparatus including: a determining unit configured to determine a source transaction of a conflict transaction occurring in the blockchain; a determination unit configured to determine a conflict mode of the conflict transaction according to the source transaction determined by the determination unit; and an optimization unit configured to determine an optimization scheme for eliminating the conflict transaction according to the conflict mode determined by the determination unit.
According to another aspect of the present disclosure, there is provided an information processing method including the steps of: a determining step, which is used for determining the source transaction of the conflict transaction occurring in the block chain; a determining step for determining a conflict mode for the conflicting transaction based on the determined source transaction; and an optimization step for determining an optimization scheme for eliminating the conflict transaction according to the determined conflict mode.
According to another aspect of the present disclosure, there is provided a computer program capable of implementing the information processing method described above. Furthermore, a computer program product in the form of at least a computer-readable medium is provided, on which a computer program code for implementing the above-described information processing method is recorded.
By the information processing device and the information processing method, the subsequent conflict transaction in the block chain can be avoided, and therefore execution efficiency and effectiveness of the transaction of the block chain are improved.
Drawings
The above and other objects, features and advantages of the present disclosure will be more readily understood by reference to the following description of embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:
fig. 1 is a block diagram showing an information processing apparatus according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a source transaction determining a conflict transaction from a read-write set of transactions;
FIG. 3 is a schematic diagram illustrating a source transaction determining a conflict transaction from a read-write set of transactions;
FIG. 4 is a schematic diagram illustrating a determination unit forming a conflicting transaction cluster based on a source transaction in accordance with an embodiment of the present disclosure;
FIG. 5 is an exemplary diagram illustrating a determination unit determining a conflict pattern by analyzing a conflict transaction cluster according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram showing a first collision mode, a second collision mode, and a third collision mode;
FIG. 7 is an exemplary diagram illustrating an optimization performed in the case where it is determined that the conflict mode is the first conflict mode;
FIG. 8 is an exemplary diagram illustrating an optimization performed in the case where it is determined that the conflict mode is the second conflict mode;
fig. 9 is an exemplary diagram showing optimization performed in the case where it is determined that the conflict mode is the third conflict mode;
fig. 10 is a flowchart illustrating an information processing method according to an embodiment of the present disclosure; and
fig. 11 is a block diagram showing a general-purpose machine that can be used to implement the information processing method and the information processing apparatus according to the embodiment of the present disclosure.
Detailed Description
Hereinafter, some embodiments of the present disclosure will be described in detail with reference to the accompanying illustrative drawings. When elements of the drawings are denoted by reference numerals, the same elements will be denoted by the same reference numerals although the same elements are shown in different drawings. Further, in the following description of the present disclosure, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present disclosure unclear.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," and "having," when used in this specification, are intended to specify the presence of stated features, entities, operations, and/or components, but do not preclude the presence or addition of one or more other features, entities, operations, and/or components.
Unless otherwise defined, all terms used herein including technical and scientific terms have the same meaning as commonly understood by one of ordinary skill in the art to which the inventive concept belongs. 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 will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. The present disclosure may be practiced without some or all of these specific details. In other instances, to avoid obscuring the disclosure with unnecessary detail, only components that are germane to the aspects in accordance with the disclosure are shown in the drawings, while other details that are not germane to the disclosure are omitted.
The core idea of the technology of the present disclosure is to analyze conflict transactions that have occurred in the blockchain to determine the reason for the occurrence of the conflict transactions, and optimize the structure or rules of the blockchain according to the determined reason, so as to avoid subsequent reoccurrence of the conflict transactions.
Hereinafter, an information processing apparatus and an information processing method for analyzing conflicting transactions in a blockchain and optimizing the blockchain according to the analysis result according to an embodiment of the present disclosure will be described in detail with reference to the accompanying drawings.
Fig. 1 is a block diagram illustrating an information processing apparatus 100 according to an embodiment of the present disclosure.
According to an embodiment of the present disclosure, the information processing apparatus 100 may analyze conflicting transactions in a blockchain and optimize the blockchain according to the analysis result.
As shown in fig. 1, according to an embodiment of the present disclosure, the information processing apparatus 100 may include a determination unit 101, a determination unit 102, and an optimization unit 103.
The determining unit 101 may determine the source transaction of the conflict transaction occurring in the blockchain.
According to an embodiment of the present disclosure, the determining unit 101 may analyze data of each transaction prior to the conflict transaction, thereby determining a source transaction of the conflict transaction, and may construct a conflict transaction cluster including the source transaction and the conflict transaction according to the determined source transaction.
Typically, the blockchain ledger marks out the transaction that was invalidated due to the conflict using a specific identification to indicate that the transaction is a conflicting transaction. Therefore, the determination unit 101 can easily determine the conflicting transaction in the blockchain ledger.
The determination unit 101 may then analyze the conflict transaction and the data of the transaction related to the conflict transaction. According to embodiments of the present disclosure, data for a transaction may include a read-write set of the transaction.
Specifically, the determination unit 101 may first extract the read-write set of the conflict transaction. The read-write set of transactions of the blockchain is used to verify the validity of the transactions. The read-write set typically includes a key, a value, and a version number, and by comparing the version number with the version number of the world state, it can be determined whether the verification of the transaction is valid, i.e., whether the transaction is a conflicting transaction. In this regard, since the read-write sets of transactions for blockchains are well known to those skilled in the art, further description of the details of the read-write sets of transactions for blockchains is omitted herein for the sake of brevity.
Subsequently, the determining unit 101 may analyze each transaction preceding the conflict transaction in a reverse order according to the read-write set of the conflict transaction until determining the source transaction of the conflict transaction. By analyzing the conflict transaction and the read-write sets of each transaction prior to the conflict transaction, the source transaction of the conflict transaction can be determined.
Fig. 2 and 3 are schematic diagrams illustrating determination of a source transaction of a conflict transaction from a read-write set of transactions, where fig. 2 illustrates a case where a source transaction of a conflict transaction is determined from a read set of transactions, and fig. 3 illustrates a case where a source transaction of a conflict transaction is determined from a read set of transactions.
According to embodiments of the present disclosure, the source transaction of the conflicting transaction may be determined according to the following rules (1) and (2):
(1) as shown in fig. 2, by way of example and not limitation, the transaction Tx3 in the blockchain is systematically marked as a conflict transaction, so the read-write set of the conflict transaction Tx3 and its preceding transactions Tx2, Tx1 are analyzed in reverse order until the source transaction Tx1 of the conflict transaction Tx3 is determined.
Specifically, some transaction prior to the conflicting transaction Tx3 (e.g., transaction Tx2) reads the Key a of transaction Tx1, modifies the value of the Key (i.e., writes the Key value), updates the version number accordingly (e.g., from version number V1 to version number V2), and registers the transaction into the blockchain ledger (i.e., accounting). In addition, the conflicting transaction Tx3, which is a concurrent transaction of transaction Tx2, also reads the Key a of transaction Tx1, modifies the value of the Key, and attempts to update the version number to register the transaction into the blockchain ledger. However, since the version number of the Key a has been updated to V2 at this time, the conflicting transaction Tx3 fails to be identified as an invalid transaction through verification of the blockchain ledger. Through the above analysis process, it may be determined that the source transaction of the conflict transaction Tx3 is Tx 1.
Rule (1) can be generalized as a preceding transaction (concurrent transaction) of a conflict transaction reads a key with the same version number and updates the value of the key, resulting in a conflict in the writing of the value of the key. From this, the source transaction of the conflict transaction may be determined.
(2) As shown in fig. 3, by way of example and not limitation, the transaction Tx3 in the blockchain is systematically marked as a conflict transaction, so the read-write set of the conflict transaction Tx3 and its preceding transactions Tx2, Tx1 are analyzed in reverse order until the source transaction Tx1 of the conflict transaction Tx3 is determined.
If a source transaction that conforms to rule (1) cannot be found, the key values in the write set of conflict transaction Tx3 may be compared to the key values in the write sets of preamble transactions Tx1, Tx 2. At this time, if there is a transaction Tx1 in which the same key value is updated, the transaction Tx1 may be determined as the source transaction of the conflict transaction Tx 3.
Rule (2) is based on the idea that whenever a preamble transaction writes a key, the version number of the key must change.
Rule (2) can be generalized to a preceding transaction (concurrent transaction) of a conflicting transaction to perform a write operation on the same key, resulting in a conflict of transactions. From this, the source transaction of the conflict transaction may be determined.
Based on the above rules (1) and (2), the source transaction that is marked by the blockchain ledger as a conflicting transaction may be determined.
According to an embodiment of the present disclosure, for each determined source transaction, the determining unit 101 may cluster the source transaction and all conflict transactions caused thereby together to form a conflict transaction cluster, thereby facilitating subsequent processing.
According to embodiments of the present disclosure, a cluster of conflict transactions may include one source transaction and one or more conflict transactions.
Fig. 4 is a schematic diagram illustrating the determination unit 101 forming a conflict transaction cluster based on source transactions according to an embodiment of the present disclosure.
As shown in fig. 4, for example, the determination unit 101 determines two source transactions Tx1 and Tx2 and conflict transactions Tx3, Tx4, Tx5, Tx6, and Tx7 caused by them. Accordingly, the determination unit 101 clusters the source transaction Tx1 and its conflict transactions Tx3, Tx6 and Tx7 and the source transaction Tx2 and its conflict transactions Tx4 and Tx5 into two conflict transaction clusters.
Constructing a conflict transaction cluster from source transactions may be used to determine a conflict pattern for the conflict transaction cluster. In addition, according to the embodiment of the disclosure, visualization of the user interface can be realized based on the conflict transaction cluster, so that the user can intuitively understand the relationship between the conflict transaction and the source transaction thereof, and subsequent optimization for the conflict transaction is facilitated.
Next, returning to fig. 1, according to an embodiment of the present disclosure, the determining unit 102 may determine the conflict mode of the conflict transaction according to the source transaction determined by the determining unit 101.
Specifically, the determination unit 102 may analyze, for a conflict transaction cluster in which the conflict transaction is located, a calling function of all transactions included in the conflict transaction cluster and a key affected by the calling function to determine a conflict pattern of the conflict transaction.
According to an embodiment of the present disclosure, the determination unit 102 may analyze all functions called by the trades and keys of influence included in the conflicting transaction cluster, and determine a conflicting pattern for the conflicting transaction cluster based on the analysis result.
For example, for the conflict transaction cluster shown in fig. 4 in which the source transaction is Tx2, the functions of all transaction calls included in the conflict transaction cluster and the keys in the read-write set of the transactions affected by the functions may be analyzed to determine the conflict mode of the conflict transaction cluster.
Note that the conflict pattern referred to herein is determined from the conflict transaction cluster of the source transaction, but for each conflict transaction in the conflict transaction cluster, the conflict pattern is also the conflict pattern of that conflict transaction, and thus the conflict pattern of the conflict transaction cluster and the conflict pattern of the conflict transaction referred to herein have equivalent meaning.
Fig. 5 is an exemplary diagram illustrating the determination unit 102 determining a conflict pattern by analyzing a conflict transaction cluster according to an embodiment of the present disclosure.
By way of example and not limitation, as shown in fig. 5, for the conflict transaction cluster shown in fig. 4 where the source transaction is Tx2, the determination unit 102 analyzes the functions called by all transactions Tx2, Tx4, Tx5 included in the conflict transaction cluster and the keys in the read-write set of transactions affected by the functions, and finds that all three transactions call a transfer function, thereby affecting the value of the key, e.g., account balance, in the blockchain ledger. As will be described in further detail below, decision unit 102 may accordingly determine the collision pattern of the cluster of collision transactions whose source transaction is Tx2 as the collision pattern that a function affects a plurality of keys.
According to an embodiment of the present disclosure, the conflict mode of the conflict transaction cluster may include a first conflict mode in which one function affects one key, a second conflict mode in which one function affects at least two or more keys, and a third conflict mode in which at least two or more functions affect one key. These three conflict modes will be described in detail below with reference to fig. 6 in conjunction with a specific example.
Fig. 6 shows a schematic diagram of the first, second and third collision modes.
As shown in fig. 6, in a first conflict mode, the invocation of one function only affects one key, e.g., a scenario where a sensor of the internet of things (IoT) continuously registers sensed data onto a blockchain ledger. For example, if the sensed data of the IoT sensors is updated too fast to approximate a concurrent transaction, it may result in the registration speed of the sensed data not keeping up with the transmission speed, causing a conflicting transaction.
Further, as shown in FIG. 6, in the second conflict mode, the invocation of one function affects at least two or more keys, such as a scenario where transfers are made from one account to multiple accounts simultaneously. For example, if multiple transactions transferring from one account to multiple accounts occur too closely to approximate a concurrent transaction, it may result in the accounting of the prior transaction transferring out of the account being incomplete and the later submitted transaction being submitted back to the ledger, such that the later submitted transaction is marked as a conflicting transaction.
Further, as shown in FIG. 6, in a third conflict mode, the invocation of at least two or more functions affects a key, such as a scenario for transferring money from multiple accounts to the same account. For example, if multiple transactions that transfer from multiple accounts to the same account occur too closely to approximate a concurrent transaction, the accounting of the prior transaction transferred to the account is incomplete and the later-submitted transaction is submitted to the ledger, such that the later-submitted transaction is marked as a conflicting transaction.
It will be understood by those skilled in the art that in a practical application of blockchains, there are also situations where the invocation of at least two or more functions affects at least two or more keys, but this situation may be resolved into a situation where the invocation of a plurality of at least two or more functions affects one key, i.e. a third conflict mode. In other words, the first to third conflict modes described above can cover the case of all conflict transactions.
Next, returning to fig. 1, according to an embodiment of the present disclosure, the optimization unit 103 may determine an optimization scheme for eliminating the conflict transaction according to the conflict mode determined by the determination unit 102.
According to an embodiment of the present disclosure, the optimization scheme may include a first optimization scheme in which the optimization is performed by modifying an intelligent contract for the blockchain and a second optimization scheme in which the optimization is performed by modifying an application layer of the blockchain.
An example of the optimization unit 103 determining the optimization scheme according to the collision mode according to the embodiment of the present disclosure is described below with reference to fig. 7, 8, and 9.
Fig. 7 shows an exemplary diagram of optimization performed in the case where it is determined that the conflict mode is the first conflict mode.
As a specific example of the first conflict mode, in a scenario where a sensor of the internet of things (IoT) continuously registers sensed data on a blockchain ledger as described above, according to a reason why a conflict transaction occurs, that is, the sensed data of the IoT sensor is updated too fast to approximate a concurrent transaction, resulting in a registration speed of the sensed data not keeping up with a transmission speed, a structure of keys of a read-write set may be modified to eliminate the conflict transaction. The optimization scheme is a modification of a data structure of a transaction of the blockchain, and belongs to a second optimization scheme for optimizing by modifying an application layer of the blockchain.
Taking an IoT sensor as an example, different keys may be used to record sensed data at different times. When it is necessary to register the latest key value into the blockchain ledger, the latest key value can be obtained by a combined calculation of the values of the respective keys.
As shown in fig. 7, five sub-keys related to the Key1, i.e., Key1_1, Key1_2, Key1_3, Key1_4, Key1_5, can be used, wherein the Key value of the sub-Key 1_1 is the same as the Key value 1 of the Key 1. Sensed data sequentially recorded at the subsequent sensing time is written as a variation (delta) from the last sensed data into the subsequent sub-keys, i.e., Key values of the Key keys 1_2, Key1_3, Key1_4, and Key1_5 are divided into delta _1, delta _2, delta _3, and delta _ 4. When the latest value of the sensing data needs to be read and registered to the blockchain ledger, the latest value of the Key1 can be calculated by the following formula.
The latest value of the Key1 is the last registered Key value of the Key1 + Key1_2+ Key1_3+ Key1_4+ Key1_5
As an optimization scheme, by modifying the data structure of the Key1, it is possible to avoid conflicting transactions due to the fact that the registration speed of the sensed data cannot keep up with the transmission speed, thereby implementing optimization of the block chain. In the above example, the number of sub-keys may be adjusted depending on the particular application, such as the duration of the sensing interval of the sensor.
According to an embodiment of the present disclosure, optimization unit 103 may implement optimization of the conflict transaction of the first conflict mode by changing a data structure of keys of a read-write set of transactions.
Fig. 8 shows an exemplary diagram of optimization performed in the case where it is determined that the collision mode is the second collision mode.
As a specific example of the second conflict mode, in the scenario described above in which a transfer is made from one account to multiple accounts simultaneously, the intelligent contracts of the blockchain may be modified depending on the reason why the conflict transaction occurred, i.e., multiple transactions transferred from one account to multiple accounts occurred too close to being similar to a concurrent transaction, which may result in the accounting of the prior transaction being incomplete and the later-submitted transaction being submitted to the ledger. According to the embodiment of the disclosure, for the second conflict mode, an optimization scheme of adding the intelligent contracts of the blockchain according to the reasons of the conflict transactions can be adopted, and the optimization scheme belongs to the first optimization scheme which is optimized by modifying the intelligent contracts of the blockchain.
For example, as shown in the pseudo code in FIG. 8, transactions that transfer from one account to multiple accounts (e.g., invoking a transfer function) may be integrated into one batch transfer transaction (e.g., a batch transfer function). For example, a business may issue payroll to employees, which is a transaction that transfers money from one account to multiple accounts. Under the condition of no optimization, the transfer transaction is composed of the transfer of a plurality of continuous transfer-out accounts to a transfer-in account, and the chronological sequence and the interval duration may cause conflict transactions. Therefore, by adding the intelligent contract of batch transfer, the transfer of one transfer-out account to a plurality of transfer-in accounts can be realized in the real sense, and the conflict transaction is avoided.
According to an embodiment of the present disclosure, the optimization unit 103 may implement optimization of the conflict transaction of the second conflict mode by adding an intelligent contract of the blockchain.
Fig. 9 shows an exemplary diagram of optimization performed in the case where it is determined that the collision mode is the third collision mode.
As a specific example of the third conflict mode, in the scenario of transferring from multiple accounts to the same account as described above, the structure of the blockchain may be modified according to the reason of the conflict transaction, that is, multiple transactions transferring from multiple accounts to the same account appear too close to be similar to a concurrent transaction, resulting in the incomplete accounting of the previous transaction transferred to the account and the submitted transaction after the previous transaction is submitted to the account book. According to the embodiment of the present disclosure, for the third conflict mode, an optimization scheme of adding a buffer layer in an application layer of a blockchain may be adopted, belonging to a second optimization scheme that performs optimization by modifying the application layer of the blockchain.
Specifically, as shown in fig. 9, according to an embodiment of the present disclosure, one buffer layer may be added in the application layer of the blockchain. In the cache layer, Endorsement (Endorsement), ordering (Order), and consensus (Commit) services of the transactions Tx1 to Tx6 may be performed in sequence to analyze the read-write set of transactions, and if a conflict is found between transactions, the non-conflicting transactions may be submitted to the ledger of the blockchain first. After the non-conflicting transaction is linked up (i.e., written to the ledger), the remaining transactions may be re-endorsed (i.e., new key values obtained). By repeating the above operations until all transactions are linked up, conflicting transactions are avoided.
According to an embodiment of the present disclosure, the optimization unit 103 may implement optimization of the conflict transaction of the third conflict mode by adding a cache layer in an application layer of the blockchain.
Those skilled in the art will recognize that the specific optimization schemes for the first through third conflict modes are described above in connection with specific examples of the first through third conflict modes, but the disclosure is not limited thereto. Those skilled in the art may employ other optimization schemes to eliminate conflict transactions than the specific examples described above by analyzing the specific causes of the first through third conflict patterns, and all such optimization schemes are intended to be within the scope of the present disclosure.
Correspondingly, the disclosure also provides an information processing method for analyzing conflict transactions in the blockchain and optimizing the blockchain according to the analysis result.
Fig. 10 is a flowchart illustrating an information processing method 1000 according to an embodiment of the present disclosure.
The information processing method 1000 starts at step S1001. Subsequently, in step S1002, the source transaction of the conflict transaction occurring in the blockchain is determined. According to an embodiment of the present disclosure, the processing in step S1002 may be realized by the determination unit 101 described above with reference to fig. 1 to 9.
Subsequently, in step S1003, a conflict mode of the conflict transaction is determined according to the determined source transaction. According to an embodiment of the present disclosure, the processing in step S1003 may be realized by the determination unit 102 described above with reference to fig. 1 to 9.
Subsequently, in step S1004, an optimization scheme for eliminating the conflict transaction is determined according to the determined conflict mode. According to an embodiment of the present disclosure, the processing in step S1004 may be implemented by the optimization unit 103 according to the description above with reference to fig. 1 to 9.
Finally, the information processing method 1000 ends in step S1005.
According to the information processing device and the information processing method, conflict transactions which occur in the blockchain can be analyzed to determine the reason of the occurrence of the conflict transactions, and the structure or the rule of the blockchain is optimized according to the determined reason, so that the subsequent occurrence of the conflict transactions is avoided, and the execution efficiency and the effectiveness of the transactions are improved.
Fig. 11 is a block diagram showing a general-purpose machine 1100 that can be used to implement the information processing method and the information processing apparatus according to the embodiment of the present disclosure. General purpose machine 1100 may be, for example, a computer system. It should be noted that the general-purpose machine 1100 is only an example and does not imply limitation to the range of use or functions of the information processing method and the information processing apparatus of the present disclosure. Neither should the general purpose machine 1100 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the above-described information processing methods or information processing apparatuses.
In fig. 11, a Central Processing Unit (CPU)1101 performs various processes in accordance with a program stored in a Read Only Memory (ROM)1102 or a program loaded from a storage section 1108 to a Random Access Memory (RAM) 1003. In the RAM 1103, data necessary when the CPU 1101 executes various processes and the like is also stored as necessary. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other via a bus 1104. An input/output interface 1105 is also connected to bus 1104.
The following components are also connected to the input/output interface 1105: an input section 1106 (including a keyboard, a mouse, and the like), an output section 1107 (including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker and the like), a storage section 1108 (including a hard disk and the like), a communication section 1109 (including a network interface card such as a LAN card, a modem, and the like). The communication section 1109 performs communication processing via a network such as the internet. The driver 1110 may also be connected to the input/output interface 1105 as needed. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like may be mounted on the drive 1110 as necessary, so that a computer program read out therefrom may be installed into the storage section 1108 as necessary.
In the case where the series of processes described above is implemented by software, a program constituting the software may be installed from a network such as the internet or from a storage medium such as the removable medium 1111.
It should be understood by those skilled in the art that such a storage medium is not limited to the removable medium 1111 shown in fig. 11, in which the program is stored, distributed separately from the apparatus to provide the program to the user. Examples of the removable medium 1111 include a magnetic disk (including a flexible disk), an optical disk (including a compact disc read only memory (CD-ROM) and a Digital Versatile Disc (DVD)), a magneto-optical disk (including a mini-disk (MD) (registered trademark)), and a semiconductor memory. Alternatively, the storage medium may be the ROM 1102, a hard disk included in the storage section 1108, or the like, in which programs are stored and which are distributed to users together with the device including them.
In addition, the present disclosure also provides a program product storing machine-readable instruction codes. The instruction codes are read by a machine and can execute the information processing method according to the disclosure when being executed. Accordingly, various storage media listed above for carrying such a program product are also included within the scope of the present disclosure.
Having described in detail in the foregoing through block diagrams, flowcharts, and/or embodiments, specific embodiments of apparatus and/or methods according to embodiments of the disclosure are illustrated. When such block diagrams, flowcharts, and/or implementations contain one or more functions and/or operations, it will be apparent to those skilled in the art that each function and/or operation in such block diagrams, flowcharts, and/or implementations can be implemented, individually and/or collectively, by a variety of hardware, software, firmware, or virtually any combination thereof. In one embodiment, portions of the subject matter described in this specification can be implemented by Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), Digital Signal Processors (DSPs), or other integrated forms. Those skilled in the art will recognize, however, that some aspects of the embodiments described in this specification can be equivalently implemented, in whole or in part, in the form of one or more computer programs running on one or more computers (e.g., in the form of one or more computer programs running on one or more computer systems), in the form of one or more programs running on one or more processors (e.g., in the form of one or more programs running on one or more microprocessors), in the form of firmware, or in virtually any combination thereof, and, it is well within the ability of those skilled in the art to design circuits and/or write code for the present disclosure, software and/or firmware, in light of the present disclosure.
It should be emphasized that the term "comprises/comprising" when used herein, is taken to specify the presence of stated features, elements, steps or components, but does not preclude the presence or addition of one or more other features, elements, steps or components. The terms "first," "second," and the like, as used in ordinal numbers, do not denote an order of execution or importance of the features, elements, steps, or components defined by the terms, but are used merely for identification among the features, elements, steps, or components for clarity of description.
In summary, in the embodiments according to the present disclosure, the present disclosure provides the following schemes, but is not limited thereto:
an information processing apparatus includes:
a determining unit configured to determine a source transaction of a conflict transaction occurring in the blockchain;
a determination unit configured to determine a conflict mode of the conflict transaction according to the source transaction determined by the determination unit; and
an optimization unit configured to determine an optimization scheme for eliminating the conflict transaction according to the conflict mode determined by the determination unit.
Scheme 2. the information processing apparatus according to scheme 1, wherein the determining unit is configured to:
analyzing data of each transaction prior to the conflicting transaction, thereby determining a source transaction for the conflicting transaction; and
a conflict transaction cluster is constructed including the source transaction and the conflict transaction based on the determined source transaction.
Scheme 3. the information processing apparatus according to scheme 2, wherein the data of the transaction includes a read-write set of the transaction.
Scheme 4. the information processing apparatus according to scheme 2, wherein the conflict transaction cluster includes one source transaction and one or more conflict transactions.
The information processing apparatus of claim 2, wherein the determination unit is configured to:
analyzing functions and affected keys called by all trades included in the conflict trading cluster; and
determining a conflict pattern for the conflicted transaction cluster based on the analysis results.
Scheme 6. the information processing apparatus according to scheme 1, wherein the collision modes include a first collision mode, a second collision mode, and a third collision mode, an
Wherein the first collision mode is a collision mode in which one function affects one key, the second collision mode is a collision mode in which one function affects at least two or more keys, and the third collision mode is a collision mode in which at least two or more functions affect one key.
Scheme 7. the information processing apparatus according to scheme 1, wherein the optimization scheme includes a first optimization scheme and a second optimization scheme, an
Wherein the first optimization scheme is a scheme optimized by modifying an intelligent contract of a blockchain, and the second optimization scheme is a scheme optimized by modifying an application layer of the blockchain.
Scheme 8. the information processing apparatus according to scheme 6, wherein the optimization unit is configured to:
optimizing the conflict transaction of the first conflict mode by changing a data structure of keys of a read-write set of transactions;
optimizing the conflict transaction of the second conflict mode by adding an intelligent contract of the blockchain; and
and optimizing the conflict transaction of the third conflict mode by adding a cache layer in an application layer of the blockchain.
Scheme 9. an information processing method, comprising:
a determining step, which is used for determining the source transaction of the conflict transaction occurring in the block chain;
a determining step configured to determine a conflict mode for the conflicting transaction based on the determined source transaction; and
an optimization step configured to determine an optimization scheme to eliminate the conflicting transaction based on the determined conflict pattern.
The information processing method according to claim 9, wherein the determining step includes:
analyzing data of each transaction prior to the conflicting transaction, thereby determining a source transaction for the conflicting transaction; and
a conflict transaction cluster is constructed including the source transaction and the conflict transaction based on the determined source transaction.
Scheme 11. the information processing method according to scheme 10, wherein the data of the transaction includes a read-write set of the transaction.
Scheme 12. the information processing method according to scheme 10, wherein the conflict transaction cluster includes one source transaction and one or more conflict transactions.
Scheme 13. the information processing method according to scheme 10, wherein the determining step includes:
analyzing functions and affected keys called by all trades included in the conflict trading cluster; and
determining a conflict pattern for the conflicted transaction cluster based on the analysis results.
Scheme 14. the information processing method according to scheme 9, wherein the collision modes include a first collision mode, a second collision mode, and a third collision mode, an
Wherein the first collision mode is a collision mode in which one function affects one key, the second collision mode is a collision mode in which one function affects at least two or more keys, and the third collision mode is a collision mode in which at least two or more functions affect one key.
Scheme 15. the information processing method according to scheme 9, wherein the optimization scheme includes a first optimization scheme and a second optimization scheme, and
wherein the first optimization scheme is a scheme optimized by modifying an intelligent contract of a blockchain, and the second optimization scheme is a scheme optimized by modifying an application layer of the blockchain.
The information processing method according to claim 14, wherein the optimizing step includes:
optimizing the conflict transaction of the first conflict mode by changing a data structure of keys of a read-write set of transactions;
optimizing the conflict transaction of the second conflict mode by adding an intelligent contract of the blockchain; and
and optimizing the conflict transaction of the third conflict mode by adding a cache layer in an application layer of the blockchain.
A computer-readable storage medium on which a computer program is stored, the computer program being capable of implementing the information processing method according to any one of claims 9 to 16 when executed by a computer.
While the disclosure has been disclosed by the description of the specific embodiments thereof, it will be appreciated that those skilled in the art will be able to devise various modifications, improvements, or equivalents of the disclosure within the spirit and scope of the appended claims. Such modifications, improvements and equivalents are also intended to be included within the scope of the present disclosure.

Claims (10)

1. An information processing apparatus comprising:
a determining unit configured to determine a source transaction of a conflict transaction occurring in the blockchain;
a determination unit configured to determine a conflict mode of the conflict transaction according to the source transaction determined by the determination unit; and
an optimization unit configured to determine an optimization scheme for eliminating the conflict transaction according to the conflict mode determined by the determination unit.
2. The information processing apparatus according to claim 1, wherein the determination unit is configured to:
analyzing data of each transaction prior to the conflicting transaction, thereby determining a source transaction for the conflicting transaction; and
a conflict transaction cluster is constructed including the source transaction and the conflict transaction based on the determined source transaction.
3. The information processing apparatus according to claim 2, wherein the data of the transaction includes a read-write set of the transaction.
4. The information processing apparatus according to claim 2, wherein the conflict transaction cluster includes one source transaction and one or more conflict transactions.
5. The information processing apparatus according to claim 2, wherein the determination unit is configured to:
analyzing functions and affected keys called by all trades included in the conflict trading cluster; and
determining a conflict pattern for the conflicted transaction cluster based on the analysis results.
6. The information processing apparatus according to claim 1, wherein the collision mode includes a first collision mode, a second collision mode, and a third collision mode, and
wherein the first collision mode is a collision mode in which one function affects one key, the second collision mode is a collision mode in which one function affects at least two or more keys, and the third collision mode is a collision mode in which at least two or more functions affect one key.
7. The information processing apparatus according to claim 1, wherein the optimization scheme includes a first optimization scheme and a second optimization scheme, and
wherein the first optimization scheme is a scheme optimized by modifying an intelligent contract of a blockchain, and the second optimization scheme is a scheme optimized by modifying an application layer of the blockchain.
8. The information processing apparatus according to claim 6, wherein the optimization unit is configured to:
optimizing the conflict transaction of the first conflict mode by changing a data structure of keys of a read-write set of transactions;
optimizing the conflict transaction of the second conflict mode by adding an intelligent contract of the blockchain; and
and optimizing the conflict transaction of the third conflict mode by adding a cache layer in an application layer of the blockchain.
9. An information processing method comprising:
a determining step, which is used for determining the source transaction of the conflict transaction occurring in the block chain;
a determining step configured to determine a conflict mode for the conflicting transaction based on the determined source transaction; and
an optimization step configured to determine an optimization scheme to eliminate the conflicting transaction based on the determined conflict pattern.
10. A computer-readable storage medium on which a computer program is stored, the computer program being capable of implementing the information processing method according to claim 9 when executed by a computer.
CN201910967627.7A 2019-10-12 2019-10-12 Information processing apparatus, information processing method, and computer program Pending CN112651738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910967627.7A CN112651738A (en) 2019-10-12 2019-10-12 Information processing apparatus, information processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910967627.7A CN112651738A (en) 2019-10-12 2019-10-12 Information processing apparatus, information processing method, and computer program

Publications (1)

Publication Number Publication Date
CN112651738A true CN112651738A (en) 2021-04-13

Family

ID=75343680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910967627.7A Pending CN112651738A (en) 2019-10-12 2019-10-12 Information processing apparatus, information processing method, and computer program

Country Status (1)

Country Link
CN (1) CN112651738A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2018100999A4 (en) * 2018-07-17 2018-09-06 Cherkas, Ruslan Mr Integration of Cryptocurrency Splitting Technology, Highly Scalable Blockchain Network and Mirror Advertising Technology for transparency of Business Operations and Taxation
CN108876610A (en) * 2018-05-31 2018-11-23 深圳市零度智控科技有限公司 Intelligent contract implementation method, user equipment, storage medium and device
US20190087793A1 (en) * 2017-08-31 2019-03-21 Brown University Adding concurrency to smart contracts
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system
CN109885485A (en) * 2019-01-21 2019-06-14 中国光大银行股份有限公司 Transaction collision detection method and device
CN110135985A (en) * 2019-04-04 2019-08-16 杭州抖音科技有限公司 A kind of parallel execution method and system traded on block chain

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190087793A1 (en) * 2017-08-31 2019-03-21 Brown University Adding concurrency to smart contracts
CN108876610A (en) * 2018-05-31 2018-11-23 深圳市零度智控科技有限公司 Intelligent contract implementation method, user equipment, storage medium and device
AU2018100999A4 (en) * 2018-07-17 2018-09-06 Cherkas, Ruslan Mr Integration of Cryptocurrency Splitting Technology, Highly Scalable Blockchain Network and Mirror Advertising Technology for transparency of Business Operations and Taxation
CN109508337A (en) * 2018-11-12 2019-03-22 杭州秘猿科技有限公司 A kind of transaction is parallel to execute method, apparatus, electronic equipment and system
CN109885485A (en) * 2019-01-21 2019-06-14 中国光大银行股份有限公司 Transaction collision detection method and device
CN110135985A (en) * 2019-04-04 2019-08-16 杭州抖音科技有限公司 A kind of parallel execution method and system traded on block chain

Similar Documents

Publication Publication Date Title
Vo et al. Research Directions in Blockchain Data Management and Analytics.
Chen et al. Gaschecker: Scalable analysis for discovering gas-inefficient smart contracts
EP2791785B1 (en) Method and system using exceptions for code specialization in a computer architecture that supports transactions
JP2022535785A (en) Methods and Contract Rewriting Framework Systems for Supporting Smart Contracts in Blockchain Networks
US20170031804A1 (en) Enhanced service validation
KR20200021993A (en) Blockchain compiler
EP2005306B1 (en) Array comparison and swap operations
CN110889754B (en) Method for improving processing efficiency of non-overdraft hot spot account
US20140013449A1 (en) Delayed validation for software licensing and activation
US20090049431A1 (en) Method and compiler of compiling a program
JPH0728679A (en) Locking system of checkin/checkout model
US7539679B2 (en) Information processing system and control
EP3396560B1 (en) Database operating method and device
Zheng et al. SCC: an accurate imputation method for scRNA-seq dropouts based on a mixture model
CN116243959A (en) Implementation of large-scale object version control and consistency
US20030154419A1 (en) Register renaming in binary translation using rollback and recovery
US9298630B2 (en) Optimizing memory bandwidth consumption using data splitting with software caching
CN112651738A (en) Information processing apparatus, information processing method, and computer program
CN110096505B (en) Data storage method, system, equipment and storage medium
CN111221573B (en) Management method of register access time sequence, processor, electronic equipment and computer readable storage medium
US8732041B2 (en) Replicating data in financial systems
CN113835690A (en) Read-write separation multi-data source component and working method thereof
US20050251795A1 (en) Method, system, and program for optimizing code
US20050177774A1 (en) Automated generation of computer-executable compensation procedures for previously executed methods
Farokhnia Lazy contracts: Alleviating high gas costs by secure and trustless off-chain execution of smart contracts

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