CN111144883B - Processing performance analysis method and device for blockchain network - Google Patents

Processing performance analysis method and device for blockchain network Download PDF

Info

Publication number
CN111144883B
CN111144883B CN201911242997.0A CN201911242997A CN111144883B CN 111144883 B CN111144883 B CN 111144883B CN 201911242997 A CN201911242997 A CN 201911242997A CN 111144883 B CN111144883 B CN 111144883B
Authority
CN
China
Prior art keywords
transaction
blockchain
cross
chain
transactions
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.)
Active
Application number
CN201911242997.0A
Other languages
Chinese (zh)
Other versions
CN111144883A (en
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.)
WeBank Co Ltd
Original Assignee
WeBank Co 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201911242997.0A priority Critical patent/CN111144883B/en
Publication of CN111144883A publication Critical patent/CN111144883A/en
Application granted granted Critical
Publication of CN111144883B publication Critical patent/CN111144883B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a processing performance analysis method and a device for a blockchain network, wherein the method comprises the following steps: executing a plurality of cross-chain transactions at a blockchain network; wherein each of the plurality of cross-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same; and determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the plurality of cross-chain transactions. When the method is applied to financial technology (Fintech), a method for analyzing the processing performance of a blockchain network of a financial institution can be provided.

Description

Processing performance analysis method and device for blockchain network
Technical Field
The invention relates to the field of financial science and technology (Fintech) and the field of computer software, in particular to a processing performance analysis method and device of a blockchain network.
Background
With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually changed to the financial technology (Fintech), but due to the requirements of safety and real-time performance of the financial industry, the requirements of the technology are also higher. The blockchain (blockchain) technology is increasingly applied to the financial field due to the characteristics of non-tamper-resistance, consistency and the like of the blockchain. Thus, the performance of the blockchain is critical to the quality of service of the financial institution.
There are ways in the art to analyze the processing performance of a blockchain, however, this way only a single blockchain is analyzed. However, more and more transactions require a blockchain network formed by a plurality of blockchains to be cooperatively completed, and the prior art does not have a way to analyze the processing performance of the blockchain network, which is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a processing performance analysis method and device for a blockchain network, which solve the problem that the prior art does not have a mode of analyzing the performance of the blockchain network.
In a first aspect, an embodiment of the present application provides a method for analyzing processing performance of a blockchain network, including: executing a plurality of cross-chain transactions at a blockchain network; wherein the cross-chain transaction is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same; and determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the cross-chain transaction.
In the method, a plurality of cross-chain transactions are firstly executed in the blockchain network, and because the cross-chain transactions are transactions completed on a plurality of blockchains of the blockchain network by executing a plurality of transactions in turn, the starting time and the uplink time of each transaction in the plurality of cross-chain transactions can be recorded, and the processing performance of the blockchain network is determined according to the starting time and the uplink time, so that a way for analyzing the performance of the blockchain network is provided.
In an alternative embodiment, the processing performance of the blockchain network is an average processing duration of processing cross-chain transactions by the blockchain network; determining the processing performance of the blockchain network according to the initiation time and the uplink time of each transaction in the cross-chain transaction, including: for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction; and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
In the method, when the processing performance of the blockchain network is the average processing time length of the blockchain network for processing the cross-link transaction, the processing time length of the cross-link transaction can be determined according to the starting time and the uplink time of each transaction in each cross-link transaction, so that the method for determining the average processing time length of the blockchain network is provided according to the processing time lengths of the cross-link transactions, the weight values of the cross-link transactions and the transaction numbers of the cross-link transactions.
In an alternative embodiment, the processing performance of the blockchain network is transaction validation performance of each blockchain in the blockchain network; the determining the processing performance of the blockchain network according to the initiation time and the uplink time of each transaction in the plurality of cross-chain transactions includes: determining the transaction confirmation duration of each transaction in the blockchain according to the starting time and the uplink time of each transaction started by the plurality of cross-chain transactions on the blockchain aiming at each blockchain of the blockchain network; determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain.
In the above method, when the processing performance of the blockchain network is the transaction confirmation performance of each blockchain in the blockchain network, the transaction confirmation duration of each transaction in the blockchain can be determined according to the initiation time and the uplink time of each transaction initiated by the plurality of cross-chain transactions on each blockchain; and a method of determining whether a performance bottleneck exists in the transaction validation performance of the blockchain may be provided based at least on the transaction validation duration of each transaction initiated on the blockchain.
In an alternative embodiment, the determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain includes: determining the fluctuation degree of the transaction confirmation time length of the blockchain according to the transaction confirmation time length of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be higher, determining that performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is not greater than the preset time length, determining that the performance bottleneck of the transaction execution performance in the transaction confirmation performance of the blockchain does not exist.
In the above manner, since the fluctuation degree of the transaction confirmation time length of the blockchain characterizes the stability of transaction execution, if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be high, determining that a performance bottleneck exists in the transaction confirmation performance of the blockchain, or if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is controlled within a preset time length range, determining that the performance bottleneck does not exist in the transaction confirmation performance of the blockchain, thereby providing a method for determining whether the performance bottleneck exists in the transaction confirmation performance of the blockchain.
In an alternative implementation manner, if it is determined that the fluctuation degree of the transaction confirmation time length of the blockchain is low and the average transaction confirmation time length of the blockchain is longer than the preset time length, determining that a bottleneck exists in the transaction confirmation performance of the blockchain, and determining a first proportion and a second proportion; the first proportion is the ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second proportion is the ratio of the total block consensus duration of the blockchain in the total transaction confirmation duration of the blockchain; if the first proportion is larger than the second proportion, determining that performance bottlenecks exist in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the first proportion is not greater than the second proportion, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
In the above manner, when it is determined that the fluctuation degree of the transaction confirmation time length of the blockchain is low and the average transaction confirmation time length of the blockchain is longer than the preset time length, only knowing that the overall transaction confirmation performance of the blockchain has a bottleneck, determining whether the performance bottleneck is on the block consensus performance or the transaction execution performance is required, so that a first proportion and a second proportion are determined, and determining that the transaction execution performance has the performance bottleneck when the first proportion is greater than the second proportion; or when the first proportion is not greater than the second proportion, determining that the block consensus performance has performance bottleneck, so as to provide a fine-granularity determining method for the transaction execution performance bottleneck under the conditions that the fluctuation degree of the transaction confirmation time length of the block chain is low and the average transaction confirmation time length of the block chain is greater than the preset time length.
In an alternative implementation manner, for any blockchain of the blockchain network, determining the block packing saturation degree of the blockchain according to the number of the blockchain transactions of which the number of blocktransactions is not less than the upper limit of the number of blocktransactions of the blockchain in the execution process of the plurality of blockchain transactions; the block transaction number is equal to the upper limit of the block transaction number of the block chain, and the blocks of the block chain are packaged.
In the above manner, since the block transaction number is equal to the upper limit of the block transaction number, the blocks of the blockchain are packed, so that a method for determining the block packing saturation degree of the blockchain can be provided according to the number of cross-chain transactions, in which the block transaction number of the blockchain is equal to the upper limit of the block transaction number of the blockchain.
In a second aspect, the present application provides a processing performance analysis apparatus for a blockchain network, comprising: an execution module for executing a plurality of cross-chain transactions at the blockchain network; wherein each of the plurality of cross-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same; and the determining module is used for determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the plurality of cross-chain transactions.
In an alternative embodiment, the processing performance of the blockchain network is an average processing duration of processing cross-chain transactions by the blockchain network; the determining module is specifically configured to: for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction; and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
In an alternative embodiment, the processing performance of the blockchain network is transaction validation performance of each blockchain in the blockchain network; the determining module is specifically configured to: determining the transaction confirmation duration of each transaction in the blockchain according to the starting time and the uplink time of each transaction started by the plurality of cross-chain transactions on the blockchain aiming at each blockchain of the blockchain network; determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain.
In an alternative embodiment, the determining module is specifically configured to: determining the fluctuation degree of the transaction confirmation time length of the blockchain according to the transaction confirmation time length of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be higher, determining that performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is not greater than the preset time length, determining that the performance bottleneck of the transaction execution performance in the transaction confirmation performance of the blockchain does not exist.
In an alternative embodiment, the transaction confirmation duration of each transaction initiated on the blockchain includes a transaction execution duration of the transaction and a blockwise consensus duration of the transaction; the determining means is further for: if the fluctuation degree of the transaction confirmation time length of the block chain is determined to be low, and the average transaction confirmation time length of the block chain is longer than the preset time length, determining that a bottleneck exists in the transaction confirmation performance of the block chain, and determining a first proportion and a second proportion; the first proportion is the ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second proportion is the ratio of the total block consensus duration of the blockchain in the total transaction confirmation duration of the blockchain; if the first proportion is larger than the second proportion, determining that performance bottlenecks exist in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the first proportion is not greater than the second proportion, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
In an alternative embodiment, the determining means is further for: determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, of which the block transaction number is equal to the upper limit of the block transaction number, of the block chain in the execution process of the cross-chain transactions aiming at any block chain of the block chain network; the block transaction number is equal to the upper limit of the block transaction number of the block chain, and the blocks of the block chain are packaged.
The advantages of the second aspect and the embodiments of the second aspect may be referred to the advantages of the first aspect and the embodiments of the first aspect, and will not be described here again.
In a third aspect, embodiments of the present application provide a computer device, including a program or instructions, which when executed, is configured to perform the method of the first aspect and the embodiments of the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium including a program or instructions, which when executed, are configured to perform the method of the first aspect and the respective embodiments of the first aspect.
Drawings
FIG. 1 is a schematic block chain architecture;
FIG. 2 is a flowchart illustrating a method for analyzing processing performance of a blockchain network according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a structure of a isomorphic chain direct interaction mode of a blockchain network;
FIG. 4 is a schematic diagram of a heterogeneous chain direct interaction mode of a blockchain network;
FIG. 5 is a schematic diagram of a heterogeneous chain indirect interaction mode of a blockchain network;
fig. 6 is a schematic structural diagram of a processing performance analysis device of a blockchain network according to an embodiment of the present application.
Detailed Description
In order to better understand the above technical solutions, the following detailed description will be made with reference to the accompanying drawings and specific embodiments, and it should be understood that specific features in the embodiments and examples of the present application are detailed descriptions of the technical solutions of the present application, and not limit the technical solutions of the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
The terms appearing in the embodiments of the present application are explained first below.
Blockchain: as shown in fig. 1, a blockchain is a chain of blocks, each block being recorded with a Hash value of the previous block in addition to the data of the block, in such a way that the chain is formed. The block chain has two core concepts, one is a cryptography technology, the other is a decentralization concept, and the history information on the block chain cannot be tampered based on the two concepts.
And (3) node: each participant in the network is a node that participates in network construction and data exchange. In a blockchain network, a node refers to a participant with a unique identity, the node having a complete ledger copy with the ability to participate in blockchain network consensus and ledger maintenance.
Intelligent contract: an intelligent contract is a computer protocol that aims to propagate, verify, or execute contracts in an informative manner. Smart contracts allow trusted transactions to be made without third parties, which transactions are traceable and irreversible. The smart contracts are in the form of code deployed on a blockchain to perform a specific function. For example, solubility is a mainstream smart contract programming language, and smart contracts written in the solubility language are called solubility contracts. When an intelligent contract is deployed onto a blockchain, a contract address is generated through which a user may invoke the intelligent contract. A function defined in an intelligent contract, called a contract interface, calls to an intelligent contract, are calls to a certain contract interface in the contract through a contract address.
Transaction: a transaction is a request by a user for an operation of an intelligent contract interface deployed on a blockchain. The transaction is initiated by a user, the transaction is sent to a blockchain node from a client of the user, and after the blockchain node receives the transaction, the corresponding intelligent contract is called according to a contract address and an interface appointed by the transaction.
Consensus mechanism: the consensus mechanism refers to each transaction node on the peer-to-peer network, and uses a common algorithm to confirm a batch of transactions. The algorithm comprises workload certification, rights and interests certification, multiple signature verification, election verification and the like.
In the running process of a financial institution (banking institution, insurance institution or securities institution) in doing business (such as loan business, deposit business, etc. of a bank), the processing performance of a blockchain of the financial institution is often analyzed. Current approaches use one transaction to analyze processing performance for a single blockchain. However, in the case of cross-blockchain, because of the confirmation and the full process of cross-chain transaction, multiple blockchain systems are required to participate in common, and multiple related transactions on multiple blockchain systems are involved, which is measured by the processing capability of a single transaction, and the real performance of the cross-chain scene is difficult to reflect. This situation does not meet the requirements of financial institutions such as banks, and is also disadvantageous to efficient operation of various businesses of the financial institutions.
To this end, as shown in fig. 2, the present application provides a processing performance analysis method of a blockchain network.
Step 201: a plurality of cross-chain transactions are performed at the blockchain network.
The cross-chain transaction is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; each cross-chain transaction corresponds to a plurality of transactions with the same transaction identification.
Step 202: and determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the cross-chain transaction.
It should be noted that the method from step 201 to step 202 is applicable to a cross-link scenario. For example, the cross-link scenarios are divided according to architecture and interaction, and the cross-link scenarios are divided into three scenarios of multi-link isomorphic direct interaction, heterogeneous direct interaction and heterogeneous indirect interaction:
as shown in fig. 3, in the isomorphic direct interaction mode, the blockchain a and the blockchain B belong to different services, have the same underlying architecture, and are two blockchains with different network architectures, storage and consensus mechanisms, and the two blockchains are directly connected through a network agent program, a software development kit (Software Development Kit, SDK) or other software, so that cross-chain interaction occurs between the two blockchains. The business of the blockchain refers to the use of the blockchain, and the bottom architecture of the blockchain refers to a specific product of the blockchain, such as that the blockchain is a bitcoin and the blockchain is an ethernet.
As shown in FIG. 4, in the heterogeneous chain direct interaction mode, the blockchain A and the blockchain B belong to two blockchains belonging to different services and having different bottom layer structures, different network structures and storage and consensus mechanisms, the two blockchains cannot directly communicate, transaction and block data conversion are performed through a protocol switching module, connection is established, the protocol switching module is only used as a channel and is responsible for data format conversion, and no independent chain and consensus mechanism exists
As shown in FIG. 5, in the heterogeneous chain indirect interaction mode, the blockchain A and the blockchain B belong to two blockchains with different services, different bottom layer structures, different network structures, storage and consensus mechanisms, the two blockchains cannot directly communicate, are connected to a relay chain through a protocol switching module, the relay chain stores the cross-chain state of the blockchain A and the blockchain B, coordinates the cross-chain flow, and has independent chains and consensus mechanisms
In step 201, for different cross-link scenarios, cross-link transactions may be executed through a unified flow, so as to perform a processing performance test on a blockchain network, where the core of the processing performance test is to correctly determine the starting time and the ending time of a single cross-link transaction, each cross-link transaction has a unique transaction Identifier (ID), and all transactions generated by the cross-link transaction store the transaction ID, where the flow is as follows:
first, a cross-chain transaction is initiated, and a cross-chain initiation transaction is initiated to any blockchain participating in the cross-chain transaction. The first transaction of the transaction, the cross-chain transaction, is initiated.
And secondly, confirming that the starting transaction is successfully uplink, and recording the transaction ID of the cross-link transaction, and the starting time and the uplink time of the transaction.
And thirdly, in the cross-link transaction flow, a plurality of transactions related to the cross-link transaction are generated successively by the participated blockchain, protocol transfer module or relay chain, and transaction IDs are used for tracking and recording the transactions, and the initiating time and the uplink time of the transactions are recorded.
And fourthly, confirming that the last transaction in the cross-link transaction is successful in the uplink, and recording the starting time and the uplink time of the transaction.
After the flow of one cross-link transaction is completed, the blockchain, the sending time and the uplink time of all transactions of the whole cross-link transaction can be obtained, and all transaction information of the cross-link transaction can be recorded no matter which cross-link scene.
As shown in table 1, taking a heterogeneous indirect interaction scenario as an example, the execution flow of the cross-chain goods transaction is as follows:
Figure BDA0002306783100000091
Figure BDA0002306783100000101
TABLE 1
The units of time in table 1 may be set according to a specific scenario, for example, units of milliseconds (ms), and step 202 is described in detail below in conjunction with the cross-chain article transaction flow shown in table 1.
In an alternative embodiment of step 202, when the processing performance of the blockchain network is an average processing duration of the blockchain network processing the cross-chain transaction, step 202 may specifically be performed in the following manner:
for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction; and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
As in the example shown in table 1, the difference 0600 between the uplink time 0700 of the last transaction with the sequence number 6 and the initiation time 0100 of the first transaction with the sequence number 1 is taken as the processing duration of the cross-chain goods transaction. The processing time length of each cross-chain transaction may be calculated in accordance with this alternative embodiment. The processing duration of each cross-chain transaction may be preset to a weight value, for example, the number of transactions that execute 3 cross-chain transactions, i.e., the number of transactions of the cross-chain transaction is 3. The average processing time for the blockchain network may be determined as follows: t= (w1×t1+w2×t2+w3×t3)/3. Specifically, w1=w2=w3=1.
In an alternative embodiment of step 202, when the processing performance of the blockchain network is transaction confirmation performance of each blockchain in the blockchain network, step 202 may specifically be performed in the following manner:
(1) And for each blockchain of the blockchain network, determining the transaction confirmation duration of each transaction in the blockchain according to the starting time and the uplink time of each transaction started by the plurality of cross-chain transactions on the blockchain.
For the example shown in table 1, the difference between the uplink time 0200 of the transaction with serial number 1 and the initiation time 0100 of the transaction with serial number 1 is 0100, i.e. the transaction confirmation time of the transaction with serial number 1 is 0100.
(2) Determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain.
Step (2) may be performed as follows:
and determining the fluctuation degree of the transaction confirmation time length of the blockchain according to the transaction confirmation time length of each transaction initiated on the blockchain.
For example, the extent of fluctuation of the transaction confirmation duration of the blockchain is characterized by the variance of the transaction confirmation duration of each transaction of the blockchain. The extent of fluctuation of the transaction confirmation duration of the blockchain may also be characterized by standard deviation, normalized variance, etc. of the transaction confirmation duration of each transaction of the blockchain, without limitation.
If the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be higher, determining that performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is not greater than the preset time length, determining that the performance bottleneck of the transaction execution performance in the transaction confirmation performance of the blockchain does not exist.
It should be noted that, the determination method that the fluctuation degree of the transaction confirmation time length of the blockchain is higher or lower may be set according to the specific situation. The fluctuation degree of the transaction confirmation duration of the blockchain is determined according to the variance of the transaction confirmation duration of the blockchain and a preset variance threshold. When the variance of the transaction confirmation time length is larger than a preset variance threshold, determining that the fluctuation degree of the transaction confirmation time length of the blockchain is higher; and when the variance of the transaction confirmation time length is not greater than the preset variance threshold, determining that the fluctuation degree of the transaction confirmation time length of the blockchain is low. When the fluctuation degree of the transaction confirmation time length of the blockchain is large, whether the logic of a specific transaction on the blockchain is too complex or not can be confirmed, bottlenecks are likely to exist, and whether the original logic can be split into a plurality of transactions or whether part of the logic can be distributed to other blockchains is evaluated.
Further, the transaction confirmation time length of each transaction initiated on the blockchain comprises the transaction execution time length of the transaction and the block consensus time length of the transaction; the following steps may also be performed in (2):
if the fluctuation degree of the transaction confirmation time length of the block chain is determined to be low, and the average transaction confirmation time length of the block chain is longer than the preset time length, determining that a bottleneck exists in the transaction confirmation performance of the block chain, and determining a first proportion and a second proportion. If the first proportion is larger than the second proportion, determining that performance bottlenecks exist in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the first proportion is not greater than the second proportion, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
The first proportion is the ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second ratio is a ratio of a total block consensus duration of the blockchain to a total transaction confirmation duration of the blockchain. The total transaction execution duration of the blockchain is the sum of the transaction execution durations of each transaction of the blockchain. The total transaction confirmation duration of the blockchain is the sum of the transaction confirmation durations of each transaction of the blockchain. The total block consensus duration of the blockchain is the sum of the block consensus durations of each transaction of the blockchain.
If the fluctuation degree of the transaction confirmation duration of a certain blockchain is smaller and the average transaction confirmation duration of the blockchain is maintained at a larger value (such as larger than the preset duration), the blockchain log is needed to confirm, and if the first proportion and the second proportion are larger, namely the blockchain consensus duration occupies a larger proportion, the problem that the consensus process of the blockchain is abnormal, too many consensus nodes, too complex consensus algorithm or abnormal consensus nodes are likely to exist is solved. If the first proportion is large, namely the transaction execution time length is large, the abnormal transaction execution process of the blockchain is indicated, whether the logic of a specific transaction on the blockchain is too complex or not can be confirmed, bottlenecks are likely to exist, and whether the original logic can be split into a plurality of transactions or part of logic can be distributed to other blockchains is evaluated. .
In an alternative embodiment after step 201, for any blockchain of the blockchain network, determining, according to the number of cross-chain transactions of which the number of blocktransactions is not less than the upper limit of the number of blocktransactions of the blockchain in the execution process of the plurality of cross-chain transactions, the block packing saturation degree of the blockchain. The block transaction number is equal to the upper limit of the block transaction number of the block chain, and the blocks of the block chain are packed
For example, a total of 10 cross-chain transactions are performed. The block transaction number of the block chain is not less than 8 cross-chain transactions of the upper limit of the block transaction number of the block chain, namely, the block chain has 8 times of block packing in the process of executing 10 cross-chain transactions. Specifically, if the blockchain is in the process of executing 10 cross-chain transactions, the blockchain transaction number always reaches the upper limit of the blockchain transaction number, which indicates that the blockchain bears excessive pressure in the process of executing, and the blockchain cannot process all received transactions in time, so that the packaging of the blocks is always in a saturated state; for another example, in the process of executing 10 cross-chain transactions, the blockchain is always lower than the upper limit of the block transaction number of the blockchain, which indicates that the blockchain is not under-pressurized and does not receive enough pressure, so that the block sizes of a plurality of chains in the cross-chain transactions can be coordinated, the load is balanced, and the overall performance of the cross-chain transactions can be improved.
As shown in fig. 6, the present application provides a processing performance analysis apparatus of a blockchain network, including: an execution module 601, configured to execute a plurality of cross-chain transactions on a blockchain network; wherein each of the plurality of cross-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same; a determining module 602, configured to determine processing performance of the blockchain network according to an initiation time and a uplink time of each transaction in the plurality of cross-chain transactions.
In an alternative embodiment, the processing performance of the blockchain network is an average processing duration of processing cross-chain transactions by the blockchain network; the determining module 602 is specifically configured to: for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction; and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
In an alternative embodiment, the processing performance of the blockchain network is transaction validation performance of each blockchain in the blockchain network; the determining module 602 is specifically configured to: determining a transaction confirmation duration of each transaction in the blockchain according to the starting time and the uplink time of each transaction started by the plurality of cross-chain transactions on the blockchain aiming at each blockchain of the blockchain network; determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain.
In an alternative embodiment, the determining module 602 is specifically configured to: determining the fluctuation degree of the transaction confirmation time length of the blockchain according to the transaction confirmation time length of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be higher, determining that performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is not greater than the preset time length, determining that the performance bottleneck of the transaction execution performance in the transaction confirmation performance of the blockchain does not exist.
In an alternative embodiment, the transaction confirmation duration of each transaction initiated on the blockchain includes a transaction execution duration of the transaction and a blockwise consensus duration of the transaction; the determining means is further for: if the fluctuation degree of the transaction confirmation time length of the block chain is determined to be low, and the average transaction confirmation time length of the block chain is longer than the preset time length, determining that a bottleneck exists in the transaction confirmation performance of the block chain, and determining a first proportion and a second proportion; the first proportion is the ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second proportion is the ratio of the total block consensus duration of the blockchain in the total transaction confirmation duration of the blockchain; if the first proportion is larger than the second proportion, determining that performance bottlenecks exist in the transaction execution performance in the transaction confirmation performance of the blockchain; or if the first proportion is not greater than the second proportion, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
In an alternative embodiment, the determining means is further for: determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, of which the block transaction number is equal to the upper limit of the block transaction number, of the block chain in the execution process of the cross-chain transactions aiming at any block chain of the block chain network; the block transaction number is equal to the upper limit of the block transaction number of the block chain, and the blocks of the block chain are packaged.
The embodiment of the application provides a computer device, which comprises a program or an instruction, and when the program or the instruction is executed, the program or the instruction is used for executing the processing performance analysis method and any optional method of the blockchain network.
The embodiments of the present application provide a storage medium including a program or an instruction, which when executed, is configured to perform a method for processing performance analysis of a blockchain network and any optional method provided in the embodiments of the present application.
Finally, it should be noted that: it will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A method for processing performance analysis of a blockchain network, comprising:
executing a plurality of cross-chain transactions at a blockchain network; wherein each of the plurality of cross-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same;
executing a plurality of cross-chain transactions at a blockchain network, comprising:
for any cross-chain transaction, starting the cross-chain transaction, and initiating a cross-chain starting transaction to any blockchain participating in the cross-chain transaction;
confirming that the starting transaction is successfully uplink, and recording the transaction ID of the cross-link transaction, the starting time of the starting transaction and the uplink time; the transaction ID is used for tracking transactions in the cross-chain transaction and recording the initiating time and the uplink time of the transactions;
confirming that the last transaction in the cross-link transaction is successful in uplink, and recording the starting time and the uplink time of the last transaction;
and determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the plurality of cross-chain transactions.
2. The method of claim 1, wherein the processing performance of the blockchain network is an average processing time duration for the blockchain network to process cross-chain transactions; the determining the processing performance of the blockchain network according to the initiation time and the uplink time of each transaction in the plurality of cross-chain transactions includes:
for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction;
and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
3. The method of claim 1, wherein the processing performance of the blockchain network is transaction validation performance for each blockchain in the blockchain network; the determining the processing performance of the blockchain network according to the initiation time and the uplink time of each transaction in the plurality of cross-chain transactions includes:
determining the transaction confirmation duration of each transaction in the blockchain according to the starting time and the uplink time of each transaction started by the plurality of cross-chain transactions on the blockchain aiming at each blockchain of the blockchain network;
determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain at least according to the transaction confirmation duration of each transaction initiated on the blockchain.
4. The method of claim 3, wherein the determining whether a performance bottleneck exists in the transaction validation performance of the blockchain based at least on a transaction validation duration of each transaction initiated on the blockchain comprises:
determining the fluctuation degree of the transaction confirmation time length of the blockchain according to the transaction confirmation time length of each transaction initiated on the blockchain;
if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be higher, determining that performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; or alternatively, the process may be performed,
if the fluctuation degree of the transaction confirmation time length of the blockchain is determined to be low, and the average transaction confirmation time length of the blockchain is not greater than the preset time length, determining that the performance bottleneck of the transaction execution performance in the transaction confirmation performance of the blockchain does not exist.
5. The method of claim 4, wherein the transaction confirmation duration for each transaction initiated on the blockchain includes a transaction execution duration for the transaction and a blockwise consensus duration for the transaction; further comprises:
if the fluctuation degree of the transaction confirmation time length of the block chain is determined to be low, and the average transaction confirmation time length of the block chain is longer than the preset time length, determining that a bottleneck exists in the transaction confirmation performance of the block chain, and determining a first proportion and a second proportion; the first proportion is the ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second proportion is the ratio of the total block consensus duration of the blockchain in the total transaction confirmation duration of the blockchain;
if the first proportion is larger than the second proportion, determining that performance bottlenecks exist in the transaction execution performance in the transaction confirmation performance of the blockchain; or alternatively, the process may be performed,
and if the first proportion is not greater than the second proportion, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
6. The method of any one of claims 1-5, further comprising:
determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, of which the block transaction number is equal to the upper limit of the block transaction number, of the block chain in the execution process of the cross-chain transactions aiming at any block chain of the block chain network; the block transaction number is equal to the upper limit of the block transaction number of the block chain, and the blocks of the block chain are packaged.
7. A performance analysis apparatus for a blockchain network, comprising:
an execution module for executing a plurality of cross-chain transactions at the blockchain network; wherein each of the plurality of cross-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the transaction identifiers of the corresponding transactions of each cross-chain transaction are the same;
the execution module is specifically configured to, for any cross-chain transaction, initiate the cross-chain transaction, and initiate a cross-chain initiation transaction to any blockchain participating in the cross-chain transaction; confirming that the starting transaction is successfully uplink, and recording the transaction ID of the cross-link transaction, the starting time of the starting transaction and the uplink time; the transaction ID is used for tracking transactions in the cross-chain transaction and recording the initiating time and the uplink time of the transactions; confirming that the last transaction in the cross-link transaction is successful in uplink, and recording the starting time and the uplink time of the last transaction;
and the determining module is used for determining the processing performance of the blockchain network according to the starting time and the uplink time of each transaction in the plurality of cross-chain transactions.
8. The apparatus of claim 7, wherein the processing performance of the blockchain network is an average processing time duration for the blockchain network to process cross-chain transactions; the determining module is specifically configured to:
for each of the plurality of cross-chain transactions, taking the interval duration between the uplink time of the last transaction of the cross-chain transaction and the initiation time of the first transaction as the processing duration of the cross-chain transaction;
and determining the average processing time length of the blockchain network according to the processing time length of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction quantity of the plurality of cross-chain transactions.
9. A computer device comprising a program or instructions which, when executed, performs the method of any of claims 1 to 6.
10. A storage medium comprising a program or instructions which, when executed, perform the method of any one of claims 1 to 6.
CN201911242997.0A 2019-12-06 2019-12-06 Processing performance analysis method and device for blockchain network Active CN111144883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911242997.0A CN111144883B (en) 2019-12-06 2019-12-06 Processing performance analysis method and device for blockchain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911242997.0A CN111144883B (en) 2019-12-06 2019-12-06 Processing performance analysis method and device for blockchain network

