CN111144883A - Processing performance analysis method and device for block chain network - Google Patents

Processing performance analysis method and device for block chain network Download PDF

Info

Publication number
CN111144883A
CN111144883A CN201911242997.0A CN201911242997A CN111144883A CN 111144883 A CN111144883 A CN 111144883A CN 201911242997 A CN201911242997 A CN 201911242997A CN 111144883 A CN111144883 A CN 111144883A
Authority
CN
China
Prior art keywords
transaction
chain
blockchain
cross
duration
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.)
Granted
Application number
CN201911242997.0A
Other languages
Chinese (zh)
Other versions
CN111144883B (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 of a block chain network, wherein the method comprises the following steps: performing a plurality of cross-chain transactions in a blockchain network; wherein each of the plurality of inter-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification; and 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. When the method is applied to financial technology (Fintech), the method for analyzing the processing performance of the blockchain network of the financial institution can be provided.

Description

Processing performance analysis method and device for block chain network
Technical Field
The invention relates to the field of financial technology (Fintech) and computer software, in particular to a processing performance analysis method and device of a block chain 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 changing to financial technology (Fintech), but due to the requirements of the financial industry on safety and real-time performance, higher requirements are also put forward on the technologies. Due to the characteristics of the blockchain, such as non-tamper-ability and consistency, blockchain (blockchain) technology is increasingly applied to the financial field. Therefore, the performance of the blockchain is critical to the quality of service of the financial institution.
In the prior art, a processing performance analysis mode for a block chain exists, however, the mode only analyzes a single block chain. However, at present, more and more transactions need to be completed cooperatively by a blockchain network composed of a plurality of blockchains, and a way of analyzing the processing performance of the blockchain network is not provided in the prior art, 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 block chain network, and solves the problem that no mode for analyzing the performance of the block chain network exists in the prior art.
In a first aspect, an embodiment of the present application provides a method for analyzing processing performance of a blockchain network, including: performing a plurality of cross-chain transactions in 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 multiple transactions corresponding to each cross-chain transaction have the same transaction identification; and 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.
In the method, a plurality of cross-chain transactions are executed in the blockchain network, and the cross-chain transactions are completed by executing a plurality of transactions on a plurality of blockchains of the blockchain network in sequence, so that the initiating 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 recorded initiating time and uplink time, thereby providing a way for analyzing the performance of the blockchain network.
In an optional embodiment, the processing performance of the blockchain network is an average processing time length of the blockchain network for processing the cross-chain transaction; the 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 comprises: regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions; and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number of the plurality of cross-chain transactions.
In the above method, when the processing performance of the blockchain network is the average processing duration of the blockchain network for processing the cross-chain transactions, the processing duration of the cross-chain transactions may be determined according to the initiation time and the uplink time of each transaction in each cross-chain transaction, so that a method for determining the average processing duration of the blockchain network is provided according to the processing durations of the multiple cross-chain transactions, the weight values of the multiple cross-chain transactions, and the number of transactions of the multiple cross-chain transactions.
In an alternative embodiment, the processing capability of the blockchain network is a transaction confirmation capability 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: for each block chain of the block chain network, determining the transaction confirmation duration of each transaction in the block chain according to the initiation time and the uplink time of each transaction initiated on the block chain by the multiple cross-chain transactions; and 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 may be determined according to the initiation time and the uplink time of each transaction initiated on each blockchain by the multiple cross-chain transactions; and a method of determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain may be provided based at least on the transaction confirmation duration of each transaction initiated on the blockchain.
In an optional 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 duration of the blockchain according to the transaction confirmation duration of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be higher, determining that a 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 duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is not greater than the preset duration, determining that the transaction execution performance in the transaction confirmation performance of the blockchain has no performance bottleneck.
In the above manner, since the fluctuation degree of the transaction confirmation duration of the blockchain represents the stability of transaction execution, if it is determined that the fluctuation degree of the transaction confirmation duration of the blockchain is high, it is determined that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain, or if it is determined that the fluctuation degree of the transaction confirmation duration of the blockchain is low and the average transaction confirmation duration of the blockchain as a whole is controlled within the preset duration range, it is determined that the performance bottleneck does not exist in the transaction execution performance in the transaction confirmation performance of the blockchain, thereby providing a method for determining whether a performance bottleneck exists in the transaction confirmation performance of the blockchain.
In an optional implementation manner, if it is determined that the fluctuation degree of the transaction confirmation duration of the blockchain is low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, it is determined that a bottleneck exists in the transaction confirmation performance of the blockchain, and a first proportion and a second proportion are determined; the first proportion is the ratio of the total transaction execution time length of the blockchain to the total transaction confirmation time length of the blockchain; the second proportion is the proportion of the total block consensus duration of the block chain in the total transaction confirmation duration of the block chain; if the first proportion is larger than the second proportion, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the block chain; or, if the first ratio is not greater than the second ratio, 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 duration of the blockchain is low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, it is only known that the transaction confirmation performance of the blockchain as a whole has a bottleneck, and it is also necessary to determine whether the performance bottleneck is in the block consensus performance or the transaction execution performance, so that the first ratio and the second ratio are determined, and when the first ratio is greater than the second ratio, it is determined that the transaction execution performance has the performance bottleneck; or when the first ratio is not greater than the second ratio, determining that a performance bottleneck exists in the block consensus performance, so as to provide a fine-grained determination method for the transaction execution performance bottleneck, wherein the fluctuation degree of the transaction confirmation duration of the block chain is low, and the average transaction confirmation duration of the block chain is greater than the preset duration.
In an optional implementation manner, for any blockchain of the blockchain network, determining a block packing saturation level of the blockchain according to the number of cross-chain transactions, in the execution process of the plurality of cross-chain transactions, of which the block transaction number of the blockchain is not less than the upper limit of the block transaction number of the blockchain; and when the block transaction quantity is equal to the upper limit of the block transaction quantity of the block chain, the blocks of the block chain are packaged.
In the above manner, since the blocks of the block chain are packed when the block transaction number is equal to the upper limit of the block transaction number, a method for determining the block packing saturation degree of the block chain can be provided according to the number of cross-chain transactions when the block transaction number of the block chain is equal to the upper limit of the block transaction number of the block chain.
In a second aspect, the present application provides an apparatus for analyzing processing performance of a blockchain network, including: an execution module to execute a plurality of cross-chain transactions in a blockchain network; wherein each of the plurality of inter-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification; and the determining module is used for determining the processing performance of the block chain network according to the initiating time and the uplink time of each transaction in the plurality of cross-chain transactions.
In an optional embodiment, the processing performance of the blockchain network is an average processing time length of the blockchain network for processing the cross-chain transaction; the determining module is specifically configured to: regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions; and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number of the plurality of cross-chain transactions.
In an alternative embodiment, the processing capability of the blockchain network is a transaction confirmation capability of each blockchain in the blockchain network; the determining module is specifically configured to: for each block chain of the block chain network, determining the transaction confirmation duration of each transaction in the block chain according to the initiation time and the uplink time of each transaction initiated on the block chain by the multiple cross-chain transactions; and 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 optional implementation manner, the determining module is specifically configured to: determining the fluctuation degree of the transaction confirmation duration of the blockchain according to the transaction confirmation duration of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be higher, determining that a 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 duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is not greater than the preset duration, determining that the transaction execution performance in the transaction confirmation performance of the blockchain has no performance bottleneck.
In an optional embodiment, the transaction confirmation duration of each transaction initiated on the blockchain includes a transaction execution duration of the transaction and a blockconsensus duration of the transaction; the determining means is further configured to: if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, 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 time length of the blockchain to the total transaction confirmation time length of the blockchain; the second proportion is the proportion of the total block consensus duration of the block chain in the total transaction confirmation duration of the block chain; if the first proportion is larger than the second proportion, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the block chain; or, if the first ratio is not greater than the second ratio, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
In an optional embodiment, the determining means is further configured to: for any block chain of the block chain network, determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, in the execution process of the plurality of cross-chain transactions, of which the block transaction number of the block chain is equal to the upper limit of the block transaction number of the block chain; and when the block transaction quantity is equal to the upper limit of the block transaction quantity of the block chain, the blocks of the block chain are packaged.
For the advantages of the second aspect and the embodiments of the second aspect, reference may be made to the advantages of the first aspect and the embodiments of the first aspect, which are not described herein again.
In a third aspect, an embodiment of the present application provides a computer device, which includes a program or instructions, and when the program or instructions are executed, the computer device is configured to perform the method of each embodiment of the first aspect and the first aspect.
In a fourth aspect, an embodiment of the present application provides a storage medium, which includes a program or instructions, and when the program or instructions are executed, the program or instructions are configured to perform the method of the first aspect and the embodiments of the first aspect.
Drawings
FIG. 1 is a schematic diagram of a blockchain;
fig. 2 is a schematic flowchart illustrating steps of a method for analyzing processing performance of a blockchain network according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of a homogeneous chain direct interaction mode of a blockchain network;
fig. 4 is a schematic structural diagram of a heterogeneous chain direct interaction mode of a blockchain network;
fig. 5 is a schematic structural diagram of an indirect interaction mode of heterogeneous chains of a blockchain network;
fig. 6 is a schematic structural diagram of a processing performance analysis apparatus of a blockchain network according to an embodiment of the present disclosure.
Detailed Description
In order to better understand the technical solutions, the technical solutions will be described in detail below with reference to the drawings and the specific embodiments of the specification, and it should be understood that the specific features in the embodiments and examples of the present application are detailed descriptions of the technical solutions of the present application, but not limitations of 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.
Block chains: as shown in fig. 1, a block chain is a chain consisting of a series of blocks, and each block records a Hash value of the block in addition to the data of the block, so that a chain is formed. The block chain has two core ideas, one is a cryptography technology, the other is a decentralization idea, and based on the two ideas, historical information on the block chain cannot be tampered.
And (3) node: each participant in the network is a node that participates in network set-up and data exchange. In a blockchain network, a node refers to a participant with a unique identity, and the node has a complete copy of the ledger and has the capability of participating in the consensus and ledger maintenance of the blockchain network.
Intelligent contract: an intelligent contract is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Smart contracts allow trusted transactions to be conducted without third parties, which transactions are traceable and irreversible. The specific form of the intelligent contract is a code which is deployed on a block chain and completes a specific function. For example, identity is a mainstream intelligent contract programming language, and an intelligent contract written in the identity language is called an identity contract. When an intelligent contract is deployed on a blockchain, a contract address is generated, and a user can call the intelligent contract through the contract address. The function defined in the intelligent contract is called a contract interface, and the calling of the intelligent contract is to call a certain contract interface in the contract through a contract address.
Trading: a transaction is a user request for an operation of an intelligent contract interface deployed on a blockchain. The transaction is initiated by the user, sent from the client of the user to the block chain node, and after receiving the transaction, the block chain node calls the corresponding intelligent contract according to the contract address and the interface specified by the transaction.
A consensus mechanism: the consensus mechanism is that transaction nodes on the peer-to-peer network use a common algorithm to confirm a batch of transactions. The algorithms used include workload certification, equity certification, multiple signature verification, election verification, etc.
During the operation of a financial institution (a banking institution, an insurance institution or a security institution) in a business (such as a loan business, a deposit business and the like of a bank), the processing performance of a block chain of the financial institution is often analyzed. Current approaches use one transaction to perform an analysis of processing performance for a single blockchain. However, in a cross-blockchain scenario, due to the confirmation and the whole processing flow of the cross-chain transaction, multiple blockchain systems need to participate together, and multiple related transactions on the multiple blockchain systems are involved, which is measured by the processing capacity of a single transaction, and it is difficult to reflect the real performance of the cross-chain scenario. The situation is not in line with the requirements of financial institutions such as banks and the like, and is not beneficial to the 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 for a blockchain network.
Step 201: multiple cross-chain transactions are performed in a 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; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification.
Step 202: and 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.
It should be noted that the method of step 201 to step 202 is suitable for a cross-chain scenario. For example, the cross-chain scenario is divided according to architecture and interaction mode, and the cross-chain scenario is divided into three scenarios, namely multi-chain isomorphic direct interaction, heterogeneous direct interaction and heterogeneous indirect interaction:
as shown in fig. 3, in the isomorphic chain direct interaction mode, the blockchain a and the blockchain B belong to different services, and have the same underlying architecture and two blockchains with different network architectures, storage and consensus mechanisms, the two blockchains are directly connected through a network agent, a Software Development Kit (SDK) or other Software, and cross-chain interaction occurs between the two blockchains. The service of the block chain refers to the use of the block chain, and the bottom layer architecture of the block chain refers to the specific product of the block chain, for example, the block chain is a bitcoin, and the block chain is an ether house.
As shown in fig. 4, in the heterogeneous chain direct interaction mode, the blockchain a and the blockchain B belong to different services, and have two blockchains with different underlying architectures, different network architectures, and storage and consensus mechanisms, where the two blockchains cannot directly communicate with each other, and perform transaction and conversion of blockdata through the protocol switching module to establish connection, and the protocol switching module is only used as a channel and is responsible for conversion of data formats, and has no independent chain or consensus mechanism
As shown in fig. 5, in the heterogeneous chain indirect interaction mode, the blockchain a and the blockchain B belong to different services, and have two blockchains with different underlying architectures, different network architectures, and storage and consensus mechanisms, where the two blockchains cannot directly communicate and are connected to the relay chain through the protocol transfer module, and the relay chain stores the cross-chain states of the blockchain a and the blockchain B, coordinates the cross-chain process, and has an independent chain and consensus mechanism
In step 201, for different cross-chain scenarios, cross-chain transactions may be executed through a unified flow, so as to perform a processing performance test on a blockchain network, where a core of the processing performance test is to correctly determine an initiation time and an end time of a single cross-chain transaction, each cross-chain transaction has a unique transaction Identifier (ID), and all transactions generated by the cross-chain transactions store the transaction ID, and the flow is as follows:
the first step is to start a cross-chain transaction and initiate a cross-chain starting transaction to any blockchain participating in the cross-chain transaction. The transaction is initiated, i.e., the first transaction of the cross-chain transaction.
And secondly, confirming successful uplink of the initiated transaction, and recording the transaction ID of the cross-chain transaction, the initiation time and uplink time of the transaction.
And thirdly, in the cross-chain transaction process, a plurality of transactions related to the cross-chain transaction are generated in succession by the participating block chain, protocol switching module or relay chain, the transactions are tracked and recorded by using the transaction ID, and the initiation time and uplink time of the transactions are recorded.
And fourthly, confirming that the last step of transaction in the cross-chain transaction is successful in uplink, and recording the initiation time and uplink time of the transaction.
After a process of the cross-chain transaction is completed, a blockchain, a sending time and an uplink time of all transactions of the whole cross-chain transaction can be obtained, and all transaction information processed by the cross-chain transaction can be recorded no matter which cross-chain scene is used.
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 unit of the time in table 1 may be set according to a specific scenario, such as the unit is milliseconds (ms), and step 202 is described in detail below in conjunction with the cross-link item transaction flow shown in table 1.
In an optional implementation manner 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 be specifically executed in the following manner:
regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions; and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number 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 serial number 6 and the initiation time 0100 of the first transaction with the serial number 1 is used as the processing duration of the cross-chain goods transaction. The processing duration of each cross-chain transaction may be calculated according to this alternative embodiment. The processing duration of each cross-chain transaction may be preset with a weight value, for example, the number of transactions executing 3 cross-chain transactions is 3. Then the average processing time for the blockchain network can be determined as follows: t ═ (w1 × t1+ w2 × t2+ w3 × t 3)/3. Specifically, w1 ═ w2 ═ w3 ═ 1.
In an optional implementation manner of step 202, when the processing performance of the blockchain network is the transaction confirmation performance of each blockchain in the blockchain network, step 202 may be specifically executed in the following manner:
(1) and aiming at each block chain of the block chain network, determining the transaction confirmation duration of each transaction in the block chain according to the initiation time and the uplink time of each transaction initiated on the block chain by the plurality of cross-chain transactions.
For the example shown in table 1, the difference between the uplink time 0200 of the transaction with sequence number 1 of the cross-chain item transaction with the transaction duration of sequence number 1 and the initiation time 0100 of the transaction with sequence number 1 is 0100, that is, the transaction confirmation duration of the transaction with sequence number 1 is 0100.
(2) And 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 in the following manner:
and determining the fluctuation degree of the transaction confirmation duration of the blockchain according to the transaction confirmation duration of each transaction initiated on the blockchain.
For example, the fluctuation degree 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 fluctuation degree of the transaction confirmation duration of the blockchain can be represented by the standard deviation, the normalized variance and the like of the transaction confirmation duration of each transaction of the blockchain, and is not limited herein.
If the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be higher, determining that a 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 duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is not greater than the preset duration, determining that the transaction execution performance in the transaction confirmation performance of the blockchain has no performance bottleneck.
It should be noted that the determination method that the transaction confirmation duration of the blockchain fluctuates to a higher or lower degree may be set according to specific situations. And determining the fluctuation degree of the transaction confirmation duration of the blockchain according to the variance of the transaction confirmation duration of the blockchain and a preset variance threshold. When the variance of the transaction confirmation duration is larger than a preset variance threshold, determining that the fluctuation degree of the transaction confirmation duration of the block chain is higher; and when the variance of the transaction confirmation duration is not greater than the preset variance threshold, determining that the fluctuation degree of the transaction confirmation duration of the block chain is lower. When the fluctuation degree of the transaction confirmation duration of the blockchain is large, whether the logic of a specific transaction on the blockchain is too complex or not can be confirmed, a bottleneck is likely to exist, and whether the original logic can be split into a plurality of transactions or whether part of the logic is distributed to other blockchains or not is evaluated.
Further, the transaction confirmation duration of each transaction initiated on the blockchain comprises the transaction execution duration of the transaction and the blockconsensus duration of the transaction; (2) may further perform the following steps:
and if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, determining that the transaction confirmation performance of the blockchain has a bottleneck, and determining a first proportion and a second proportion. If the first proportion is larger than the second proportion, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the block chain; or, if the first ratio is not greater than the second ratio, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
It should be noted that the first proportion is a ratio of the total transaction execution duration of the blockchain to the total transaction confirmation duration of the blockchain; the second proportion is the proportion of the total block consensus duration of the block chain in the total transaction confirmation duration of the block chain. The total transaction execution time length of the blockchain is the sum of the transaction execution time lengths 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 block chain is the sum of the block consensus durations of each transaction of the block chain.
If the fluctuation degree of the transaction confirmation duration of a certain block chain is small, and the average transaction confirmation duration of the block chain is maintained at a large value (if the fluctuation degree is larger than the preset duration), block chain log confirmation is required, and the first proportion and the second proportion are used, and if the second proportion is large, namely the block consensus duration is large, the block chain consensus process is abnormal, and the problems that consensus nodes are too many, consensus algorithms are too complex or the consensus nodes are abnormal are likely to exist. If the first ratio is larger, that is, the transaction execution duration is larger, indicating that there is an abnormality in the transaction execution process of the blockchain, it may be determined whether the logic of a specific transaction on the blockchain is too complex, and there is a possibility of a bottleneck, and it is evaluated whether the original logic can be split into multiple transactions or part of the logic can be allocated to other blockchains. .
In an optional implementation manner after step 201, for any block chain of the block chain network, determining a block packing saturation level of the block chain according to a cross-chain transaction number, in which a block transaction number of the block chain is not less than an upper limit of the block transaction number of the block chain, in an execution process of the multiple cross-chain transactions. When the block transaction quantity is equal to the upper limit of the block transaction quantity of the block chain, the blocks of the block chain are packaged
For example, a total of 10 cross-chain transactions are performed. And 8 cross-chain transactions of which the block transaction number of the block chain is not less than the block transaction number upper limit of the block chain are provided, namely the block chain has block packing for 8 times in the process of executing 10 cross-chain transactions. Particularly, if the block chain always reaches the upper limit of the block transaction number of the block chain in the process of executing 10 cross-chain transactions, it indicates that the block chain bears excessive pressure in the executing process, and the block chain cannot process all received transactions in time, so that the block packaging is always in a saturated state; for another example, during the execution of 10 inter-chain transactions, the blockchain is always lower than the upper limit of the number of blockchain transactions, which indicates that the pressure of the blockchain is insufficient and a sufficient amount of pressure is not received, so that the sizes of blocks of multiple chains in the inter-chain transactions can be coordinated to balance the load, and the overall performance of the inter-chain transactions can be improved.
As shown in fig. 6, the present application provides a processing performance analysis apparatus for a blockchain network, including: an execution module 601, configured to execute a plurality of cross-chain transactions in a blockchain network; wherein each of the plurality of inter-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification; a determining module 602, configured to determine a processing performance of the blockchain network according to an initiation time and an uplink time of each transaction in the multiple cross-chain transactions.
In an optional embodiment, the processing performance of the blockchain network is an average processing time length of the blockchain network for processing the cross-chain transaction; the determining module 602 is specifically configured to: regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions; and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number of the plurality of cross-chain transactions.
In an alternative embodiment, the processing capability of the blockchain network is a transaction confirmation capability of each blockchain in the blockchain network; the determining module 602 is specifically configured to: for each block chain of the block chain network, determining the transaction confirmation duration of each transaction in the block chain according to the initiation time and the uplink time of each transaction initiated on the block chain by the multiple cross-chain transactions; and 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 optional implementation manner, the determining module 602 is specifically configured to: determining the fluctuation degree of the transaction confirmation duration of the blockchain according to the transaction confirmation duration of each transaction initiated on the blockchain; if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be higher, determining that a 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 duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is not greater than the preset duration, determining that the transaction execution performance in the transaction confirmation performance of the blockchain has no performance bottleneck.
In an optional embodiment, the transaction confirmation duration of each transaction initiated on the blockchain includes a transaction execution duration of the transaction and a blockconsensus duration of the transaction; the determining means is further configured to: if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, 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 time length of the blockchain to the total transaction confirmation time length of the blockchain; the second proportion is the proportion of the total block consensus duration of the block chain in the total transaction confirmation duration of the block chain; if the first proportion is larger than the second proportion, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the block chain; or, if the first ratio is not greater than the second ratio, determining that a performance bottleneck exists in the block consensus performance in the transaction confirmation performance of the block chain.
In an optional embodiment, the determining means is further configured to: for any block chain of the block chain network, determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, in the execution process of the plurality of cross-chain transactions, of which the block transaction number of the block chain is equal to the upper limit of the block transaction number of the block chain; and when the block transaction quantity is equal to the upper limit of the block transaction quantity of the block chain, the blocks of the block chain are packaged.
The embodiment of the present application provides a computer device, which includes a program or an instruction, and when the program or the instruction is executed, the program or the instruction is used to execute the processing performance analysis method and any optional method of the blockchain network provided by the embodiment of the present application.
The embodiment of the present application provides a storage medium, which includes a program or an instruction, and when the program or the instruction is executed, the program or the instruction is used to execute the processing performance analysis method and any optional method of the blockchain network provided by the embodiment of the present application.
Finally, it should be noted that: as will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 changes and modifications may 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 of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for analyzing processing performance of a blockchain network, comprising:
performing a plurality of cross-chain transactions in a blockchain network; wherein each of the plurality of inter-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification;
and 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.
2. The method of claim 1, wherein the processing performance of the blockchain network is an average processing duration of the blockchain network processing a cross-chain transaction; 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:
regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions;
and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number of the plurality of cross-chain transactions.
3. The method of claim 1, wherein the processing performance of the blockchain network is a transaction confirmation 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:
for each block chain of the block chain network, determining the transaction confirmation duration of each transaction in the block chain according to the initiation time and the uplink time of each transaction initiated on the block chain by the multiple cross-chain transactions;
and 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 determining whether a performance bottleneck exists in a transaction confirmation performance of the blockchain based at least on a transaction confirmation duration for each transaction initiated on the blockchain comprises:
determining the fluctuation degree of the transaction confirmation duration of the blockchain according to the transaction confirmation duration of each transaction initiated on the blockchain;
if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be higher, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the blockchain; alternatively, the first and second electrodes may be,
and if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is not greater than the preset duration, determining that the transaction execution performance in the transaction confirmation performance of the blockchain has no performance bottleneck.
5. The method of claim 4, wherein the transaction confirmation duration for each transaction initiated on the blockchain comprises a transaction execution duration for the transaction and a blockconsensus duration for the transaction; further comprising:
if the fluctuation degree of the transaction confirmation duration of the blockchain is determined to be low, and the average transaction confirmation duration of the blockchain is greater than the preset duration, 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 time length of the blockchain to the total transaction confirmation time length of the blockchain; the second proportion is the proportion of the total block consensus duration of the block chain in the total transaction confirmation duration of the block chain;
if the first proportion is larger than the second proportion, determining that a performance bottleneck exists in the transaction execution performance in the transaction confirmation performance of the block chain; alternatively, the first and second electrodes may be,
and if the first proportion is not larger 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 of claims 1-5, further comprising:
for any block chain of the block chain network, determining the block packing saturation degree of the block chain according to the number of cross-chain transactions, in the execution process of the plurality of cross-chain transactions, of which the block transaction number of the block chain is equal to the upper limit of the block transaction number of the block chain; and when the block transaction quantity is equal to the upper limit of the block transaction quantity of the block chain, the blocks of the block chain are packaged.
7. An apparatus for analyzing performance of a blockchain network, comprising:
an execution module to execute a plurality of cross-chain transactions in a blockchain network; wherein each of the plurality of inter-chain transactions is a transaction completed by sequentially executing a plurality of transactions on a plurality of blockchains of the blockchain network; the multiple transactions corresponding to each cross-chain transaction have the same transaction identification;
and the determining module is used for determining the processing performance of the block chain network according to the initiating 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 duration for the blockchain network to process cross-chain transactions; the determining module is specifically configured to:
regarding each cross-chain transaction in the plurality of cross-chain transactions, taking an interval duration between an uplink time of a last transaction and an initiation time of a first transaction of the cross-chain transactions as a processing duration of the cross-chain transactions;
and determining the average processing duration of the block chain network according to the processing durations of the plurality of cross-chain transactions, the weight values of the plurality of cross-chain transactions and the transaction number of the plurality of cross-chain transactions.
9. A computer device comprising a program or instructions that, when executed, perform 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 true CN111144883A (en) 2020-05-12
CN111144883B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970129A (en) * 2020-10-21 2020-11-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and readable storage medium
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112350852A (en) * 2020-10-21 2021-02-09 重庆邮电大学 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
US11354657B2 (en) 2020-07-03 2022-06-07 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
US11372848B2 (en) 2020-07-03 2022-06-28 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
US11403632B2 (en) 2020-07-03 2022-08-02 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
CN115309581A (en) * 2022-10-11 2022-11-08 人民法院信息技术服务中心 Heterogeneous block chain cross-chain transaction running state analysis method and device

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

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11354657B2 (en) 2020-07-03 2022-06-07 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
US11372848B2 (en) 2020-07-03 2022-06-28 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
US11403632B2 (en) 2020-07-03 2022-08-02 Alipay Labs (singapore) Pte. Ltd. Managing transactions in multiple blockchain networks
CN112150284A (en) * 2020-09-22 2020-12-29 浙江数秦科技有限公司 Block chain heterogeneous chain cross-chain transaction method
CN112150284B (en) * 2020-09-22 2024-04-12 浙江数秦科技有限公司 Blockchain heterogeneous chain cross-chain transaction method
CN111970129A (en) * 2020-10-21 2020-11-20 腾讯科技(深圳)有限公司 Data processing method and device based on block chain and readable storage medium
CN112350852A (en) * 2020-10-21 2021-02-09 重庆邮电大学 Performance calculation method of block chain network based on Internet of vehicles architecture
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
CN115309581A (en) * 2022-10-11 2022-11-08 人民法院信息技术服务中心 Heterogeneous block chain cross-chain transaction running state analysis method and device

Also Published As

Publication number Publication date
CN111144883B (en) 2023-05-16

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
CN109639521B (en) Block chain performance testing method, device, equipment and storage medium
CN105988862B (en) Distributed transaction processing method and device
CN109522362A (en) Incomplete markets synchronous method, system and equipment based on block chain data
CN110866825A (en) Public link-based block chain information storage method and system
CN107301536A (en) Resource transfers method and device
CN107819861A (en) Business data processing method, apparatus and system
CN110599177A (en) Transaction verification method and related equipment
CN111612614A (en) Public link-based sub-chain service system
CN110704438B (en) Method and device for generating bloom filter in blockchain
CN111640017A (en) Transaction correctness verification method and device applied to alliance chain cross-chain transfer
CN110210845B (en) Method, apparatus, medium, and computing device for blockchain data migration
WO2020238250A1 (en) Capital chain information tracing method and system, and server and readable storage medium
WO2022262510A1 (en) Method and apparatus for synchronizing cross-blockchain transactions
CN109447802B (en) Fund management system based on block chain technology
CN111640018B (en) Block chain transaction existence verification method and device
CN110490742B (en) Transaction execution method and device in blockchain
WO2019033741A1 (en) Investment commodity resource processing method, device, storage medium and computer apparatus
CN107153646A (en) A kind of data processing method and equipment
CN110599175A (en) Block processing method and related equipment
CN111127120B (en) Service data processing system, relevant nodes and method based on block chain technology
CN112446786A (en) Abnormal transaction processing method and device, electronic equipment and readable storage medium
CN112488683B (en) Under-chain transaction method and device of blockchain
CN111667255B (en) Digital asset transfer system and method based on alliance chain

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