Publications (2)

Publication Number Publication Date
CN111144883A CN111144883A (en) 2020-05-12
CN111144883B true CN111144883B (en) 2023-05-16

Family

ID=70517743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911242997.0A Active CN111144883B (en) 2019-12-06 2019-12-06 Processing performance analysis method and device for blockchain network

Country Status (1)

Country Link
CN (1) CN111144883B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG10202006447VA (en) 2020-07-03 2021-04-29 Alipay Labs Singapore Pte Ltd Managing transactions in multiple blockchain networks
SG10202006451QA (en) 2020-07-03 2021-02-25 Alipay Labs Singapore Pte Ltd Managing transactions in multiple blockchain networks
SG10202006466YA (en) 2020-07-03 2021-05-28 Alipay Labs Singapore Pte Ltd Managing transactions in multiple blockchain networks
CN112150284B (en) * 2020-09-22 2024-04-12 浙江数秦科技有限公司 Blockchain heterogeneous chain cross-chain transaction method
CN111970129B (en) * 2020-10-21 2021-01-01 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and readable storage medium
CN112350852B (en) * 2020-10-21 2022-04-05 重庆邮电大学 Performance calculation method of block chain network based on Internet of vehicles architecture
CN112435123A (en) * 2020-11-25 2021-03-02 国网能源研究院有限公司 Transaction method, system and storage medium based on isomorphic multi-chain system
CN112882802A (en) * 2021-02-01 2021-06-01 杭州云象网络技术有限公司 Multi-chain message table transaction processing method for cross-chain and cross-chain system
CN115309581B (en) * 2022-10-11 2023-01-24 人民法院信息技术服务中心 Method and device for analyzing cross-chain transaction running state of heterogeneous block chain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018076760A1 (en) * 2016-10-27 2018-05-03 上海亿账通区块链科技有限公司 Block chain-based transaction processing method, system, electronic device, and storage medium
CN109753418A (en) * 2018-12-28 2019-05-14 金蝶软件(中国)有限公司 Performance test methods, device, computer equipment and storage medium
CN110033271A (en) * 2019-03-22 2019-07-19 湖南天河国云科技有限公司 Across the chain method of commerce of one kind, system and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018076760A1 (en) * 2016-10-27 2018-05-03 上海亿账通区块链科技有限公司 Block chain-based transaction processing method, system, electronic device, and storage medium
CN109753418A (en) * 2018-12-28 2019-05-14 金蝶软件(中国)有限公司 Performance test methods, device, computer equipment and storage medium
CN110033271A (en) * 2019-03-22 2019-07-19 湖南天河国云科技有限公司 Across the chain method of commerce of one kind, system and computer readable storage medium

Also Published As

Publication number Publication date
CN111144883A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111144883B (en) Processing performance analysis method and device for blockchain network
CN107395353B (en) block chain consensus method and device
WO2020258848A1 (en) Method and apparatus for cross-chain transmission of resources
CN110442652B (en) Cross-chain data processing method and device based on block chain
CN108062672B (en) Flow scheduling method based on block chain intelligent contract
CN108170590B (en) Test system and method of block chain system
CN110517141B (en) Consensus method and device based on block chain system
CN110866825A (en) Public link-based block chain information storage method and system
CN111612613A (en) Block chain network with centralized system
CN109271245A (en) A kind of control method and device of block processes task
CN111640017A (en) Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN110704438B (en) Method and device for generating bloom filter in blockchain
WO2021082340A1 (en) Data processing method, apparatus, system, and storage medium
CN111614468A (en) Block chain consensus method and system
CN110210845B (en) Method, apparatus, medium, and computing device for blockchain data migration
CN107153646B (en) Data processing method and equipment
CN113347164A (en) Block chain-based distributed consensus system, method, device and storage medium
US20230275771A1 (en) Pre-execution of block chain transaction in parallel during block consensus
CN110599166A (en) Method and device for acquiring transaction dependency relationship in block chain
WO2021027612A1 (en) Method and apparatus for executing transaction in blockchain
CN110599175A (en) Block processing method and related equipment
CN111640018B (en) Block chain transaction existence verification method and device
Garcia Bringas et al. BlockChain platforms in financial services: current perspective
WO2020042929A1 (en) Block chain system
CN112488683B (en) Under-chain transaction method and device of blockchain

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
GR01 Patent grant
GR01 Patent grant